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.

@mashawes mashawes force-pushed the resource-integration-tests branch from ffacc5a to ce66d6d Compare July 3, 2026 14:41
@gtema gtema force-pushed the resource-integration-tests branch from ce66d6d to 9a21eae Compare July 7, 2026 10:14
@gtema gtema enabled auto-merge (squash) July 7, 2026 10:16
gtema
gtema previously approved these changes Jul 7, 2026
@gtema gtema disabled auto-merge July 7, 2026 10:53
@gtema gtema enabled auto-merge (squash) July 7, 2026 10:54
@gtema gtema dismissed their stale review July 7, 2026 10:54

github stuck

Signed-off-by: Mohammed <mashawes@andrew.cmu.edu>
@gtema gtema force-pushed the resource-integration-tests branch from 9a21eae to d536b6a Compare July 8, 2026 08:33
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