KubeArmor icon indicating copy to clipboard operation
KubeArmor copied to clipboard

Added k8s test scenarios to ginkgo-based test framework

Open rksharma95 opened this issue 2 years ago • 4 comments

  • Added test scenarios to test Kubearmor in k8s env by applying KubeArmorSecurityPolicy for process, files and network operations.
  • Added utility function func K8sApplyFile(fileName string) error{} supported k8s resources can be created with the YAML file if doesn't already exist. currently supported k8s resources:
    • Deployment
    • Service
    • Namespace
    • KubeArmorPolicy
    • KubeArmorHostPolicy

Signed-off-by: rk [email protected]

rksharma95 avatar Jul 25 '22 07:07 rksharma95

PTAL @nyrahul

rksharma95 avatar Jul 25 '22 07:07 rksharma95

Codecov Report

Merging #778 (efe7b99) into main (a2dd030) will increase coverage by 0.38%. The diff coverage is n/a.

@@            Coverage Diff             @@
##             main     #778      +/-   ##
==========================================
+ Coverage   38.70%   39.09%   +0.38%     
==========================================
  Files          31       31              
  Lines       10013    10013              
==========================================
+ Hits         3876     3915      +39     
+ Misses       5620     5585      -35     
+ Partials      517      513       -4     
Impacted Files Coverage Δ
KubeArmor/monitor/processTree.go 94.62% <0.00%> (-1.08%) :arrow_down:
KubeArmor/feeder/policyMatcher.go 41.50% <0.00%> (-0.35%) :arrow_down:
KubeArmor/monitor/logUpdate.go 66.13% <0.00%> (+0.79%) :arrow_up:
KubeArmor/core/containerdHandler.go 68.91% <0.00%> (+15.73%) :arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

codecov-commenter avatar Jul 25 '22 13:07 codecov-commenter

Hey @rksharma95 , any updates here? Thanks

nyrahul avatar Aug 02 '22 02:08 nyrahul

@rksharma95 , the tests are failing with the new apply function! Can we make it work?

nyrahul avatar Aug 22 '22 17:08 nyrahul

LGTM !!!

achrefbensaad avatar Dec 30 '22 13:12 achrefbensaad