Skip to content

Commit

Permalink
Add autify-connect-client-extra-arguments
Browse files Browse the repository at this point in the history
riywo committed Oct 25, 2022
1 parent b548277 commit 3e5d150
Showing 4 changed files with 15 additions and 2 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -83,6 +83,9 @@ autify-connect-client:
required: false
description: "When true, start Autify Connect Client"
default: "false"
autify-connect-client-extra-arguments:
required: false
description: 'Extra command line arguments you want to pass to Autify Connect Client e.g. "--experimental-tunnel-proxy http://proxy".'
autify-path:
required: false
default: "autify"
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -46,6 +46,9 @@ inputs:
required: false
description: 'When true, start Autify Connect Client'
default: 'false'
autify-connect-client-extra-arguments:
required: false
description: 'Extra command line arguments you want to pass to Autify Connect Client e.g. "--experimental-tunnel-proxy http://proxy".'
autify-path:
required: false
default: 'autify'
@@ -93,4 +96,5 @@ runs:
INPUT_OS_VERSION: ${{ inputs.os-version }}
INPUT_AUTIFY_CONNECT: ${{ inputs.autify-connect }}
INPUT_AUTIFY_CONNECT_CLIENT: ${{ inputs.autify-connect-client }}
INPUT_AUTIFY_CONNECT_CLIENT_EXTRA_ARGUMENTS: ${{ inputs.autify-connect-client-extra-arguments }}
INPUT_AUTIFY_PATH: ${{ inputs.autify-path }}
4 changes: 4 additions & 0 deletions script.bash
Original file line number Diff line number Diff line change
@@ -77,6 +77,10 @@ if [ "${INPUT_AUTIFY_CONNECT_CLIENT}" = "true" ]; then
add_args "--autify-connect-client"
fi

if [ -n "${INPUT_AUTIFY_CONNECT_CLIENT_EXTRA_ARGUMENTS}" ]; then
add_args "--autify-connect-client-extra-arguments=${INPUT_AUTIFY_CONNECT_CLIENT_EXTRA_ARGUMENTS}"
fi

export AUTIFY_CLI_USER_AGENT_SUFFIX="${AUTIFY_CLI_USER_AGENT_SUFFIX:=github-actions-web-test-run}"

OUTPUT=$(mktemp)
6 changes: 4 additions & 2 deletions test/test.bash
Original file line number Diff line number Diff line change
@@ -20,6 +20,7 @@ function before() {
unset INPUT_OS_VERSION
unset INPUT_AUTIFY_CONNECT
unset INPUT_AUTIFY_CONNECT_CLIENT
unset INPUT_AUTIFY_CONNECT_CLIENT_EXTRA_ARGUMENTS
echo "=== TEST ==="
}

@@ -122,11 +123,12 @@ function test_output() {
export INPUT_OS_VERSION=i
export INPUT_AUTIFY_CONNECT=j
export INPUT_AUTIFY_CONNECT_CLIENT=true
test_command "autify web test run a --wait -t=300 -r=b1 -r=b2 --max-retry-count=c --name=d --browser=e --device=f --device-type=g --os=h --os-version=i --autify-connect=j --autify-connect-client"
export INPUT_AUTIFY_CONNECT_CLIENT_EXTRA_ARGUMENTS=k
test_command "autify web test run a --wait -t=300 -r=b1 -r=b2 --max-retry-count=c --name=d --browser=e --device=f --device-type=g --os=h --os-version=i --autify-connect=j --autify-connect-client --autify-connect-client-extra-arguments=k"
test_code 0
test_log
test_output exit-code "0"
test_output log "autify web test run a --wait -t=300 -r=b1 -r=b2 --max-retry-count=c --name=d --browser=e --device=f --device-type=g --os=h --os-version=i --autify-connect=j --autify-connect-client\n$(cat "$log_file")"
test_output log "autify web test run a --wait -t=300 -r=b1 -r=b2 --max-retry-count=c --name=d --browser=e --device=f --device-type=g --os=h --os-version=i --autify-connect=j --autify-connect-client --autify-connect-client-extra-arguments=k\n$(cat "$log_file")"
test_output result-url "https://result"
}

0 comments on commit 3e5d150

Please sign in to comment.