Skip to content

Commit

Permalink
explicitly set org for the proxy too
Browse files Browse the repository at this point in the history
Katello does this automatically, but not plain Foreman

Fixes: 39c0457
  • Loading branch information
evgeni authored and ekohl committed Dec 13, 2022
1 parent 39c0457 commit 13630ab
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bats/fb-test-foreman-rex.bats
Expand Up @@ -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"
}

0 comments on commit 13630ab

Please sign in to comment.