Skip to content

Commit

Permalink
fixing unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
chrislovecnm committed Dec 15, 2017
1 parent 223694f commit e9362a7
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pkg/acls/s3/storage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func Test_Strategy(t *testing.T) {
context := &vfs.VFSContext{}
path, err := context.BuildVfsPath("s3://test/foo")
if err != nil {
t.Error("unable to create path: %v", err)
t.Errorf("unable to create path: %v", err)
}

cluster := &kops.Cluster{
Expand All @@ -44,19 +44,19 @@ func Test_Strategy(t *testing.T) {
acl, err := s.GetACL(path, cluster)

if err != nil {
t.Error("error getting ACL: %v", err)
t.Errorf("error getting ACL: %v", err)
}

if acl == nil {
t.Error("public ro ACL is nil and should not be, this test is a positive test case.")
t.Errorf("public ro ACL is nil and should not be, this test is a positive test case.")
}
}

func Test_In_StateStore(t *testing.T) {
context := &vfs.VFSContext{}
stateStore, err := context.BuildVfsPath("s3://my_state_store/cluster")
if err != nil {
t.Error("unable to create path: %v", err)
t.Errorf("unable to create path: %v", err)
}

cluster := &kops.Cluster{
Expand All @@ -72,10 +72,10 @@ func Test_In_StateStore(t *testing.T) {
acl, err := s.GetACL(stateStore, cluster)

if err != nil {
t.Error("error getting ACL: %v", err)
t.Errorf("error getting ACL: %v", err)
}

if acl != nil {
t.Error("public ro ACL is set but path is in the state store, this test is a negative test case.")
t.Errorf("public ro ACL is set but path is in the state store, this test is a negative test case.")
}
}

0 comments on commit e9362a7

Please sign in to comment.