diff --git a/bats/fb-test-foreman-rex.bats b/bats/fb-test-foreman-rex.bats index 761f8598e..bcf414c91 100644 --- a/bats/fb-test-foreman-rex.bats +++ b/bats/fb-test-foreman-rex.bats @@ -17,9 +17,11 @@ load foreman_helper # Force execution of the test in an own Organization # This ensures any *other* proxy with the REX capability is not used, # as that can lead to wrong results. + OLD_ORGS=$(hammer --output csv --no-headers --show-ids proxy info --name $HOSTNAME --fields Organizations) REX_ORG="Remote Execution Org $$" hammer organization create --name "${REX_ORG}" hammer host update --name $HOSTNAME --new-organization "${REX_ORG}" + hammer proxy update --name $HOSTNAME --organizations "${OLD_ORGS},${REX_ORG}" hammer job-invocation create --job-template "${job_template}" --inputs 'command=uptime' --search-query "name = $HOSTNAME" }