From 9de8337dbb64f334c2d6cdef81f38f3d133ec023 Mon Sep 17 00:00:00 2001 From: Quoc Truong Date: Wed, 28 Feb 2018 11:17:41 -0800 Subject: [PATCH] Remove flaky sql tests --- .../SQL2/SQL.GcSqlInstances.Tests.ps1 | 2 +- .../SQL3/SQL.GcSqlInstances.Two.Tests.ps1 | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Google.PowerShell.IntegrationTests/SQL2/SQL.GcSqlInstances.Tests.ps1 b/Google.PowerShell.IntegrationTests/SQL2/SQL.GcSqlInstances.Tests.ps1 index 5edabf77..5eca3dc1 100644 --- a/Google.PowerShell.IntegrationTests/SQL2/SQL.GcSqlInstances.Tests.ps1 +++ b/Google.PowerShell.IntegrationTests/SQL2/SQL.GcSqlInstances.Tests.ps1 @@ -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" } diff --git a/Google.PowerShell.IntegrationTests/SQL3/SQL.GcSqlInstances.Two.Tests.ps1 b/Google.PowerShell.IntegrationTests/SQL3/SQL.GcSqlInstances.Two.Tests.ps1 index 728de794..03a12a31 100644 --- a/Google.PowerShell.IntegrationTests/SQL3/SQL.GcSqlInstances.Two.Tests.ps1 +++ b/Google.PowerShell.IntegrationTests/SQL3/SQL.GcSqlInstances.Two.Tests.ps1 @@ -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 @@ -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" {