Skip to content

Commit

Permalink
e2e_test: Validate the testcases
Browse files Browse the repository at this point in the history
  • Loading branch information
Jille committed Jan 23, 2023
1 parent 12c394a commit a4ba2b9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions e2e_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package pgperms_test

import (
"bytes"
"context"
"io/ioutil"
"os"
Expand Down Expand Up @@ -43,10 +44,15 @@ func TestEndToEnd(t *testing.T) {
if err != nil {
t.Fatalf("Failed to read test case: %v", err)
}
dec := yaml.NewDecoder(bytes.NewReader(b))
dec.KnownFields(true)
var tc TestCase
if err := yaml.Unmarshal(b, &tc); err != nil {
t.Fatalf("Failed to parse test case: %v", err)
}
if err := pgperms.ValidateConfig(tc.Config); err != nil {
t.Fatalf("Failed to validate test case config: %v", err)
}

// 0. Check database emptiness
checkClusterIsEmpty(ctx, t, conn)
Expand Down

0 comments on commit a4ba2b9

Please sign in to comment.