diff --git a/.github/workflows/load-test.yaml b/.github/workflows/load-test.yaml index 183e67e..5bc549e 100644 --- a/.github/workflows/load-test.yaml +++ b/.github/workflows/load-test.yaml @@ -24,11 +24,6 @@ jobs: - name: Wait for kyverno ready uses: ./.github/actions/kyverno-wait-ready - name: Run local k6 test - shell: bash - run: | - cd k6 - ./start.sh tests/kyverno-pss.js 10 1000 - cat kyverno-pss.js-10vu-1000it-logs.txt - # uses: grafana/k6-action@v0.3.0 - # with: - # filename: k6/tests/kyverno-pss.js 10 100 \ No newline at end of file + uses: grafana/k6-action@v0.3.0 + with: + filename: k6/tests/test.js \ No newline at end of file diff --git a/k6/tests/test.js b/k6/tests/test.js new file mode 100644 index 0000000..9e949c5 --- /dev/null +++ b/k6/tests/test.js @@ -0,0 +1,16 @@ +import http from 'k6/http'; +import { sleep } from 'k6'; + +export const options = { + duration: '1m', + vus: 2, + thresholds: { + http_req_failed: ['rate<0.01'], // http errors should be less than 1% + http_req_duration: ['p(95)<10'], // 95 percent of response times must be below 500ms + }, +}; + +export default function () { + const res = http.get('https://test.k6.io'); + sleep(1); +} \ No newline at end of file