Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
Signed-off-by: tjons <[email protected]>
  • Loading branch information
tjons committed Nov 24, 2023
1 parent 6e4def9 commit 1292c71
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
2 changes: 1 addition & 1 deletion build/install-istio-with-kind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ set -x
GOARCH=$(go env GOARCH)
GOOS=$(go env GOOS)
KIND_VERSION=0.11.1
ISTIO_VERSION=1.8.6
ISTIO_VERSION=1.9.9

# Download and install kind
curl -L https://github.com/kubernetes-sigs/kind/releases/download/v${KIND_VERSION}/kind-${GOOS}-${GOARCH} --output kind && chmod +x kind && sudo mv kind /usr/local/bin/
Expand Down
18 changes: 18 additions & 0 deletions test/bats/istio-cm-patch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
data:
mesh: |-
extensionProviders:
- name: opa-ext-authz-grpc
envoyExtAuthzGrpc:
service: opa-ext-authz-grpc.local
port: "9191"
accessLogFile: /dev/stdout
defaultConfig:
discoveryAddress: istiod.istio-system.svc:15012
proxyMetadata: {}
tracing:
zipkin:
address: zipkin.istio-system:9411
enablePrometheusMerge: true
rootNamespace: istio-system
trustDomain: cluster.local
meshNetworks: 'networks: {}'
5 changes: 5 additions & 0 deletions test/bats/test.bats
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ SLEEP_TIME=1
assert_success
}

@test "register OPA sidecars as external authorizer in the mesh" {
run kubectl patch configmap istio -n istio-system --patch-file test/bats/istio-cm-patch.yaml
assert_success
}

@test "label default namespace for Istio Proxy and OPA-Envoy sidecar injection" {
run kubectl label namespace default opa-istio-injection="enabled"
assert_success
Expand Down

0 comments on commit 1292c71

Please sign in to comment.