-
Notifications
You must be signed in to change notification settings - Fork 9
Fix API module return list of key instead of list of dict. #241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think api module should just return what API does return. I'm note sure how much such "requirement" complicates the work.
You said some integration tests fail - which?
5df2646 to
d1e799e
Compare
|
Yes, I've mentioned that some integration tests fail. Before the latest commit, 12 tests failed. 9 with error Integ tests with Connection Refused
Integ tests with 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 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 Assertion failure:
Connection Refused failure:
Other failures:
These tests were rerun 3 times, first time ending with about 20 failures. |
34e0c2f to
5170b18
Compare
justinc1
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, nice work. I did very trivial changes, just small unittest/comment cleanup.
a6d20fe to
89c16e9
Compare
…PI integ test, update unit tests.
Signed-off-by: Justin Cinkelj <justin.cinkelj@xlab.si>
Signed-off-by: Justin Cinkelj <justin.cinkelj@xlab.si>
89c16e9 to
612d0d0
Compare
API module with action
getwould 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 the
apimodule with actiongeton endpoint/pingwhich returned:This PR fixes this bug to by making a minor change in the
filter_resultsfunction inmodule_utils/utils.py.The return should now look like this: