e2e tests assume non-root user
This commit is contained in:
parent
c26866c0c8
commit
e498bb951c
|
@ -153,8 +153,20 @@ jobs:
|
|||
GOPATH: /go
|
||||
steps:
|
||||
- checkout
|
||||
- run: make deps
|
||||
- run: make e2e-test
|
||||
- run: apt-get update; apt-get install -y sudo unzip
|
||||
# e2e tests require privileged mount/umount permissions when running as root
|
||||
# TODO: switch to using machine executor and run as root to test e2e path
|
||||
- run:
|
||||
name: prepare non-root user
|
||||
command: |
|
||||
groupadd --gid 3434 circleci
|
||||
useradd --uid 3434 --gid circleci --shell /bin/bash --create-home circleci
|
||||
echo 'circleci ALL=NOPASSWD: ALL' >> /etc/sudoers.d/50-circleci
|
||||
echo 'Defaults env_keep += "DEBIAN_FRONTEND"' >> /etc/sudoers.d/env_keep
|
||||
chown -R circleci:circleci /go
|
||||
|
||||
- run: sudo -E -H -u circleci PATH=${PATH} make deps
|
||||
- run: sudo -E -H -u circleci PATH=${PATH} make e2e-test
|
||||
|
||||
test-website:
|
||||
executor: go-machine-recent
|
||||
|
|
Loading…
Reference in New Issue