forked from apinf/apinf-umbrella
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow running tests as root, without user-switching to fix lsof tests.
With the changes in 2e595ce to change the gid of the running process, this broke the ability to run "lsof" tests in Docker test environments. This is mostly because lsof can't grab information for processes belonging to different users/groups (even when running lsof as root) inside a Docker container unless that Docker container is run in privileged mode (which we can't do in our CircleCI 2.0 environment). So make the necessary tweaks so that we can always run the tests as the current user, even if the current user is root. While in some ways it was nice to test user-switching in our test environment, in other ways this simply reverts testing back to how we tested in CircleCI 1.0, where the tests were run as the current "ubuntu" user (the current user is just root now). As part of this, also rework the lsof port check tests a bit to get rid of shell piping so the errors are more obvious on failures, and also better sanity check the output to ensure we're not missing expected ports from lsof's output.
- Loading branch information
Showing
6 changed files
with
53 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
ES_JAVA_OPTS=-Des.default.path.conf={{etc_dir}}/elasticsearch -Dmapper.allow_dots_in_name=true -XX:-HeapDumpOnOutOfMemoryError {{elasticsearch.embedded_server_env.java_opts}} | ||
ES_JAVA_OPTS=-Des.default.path.conf={{etc_dir}}/elasticsearch -Dmapper.allow_dots_in_name=true -XX:-HeapDumpOnOutOfMemoryError {{#_test_env?}}-Des.insecure.allow.root=true{{/_test_env?}} {{elasticsearch.embedded_server_env.java_opts}} | ||
ES_HEAP_SIZE={{elasticsearch.embedded_server_env.heap_size}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters