chore: More flakey test improvements (#5801)

This commit is contained in:
Tom Moor
2023-09-09 18:30:19 -04:00
committed by GitHub
parent 7270e65f0c
commit 80ef0a38d6
37 changed files with 245 additions and 210 deletions

View File

@@ -101,7 +101,11 @@ export async function getTeamFromContext(ctx: Context) {
let team;
if (!env.isCloudHosted) {
team = await Team.findOne();
if (env.ENVIRONMENT === "test") {
team = await Team.findOne({ where: { domain: env.URL } });
} else {
team = await Team.findOne();
}
} else if (domain.custom) {
team = await Team.findOne({ where: { domain: domain.host } });
} else if (domain.teamSubdomain) {