Skip to content

Commit

Permalink
Remove flaky sql tests
Browse files Browse the repository at this point in the history
  • Loading branch information
quoctruong committed Feb 28, 2018
1 parent 9fff4e5 commit 9de8337
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ Describe "Import-GcSqlInstance" {
{ Import-GcSqlInstance $instance "gs://gcsql-csharp-import-testing/testsql.csv" "newguestbook" "entries" } | Should not Throw
}

It "should throw an error if something's wrong" {
It "should throw an error if something's wrong" -Skip {
{ Import-GcSqlInstance $instance "gs://gcsql-csharp-import-testing/testsqlS" "newguestbook" } | Should Throw `
"ERROR 1227 (42000) at line 18: Access denied; you need (at least one of) the SUPER privilege(s) for this operation"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ Describe "Restore-GcSqlInstanceBackup" {
$numRestoreOps1 = (Get-GcSqlOperation -Instance $backupInstance1 | where { $_.OperationType -eq "RESTORE_VOLUME" }).Count
$numRestoreOps2 = (Get-GcSqlOperation -Instance $backupInstance2 | where { $_.OperationType -eq "RESTORE_VOLUME" }).Count

It "should backup test-db4 to its own backup" {
It "should backup test-db4 to its own backup" -Skip:$skipTest {
$backupRunId = $backupRunIds1[0]

Restore-GcSqlInstanceBackup $backupRunId $backupInstance1
Expand Down Expand Up @@ -225,9 +225,11 @@ Describe "Restore-GcSqlInstanceBackup" {
$operations[0].Error | Should Match ""
}

# Reset both instances to their own last backups
Restore-GcSqlInstanceBackup $backupRunIds1[0] $backupInstance1
Restore-GcSqlInstanceBackup $backupRunIds2[0] $backupInstance2
if (-not $skipTest) {
# Reset both instances to their own last backups
Restore-GcSqlInstanceBackup $backupRunIds1[0] $backupInstance1
Restore-GcSqlInstanceBackup $backupRunIds2[0] $backupInstance2
}
}

Describe "Update-GcSqlInstance" {
Expand Down

0 comments on commit 9de8337

Please sign in to comment.