Skip to content

Commit

Permalink
add AE test to ADO
Browse files Browse the repository at this point in the history
  • Loading branch information
shueybubbles committed Aug 18, 2023
1 parent 2f29ad8 commit 84d4a81
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
15 changes: 6 additions & 9 deletions .pipelines/TestSql2017.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,12 @@ pool:
trigger: none
variables:
TESTPASSWORD: $(SQLPASSWORD)
AZURE_CLIENT_SECRET: $(AZURE_CLIENT_SECRET)

steps:
- task: GoTool@0
inputs:
version: '1.19'
- task: Go@0
displayName: 'Go: get sources'
inputs:
command: 'get'
arguments: '-d'
workingDirectory: '$(Build.SourcesDirectory)'


- task: Go@0
displayName: 'Go: install gotest.tools/gotestsum'
Expand All @@ -41,8 +35,6 @@ steps:
arguments: 'github.com/AlekSi/gocov-xml@latest'
workingDirectory: '$(System.DefaultWorkingDirectory)'

#Your build pipeline references an undefined variables named SQLPASSWORD and AZURESERVER_DSN.
#Create or edit the build pipeline for this YAML file, define the variable on the Variables tab. See https://go.microsoft.com/fwlink/?linkid=865972

- task: Docker@2
displayName: 'Run SQL 2017 docker image'
Expand All @@ -61,6 +53,11 @@ steps:
SQLPASSWORD: $(SQLPASSWORD)
AZURESERVER_DSN: $(AZURESERVER_DSN)
SQLSERVER_DSN: $(SQLSERVER_DSN)
AZURE_CLIENT_SECRET: $(AZURE_CLIENT_SECRET)
KEY_VAULT_NAME: $(KEY_VAULT_NAME)
AZURE_TENANT_ID: $(AZURE_TENANT_ID)
AZURE_CLIENT_ID: $(AZURE_CLIENT_ID)
COLUMN_ENCRYPTION: 1
continueOnError: true
- task: PublishTestResults@2
displayName: "Publish junit-style results"
Expand Down
2 changes: 1 addition & 1 deletion alwaysencrypted_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func TestAlwaysEncryptedE2E(t *testing.T) {
sel.WriteString(fmt.Sprintf("unencryptedcolumn from [%s]", tableName))
_, err = conn.Exec(query.String())
assert.NoError(t, err, "Failed to create encrypted table")
defer conn.Exec("DROP TABLE IF EXISTS " + tableName)
defer func() { _, _ = conn.Exec("DROP TABLE IF EXISTS " + tableName) }()
_, err = conn.Exec(insert.String(), insertArgs...)
assert.NoError(t, err, "Failed to insert row in encrypted table")
rows, err := conn.Query(sel.String())
Expand Down

0 comments on commit 84d4a81

Please sign in to comment.