Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

chore/enterpriseportal: add test for iam_model#63503

Merged
bobheadxi merged 4 commits into
mainfrom
ep-iam-model-tests
Jun 27, 2024
Merged

chore/enterpriseportal: add test for iam_model#63503
bobheadxi merged 4 commits into
mainfrom
ep-iam-model-tests

Conversation

@bobheadxi

@bobheadxi bobheadxi commented Jun 27, 2024

Copy link
Copy Markdown
Member

Uses the guidance in https://openfga.dev/docs/modeling/testing to craft some rudimentary IAM model tests for Enterprise Portal IAM.

Not automated for now - the model tests must be run manually:

go run github.com/openfga/cli/cmd/fga@latest model test --tests='cmd/enterprise-portal/service/iam_model.fga.yml'

If we end up changing the model more I'll ask around in dev-infra to see how we should automate this.

Test plan

CI and:

go run github.com/openfga/cli/cmd/fga@latest model test --tests='cmd/enterprise-portal/service/iam_model.fga.yml'

@bobheadxi bobheadxi requested a review from a team June 27, 2024 00:12
@cla-bot cla-bot Bot added the cla-signed label Jun 27, 2024

@jac jac left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this doesn't look correct to me. it was passing but I don't think the assertions were actually correct

the uuids are painful to review lol 😭

Comment thread cmd/enterprise-portal/service/iam_model.fga.yml
Comment thread cmd/enterprise-portal/service/iam_model.fga.yml Outdated
Comment thread cmd/enterprise-portal/service/iam_model.fga.yml Outdated
Comment thread cmd/enterprise-portal/service/iam_model.fga.yml Outdated
bobheadxi and others added 3 commits June 27, 2024 09:10
Co-authored-by: James Cotter <35706755+jac@users.noreply.github.com>
@bobheadxi bobheadxi requested a review from jac June 27, 2024 16:34
@bobheadxi bobheadxi changed the title chore/enterpriseportal: add test for iam_model, remove unused relation chore/enterpriseportal: add test for iam_model Jun 27, 2024
@bobheadxi bobheadxi merged commit 9cce5df into main Jun 27, 2024
@bobheadxi bobheadxi deleted the ep-iam-model-tests branch June 27, 2024 18:56

@unknwon unknwon left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

TIL!

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants