Skip to content

Commit

Permalink
Update test for rhelemeter
Browse files Browse the repository at this point in the history
  • Loading branch information
philipgough committed Sep 29, 2023
1 parent 1e51551 commit 4c08e8f
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion services/rhelemeter-template.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ local rhelemeter = (import 'rhelemeter.libsonnet') {
],
parameters: [
{ name: 'NAMESPACE', value: 'rhelemeter' },
{ name: 'IMAGE_TAG', value: '1568906' },
{ name: 'IMAGE_TAG', value: '5923762' },
{ name: 'IMAGE', value: 'quay.io/app-sre/telemeter' },
{ name: 'REPLICAS', value: '2' },
{ name: 'RHELEMETER_TENANT_ID', value: 'rhel' },
Expand Down
2 changes: 1 addition & 1 deletion services/rhelemeter.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace: 'rhelemeter',

rhelemeterServer+:: {
image: 'quay.io/app-sre/telemeter:82f71d3',
image: 'quay.io/app-sre/telemeter:5923762',
replicas: 3,
logLevel: 'warn',
oidcIssuer: error 'must provide telemeterForwardURL',
Expand Down
3 changes: 1 addition & 2 deletions tests/ci/ci_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,7 @@ telemeter() {

rhelemeter() {
oc wait --for=jsonpath='{.status.phase}=Active' namespace/rhelemeter --timeout=5s
oc process -f --param-file=env/rhelemeter.test.ci.env -p RHELEMETER_EXTERNAL_MTLS_CA="$(cat ../deploy/manifests/rhelemeter_certs/ca.crt)" \
RHELEMETER_EXTERNAL_MTLS_CRT="$(cat ../deploy/manifests/rhelemeter_certs/tls.crt)" RHELEMETER_EXTERNAL_MTLS_KEY="$(cat ../deploy/manifests/rhelemeter_certs/tls.key)" \
oc process -f --param-file=env/rhelemeter.test.ci.env -p RHELEMETER_CLIENT_INFO_PSK=ZXhhbXBsZS1hcHAtc2VjcmV0 \
-f ../../resources/services/rhelemeter-template.yaml | oc apply --namespace rhelemeter -f -
}

Expand Down
1 change: 1 addition & 0 deletions tests/ci/env/rhelemeter.test.ci.env
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ RHELEMETER_OIDC_ISSUER=http://dex.dex.svc.cluster.local:5556/dex
RHELEMETER_CLIENT_ID=test
RHELEMETER_TENANT_ID=test
RHELEMETER_CLIENT_SECRET=ZXhhbXBsZS1hcHAtc2VjcmV0
RHELEMETER_CLIENT_INFO_PSK=ZXhhbXBsZS1hcHAtc2VjcmV0
1 change: 1 addition & 0 deletions tests/deploy/env/rhelemeter.test.env
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ RHELEMETER_OIDC_ISSUER=http://dex.dex.svc.cluster.local:5556/dex
RHELEMETER_CLIENT_ID=test
RHELEMETER_TENANT_ID=test
RHELEMETER_CLIENT_SECRET=ZXhhbXBsZS1hcHAtc2VjcmV0
RHELEMETER_CLIENT_INFO_PSK=ZXhhbXBsZS1hcHAtc2VjcmV0
3 changes: 1 addition & 2 deletions tests/deploy/launch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,7 @@ telemeter() {

rhelemeter() {
oc create ns rhelemeter || true
oc process --param-file=env/rhelemeter.test.env -p RHELEMETER_EXTERNAL_MTLS_CA="$(cat manifests/rhelemeter_certs/ca.crt)" \
RHELEMETER_EXTERNAL_MTLS_CRT="$(cat manifests/rhelemeter_certs/tls.crt)" RHELEMETER_EXTERNAL_MTLS_KEY="$(cat manifests/rhelemeter_certs/tls.key)" \
oc process --param-file=env/rhelemeter.test.env -p RHELEMETER_CLIENT_INFO_PSK=super-secret \
-f ../../resources/services/rhelemeter-template.yaml | oc apply --namespace rhelemeter -f -
}

Expand Down
8 changes: 8 additions & 0 deletions tests/deploy/testdata/client-info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"secret": "super-secret",
"config": {
"secret_header": "x-secret",
"common_name_header": "x-common-name",
"issuer_header": "x-issuer"
}
}

0 comments on commit 4c08e8f

Please sign in to comment.