Skip to content
This repository was archived by the owner on Jun 26, 2024. It is now read-only.

Commit 28ee045

Browse files
committed
[acceptance-tests] Use patch instead of apply for IDP setup
Signed-off-by: Pavel Macík <[email protected]>
1 parent 2c4d36b commit 28ee045

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

test/acceptance/openshift-setup.sh

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,7 @@ USER_TOKEN=acceptance-tests-dev
1010
oc get secret $HTPASSWD_SECRET -n openshift-config >/dev/null 2>&1 \
1111
|| oc create secret generic $HTPASSWD_SECRET --from-file=htpasswd=$HTPASSWD_FILE -n openshift-config
1212

13-
oc apply -f - <<EOF
14-
apiVersion: config.openshift.io/v1
15-
kind: OAuth
16-
metadata:
17-
name: cluster
18-
spec:
19-
identityProviders:
20-
- name: acceptance-tests
21-
challenge: true
22-
login: true
23-
mappingMethod: claim
24-
type: HTPasswd
25-
htpasswd:
26-
fileData:
27-
name: $HTPASSWD_SECRET
28-
EOF
13+
oc patch oauth cluster --type merge -p '{"spec":{"identityProviders":[{"htpasswd":{"fileData":{"name":"'$HTPASSWD_SECRET'"}},"mappingMethod":"claim","name":"acceptance-tests","challenge":"true","login":true,"type":"HTPasswd"}]}}'
2914

3015
CURRENT_CTX=$(oc config current-context)
3116

0 commit comments

Comments
 (0)