-
Notifications
You must be signed in to change notification settings - Fork 4
/
prepareSystemTests.sh
executable file
·78 lines (67 loc) · 2.55 KB
/
prepareSystemTests.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#!/bin/bash
set -x -o xtrace
helm uninstall cx
./mvnw clean spotless:apply install package -Pwith-docker-image
minikube image load cx-ssi-agent-app:latest
minikube image load lab-cx-ssi-connector-app:latest
minikube image load edc-dataplane-hashicorp-vault:latest
infraChartsDir=./charts/lab-infrastructure
helm dependency update "${infraChartsDir}"
helm upgrade --install cx "${infraChartsDir}" \
--set bob.ssi.agent.embedded.enforceHttpsToResolveDidWeb=false \
--set bob.controlplane.image.tag=latest \
--set bob.controlplane.image.repository=docker.io/library/lab-cx-ssi-connector-app \
--set bob.controlplane.image.pullPolicy=Never \
--set bob.dataplane.image.tag=latest \
--set alice.ssi.agent.embedded.enforceHttpsToResolveDidWeb=false \
--set alice.controlplane.image.tag=latest \
--set alice.controlplane.image.repository=docker.io/library/lab-cx-ssi-connector-app \
--set alice.controlplane.image.pullPolicy=Never \
--set alice.dataplane.image.tag=latest \
--set operator.image.tag=latest \
--set operator.image.repository=docker.io/library/cx-ssi-agent-app \
--set operator.image.pullPolicy=Never
hostName=$(minikube ip)
aliceDataMgmtPort=$(kubectl get service alice-controlplane -o jsonpath='{.spec.ports[?(@.name=="data")].nodePort}')
aliceSsiPort=$(kubectl get service alice-controlplane -o jsonpath='{.spec.ports[?(@.name=="ssi")].nodePort}')
bobDataMgmtPort=$(kubectl get service bob-controlplane -o jsonpath='{.spec.ports[?(@.name=="data")].nodePort}')
bobSsiPort=$(kubectl get service bob-controlplane -o jsonpath='{.spec.ports[?(@.name=="ssi")].nodePort}')
operatorPort=$(kubectl get service operator -o jsonpath='{.spec.ports[?(@.name=="http")].nodePort}')
rm ./lab-cx-ssi-system-test/src/test/resources/bob.yaml
cat <<EOT >>./lab-cx-ssi-system-test/src/test/resources/bob.yaml
bpn: "BPNBOB"
hostName:
external: "${hostName}"
internal: "bob-controlplane"
ssiApi:
port: ${bobSsiPort}
didDocumentApi:
port: 8086
dataMgmtApi:
port: ${bobDataMgmtPort}
authKey: "password"
idsApi:
port: 8084
EOT
rm ./lab-cx-ssi-system-test/src/test/resources/alice.yaml
cat <<EOT >>./lab-cx-ssi-system-test/src/test/resources/alice.yaml
bpn: "BPNALICE"
hostName:
external: "${hostName}"
internal: "alice-controlplane"
ssiApi:
port: ${aliceSsiPort}
didDocumentApi:
port: 8086
dataMgmtApi:
port: ${aliceDataMgmtPort}
authKey: "password"
idsApi:
port: 8084
EOT
rm ./lab-cx-ssi-system-test/src/test/resources/operator.yaml
cat <<EOT >>./lab-cx-ssi-system-test/src/test/resources/operator.yaml
hostName: "${hostName}"
agentApi:
port: ${operatorPort}
EOT