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

Refactored creation of DB objects and permissions in tests #1097

Merged
merged 1 commit into from
Nov 15, 2023

Conversation

kian99
Copy link
Contributor

@kian99 kian99 commented Nov 15, 2023

Description

Recreates #1080 as that PR was closed.

I noticed in my previous PRs that the setup of test resources in env.go was inconsistent, this PR aims to address that.

Changed env.go so that the PopulateDB function only populates the DB and added PopulateDBAndPermissions to populate the DB and OpenFGA permissions. This clarifies when a test needs only database objects versus when a test needs database objects and permissions.

Engineering checklist

Check only items that apply

  • Documentation updated
  • Covered by unit tests
  • Covered by integration tests

- Changed env.go so that the PopulateDB function only populates the DB and added PopulateDBAndPermissions to populate the DB and OpenFGA permissions. This clarifies when a test needs only database objects versus when a test needs database objects and permissions
@kian99 kian99 merged commit 150f1a7 into canonical:v3 Nov 15, 2023
2 checks passed
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