Skip to content

Commit

Permalink
Merge pull request #486 from svscheg/issue159
Browse files Browse the repository at this point in the history
Make the OutputSynapse.streamanalytics resource uptestable
  • Loading branch information
svscheg authored Jul 10, 2023
2 parents e69a0cc + 4895c65 commit 09b6cf7
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 6 deletions.
39 changes: 33 additions & 6 deletions examples/streamanalytics/analyticsoutputsynapse.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@ kind: OutputSynapse
metadata:
annotations:
meta.upbound.io/example-id: streamanalytics/v1beta1/outputsynapse
upjet.upbound.io/manual-intervention: "This resource requires a SQL server containing the Azure SQL database."
labels:
testing.upbound.io/example-name: example
name: example
spec:
forProvider:
database: master
table: ExampleTable
server: exampleoutputsynapse-ondemand.sql.azuresynapse.net
server: mssqlservername
user: sqladminuser
streamAnalyticsJobNameSelector:
matchLabels:
Expand All @@ -29,6 +28,8 @@ kind: Secret
metadata:
name: example-synapse-workspace
namespace: upbound-system
annotations:
uptest.upbound.io/pre-delete-hook: testhooks/delete-outputSynapse.sh
type: Opaque
stringData:
example-key: dXBib3VuZHJvY2tz
Expand All @@ -38,7 +39,6 @@ kind: DataLakeGen2FileSystem
metadata:
annotations:
meta.upbound.io/example-id: streamanalytics/v1beta1/outputsynapse
upjet.upbound.io/manual-intervention: "This resource is dependency of OutputSynapse. This resource is skipping because parent resource was skipped."
labels:
testing.upbound.io/example-name: example
name: exampleoutputsynapse
Expand All @@ -53,7 +53,6 @@ kind: Account
metadata:
annotations:
meta.upbound.io/example-id: streamanalytics/v1beta1/outputsynapse
upjet.upbound.io/manual-intervention: "This resource is dependency of OutputSynapse. This resource is skipping because parent resource was skipped."
labels:
testing.upbound.io/example-name: example
name: exampleoutputsynapse
Expand All @@ -73,7 +72,6 @@ kind: Job
metadata:
annotations:
meta.upbound.io/example-id: streamanalytics/v1beta1/outputsynapse
upjet.upbound.io/manual-intervention: "This resource is dependency of OutputSynapse. This resource is skipping because parent resource was skipped."
labels:
testing.upbound.io/example-name: example
name: example-job
Expand Down Expand Up @@ -102,10 +100,39 @@ kind: ResourceGroup
metadata:
annotations:
meta.upbound.io/example-id: streamanalytics/v1beta1/outputsynapse
upjet.upbound.io/manual-intervention: "This resource is dependency of OutputSynapse. This resource is skipping because parent resource was skipped."
labels:
testing.upbound.io/example-name: example
name: exampleoutputsynapse
spec:
forProvider:
location: West Europe
---
apiVersion: sql.azure.upbound.io/v1beta1
kind: MSSQLServer
metadata:
annotations:
meta.upbound.io/example-id: streamanalytics/v1beta1/outputsynapse
labels:
testing.upbound.io/example-name: example
name: mssqlservername
spec:
forProvider:
administratorLogin: missadministrator
administratorLoginPasswordSecretRef:
key: example-key
name: example-secret
namespace: upbound-system
location: West Europe
resourceGroupNameSelector:
matchLabels:
testing.upbound.io/example-name: example
version: "12.0"
---
apiVersion: v1
kind: Secret
metadata:
name: example-secret
namespace: upbound-system
type: Opaque
data:
example-key: dGVzdFBhc3N3b3JkITEyMw==
5 changes: 5 additions & 0 deletions examples/streamanalytics/testhooks/delete-outputSynapse.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash
set -aeuo pipefail

# Delete the outputSynapse resource before deleting secret with password
${KUBECTL} delete outputsynapse.streamanalytics.azure.upbound.io --all

0 comments on commit 09b6cf7

Please sign in to comment.