integration-0.1.0
Safe HaskellSafe-Inferred
LanguageGHC2021

Test.LegalHold

Synopsis

Documentation

testLHMessageExchange :: HasCallStack => TaggedBool "clients1New" -> TaggedBool "clients2New" -> App () Source #

data TestClaimKeys Source #

Instances

Instances details
Generic TestClaimKeys Source # 
Instance details

Defined in Test.LegalHold

Associated Types

type Rep TestClaimKeys :: Type -> Type #

Show TestClaimKeys Source # 
Instance details

Defined in Test.LegalHold

type Rep TestClaimKeys Source # 
Instance details

Defined in Test.LegalHold

type Rep TestClaimKeys = D1 ('MetaData "TestClaimKeys" "Test.LegalHold" "integration-0.1.0-1M0hVX0XSYq1OAOo8LJGGB" 'False) (C1 ('MetaCons "TCKConsentMissing" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TCKConsentAndNewClients" 'PrefixI 'False) (U1 :: Type -> Type))

data LHApprovedOrPending Source #

Constructors

LHApproved 
LHPending 

Instances

Instances details
Generic LHApprovedOrPending Source # 
Instance details

Defined in Test.LegalHold

Associated Types

type Rep LHApprovedOrPending :: Type -> Type #

Show LHApprovedOrPending Source # 
Instance details

Defined in Test.LegalHold

type Rep LHApprovedOrPending Source # 
Instance details

Defined in Test.LegalHold

type Rep LHApprovedOrPending = D1 ('MetaData "LHApprovedOrPending" "Test.LegalHold" "integration-0.1.0-1M0hVX0XSYq1OAOo8LJGGB" 'False) (C1 ('MetaCons "LHApproved" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "LHPending" 'PrefixI 'False) (U1 :: Type -> Type))

testLHClaimKeys :: LHApprovedOrPending -> TestClaimKeys -> App () Source #

Cannot fetch prekeys of LH users if requester has not given consent or has old clients.

checkChan :: HasCallStack => Chan t -> (t -> App (Maybe a)) -> App a Source #

pops a channel until it finds an event that returns a Just upon running the matcher function

checkChanVal :: HasCallStack => Chan (t, LazyByteString) -> (Value -> MaybeT App a) -> App a Source #

like checkChan but throws away the request and decodes the body

setTimeoutTo :: Int -> Env -> Env Source #

this sets the timeout to a higher number; we need this because the SQS queue on the brig is super slow and that's why client.remove events arrive really late

FUTUREWORK(mangoiv): improve the speed of internal event queuing

data GroupConvAdmin Source #

Instances

Instances details
Generic GroupConvAdmin Source # 
Instance details

Defined in Test.LegalHold

Associated Types

type Rep GroupConvAdmin :: Type -> Type #

Show GroupConvAdmin Source # 
Instance details

Defined in Test.LegalHold

type Rep GroupConvAdmin Source # 
Instance details

Defined in Test.LegalHold

type Rep GroupConvAdmin = D1 ('MetaData "GroupConvAdmin" "Test.LegalHold" "integration-0.1.0-1M0hVX0XSYq1OAOo8LJGGB" 'False) (C1 ('MetaCons "LegalholderIsAdmin" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "PeerIsAdmin" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BothAreAdmins" 'PrefixI 'False) (U1 :: Type -> Type)))

testLHNoConsentRemoveFromGroup :: LHApprovedOrPending -> GroupConvAdmin -> App () Source #

If a member of an existing conversation is assigned a LH device, users are removed from the conversation until policy conflicts are resolved.

As to who gets to stay: - admins will stay over members - local members will stay over remote members.

testBlockCreateMLSConvForLHUsers :: HasCallStack => LhApiVersion -> App () Source #

scenario 2.2: charlie is put under legalhold but creates an MLS Group himself since he doesn't need to claim his own keypackage to do so, this would succeed we need to check upon group creation if the user is under legalhold and reject the operation if they are

data ImplicitConsent Source #

LH can be configured in a way that does not require users to give preliminary consent to LH when being added to a team. The user still has to approve the LH device before the recording starts. This is called "implicit consent", was introduced to accomodate specific work flows, and there is some hope that it'll be removed in the future.

Explicit consent requires users to consent on entering the team, and then approve the actual being put under recording again if it happens.

This flag allows to make tests run through both configurations with minimal adjustment.

Instances

Instances details
Generic ImplicitConsent Source # 
Instance details

Defined in Test.LegalHold

Associated Types

type Rep ImplicitConsent :: Type -> Type #

Show ImplicitConsent Source # 
Instance details

Defined in Test.LegalHold

Eq ImplicitConsent Source # 
Instance details

Defined in Test.LegalHold

type Rep ImplicitConsent Source # 
Instance details

Defined in Test.LegalHold

type Rep ImplicitConsent = D1 ('MetaData "ImplicitConsent" "Test.LegalHold" "integration-0.1.0-1M0hVX0XSYq1OAOo8LJGGB" 'False) (C1 ('MetaCons "ImplicitConsent" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ExplicitConsent" 'PrefixI 'False) (U1 :: Type -> Type))

ensureLHFeatureConfigForServer :: ImplicitConsent -> (String -> App ()) -> App () Source #

Ensure that the LH config is as expected: Either by expecting it from the current server's config. Or, by creating a new one.