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

testing-env: create default atlantis user #2689

Merged
merged 1 commit into from
Nov 17, 2022
Merged

Conversation

nitrocode
Copy link
Member

@nitrocode nitrocode commented Nov 17, 2022

what

  • testing-env: create default atlantis user

why

  • Running tests on the testing-env fail because the negative tests create files that root can see and modify. However, if anyone runs the tests locally, in non-root, it passes fine.
  • This issue only seems to affect the new golang 1.19 image and not the previous golang 1.17 image
  • Approving and merging this will create a new testing-env image which can be set in our github workflow and circleci to allow bumping dependencies that require modern versions of golang.

references

commands

This command fails to run tests

$ docker run -it \
  -w /atlantis \
  -v $(pwd):/atlantis \
  ghcr.io/runatlantis/testing-env:2022.11.13 \
  sh -c "make test"

I built a local container and ran the tests using the atlantis user

$ docker build -t testing-env testing/
$ docker run -it \
  -w /atlantis \
  -v $(pwd):/atlantis \
  testing-env \
  sh -c "make test"
...
ok  	github.com/runatlantis/atlantis/server/events/vcs	8.845s
ok  	github.com/runatlantis/atlantis/server/events/vcs/bitbucketcloud	0.037s
ok  	github.com/runatlantis/atlantis/server/events/vcs/bitbucketserver	0.046s
ok  	github.com/runatlantis/atlantis/server/events/vcs/common	0.023s
?   	github.com/runatlantis/atlantis/server/events/vcs/fixtures	[no test files]
ok  	github.com/runatlantis/atlantis/server/events/webhooks	0.010s
ok  	github.com/runatlantis/atlantis/server/jobs	0.029s
ok  	github.com/runatlantis/atlantis/server/logging	0.034s
?   	github.com/runatlantis/atlantis/server/metrics	[no test files]
ok  	github.com/runatlantis/atlantis/server/recovery	0.004s [no tests to run]
?   	github.com/runatlantis/atlantis/server/scheduled	[no test files]
?   	github.com/runatlantis/atlantis/testdrive	[no test files]

@nitrocode nitrocode requested a review from a team as a code owner November 17, 2022 03:48
@nitrocode nitrocode merged commit 4dcc73b into main Nov 17, 2022
@nitrocode nitrocode deleted the testing-env-set-user branch November 17, 2022 04:14
krrrr38 pushed a commit to krrrr38/atlantis that referenced this pull request Dec 16, 2022
@nitrocode nitrocode added this to the 0.21.0 milestone Jan 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants