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

Fix failing integration test #2816

Merged
merged 19 commits into from
Oct 18, 2023
Merged

Fix failing integration test #2816

merged 19 commits into from
Oct 18, 2023

Conversation

MDrakos
Copy link
Member

@MDrakos MDrakos commented Oct 13, 2023

BugDX-2246 Nightly failure: TestInstallScriptsIntegrationTestSuite/TestInstall/install-prbranch-with-version

@MDrakos
Copy link
Member Author

MDrakos commented Oct 13, 2023

Note that we will not run into this issue with our regular integration tests because they copy binaries from the build directory and execute those directly. The issue surfaced in this test because we are running state which is resolving to the state tool that was installed by the GH action earlier.

@MDrakos MDrakos requested a review from Naatan October 13, 2023 20:53
Comment on lines 53 to 55
// The home dir is set already for the test session, but we need to
// set it for the test so helper functions can find it.
suite.T().Setenv(constants.HomeEnvVarName, ts.Dirs.HomeDir)
Copy link
Member

Choose a reason for hiding this comment

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

Nice find, but we should probably do this as part of e2e.New(). Otherwise we'll likely keep running into this.

test/integration/install_scripts_int_test.go Outdated Show resolved Hide resolved
Comment on lines 127 to 131
installPath, err := installation.InstallPathForBranch(constants.BranchName)
suite.NoError(err)

binPath := filepath.Join(installPath, "bin")
statePath := filepath.Join(binPath, "state"+osutils.ExeExt)
Copy link
Member

Choose a reason for hiding this comment

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

e2e should handle this, and if it's not it'll need to be fixed there. You should be able to use ts.Exe.

But that is too much here. This shell should have no awareness of the CI State Tool. It sounds like we're bleeding the state tool PATH from the CI environment into our test environment. We should focus on fixing that because there's no way we'll always remember this caveat.

@MDrakos MDrakos requested a review from Naatan October 16, 2023 21:18
Copy link
Member

@Naatan Naatan left a comment

Choose a reason for hiding this comment

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

This looks good, but as we said this is an interim workaround. I'd like to see comments calling this out as a temp workaround with a link to the jira story so we don't lose track of the core issue.

@MDrakos MDrakos requested a review from Naatan October 17, 2023 17:06
Naatan
Naatan previously approved these changes Oct 18, 2023
@MDrakos MDrakos changed the base branch from version/0-42-0-RC1 to version/0-43-0-RC1 October 18, 2023 16:56
@MDrakos MDrakos dismissed Naatan’s stale review October 18, 2023 16:56

The base branch was changed.

@MDrakos MDrakos requested a review from Naatan October 18, 2023 17:23
@MDrakos MDrakos changed the base branch from version/0-43-0-RC1 to version/0-42-0-RC1 October 18, 2023 17:24
@MDrakos
Copy link
Member Author

MDrakos commented Oct 18, 2023

For some reason I thought v42 was already out so changed the base to v43... I've now changed it back to v42 🤦‍♂️

@MDrakos MDrakos requested a review from Naatan October 18, 2023 17:52
@MDrakos MDrakos merged commit b995636 into version/0-42-0-RC1 Oct 18, 2023
@MDrakos MDrakos deleted the DX-2246 branch October 18, 2023 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants