Skip to content

editoast: authz: update several tests to use the TestExtClient API - #17752

Merged
Sh099078 merged 1 commit into
devfrom
lf/refacto-authz-tests
Jul 22, 2026
Merged

editoast: authz: update several tests to use the TestExtClient API#17752
Sh099078 merged 1 commit into
devfrom
lf/refacto-authz-tests

Conversation

@Sh099078

@Sh099078 Sh099078 commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Follow-up on #17242 (comment), remove boilerplate from some tests by using TestExtClient API ; add more utility methods when needed in the second commit.

The first commit updates infra and rolling stock resources tests, the second generalizes it to all openfga resources in the authz crate. If both commits seem fine to reviewers I can squash them before merging

On a sidenote: maybe it would be more readable to implement the TestExtClient methods of each resource type in the said resource type module instead of grouping them all in test_client_ext.rs ? With more than two resources it starts to get messy

@Sh099078
Sh099078 requested a review from a team as a code owner July 20, 2026 19:24
@github-actions github-actions Bot added the area:editoast Work on Editoast Service label Jul 20, 2026
@Sh099078
Sh099078 force-pushed the lf/refacto-authz-tests branch from 3acb14b to 0100962 Compare July 20, 2026 19:25
@Sh099078 Sh099078 moved this to Awaiting merge in Board PI 21 Jul 20, 2026
@Sh099078 Sh099078 self-assigned this Jul 20, 2026
@Sh099078 Sh099078 changed the title editoast: authz: refactorize several tests to use TestExtClient API editoast: authz: update several tests to use TestExtClient API Jul 20, 2026
@Sh099078 Sh099078 changed the title editoast: authz: update several tests to use TestExtClient API editoast: authz: update several tests to use the TestExtClient API Jul 20, 2026

@leovalais leovalais 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.

I'm not sure we can implement a trait in several places like regular impl blocks. We'd need a trait for each resource, but that's a bit...

- Add missing authz functions in TestExtClient API.
- Use TestExtClient whenever possible in `authz` tests.

Signed-off-by: Loup Federico <16464925+Sh099078@users.noreply.github.com>
@Sh099078
Sh099078 force-pushed the lf/refacto-authz-tests branch from 0100962 to bd98637 Compare July 22, 2026 13:30
@Sh099078

Copy link
Copy Markdown
Contributor Author

rebase on dev + squash commits

@Sh099078
Sh099078 enabled auto-merge July 22, 2026 13:31
@Sh099078
Sh099078 added this pull request to the merge queue Jul 22, 2026
Merged via the queue into dev with commit 607ad8a Jul 22, 2026
31 checks passed
@Sh099078
Sh099078 deleted the lf/refacto-authz-tests branch July 22, 2026 14:33
@github-project-automation github-project-automation Bot moved this from Awaiting merge to Awaiting Validation in Board PI 21 Jul 22, 2026
@Maymanaf Maymanaf moved this from Awaiting Validation to Done in Board PI 21 Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:editoast Work on Editoast Service

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants