test: Add identity provider integration tests#831
Conversation
gtema
left a comment
There was a problem hiding this comment.
generally good, but we need some refinements:
- add update tests as well
- try to add some negative tests (adding user to non-existing group or vice versa, using duplicate names, invalid data, delete not existing resource, etc)
| let domain = create_domain!(state)?; | ||
| let name = Uuid::new_v4().to_string(); | ||
|
|
||
| let group = state |
There was a problem hiding this comment.
let's please use "create_user!", "create_group!" like the tests/integration/src/identity/user_group/add.rs - we should be using this pattern more since it includes automatic cleanup of the resources created by the test what helps to fix test reliability. It is actually already present in some of the added tests.
| use tracing_test::traced_test; | ||
| use uuid::Uuid; | ||
|
|
||
| use openstack_keystone::identity::IdentityApi; |
There was a problem hiding this comment.
From now on this import is not necessary. Please remove it, but you actually should just run cargo check -p test_integration --tests to see warnings. Focus only in the files you add
dd0b043 to
7241113
Compare
gtema
left a comment
There was a problem hiding this comment.
since we now have DCO check which need to pass for all commits you are in unfortunate situation forcing you to either rewrite every single commit message , or, better, squash all changes to the single commit and put a proper commit message to it (you can do it with 'git rebase -i origin/main' - or it may be upstream/main). If you are not able to solve this (since this is a fork) you can follow a different approach and cherry-pick all 3 commits to the new branch (git cherry-pick -n 7241113, git cherry-pick -n .........). Another approach for not recreating the change is to do a git reset --soft $(git merge-base HEAD main) or just 3 times git reset --soft HEAD^1. This will undo commits while keeping the changes.
Which leaves the git rebase -i origin/main and pick the reword for every commit the easiest option.
Otherwise tests themselves looks fine
Adds integration test coverage for the identity provider, following the existing test patterns and harness.
Closes #449
Note: this contribution was developed with AI assistance.