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

Add failing test for #3244 #3248

Merged
merged 1 commit into from
Nov 19, 2024

Conversation

corneliusroemer
Copy link
Contributor

@corneliusroemer corneliusroemer commented Nov 19, 2024

To ensure we're fixing it in #3246

> Task :test

RevokeEndpointTest > WHEN superuser revokes entries of other group THEN superuser is submitter of revocation entry() FAILED
    java.lang.AssertionError:
    Expected: is "test_superuser"
         but: was "testuser"
        at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
        at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:6)
        at org.loculus.backend.controller.TestHelpersKt.assertSubmitterIs(TestHelpers.kt:81)
        at org.loculus.backend.controller.submission.RevokeEndpointTest.WHEN superuser revokes entries of other group THEN superuser is submitter of revocation entry(RevokeEndpointTest.kt:114)

@corneliusroemer corneliusroemer changed the base branch from main to theosanderson/fix-revoked-sequences November 19, 2024 18:44
@corneliusroemer corneliusroemer marked this pull request as ready for review November 19, 2024 18:44
@corneliusroemer corneliusroemer merged commit fa2cfe1 into theosanderson/fix-revoked-sequences Nov 19, 2024
15 of 16 checks passed
@corneliusroemer corneliusroemer deleted the revoke-test branch November 19, 2024 18:44
theosanderson added a commit that referenced this pull request Nov 20, 2024
…3246)

* (CoPilot generated attempt) Fix submitter of revoked sequences to be the revoker

Fixes #3244

Update the submitter of a revoked sequence to the revoker

* Modify `backend/src/main/kotlin/org/loculus/backend/service/submission/SubmissionDatabaseService.kt` to set the `submitterColumn` to the revoker's account during the revocation process
* Change the `revoke` function to use the revoker's username for the `submitterColumn` instead of cloning the old submitter information

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/loculus-project/loculus/issues/3244?shareId=XXXX-XXXX-XXXX-XXXX).

* Add test for #3244 (#3248)

* Assert some more things that we don't seem to so far to avoid similar errors from happening in future

* fix tests

---------

Co-authored-by: Cornelius Roemer <[email protected]>
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.

1 participant