Closed anazobec closed 1 year ago
Yes, I've mentioned that some integration tests fail. Before the latest commit, 12 tests failed. 9 with error Connection Refused
and others with just an assertion failure.
The results of these integration tests, can be seen from here: https://github.com/ScaleComputing/HyperCoreAnsibleCollection/actions/runs/5043144438/jobs/9044620677
With the latest commit (at this point d1e799e), API module should now on /ping
endpoint, with data { status: "Active" }
return something like this:
record: {
"status": "Active"
}
If data on the endpoint is not a single dictionary, then a list of dictionaries will be returned.
Here are the newly run integration tests as of commit d1e799e: https://github.com/ScaleComputing/HyperCoreAnsibleCollection/actions/runs/5045862848
11 tests fail: 2 are assertion errors, 1 of them is an error caused by changing the get_records
function in the api module. The rest of the tests fail with a Connection Refused error, Unexpected response, EOF.
These tests were rerun 3 times, first time ending with about 20 failures.
API module with action
get
would sometimes return a list of with only a key present instead of dict. This minor bug could be seen in the records output on calling theapi
module with actionget
on endpoint/ping
which returned:This PR fixes this bug to by making a minor change in the
filter_results
function inmodule_utils/utils.py
. The return should now look like this: