Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: Amir Malka <amirm@armosec.io>
  • Loading branch information
amirmalka committed Mar 7, 2024
1 parent 91a573e commit c7c0183
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ func TestLoadConfig(t *testing.T) {
AccessKey: "xxxxxxxx-1111-1111-1111-xxxxxxxx",
Resources: []Resource{
{Group: "", Version: "v1", Resource: "nodes", Strategy: "patch"},
{Group: "", Version: "v1", Resource: "pods", Strategy: "patch"},
{Group: "apps", Version: "v1", Resource: "deployments", Strategy: "patch"},
{Group: "apps", Version: "v1", Resource: "statefulsets", Strategy: "patch"},
{Group: "spdx.softwarecomposition.kubescape.io", Version: "v1beta1", Resource: "applicationprofiles", Strategy: "patch"},
Expand Down
4 changes: 2 additions & 2 deletions tests/synchronizer_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -933,7 +933,7 @@ func TestSynchronizer_TC05_InCluster(t *testing.T) {
}
// check that pods in a non-kubescape namespace were not synchronized
for _, podName := range getPodNamesInNamespace(td.clusters[0].k8sclient, namespace) {
_, objFound, _ := td.processor.GetObjectFromPostgres(td.clusters[0].account, td.clusters[0].cluster, "v1/pods", namespace, podName)
_, objFound, _ := td.processor.GetObjectFromPostgres(td.clusters[0].account, td.clusters[0].cluster, "/v1/pods", namespace, podName)
assert.False(t, objFound)
}

Expand All @@ -944,7 +944,7 @@ func TestSynchronizer_TC05_InCluster(t *testing.T) {

// check that pods in the kubescape namespace are synchronized
for _, podName := range getPodNamesInNamespace(td.clusters[0].k8sclient, kubescapeNamespace) {
_ = waitForObjectInPostgres(t, td, td.clusters[0].account, td.clusters[0].cluster, "v1/pods", kubescapeNamespace, podName)
_ = waitForObjectInPostgres(t, td, td.clusters[0].account, td.clusters[0].cluster, "/v1/pods", kubescapeNamespace, podName)
}

// tear down
Expand Down

0 comments on commit c7c0183

Please sign in to comment.