Skip to content

test: Add resource provider integration tests#873

Open
mashawes wants to merge 1 commit into
openstack-experimental:mainfrom
mashawes:resource-integration-tests
Open

test: Add resource provider integration tests#873
mashawes wants to merge 1 commit into
openstack-experimental:mainfrom
mashawes:resource-integration-tests

Conversation

@mashawes

Copy link
Copy Markdown
Collaborator

Fills in the missing integration test coverage for the resource provider, following the existing test patterns and harness.

  • Domain lookups: find_domain_by_name (found and missing) and get_domain_enabled.
  • Project lookups: get_project_by_name (found and missing) and get_project_parents (verifying a parent/child hierarchy).
  • Negative cases: creating a domain or project with an over-length name is rejected. Resource delete is idempotent, it returns Ok for a missing id, so a delete-not-found error case isn't applicable; get-not-found is already covered.
  • All tests use the existing harness (get_state, create_domain!, create_project!) and the public provider API via ExecutionContext; no production code is changed.

Closes #448

Note: this contribution was developed with AI assistance.

@mashawes mashawes self-assigned this Jun 29, 2026
@mashawes mashawes requested a review from gtema June 29, 2026 14:25

@gtema gtema left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • from now on you need to satisfy the DCO (https://github.com/apps/dco) which is literally just a "Signed-Off-By: ..." trailer in the commit message. You can do this by using "-s" option to git commit: "git commit -s"
  • Use the existing create_domain! / create_project! macros for consistency
  • Add a second negative‑validation test that attempts to create a domain/project with an empty name and asserts is_err()
  • Consider adding a test that creates a grand‑child (project → parent → grand‑parent) and checks that the full ancestor chain is returned, confirming that the provider correctly walks multiple levels.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement integration tests for resource provider

2 participants