Skip to content

Complement TestOIDCProviderUnavailable should use a clean deployment (cross-test pollution from modified homeserver config being re-used) #19937

Description

@MadLittleMods

We enable COMPLEMENT_ENABLE_DIRTY_RUNS (docs) which means Complement will reuse deployments (shares homeservers between tests).

Because we modify the homeserver configuration in TestOIDCProviderUnavailable, this also affects all other tests that run after this test.

// Configure the OIDC Provider by writing a config fragment
err = dockerutil.WriteFileIntoContainer(
t,
dc,
deployment.ContainerID(t, "hs1"),
"/conf/homeserver.d/oidc_provider.yaml",
[]byte(OIDC_HOMESERVER_CONFIG),
)

Potential solutions

As suggested in the COMPLEMENT_ENABLE_DIRTY_RUNS docs, we could use OldDeploy to get a fresh deployment. The problem is that the OldDeploy API is way more cumbersome using blueprints instead of just being able to specify the number of homeservers desired.

Ideally, we'd just be able to specify that this homeserver should not be re-used when making the deployment like deployment := complement.CleanDeploy(t, 1) (perhaps more apparent name)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions