add assertion to test on number of queries made (#9)

* add assertions around access to resulting job

there is a problem getting the job w/ the user that launched it

add more assertions to bulk tests (#11)

dig more into the results and assert on results
also, use a fixture that already implemented the "max queries" thing

fix ansible collection sanity tests (#12)
This commit is contained in:
Elijah DeLee
2023-02-23 09:00:54 -05:00
parent 7aad16964c
commit 2becc5dda9
5 changed files with 38 additions and 27 deletions

View File

@@ -29,7 +29,7 @@ options:
description:
- The name to use for the host.
type: str
require: True
required: True
description:
description:
- The description to use for the host.
@@ -70,7 +70,7 @@ import json
def main():
# Any additional arguments that are not fields of the item can be added here
argument_spec = dict(
hosts=dict(required=True, type='list'),
hosts=dict(required=True, type='list', elements='dict'),
inventory=dict(required=True, type='int'),
)
@@ -82,8 +82,8 @@ def main():
hosts = module.params.get('hosts')
for h in hosts:
if 'variables' in h:
h['variables'] = json.dumps(h['variables'])
if 'variables' in h:
h['variables'] = json.dumps(h['variables'])
# Launch the jobs
result = module.post_endpoint("bulk/host_create", data={"inventory": inventory, "hosts": hosts})