-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
dwertent
committed
Dec 21, 2021
1 parent
214f16e
commit 9880430
Showing
9 changed files
with
5 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,6 @@ import ( | |
"encoding/json" | ||
"testing" | ||
|
||
"github.com/armosec/k8s-interface/k8sinterface" | ||
"github.com/armosec/k8s-interface/workloadinterface" | ||
"github.com/stretchr/testify/assert" | ||
) | ||
|
@@ -36,7 +35,6 @@ func assertObjectFields(t *testing.T, b workloadinterface.IMetadata) { | |
assert.Equal(t, "/default/User/[email protected]/rbac.authorization.k8s.io/v1/default/Role/pod-reader/rbac.authorization.k8s.io/v1/default/RoleBinding/read-pods", b.GetID()) | ||
} | ||
func TestNewRegoResponseVectorObject(t *testing.T) { | ||
k8sinterface.InitializeMapResourcesMock() | ||
|
||
relatedObjects := []map[string]interface{}{} | ||
relatedObject := getMock(role) | ||
|
@@ -56,7 +54,6 @@ func TestNewRegoResponseVectorObject(t *testing.T) { | |
} | ||
|
||
func TestSetGetObject(t *testing.T) { | ||
k8sinterface.InitializeMapResourcesMock() | ||
|
||
obj := `{"name":"Jane","namespace":"","kind":"User","apiVersion":""}` | ||
relatedObjects := []map[string]interface{}{} | ||
|
@@ -88,7 +85,6 @@ func TestSetGetObject(t *testing.T) { | |
} | ||
|
||
func TestVectorObjGetters(t *testing.T) { | ||
k8sinterface.InitializeMapResourcesMock() | ||
|
||
v, err := NewRegoResponseVectorObjectFromBytes([]byte(subjectSA)) | ||
if err != nil { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters