Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Random failures from DeleteAllProfiles unit test #11134

Closed
afbjorklund opened this issue Apr 19, 2021 · 1 comment · Fixed by #11160
Closed

Random failures from DeleteAllProfiles unit test #11134

afbjorklund opened this issue Apr 19, 2021 · 1 comment · Fixed by #11160
Labels
area/testing kind/bug Categorizes issue or PR as related to a bug. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.

Comments

@afbjorklund
Copy link
Collaborator

afbjorklund commented Apr 19, 2021

Due to it making direct calls to docker, and finding profiles outside the test context.

--- FAIL: TestDeleteAllProfiles (0.20s)
    delete_test.go:203: ListProfiles length = 9, expected 8
        valid: []
        invalid: [0xc000d73320 0xc000d73350 0xc000d73380 0xc000d733b0 0xc000d733e0 0xc000d73410 0xc000d73440 0xc000d73470 0xc000d734d0]

There should be a mocked docker (oci.Docker), similar to the mock miniHome.

        pDirs, err := profileDirs(miniHome...)

        cs, err := oci.ListOwnedContainers(oci.Docker)
                        err = os.Setenv(localpath.MinikubeHome, td)

The invalid profiles are:

[p1 p2_empty_profile_config p3_invalid_profile_config p4_partial_profile_config p5_missing_machine_config p6_empty_machine_config p7_invalid_machine_config p8_partial_machine_config minikube]

It also shouldn't just make random calls to Docker like that, but that's another story. (#8577)

@afbjorklund afbjorklund added kind/bug Categorizes issue or PR as related to a bug. area/testing labels Apr 19, 2021
@afbjorklund afbjorklund changed the title Random failures from DeleteAllProfiles unit tet Random failures from DeleteAllProfiles unit test Apr 19, 2021
@spowelljr spowelljr added the priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. label Apr 19, 2021
@medyagh medyagh added the help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. label Apr 19, 2021
@afbjorklund afbjorklund removed the help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. label Apr 20, 2021
@afbjorklund
Copy link
Collaborator Author

TestListProfiles also got the wrong result, but it didn't validate properly.

-- FAIL: TestListProfiles (0.10s)
    profile_test.go:59: ListProfiles length = 6, expected 5
        valid: [0xc000197ad0 0xc000197e60]
        invalid: [0xc00027e030 0xc00027e1e0 0xc00027e810 0xc00027e8a0]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/testing kind/bug Categorizes issue or PR as related to a bug. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants