Skip to content

Commit 85e5d15

Browse files
committed
chore: remove nginx configs (using Traefik in production)
1 parent 0b23c75 commit 85e5d15

7 files changed

Lines changed: 32 additions & 6 deletions

File tree

File renamed without changes.
File renamed without changes.

load_tests/config.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ export const config = {
77

88
// Test credentials
99
testUser: {
10-
email: __ENV.TEST_EMAIL || 'test@prostaff.gg',
11-
password: __ENV.TEST_PASSWORD || 'Test123!@#'
10+
email: 'test@prostaff.gg',
11+
password: 'TestPassword123'
1212
},
1313

1414
// Load test profiles
@@ -120,12 +120,14 @@ export const config = {
120120

121121
// Helper function to get auth token
122122
export function getAuthToken(http) {
123+
const payload = JSON.stringify({
124+
email: config.testUser.email,
125+
password: config.testUser.password
126+
});
127+
123128
const loginRes = http.post(
124129
`${config.baseUrl}${config.endpoints.auth.login}`,
125-
JSON.stringify({
126-
email: config.testUser.email,
127-
password: config.testUser.password
128-
}),
130+
payload,
129131
{
130132
headers: { 'Content-Type': 'application/json' },
131133
}

load_tests/test-auth.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import http from 'k6/http';
2+
3+
export default function() {
4+
const payload = JSON.stringify({
5+
email: 'test@prostaff.gg',
6+
password: 'TestPassword123'
7+
});
8+
9+
const params = {
10+
headers: {
11+
'Content-Type': 'application/json',
12+
},
13+
};
14+
15+
const res = http.post('http://localhost:3333/api/v1/auth/login', payload, params);
16+
17+
console.log('Status:', res.status);
18+
console.log('Body:', res.body);
19+
20+
if (res.status === 200) {
21+
const body = JSON.parse(res.body);
22+
console.log('Token:', body.data?.access_token || body.access_token || body.token);
23+
}
24+
}

0 commit comments

Comments
 (0)