Skip to content

Commit

Permalink
add small k6 load test (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
simongottschlag authored Oct 31, 2022
1 parent fbd55a5 commit 96cdefe
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,7 @@ docker-run: docker-build
--reconcile-interval "10s" \
--git-url $${GIT_URL_AND_CREDS} \
--git-branch "main" \
--git-yaml-path "yaml/"
--git-yaml-path "yaml/"

k6-http-get:
k6 run -e LOAD_TEST_URI=$${LOAD_TEST_URI} test/k6/http_get.js
14 changes: 14 additions & 0 deletions test/k6/http_get.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { check } from "k6";
import http from "k6/http";

export const options = {
vus: 10,
duration: "2m",
};

export default function () {
const res = http.get(__ENV.LOAD_TEST_URI);
check(res, {
"is status 200": (r) => r.status === 200,
});
}

0 comments on commit 96cdefe

Please sign in to comment.