test: Added integration tests for content override Varlink API - #543
test: Added integration tests for content override Varlink API#543DuckBoss wants to merge 3 commits into
Conversation
7bea3af to
417d915
Compare
|
Note: some integration test failures are expected right now due to how rhsm2 handles client and connection caching. This needs a fix in rhsm2. |
417d915 to
90df988
Compare
jirihnidek
left a comment
There was a problem hiding this comment.
Overall it looks good. I can see that you introduced two methods that I already implemented in my PR. I have few comments and suggestions.
|
|
||
|
|
||
| def _cleanup_override_file(context): | ||
| """Restore or remove the override file after a scenario.""" |
There was a problem hiding this comment.
Shouldn't we add such cleanup to environment.py to methods: before_scenario() after_scenario()?
There was a problem hiding this comment.
I'm not sure if this really needs to be moved there. Those scenario hooks are called before/after every test, and it seems a bit overkill for this situation since this isn't a common file for other tests.
Considering the above, if you still want me to make this change then I can.
There was a problem hiding this comment.
You are right. Calling it before each scenario would be overkill. It would be better to use fixtures described here: https://behave.readthedocs.io/en/latest/fixtures/#docid-fixtures
44e0549 to
15799cc
Compare
|
Thanks for the review, I've addressed your comments and also added some missing docstrings. |
15799cc to
10f378e
Compare
Remove 'rhc' from the dnf install list in the integration test workflow so the locally-built RPM is not shadowed by the system package. Assisted-by: Cursor Signed-off-by: Jason Jerome <jajerome@redhat.com>
UploadContentOverrides now returns early when ReadLocalContentOverrides yields an empty slice, avoiding a 400 Bad Request from Candlepin which rejects a null/empty payload on PUT content_overrides. Assisted-by: Cursor Signed-off-by: Jason Jerome <jajerome@redhat.com>
eef7110 to
e015dde
Compare
Add integration tests for com.redhat.rhsm.testing.content.override covering Download and Upload methods across registered and unregistered system states. - Add feature file with 8 scenarios for content override API - Add JSON schema for Download response validation - Add step definitions for DNF5 override file management - Add reusable generic steps for varlink error and result assertions - Update rhsm2 dependency to include connection invalidation fix Resolves: CCT-2809 Assisted-by: Cursor Signed-off-by: Jason Jerome <jajerome@redhat.com>
e015dde to
ecf664e
Compare
This patch adds Behave integration tests for the
com.redhat.rhsm.testing.content.override interface, covering Download and Upload methods.
Resolves: CCT-2809