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

[WPB-5687] port flaking LH tests to new integration #3876

Merged
merged 21 commits into from
Feb 23, 2024

Conversation

MangoIV
Copy link
Contributor

@MangoIV MangoIV commented Feb 6, 2024

https://wearezeta.atlassian.net/browse/WPB-5687

Checklist

  • Add a new entry in an appropriate subdirectory of changelog.d
  • Read and follow the PR guidelines

@MangoIV MangoIV changed the title Mangoiv/lh tests to new integration [WPB-5687] lh tests to new integration Feb 6, 2024
@MangoIV MangoIV changed the title [WPB-5687] lh tests to new integration [WPB-5687] port flaking LH tests to new integration Feb 6, 2024
@zebot zebot added the ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist label Feb 6, 2024
@MangoIV MangoIV force-pushed the mangoiv/lh-tests-to-new-integration branch from 8a4756c to 010a6fc Compare February 6, 2024 16:37
@MangoIV MangoIV force-pushed the mangoiv/lh-tests-to-new-integration branch from 010a6fc to 44e1f4a Compare February 12, 2024 09:10
@MangoIV
Copy link
Contributor Author

MangoIV commented Feb 13, 2024

/teams/{tid}/legalhod/settings not ported because they don't flake.

@MangoIV MangoIV force-pushed the mangoiv/lh-tests-to-new-integration branch from 9ebaf36 to 66a4242 Compare February 13, 2024 14:58
- delegate only the testcase generation to the user
- use an OVERLAPPABLE default instance if the type is a Generic Enum
- cover more cases
- don't use newtype Wrappers wherever possible
@MangoIV
Copy link
Contributor Author

MangoIV commented Feb 14, 2024

I already have a flaking test: LegalHold.testLHDisableForUser, it is extremely flaky though so I'm going to have to fix it :3

@MangoIV
Copy link
Contributor Author

MangoIV commented Feb 15, 2024

still needs some cleanups (also for some reason postProteus reports 404 no endpoint) :(

@MangoIV
Copy link
Contributor Author

MangoIV commented Feb 16, 2024

client removed notification takes extremely long to arrive; on local it was fine to bump the timeout, in CI it takes over 20 seconds for it before it times out

@MangoIV MangoIV force-pushed the mangoiv/lh-tests-to-new-integration branch from 56b6955 to 84feffa Compare February 19, 2024 12:25
@MangoIV
Copy link
Contributor Author

MangoIV commented Feb 20, 2024

I have no idea on how to solve this issue with timeouts, it's because the SQS queue is really slow. there's two options:

  • bump the timeouts to something really high
  • don't wait for these events

@MangoIV MangoIV force-pushed the mangoiv/lh-tests-to-new-integration branch from 392d4a6 to 402d6ec Compare February 20, 2024 15:28
@MangoIV MangoIV marked this pull request as ready for review February 21, 2024 11:54
@MangoIV MangoIV requested a review from fisx February 21, 2024 12:13
@MangoIV
Copy link
Contributor Author

MangoIV commented Feb 21, 2024

there are still some legalhold tests that are not ported but I have confirmed that these have not flaked for some time (sinche the http-client revert)

@MangoIV MangoIV force-pushed the mangoiv/lh-tests-to-new-integration branch 2 times, most recently from 6938583 to f4c8b09 Compare February 21, 2024 13:39
fisx
fisx previously approved these changes Feb 21, 2024
@@ -149,7 +149,6 @@ deleteUser user = do
submit "DELETE" $
req & addJSONObject ["password" .= defPassword]

-- | https://staging-nginz-https.zinfra.io/api-internal/swagger-ui/brig/#/brig/post_i_clients__uid_
Copy link
Contributor

Choose a reason for hiding this comment

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

removed by accident?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no, this is the wrong endpoint (internal)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have replaced this with the proper one

@fisx fisx dismissed their stale review February 21, 2024 13:59

sorry, i wanted to just send the comments, i approved by accident.

@MangoIV MangoIV force-pushed the mangoiv/lh-tests-to-new-integration branch from f4c8b09 to df9ce7f Compare February 21, 2024 14:06
postLegalHoldSettings tid alice (mkLegalHoldSettings lhPort)
>>= assertStatus 201

if not connectFirst
Copy link
Contributor

Choose a reason for hiding this comment

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

why not?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I also stumbled over this in the old test but I does make sense.

@MangoIV MangoIV force-pushed the mangoiv/lh-tests-to-new-integration branch from 16a2d97 to fe70861 Compare February 22, 2024 14:05
Copy link
Contributor

@pcapriotti pcapriotti left a comment

Choose a reason for hiding this comment

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

LGTM. I only skimmed over the new tests, but they seem ok to me. I like the improvements to the HasTests class. Personally, I would have skipped the Generics stuff, but I'm not going to fight you on that :).

@MangoIV MangoIV merged commit c6acc1f into develop Feb 23, 2024
8 checks passed
@MangoIV MangoIV deleted the mangoiv/lh-tests-to-new-integration branch February 23, 2024 20:23
stefanwire pushed a commit that referenced this pull request Jul 23, 2024
* [fix] use -e flag to abort when `docker-compose` fails
* [feat] make `HasTests` easier to use
- delegate only the testcase generation to the user
- use an OVERLAPPABLE default instance if the type is a Generic Enum
- cover more cases
- don't use newtype Wrappers wherever possible
* [feat] port over flaking Legalhold tests and delete them from galley integration
* [feat] minor testlib improvements and additions
---------

Co-authored-by: Matthias Fischmann <[email protected]>
battermann pushed a commit that referenced this pull request Jul 24, 2024
* [fix] use -e flag to abort when `docker-compose` fails
* [feat] make `HasTests` easier to use
- delegate only the testcase generation to the user
- use an OVERLAPPABLE default instance if the type is a Generic Enum
- cover more cases
- don't use newtype Wrappers wherever possible
* [feat] port over flaking Legalhold tests and delete them from galley integration
* [feat] minor testlib improvements and additions
---------

Co-authored-by: Matthias Fischmann <[email protected]>
elland pushed a commit that referenced this pull request Jul 24, 2024
* WPB-5845 guests should not be able to join conversations under legalhold (#3853)

* Clean up LH tests (#3830)

* Use HasTests to save a few LOC.

* Fix/extend client CRUD api.

- moved internal add from API.Brig to API.BrigInternal
- created API.BrigCommon for data structured needed in both
- added public add

* Tranlate tests: manually add/delete client.

* Fiddle with test case type abstractions.

* Remove obsolete test from integration/test/Test/Demo.hs

* Unblock release. (#3871)

* WIP: [WPB-5687] port flaking LH tests to new integration (#3876)

* [fix] use -e flag to abort when `docker-compose` fails
* [feat] make `HasTests` easier to use
- delegate only the testcase generation to the user
- use an OVERLAPPABLE default instance if the type is a Generic Enum
- cover more cases
- don't use newtype Wrappers wherever possible
* [feat] port over flaking Legalhold tests and delete them from galley integration
* [feat] minor testlib improvements and additions
---------

Co-authored-by: Matthias Fischmann <[email protected]>

* wip

* fix integration tests

---------

Co-authored-by: fisx <[email protected]>
Co-authored-by: Mango The Fourth <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants