Skip to content

Commit

Permalink
Update e2e tests with redis to verify secret ref (dapr#1994)
Browse files Browse the repository at this point in the history
  • Loading branch information
yittg committed Sep 3, 2020
1 parent da640a1 commit b22d212
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 5 deletions.
6 changes: 4 additions & 2 deletions tests/config/dapr_redis_pubsub.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ spec:
type: pubsub.redis
metadata:
- name: redisHost
value: dapr-redis-master:6379
secretKeyRef:
name: redissecret
key: host
- name: redisPassword
value: ""
value: ""
6 changes: 4 additions & 2 deletions tests/config/dapr_redis_state.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ spec:
type: state.redis
metadata:
- name: redisHost
value: dapr-redis-master:6379
secretKeyRef:
name: redissecret
key: host
- name: redisPassword
value: ""
- name: actorStateStore
value: "true"
value: "true"
7 changes: 7 additions & 0 deletions tests/config/kubernetes_redis_secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: v1
kind: Secret
metadata:
name: redissecret
type: Opaque
data:
host: ZGFwci1yZWRpcy1tYXN0ZXI6NjM3OQ==
3 changes: 2 additions & 1 deletion tests/dapr_tests.mk
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,9 @@ setup-app-configurations:

# Apply component yaml for state, secrets, pubsub, and bindings
setup-test-components:
$(KUBECTL) apply -f ./tests/config/dapr_redis_state.yaml --namespace $(DAPR_TEST_NAMESPACE)
$(KUBECTL) apply -f ./tests/config/kubernetes_secret.yaml --namespace $(DAPR_TEST_NAMESPACE)
$(KUBECTL) apply -f ./tests/config/kubernetes_redis_secret.yaml --namespace $(DAPR_TEST_NAMESPACE)
$(KUBECTL) apply -f ./tests/config/dapr_redis_state.yaml --namespace $(DAPR_TEST_NAMESPACE)
$(KUBECTL) apply -f ./tests/config/dapr_tests_cluster_role_binding.yaml --namespace $(DAPR_TEST_NAMESPACE)
$(KUBECTL) apply -f ./tests/config/dapr_redis_pubsub.yaml --namespace $(DAPR_TEST_NAMESPACE)
$(KUBECTL) apply -f ./tests/config/dapr_kafka_bindings.yaml --namespace $(DAPR_TEST_NAMESPACE)
Expand Down

0 comments on commit b22d212

Please sign in to comment.