Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuanianji committed Jan 8, 2024
1 parent f6939c3 commit 9e7cfaf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/gcloud-cli-persistence/with_node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ source dev-container-features-test-lib
check "help" bash -c "gcloud --help | grep 'NAME'"

# check that `.config/gcloud` and `/dc/gcloud-cli` exist under the user (should be node)
check "config" bash -c "ls -la ~/.config | grep 'gloud'"
check "config" bash -c "ls -la ~/.config | grep 'gcloud'"
check "dc" bash -c "ls -la /dc | grep 'gcloud-cli'"

# check that the folders are owned by the user
# `stat -c "%U %G" ~/.config` returns "$USER $GROUP", in this case "node node"
# https://askubuntu.com/a/175060
check "~/.config/gloud owned by user" bash -c "test \"$(stat -c "%U %G" ~/.config)\" = 'node node'"
check "~/.config/gloud owned by user" bash -c "test \"$(stat -c "%U %G" ~/.config/gcloud)\" = 'node node'"
check "/dc/gcloud-cli owned by user" bash -c "test \"$(stat -c "%U %G" /dc/gcloud-cli)\" = 'node node'"

# Report result
Expand Down

0 comments on commit 9e7cfaf

Please sign in to comment.