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

test: Remove circular symlinks from testdata #9886

Merged
merged 4 commits into from
Jul 6, 2022

Conversation

jannfis
Copy link
Member

@jannfis jannfis commented Jul 6, 2022

This removes circular symlinks from testdata of repo server, and instead creates the links at runtime during the tests.

This fixes build breakage on certain infrastructures.

Note on DCO:

If the DCO action in the integration test fails, one or more of your commits are not signed off. Please click on the Details link next to the DCO action for instructions on how to resolve this.

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • The title of the PR states what changed and the related issues number (used for the release note).
  • I've included "Closes [ISSUE #]" or "Fixes [ISSUE #]" in the description to automatically close the associated issue.
  • I've updated both the CLI and UI to expose my feature, or I plan to submit a second PR with them.
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • Optional. My organization is added to USERS.md.
  • I have signed off all my commits as required by DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My build is green (troubleshooting builds).

Signed-off-by: jannfis <jann@mistrust.net>
Signed-off-by: jannfis <jann@mistrust.net>
@jannfis jannfis requested a review from crenshaw-dev July 6, 2022 10:12
Signed-off-by: jannfis <jann@mistrust.net>
@codecov
Copy link

codecov bot commented Jul 6, 2022

Codecov Report

Merging #9886 (ab8c590) into master (f13fc39) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #9886   +/-   ##
=======================================
  Coverage   45.73%   45.73%           
=======================================
  Files         227      227           
  Lines       26953    26953           
=======================================
  Hits        12327    12327           
  Misses      12946    12946           
  Partials     1680     1680           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f13fc39...ab8c590. Read the comment docs.

Signed-off-by: jannfis <jann@mistrust.net>
Copy link
Collaborator

@crenshaw-dev crenshaw-dev left a comment

Choose a reason for hiding this comment

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

lgtm besides one nit. :-)

return err
}
defer func() {
if err := os.Chdir(oldWorkingDir); err != nil {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is it possible we're gonna run into race conditions when other tests assume a certain working directory?

reposerver/repository/repository_test.go Show resolved Hide resolved
@crenshaw-dev crenshaw-dev merged commit 2389e5b into argoproj:master Jul 6, 2022
@jannfis jannfis added the cherry-pick/2.4 Candidate for cherry picking into the 2.4 release branch label Jul 6, 2022
@jannfis
Copy link
Member Author

jannfis commented Jul 6, 2022

Cherry-picking this into release-2.4

jannfis added a commit that referenced this pull request Jul 6, 2022
* test: Remove circular symlinks from testdata

Signed-off-by: jannfis <jann@mistrust.net>

* Another test case

Signed-off-by: jannfis <jann@mistrust.net>

* Use defer for changing back to original workdir

Signed-off-by: jannfis <jann@mistrust.net>

* Abort the test on error in defer

Signed-off-by: jannfis <jann@mistrust.net>
jannfis added a commit that referenced this pull request Jul 28, 2022
* test: Remove circular symlinks from testdata

Signed-off-by: jannfis <jann@mistrust.net>

* Another test case

Signed-off-by: jannfis <jann@mistrust.net>

* Use defer for changing back to original workdir

Signed-off-by: jannfis <jann@mistrust.net>

* Abort the test on error in defer

Signed-off-by: jannfis <jann@mistrust.net>
jannfis added a commit that referenced this pull request Jul 28, 2022
* test: Remove circular symlinks from testdata

Signed-off-by: jannfis <jann@mistrust.net>

* Another test case

Signed-off-by: jannfis <jann@mistrust.net>

* Use defer for changing back to original workdir

Signed-off-by: jannfis <jann@mistrust.net>

* Abort the test on error in defer

Signed-off-by: jannfis <jann@mistrust.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick/2.4 Candidate for cherry picking into the 2.4 release branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants