-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
These two tests which should add groups to the current user are not working in GitHub Actions, but they are working on a standard computer. Since the user used in GitHub Actions is called "runner", we can use this specific name to exclude these tests in GitHub.
- Loading branch information
1 parent
084ab45
commit c71bed3
Showing
1 changed file
with
25 additions
and
24 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,33 @@ | ||
#!/usr/bin/env bash | ||
if [ "$USER" != "runner" ]; then | ||
. "$(dirname $0)"/jtest.inc "$1" | ||
cqfd="$TDIR/.cqfd/cqfd" | ||
|
||
. "$(dirname $0)"/jtest.inc "$1" | ||
cqfd="$TDIR/.cqfd/cqfd" | ||
cd $TDIR/ | ||
|
||
cd $TDIR/ | ||
################################################################################ | ||
# 'cqfd run' should add extra_groups provided by an environment variable | ||
################################################################################ | ||
jtest_prepare "'cqfd run' should add extra_groups provided by an env variable" | ||
result=$(user_extra_groups="docker newgroup:12345" $cqfd run 'groups' | grep docker | grep newgroup) | ||
|
||
################################################################################ | ||
# 'cqfd run' should add extra_groups provided by an environment variable | ||
################################################################################ | ||
jtest_prepare "'cqfd run' should add extra_groups provided by an env variable" | ||
result=$(user_extra_groups="docker newgroup:12345" $cqfd run 'groups' | grep docker | grep newgroup) | ||
if [ -n "$result" ]; then | ||
jtest_result pass | ||
else | ||
jtest_result fail | ||
fi | ||
|
||
if [ -n "$result" ]; then | ||
jtest_result pass | ||
else | ||
jtest_result fail | ||
fi | ||
################################################################################ | ||
# 'cqfd run' should add extra_groups provided by the config | ||
################################################################################ | ||
jtest_prepare "'cqfd run' should add config's extra_groups to the local user" | ||
echo 'user_extra_groups="docker newgroup:12345"' >> .cqfdrc | ||
result=$($cqfd run 'groups' | grep docker | grep newgroup) | ||
|
||
################################################################################ | ||
# 'cqfd run' should add extra_groups provided by the config | ||
################################################################################ | ||
jtest_prepare "'cqfd run' should add config's extra_groups to the local user" | ||
echo 'user_extra_groups="docker newgroup:12345"' >> .cqfdrc | ||
result=$($cqfd run 'groups' | grep docker | grep newgroup) | ||
if [ -n "$result" ]; then | ||
jtest_result pass | ||
else | ||
jtest_result fail | ||
fi | ||
|
||
if [ -n "$result" ]; then | ||
jtest_result pass | ||
else | ||
jtest_result fail | ||
fi | ||
|