mirror of
https://github.com/actions/actions-runner-controller.git
synced 2025-12-10 11:41:27 +00:00
The unit tests are simulating a run for entrypoint. It creates some dummy config.sh and runsvc.sh and makes sure the logic behind entrypoint.sh is correct. Unfortunately the entrypoint.sh contains some sections that are not mockable so I had to put some logic in there too. Testing includes for now: - the normal scenario - the normal non-ephemeral scenario - the configuration failure scenario Also tested the entrypoint.sh on a real runner, still works as expected.
19 lines
269 B
Bash
Executable File
19 lines
269 B
Bash
Executable File
#!/bin/bash
|
|
|
|
export LIGHTGREEN='\e[0;32m'
|
|
export LIGHTRED='\e[0;31m'
|
|
export WHITE='\e[0;97m'
|
|
export RESET='\e[0m'
|
|
|
|
log(){
|
|
printf "${WHITE}$@${RESET}\n" 2>&1
|
|
}
|
|
|
|
success(){
|
|
printf "${LIGHTGREEN}$@${RESET}\n" 2>&1
|
|
}
|
|
|
|
error(){
|
|
printf "${LIGHTRED}$@${RESET}\n" 2>&1
|
|
}
|