-
Notifications
You must be signed in to change notification settings - Fork 325
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* 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 <mf@zerobuzz.net> * wip * fix integration tests --------- Co-authored-by: fisx <mf@zerobuzz.net> Co-authored-by: Mango The Fourth <40720523+MangoIV@users.noreply.github.com>
- Loading branch information
1 parent
b7f50a2
commit 87283d7
Showing
37 changed files
with
1,263 additions
and
1,004 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Guests should not be added to conversations that are under legalhold |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
port flaking LH tests to new integration and improve the ergonomics of our testing library |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Translate integration tests: manually add / delete LH device |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
module API.BrigCommon where | ||
|
||
import API.Common | ||
import Data.Aeson.Types (Pair) | ||
import Data.Maybe | ||
import Testlib.Prelude as Prelude | ||
|
||
data AddClient = AddClient | ||
{ ctype :: String, -- "temporary", "permanent", "legalhold" | ||
internal :: Bool, | ||
clabel :: String, | ||
model :: String, | ||
prekeys :: Maybe [Value], | ||
lastPrekey :: Maybe Value, | ||
password :: String, | ||
acapabilities :: Maybe [String] | ||
} | ||
|
||
instance Default AddClient where | ||
def = | ||
AddClient | ||
{ ctype = "permanent", | ||
internal = False, | ||
clabel = "Test Device", | ||
model = "Test Model", | ||
prekeys = Nothing, | ||
lastPrekey = Nothing, | ||
password = defPassword, | ||
acapabilities = Just ["legalhold-implicit-consent"] | ||
} | ||
|
||
mkAddClientValue :: AddClient -> App [Pair] | ||
mkAddClientValue args = do | ||
pks <- maybe (fmap pure getPrekey) pure args.prekeys | ||
lpk <- maybe getLastPrekey pure args.lastPrekey | ||
pure | ||
[ "prekeys" .= pks, | ||
"lastkey" .= lpk, | ||
"type" .= args.ctype, | ||
"label" .= args.clabel, | ||
"model" .= args.model, | ||
"password" .= args.password, | ||
"capabilities" .= args.acapabilities | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.