Make transaction-rollback=true the default for test-suite (#1663)

Change test-suite to use db-tx-rollback-all = true by default
This commit is contained in:
Wolfgang Walther
2020-12-03 18:54:33 +01:00
committed by GitHub
parent 10a70d4e52
commit 609c9aead8
21 changed files with 708 additions and 495 deletions
+5 -4
View File
@@ -15,7 +15,7 @@ import SpecHelper
-- creates Item to work with for PATCH and DELETE
postItem =
request methodPost "/items"
[("Prefer", "resolution=ignore-duplicates")]
[("Prefer", "tx=commit"), ("Prefer", "resolution=ignore-duplicates")]
[json|{"id":0}|]
`shouldRespondWith`
""
@@ -23,7 +23,9 @@ postItem =
-- removes Items left over from POST, PUT, and PATCH
deleteItems =
delete "/items?id=lte.0"
request methodDelete "/items?id=lte.0"
[("Prefer", "tx=commit")]
""
`shouldRespondWith`
""
{ matchStatus = 204 }
@@ -175,9 +177,8 @@ shouldNotPersistMutations reqHeaders respHeaders = do
allowed :: SpecWith ((), Application)
allowed = describe "tx-allow-override = true" $ do
describe "without Prefer tx" $ do
-- TODO: Change this to default to rollback for whole test-suite
preferDefault `shouldRespondToReads` withoutPreferenceApplied
preferDefault `shouldPersistMutations` withoutPreferenceApplied
preferDefault `shouldNotPersistMutations` withoutPreferenceApplied
describe "Prefer tx=commit" $ do
preferCommit `shouldRespondToReads` withPreferenceCommitApplied