mirror of
https://github.com/actions/actions-runner-controller.git
synced 2025-12-14 13:46:45 +00:00
Adding unit test for ephemeral feature flag
This was something that was missing in #707. Adding a new test to make sure the ephemeral feature flag from upstream is set up correctly by the script.
This commit is contained in:
committed by
Yusuke Kuoka
parent
b679a54196
commit
bf35c51440
31
test/entrypoint/should_switch_to_ephemeral_upstream_feature/runsvc.sh
Executable file
31
test/entrypoint/should_switch_to_ephemeral_upstream_feature/runsvc.sh
Executable file
@@ -0,0 +1,31 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
export LIGHTGREEN='\e[0;32m'
|
||||
export LIGHTRED='\e[0;31m'
|
||||
export WHITE='\e[0;97m'
|
||||
export RESET='\e[0m'
|
||||
|
||||
log(){
|
||||
printf "\t${WHITE}$@${RESET}\n" 2>&1
|
||||
}
|
||||
|
||||
success(){
|
||||
printf "\t${LIGHTGREEN}$@${RESET}\n" 2>&1
|
||||
}
|
||||
|
||||
error(){
|
||||
printf "\t${LIGHTRED}$@${RESET}\n" 2>&1
|
||||
exit 1
|
||||
}
|
||||
|
||||
success ""
|
||||
success "Running the service..."
|
||||
# test if --once is present as a parameter
|
||||
echo "$*" | grep -q 'once' && error "Should not include --once in the parameters"
|
||||
success "...successful"
|
||||
touch runsvc_ran
|
||||
success ""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user