Skip to content
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

test: simplify group tests #163

Open
wants to merge 40 commits into
base: main
Choose a base branch
from
Open

Conversation

SiasMey
Copy link
Contributor

@SiasMey SiasMey commented Dec 18, 2024

Description

  • test: extract helpers
  • test: remove unused params and mock setups
  • test: extract setting up mock for create
  • test: shuffle group post mock setup
  • test: use shared helpers for setting up delete mocks
  • test: creats helper for import mocks
  • test: add nillable parent to group mock setup
  • test: allow group delete to have empty parent (root)
  • test: use new helpers in UpdateGroupsResource test
  • test: use create and delete helpers all over
  • test: update createImportMocks to deal with nil parent
  • test: use new helpers for recreate updates
  • test: add helper to set up GroupUpdate mocks
  • test: gock.OffAll and root parent update helpers
  • test: use import setup for update pre-plan test
  • test: change ids and names for basic create
  • test: update parent and id for import group
  • test: re organize functions
  • test: pull up test values
  • test: update root values
  • test: extract values for root child creation
  • test: extract constants for update test
  • test: fix tests for update not passing groupID
  • test: extract values for recreate update test
  • test: extract testName to variable
  • test: use sprintf on the test manifest
  • test: use interpolation for another manifest
  • test: use string interpolation for another manifest
  • test: use string interpolation for yet another manifest
  • test: interpolate more manifests
  • test: interpolate one more manifest
  • test: use "real" parent_id for all requests
  • test: extract group create request creation
  • test: use str for parentID instead of pointer
  • test: use string for delete group mock setup
  • test: use string in update group mock setup
  • test: rename root test groups
  • test: shrink if conditional body
  • test: make root parent check consistent

Related Issue(s)

}`,
name = "%s"
parent_group_id = "%s"
}`, provider.ProviderConfig, testName, testParentID),
Copy link
Contributor

Choose a reason for hiding this comment

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

🎉

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.

2 participants