storage/kubernetes: run transactional conformance tests
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package kubernetes
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
@@ -78,7 +79,7 @@ func TestURLFor(t *testing.T) {
|
||||
|
||||
func TestStorage(t *testing.T) {
|
||||
client := loadClient(t)
|
||||
conformance.RunTests(t, func() storage.Storage {
|
||||
newStorage := func() storage.Storage {
|
||||
for _, resource := range []string{
|
||||
resourceAuthCode,
|
||||
resourceAuthRequest,
|
||||
@@ -88,9 +89,14 @@ func TestStorage(t *testing.T) {
|
||||
resourcePassword,
|
||||
} {
|
||||
if err := client.deleteAll(resource); err != nil {
|
||||
// Fatalf sometimes doesn't print the error message.
|
||||
fmt.Fprintf(os.Stderr, "delete all %q failed: %v\n", resource, err)
|
||||
t.Fatalf("delete all %q failed: %v", resource, err)
|
||||
}
|
||||
}
|
||||
return client
|
||||
})
|
||||
}
|
||||
|
||||
conformance.RunTests(t, newStorage)
|
||||
conformance.RunTransactionTests(t, newStorage)
|
||||
}
|
||||
|
Reference in New Issue
Block a user