tests: force remove BigQuery datasets and don't bother manually removing tables

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6473
GitOrigin-RevId: 15cefa76cfd472f4197ae965970dfbc203f694a4
This commit is contained in:
Daniel Harvey 2022-10-24 17:53:15 +01:00 committed by hasura-bot
parent 18a9308a6a
commit daf55101f4
3 changed files with 36 additions and 10 deletions

View File

@ -66,3 +66,36 @@ package api-tests
executable-dynamic: True
library-vanilla: False
package mysql
extra-include-dirs:
/opt/homebrew/opt/openssl/include
/opt/homebrew/opt/mysql-client@5.7/include
extra-lib-dirs:
/opt/homebrew/opt/openssl/lib
/opt/homebrew/opt/mysql-client@5.7/lib
package odbc
extra-include-dirs: /opt/homebrew/opt/unixodbc/include
extra-lib-dirs: /opt/homebrew/opt/unixodbc/lib
package pcre-light
extra-include-dirs: /opt/homebrew/opt/pcre/include
extra-lib-dirs: /opt/homebrew/opt/pcre/lib
package postgresql-libpq
extra-include-dirs:
/opt/homebrew/opt/libpq/include
/opt/homebrew/opt/openssl/include
extra-lib-dirs:
/opt/homebrew/opt/libpq/lib
/opt/homebrew/opt/openssl/lib
package pg-client
extra-include-dirs:
/opt/homebrew/opt/libpq/include
/opt/homebrew/opt/openssl/include
extra-lib-dirs:
/opt/homebrew/opt/libpq/lib
/opt/homebrew/opt/openssl/lib

View File

@ -246,16 +246,8 @@ teardown (reverse -> tables) (testEnvironment, _) = do
( forFinally_ tables $ \table ->
Schema.untrackRelationships BigQuery table testEnvironment
)
-- Then teardown tables
( finally
( forFinally_ tables $ \table -> do
finally
(untrackTable testEnvironment schemaName table)
(dropTable schemaName table)
)
-- remove test dataset
(removeDataset schemaName)
)
-- remove test dataset
(removeDataset schemaName)
setupTablesAction :: [Schema.Table] -> TestEnvironment -> SetupAction
setupTablesAction ts env =

View File

@ -631,6 +631,7 @@ deleteDataset conn datasetId = do
"DELETE " <> bigQueryProjectUrl (_bqProjectId conn)
<> "/datasets/"
<> T.unpack datasetId
<> "/?force=true&deleteContents=true"
let req = jsonRequestHeader (parseRequest_ url)