Skip to content

Commit

Permalink
more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ncode committed Dec 4, 2023
1 parent afa0244 commit 54466ff
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion pkg/aclmanager/aclmanager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,15 @@ func TestListAcls(t *testing.T) {
}
}

func TestListAcls_Error(t *testing.T) {
redisClient, mock := redismock.NewClientMock()

// Mocking the response for the ACL LIST command
mock.ExpectDo("ACL", "LIST").SetVal([]string{"user acl1", "user acl2"})
_, err := listAcls(context.Background(), redisClient)
assert.Error(t, err)
}

func TestMirrorAcls(t *testing.T) {
tests := []struct {
name string
Expand Down Expand Up @@ -316,7 +325,7 @@ func TestNewAclManager(t *testing.T) {
}
}

func TestCurrentFunctionError(t *testing.T) {
func TestCurrentFunction_Error(t *testing.T) {
redisClient, mock := redismock.NewClientMock()

// Mocking the response for the Info function
Expand Down

0 comments on commit 54466ff

Please sign in to comment.