KubeArmor icon indicating copy to clipboard operation
KubeArmor copied to clipboard

CI(tests) Use AssertCommand function in every test

Open PrimalPimmy opened this issue 1 year ago • 5 comments

Feature Request

Short Description

The CI tests have been updated to use the Eventually function in the ginkgo tests, however we need to update all the tests, only KSP tests were updated recently.

Is your feature request related to a problem? Please describe the use case.

Today we might get flakey tests and we would need to have a retry logic for executing commands.

in all of our tests Describe the solution you'd like

A new AssertCommand function was added recently to the utils package. Use this function instead of the K8sExecInPod() in all of our tests: https://github.com/kubearmor/KubeArmor/blob/8ceb083cb76d89f65cff3a60ad33b1835fb330c6/tests/util/kartutil.go#L614

NOTE: some the the exec operators do not compare/match with anything and are just meant for executing, in that case you can set Matchregexp(".*") wherever matching is not required.

PrimalPimmy avatar Feb 20 '24 12:02 PrimalPimmy

working on it ! pls assign

akshat-kaushik avatar Feb 21 '24 16:02 akshat-kaushik

Hey @akshat-kaushik thank you for your interest! Let us know if you have any questions.

rootxrishabh avatar Feb 24 '24 09:02 rootxrishabh

Hi!I would like to work on this issue if its not being solved?Can anyone assign me this issue

EraKin575 avatar Mar 10 '24 20:03 EraKin575

Is this issue resolved? coz i see the pr that's linked not merged

bhoopesh369 avatar May 17 '24 17:05 bhoopesh369

@rootxrishabh

bhoopesh369 avatar May 18 '24 20:05 bhoopesh369