Skip to content

Commit

Permalink
chore: update the load tests (#362)
Browse files Browse the repository at this point in the history
* chore: reduce dev and test backup frequency to save space

* chore: update load tests, add checks

* feat: extend functionality of load tests to run from pod

* chore: remove redundant readmes

* chore: make make comands

* chore: add config to change hashing algorythm

* chore: add readme change
  • Loading branch information
thegentlemanphysicist authored Jul 8, 2024
1 parent b470b52 commit f8963a4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
8 changes: 6 additions & 2 deletions k6/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,20 @@ This will create the image and host it. Each time you change the test code of co

Next create the k6-config file in the namespace from which you want to run the tests:
```
oc create -n <NAMESPACE> configmap k6-config --from-file=./src/config/config.json
make config NAMESPACE="<NAMESPACE>"
```

Lastly deploy the config from the `sso-keycloak/k6/k6-runner/openshift/k6` directory.
```
oc -n <NAMESPACE> process -f dc.yaml | oc -n <NAMESPACE> apply -f -
make run_job NAMESPACE="<NAMESPACE>"
```

Be sure to delete the job when done to prevent the load test from re-running in the cluster.

```
make delete NAMESPACE="<NAMESPACE>"
```

#### Running the test locally without docker.

The tests can also be run without docker, by running:
Expand Down
5 changes: 5 additions & 0 deletions k6/k6-runner/src/tests/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,12 @@ function generateRealms(count) {
newRealm.id = `newrealm-${i}`;
newRealm.realm = `newrealm-${i}`;
newRealm.displayName = `New Realm ${i}`;
// When testing different hashing algorythms we deploy new realms with this type of config:
// newRealm.passwordPolicy = "hashAlgorithm(pbkdf2-sha256) and hashIterations(27500)";
// The default hash iterations are 210000 and pbkdf2-sha512
// newRealm.passwordPolicy = "hashIterations(210000) and hashAlgorithm(pbkdf2-sha512)";
realms.push(newRealm);

}
return realms;
}
Expand Down

0 comments on commit f8963a4

Please sign in to comment.