Skip to content

Remove hard-coded KAS address in QA tests

Tiger Watson requested to merge 393537-use-dynamic-kas-address-in-agent-qa into master

What does this MR do and why?

Fetches the KAS address from the instance we are testing against, instead of hard-coding it to staging. This will allow running QA tests for the agent in environments other than staging.

QA test output

The output is mostly the same, except the value Helm uses for --set config.kasAddress= is dynamically fetched instead of always being set to staging. In this case we can see it uses the local KAS address, grpc://127.0.0.1:8150.

< snip >
[Mar 08 2023 16:48:15 AEDT (QA Tests)] INFO  -- ==> Built a QA::Resource::Clusters::Agent with name 'my-agent' via api in 19.0 seconds
[Mar 08 2023 16:48:15 AEDT (QA Tests)] INFO  -- ==> Built a QA::Resource::Clusters::AgentToken with id '36' via api in 19.06 seconds
[Mar 08 2023 16:48:15 AEDT (QA Tests)] INFO  -- Executing: `helm repo add gitlab https://charts.gitlab.io && helm repo update && helm upgrade --install test gitlab/gitlab-agent   --namespace gitlab-agent   --create-namespace   --set image.tag=fe716ea   --set config.token=<TOKEN>   --set config.kasAddress=grpc://127.0.0.1:8150   --set config.kasHeaders="{Cookie: gitlab_canary=true}" `
............
[Mar 08 2023 16:48:19 AEDT (QA Tests)] INFO  -- ==> Built a QA::Resource::Repository::Commit via api in 0.62 seconds
< snip >

How to set up and validate locally

See !113638 (merged).

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #393537 (closed)

Edited by Tiger Watson

Merge request reports