trilioData / tvk-plugins

kubectl plugins for logcollector and preflight checks tools
Other
2 stars 8 forks source link

:seedling: TK-7144 Refactor Preflight Unit and Integration test suite #160

Closed prasad-trilio closed 1 year ago

prasad-trilio commented 1 year ago

Converted some intgeration tests into unit-test.

Removed dependency on pre-build job for preflight and log-collector tests jobs.

somesh22123 commented 1 year ago

@prasad-trilio we should increase the timeout interval for failed test cases.

prasad-trilio commented 1 year ago

removed test case is missing in unit test cases

The relevant test-case was already present in cmd/preflight/cmd/helper_test.go. The test case is

    It("Should return error when input data format does not match with struct variable fields "+
            "or contains incorrect hierarchy of field values", func() {

It does not appear in diff changes.

prasad-trilio commented 1 year ago

no changes/enhancements in file, can be reverted with except for import grouping.

moved the func call preflight.InitKubeEnv(cmdOps.Run.Kubeconfig) below the logger initialization. So that, any error during kube clients creation gets logged into the log-file.

prasad-trilio commented 1 year ago

@prasad-trilio we should increase the timeout interval for failed test cases.

for cleanup command test-cases, in code we are performing delete operation and then updating the object to remove finalizers. This might cause the test to fail. This cleanup issue is being currently worked upon.

For run command. volume-snapshot does not come in ready state, a timeout of 10min already exists.