Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
federicotdn committed Jan 22, 2025
1 parent 3465732 commit 4abf32d
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions k6/internal/01.quickpizza.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,17 @@ function testCreateUserLogin() {
function testTokenValidation() {
describe("Validate a token", () => {
var res = http.post(`${BASE_URL}/api/users/token/authenticate`, {
headers: {}
headers: {
"X-Is-Internal": "1",
}
});

expect(res.status, "response status").to.equal(401);

res = http.post(`${BASE_URL}/api/users/token/authenticate`, {
headers: {
"Authorization": "token tooshort"
"Authorization": "token tooshort",
"X-Is-Internal": "1",
}
});

Expand All @@ -108,7 +111,8 @@ function testTokenValidation() {
// yield the default user (id=1). See comment in routes/+page.svelte.
res = http.post(`${BASE_URL}/api/users/token/authenticate`, null, {
headers: {
"Authorization": "token aaaaaaaaaaaaaaaa"
"Authorization": "token aaaaaaaaaaaaaaaa",
"X-Is-Internal": "1",
}
});

Expand Down

0 comments on commit 4abf32d

Please sign in to comment.