update remote state tests to use new test helpers
This commit is contained in:
parent
112c37458f
commit
57cbcbe99d
|
@ -64,7 +64,7 @@ func TestBackend(t *testing.T) {
|
|||
"access_key": res.accessKey,
|
||||
}).(*Backend)
|
||||
|
||||
backend.TestBackend(t, b, nil)
|
||||
backend.TestBackendStates(t, b)
|
||||
}
|
||||
|
||||
func TestBackendLocked(t *testing.T) {
|
||||
|
@ -88,7 +88,8 @@ func TestBackendLocked(t *testing.T) {
|
|||
"access_key": res.accessKey,
|
||||
}).(*Backend)
|
||||
|
||||
backend.TestBackend(t, b1, b2)
|
||||
backend.TestBackendStateLocks(t, b1, b2)
|
||||
backend.TestBackendStateForceUnlock(t, b1, b2)
|
||||
}
|
||||
|
||||
type testResources struct {
|
||||
|
|
|
@ -63,7 +63,8 @@ func TestBackend(t *testing.T) {
|
|||
})
|
||||
|
||||
// Test
|
||||
backend.TestBackend(t, b1, b2)
|
||||
backend.TestBackendStates(t, b1)
|
||||
backend.TestBackendStateLocks(t, b1, b2)
|
||||
}
|
||||
|
||||
func TestBackend_lockDisabled(t *testing.T) {
|
||||
|
@ -83,7 +84,8 @@ func TestBackend_lockDisabled(t *testing.T) {
|
|||
})
|
||||
|
||||
// Test
|
||||
backend.TestBackend(t, b1, b2)
|
||||
backend.TestBackendStates(t, b1)
|
||||
backend.TestBackendStateLocks(t, b1, b2)
|
||||
}
|
||||
|
||||
func TestBackend_gzip(t *testing.T) {
|
||||
|
@ -95,5 +97,5 @@ func TestBackend_gzip(t *testing.T) {
|
|||
})
|
||||
|
||||
// Test
|
||||
backend.TestBackend(t, b, nil)
|
||||
backend.TestBackendStates(t, b)
|
||||
}
|
||||
|
|
|
@ -66,7 +66,9 @@ func TestBackend(t *testing.T) {
|
|||
})
|
||||
|
||||
// Test
|
||||
backend.TestBackend(t, b1, b2)
|
||||
backend.TestBackendStates(t, b1)
|
||||
backend.TestBackendStateLocks(t, b1, b2)
|
||||
backend.TestBackendStateForceUnlock(t, b1, b2)
|
||||
}
|
||||
|
||||
func TestBackend_lockDisabled(t *testing.T) {
|
||||
|
@ -89,5 +91,5 @@ func TestBackend_lockDisabled(t *testing.T) {
|
|||
})
|
||||
|
||||
// Test
|
||||
backend.TestBackend(t, b1, b2)
|
||||
backend.TestBackendStateLocks(t, b1, b2)
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ func TestBackendConfig(t *testing.T) {
|
|||
func TestBackend(t *testing.T) {
|
||||
defer Reset()
|
||||
b := backend.TestBackendConfig(t, New(), nil).(*Backend)
|
||||
backend.TestBackend(t, b, nil)
|
||||
backend.TestBackendStates(t, b)
|
||||
}
|
||||
|
||||
func TestBackendLocked(t *testing.T) {
|
||||
|
@ -48,7 +48,7 @@ func TestBackendLocked(t *testing.T) {
|
|||
b1 := backend.TestBackendConfig(t, New(), nil).(*Backend)
|
||||
b2 := backend.TestBackendConfig(t, New(), nil).(*Backend)
|
||||
|
||||
backend.TestBackend(t, b1, b2)
|
||||
backend.TestBackendStateLocks(t, b1, b2)
|
||||
}
|
||||
|
||||
// use the this backen to test the remote.State implementation
|
||||
|
|
|
@ -38,7 +38,7 @@ func TestBackend(t *testing.T) {
|
|||
createMantaFolder(t, b.storageClient, directory)
|
||||
defer deleteMantaFolder(t, b.storageClient, directory)
|
||||
|
||||
backend.TestBackend(t, b, nil)
|
||||
backend.TestBackendStates(t, b)
|
||||
}
|
||||
|
||||
func TestBackendLocked(t *testing.T) {
|
||||
|
@ -60,7 +60,8 @@ func TestBackendLocked(t *testing.T) {
|
|||
createMantaFolder(t, b1.storageClient, directory)
|
||||
defer deleteMantaFolder(t, b1.storageClient, directory)
|
||||
|
||||
backend.TestBackend(t, b1, b2)
|
||||
backend.TestBackendStateLocks(t, b1, b2)
|
||||
backend.TestBackendStateForceUnlock(t, b1, b2)
|
||||
}
|
||||
|
||||
func createMantaFolder(t *testing.T, mantaClient *storage.StorageClient, directoryName string) {
|
||||
|
|
|
@ -103,7 +103,7 @@ func TestBackend(t *testing.T) {
|
|||
createS3Bucket(t, b.s3Client, bucketName)
|
||||
defer deleteS3Bucket(t, b.s3Client, bucketName)
|
||||
|
||||
backend.TestBackend(t, b, nil)
|
||||
backend.TestBackendStates(t, b)
|
||||
}
|
||||
|
||||
func TestBackendLocked(t *testing.T) {
|
||||
|
@ -131,7 +131,8 @@ func TestBackendLocked(t *testing.T) {
|
|||
createDynamoDBTable(t, b1.dynClient, bucketName)
|
||||
defer deleteDynamoDBTable(t, b1.dynClient, bucketName)
|
||||
|
||||
backend.TestBackend(t, b1, b2)
|
||||
backend.TestBackendStateLocks(t, b1, b2)
|
||||
backend.TestBackendStateForceUnlock(t, b1, b2)
|
||||
}
|
||||
|
||||
// add some extra junk in S3 to try and confuse the env listing.
|
||||
|
@ -334,9 +335,9 @@ func TestKeyEnv(t *testing.T) {
|
|||
t.Fatal(err)
|
||||
}
|
||||
|
||||
backend.TestBackend(t, b0, nil)
|
||||
backend.TestBackend(t, b1, nil)
|
||||
backend.TestBackend(t, b2, nil)
|
||||
backend.TestBackendStates(t, b0)
|
||||
backend.TestBackendStates(t, b1)
|
||||
backend.TestBackendStates(t, b2)
|
||||
}
|
||||
|
||||
func testGetWorkspaceForKey(b *Backend, key string, expected string) error {
|
||||
|
|
|
@ -67,7 +67,7 @@ func TestBackend(t *testing.T) {
|
|||
|
||||
defer deleteSwiftContainer(t, b.client, container)
|
||||
|
||||
backend.TestBackend(t, b, nil)
|
||||
backend.TestBackendStates(t, b)
|
||||
}
|
||||
|
||||
func TestBackendPath(t *testing.T) {
|
||||
|
|
Loading…
Reference in New Issue