Skip to content

Commit

Permalink
Fix k6 API use
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoColomb authored Nov 23, 2024
1 parent 9b487f9 commit bb0997d
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/abstract-test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { check, fail, group } from 'k6'
import * as http from 'k6/http'
import http from 'k6/http'

export const options = {
thresholds: {
Expand Down
2 changes: 1 addition & 1 deletion lib/benchmark.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { check } from 'k6'
import * as http from 'k6/http'
import http from 'k6/http'

export const options = {
stages: [
Expand Down
2 changes: 1 addition & 1 deletion lib/caching.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { options, prepare, test } from './abstract-test.js'
import * as http from 'k6/http'
import http from 'k6/http'

export { options }

Expand Down
2 changes: 1 addition & 1 deletion lib/concatenation.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ export function setup () {
export default function (data) {
assert(data, 'http://server.localhost/', (test) => ({
'is expected status': (r) => isEqual(r, 'Status', r.status, 200),
'is expected body': (r) => isEqual(r, 'body', r.body.trim(), test.responseBody.trim())
'is expected body': (r) => isEqual(r, 'body', r.body?.trim(), test.responseBody?.trim())
}))
}
2 changes: 1 addition & 1 deletion lib/ssl.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as http from 'k6/http'
import http from 'k6/http'
import { options as defaultOptions, prepare, assert } from './abstract-test.js'

export const options = Object.assign(defaultOptions, {
Expand Down

0 comments on commit bb0997d

Please sign in to comment.