Skip to content
This repository was archived by the owner on May 14, 2025. It is now read-only.

Conversation

@AmitKumarDas
Copy link
Owner

@AmitKumarDas AmitKumarDas commented Apr 18, 2020

This commit fixes the issue of integration tests that were never run.

Reason for this bug?

This has mostly happened when apiserver & etcd binaries were upgraded. The new binaries make use of new flags & deprecates use of old as well as insecure flags. The framework package present in test/integration did not handle these new changes and was rather swallowing the startup errors resulting in passing these tests that never ran.

What has been done?

The changes include copying of integration test related framework code from controller runtime library. The copied codebase fits the current integration test framework of Metac nicely. This approach also avoid import of un-required dependencies & associated go vendoring problems that often arises due to import of controller-runtime libraries.

closes #136

Refer - https://github.com/kubernetes-sigs/controller-runtime/tree/master/pkg/internal/testing

Signed-off-by: AmitKumarDas amit.das@mayadata.io

@AmitKumarDas AmitKumarDas self-assigned this Apr 18, 2020
@AmitKumarDas AmitKumarDas added bug Something isn't working integration test Testing Metac on Kubernetes labels Apr 18, 2020
@AmitKumarDas AmitKumarDas force-pushed the code-5 branch 2 times, most recently from f76d4df to 65997d7 Compare April 18, 2020 10:42
@grzesuav
Copy link
Collaborator

@AmitKumarDas there are two errors logged from integration tests :

--- PASS: TestInstallUninstallCRD (2.54s)
##[error]    install_uninstall_crd_test.go:341: CRD storages.dao.amitd.io should have been deleted: IsFinalized true

and

--- PASS: TestSetStatusOnCR (5.55s)
##[error]    set_status_on_cr_test.go:153: Waiting for verification of CoolNerd resource status

they are expected to be there ?

@AmitKumarDas
Copy link
Owner Author

@grzesuav the tests should pass eventually. Since the controller reconcile is eventual. I will still have a look once infront of my laptop.

This commit fixes the issue of integration tests that were never
run.

Reason for this bug?
This has mostly happened when apiserver & etcd binaries were
upgraded. The new binaries make use of new flags & deprecates
use of old as well as insecure flags. The framework package
present in test/integration did not handle these new changes
and was rather swallowing the startup errors resulting in
passing these tests that never ran.

What has been done?
The changes include copying of integration test related
framework code from controller runtime library. The copied
codebase fits the current integration test framework of Metac
nicely. This approach also avoid import of unrequired
dependencies & associated go vendoring problems that often
arises due to import of controller-runtime libraries.

closes #136

Refer - https://github.com/kubernetes-sigs/controller-runtime/tree/master/pkg/internal/testing

Signed-off-by: AmitKumarDas <amit.das@mayadata.io>
@AmitKumarDas
Copy link
Owner Author

AmitKumarDas commented Apr 20, 2020

@grzesuav on further debugging, I found that those two errors were actually info messages that were logged via t.Log i.e. testing.T instance. I guess these were being logged as stderr. I have removed one of the logs since it was no more required. The other log uses klog.Infof now instead of t.Log.

@grzesuav
Copy link
Collaborator

I have approved but does not have any valuable input, so other approval would be appreciated

@floriankoch
Copy link
Collaborator

floriankoch commented Apr 20, 2020

@AmitKumarDas i don't know the codebsae good enough to do a propper review

From the 10000 Feet View, the changes are looking good

Copy link
Collaborator

@shovanmaity shovanmaity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@AmitKumarDas AmitKumarDas merged commit afeebdf into master Apr 21, 2020
@AmitKumarDas AmitKumarDas deleted the code-5 branch April 21, 2020 04:35
@AmitKumarDas
Copy link
Owner Author

🎉 This PR is included in version 0.2.4 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug Something isn't working integration test Testing Metac on Kubernetes logging released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: integration tests are never run

5 participants