Skip to content

Commit

Permalink
clean
Browse files Browse the repository at this point in the history
Signed-off-by: Prateeknandle <prateeknandle@gmail.com>
  • Loading branch information
Prateeknandle committed Jan 13, 2023
1 parent 4a6b5b7 commit 4f735e3
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions tests/smoke/smoke_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,27 +79,18 @@ var _ = BeforeSuite(func() {

var _ = AfterSuite(func() {
util.KubearmorPortForwardStop()
err := util.DeleteAllKsp()
Expect(err).To(BeNil())
// wait for policy deletion
time.Sleep(5 * time.Second)
})

func discover(ns string, l string) (types.KubeArmorPolicy, error) {
policy := types.KubeArmorPolicy{}
pod, _ := exec.Command("kubectl", "get", "pods", "-A").Output()
log.Printf("pod:%q", pod)
cmd, err := exec.Command("karmor", "discover", "-n", ns, "-l", l, "-f", "json").Output()
log.Printf("cmd : %q", cmd)
fmt.Println(json.Valid([]byte(cmd)))
if err != nil {
log.Error().Msgf("Failed to apply the `karmor discover` command : %v", err)
}
err = json.Unmarshal(cmd, &policy)
if err != nil {
log.Error().Msgf("Failed to unmarshal the policy : %v", err)
}
//log.Printf("policy : %v", policy)
return policy, err
}

Expand Down

0 comments on commit 4f735e3

Please sign in to comment.