kubearmor-client icon indicating copy to clipboard operation
kubearmor-client copied to clipboard

Integration Tests

Open daemon1024 opened this issue 3 years ago • 2 comments

kArmor only has basic CI checks and unit tests for checking logs module. We should have CI for individual modules and if they are working as expected, like leveraging install to install KubeArmor on a sample cluster successfully and other modules accordingly.

We already tests somewhat of our modules in KubeArmor Ginkgo tests, but they only test released version of kArmor and not being check on each update. Also, this would give us more confidence while reviewing/merging pull requests as well.

Specific scenarios to consider:

  • [ ] test karmor recommend for a namespace that does not have any deployments
  • [ ] test karmor profile

daemon1024 avatar Aug 31 '22 14:08 daemon1024

@daemon1024 I think can create a github ci to test karmor cmd,To test whether the command is running as expected,such as

Available Commands:
  completion  Generate the autocompletion script for the specified shell
  discover    Discover applicable policies
  help        Help about any command
  install     Install KubeArmor in a Kubernetes Cluster
  logs        Observe Logs from KubeArmor
  probe       Checks for supported KubeArmor features in the current environment
  profile     Profiling of logs
  recommend   Recommend Policies
  rotate-tls  Rotate webhook controller tls certificates
  selfupdate  selfupdate this cli tool
  summary     Observability from discovery engine
  sysdump     Collect system dump information for troubleshooting and error report
  uninstall   Uninstall KubeArmor from a Kubernetes Cluster
  version     Display version information
  vm          VM commands for kvmservice

xiao-jay avatar Mar 15 '23 15:03 xiao-jay

@xiao-jay right, We will have to tailor individual tests for each command. Like install in itself will have multiple cases to cover such as

  • If the daemonset is modified with arguements
  • If the autodetection works
  • If the save functionality works.

Similarly we will have to analyse and work towards each of the commands. SOme commands already have tests like recommend. We can prioritise maybe which commands are more used and create tests for them first. Thanks a lot for showing interest, WDYT?

daemon1024 avatar Mar 16 '23 08:03 daemon1024