File tree Expand file tree Collapse file tree 1 file changed +44
-0
lines changed
Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change 1+ kind : TestWorkflow
2+ apiVersion : testworkflows.testkube.io/v1
3+ metadata :
4+ name : k6-test-nginx
5+ namespace : testkube
6+ spec :
7+ events :
8+ - cronjob :
9+ cron : 0 * * * *
10+ content :
11+ files :
12+ - path : k6.js
13+ content : >-
14+ import {check, sleep, group} from "k6";
15+ import http from "k6/http";
16+
17+ export let options = {
18+ vus: 10,
19+ duration: '30s',
20+ batchPerHost: 4,
21+ insecureSkipTLSVerify: true,
22+ thresholds: {
23+ 'http_req_duration{kind:html}': ['avg<=250', 'p(95)<500'],
24+ }
25+ };
26+
27+ export default function () {
28+ group("static", function () {
29+ check(http.get(`http://${__ENV.TARGET_HOSTNAME}:80`, {
30+ tags: {'kind': 'html'},
31+ }), {
32+ "status is 200": (res) => res.status === 200,
33+ });
34+ });
35+ sleep(1);
36+ }
37+ use :
38+ - name : official/k6/v1
39+ config : {}
40+ container :
41+ workingDir : /data
42+ env :
43+ - name : TARGET_HOSTNAME
44+ value : nginx-service.default.svc.cluster.local
You can’t perform that action at this time.
0 commit comments