Skip to content

Commit

Permalink
Implement Acceptance e2e tests for BTP user journey
Browse files Browse the repository at this point in the history
  • Loading branch information
kwiatekus committed Jan 16, 2025
1 parent 50e5878 commit 894211a
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,4 @@ mod
/template.yaml

dist/
tests/btp/sm.env
16 changes: 16 additions & 0 deletions tests/btp/integration-test-btp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,22 @@ echo "Step2: List modules"

# -------------------------------------------------------------------------------------
echo "Step3: Connecting to remote BTP subaccount"

kubectl create secret generic remote-service-manager-credentials --namespace kyma-system --from-env-file sm.env
echo "Waiting for CRD btp operator"
while ! kubectl get crd btpoperators.operator.kyma-project.io; do echo "Waiting for CRD btp operator..."; sleep 1; done
kubectl wait --for condition=established crd/btpoperators.operator.kyma-project.io
while ! kubectl get btpoperators.operator.kyma-project.io btpoperator --namespace kyma-system; do echo "Waiting for btpoperator..."; sleep 1; done
kubectl wait --for condition=Ready btpoperators.operator.kyma-project.io/btpoperator -n kyma-system --timeout=180s
kyma alpha reference-instance \
--btp-secret-name remote-service-manager-credentials \
--namespace kyma-system \
--offering-name objectstore \
--plan-selector standard \
--reference-name object-store-reference
kubectl apply -n kyma-system -f k8s-resources/dependencies/object-store-binding.yaml
while ! kubectl get secret object-store-reference-binding --namespace kyma-system; do echo "Waiting for object-store-reference-binding secret..."; sleep 5; done

# -------------------------------------------------------------------------------------
echo "Step4: Create Shared Service Instance Reference"
# -------------------------------------------------------------------------------------
Expand Down
5 changes: 4 additions & 1 deletion tests/btp/k8s-resources/exposed-docker-registry.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@ metadata:
name: default
spec:
externalAccess:
enabled: true
enabled: true
storage:
btpObjectStore:
secretName: object-store-reference-binding
8 changes: 8 additions & 0 deletions tests/btp/k8s-resources/object-store-binding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: services.cloud.sap.com/v1
kind: ServiceBinding
metadata:
name: object-store-reference-binding
spec:
serviceInstanceName: object-store-reference
externalName: object-store-reference-binding
secretName: object-store-reference-binding

0 comments on commit 894211a

Please sign in to comment.