chore: More flakey test improvements (#5801)
This commit is contained in:
@@ -1,11 +1,7 @@
|
||||
import { faker } from "@faker-js/faker";
|
||||
import { v4 as uuidv4 } from "uuid";
|
||||
import { buildUser, buildTeam } from "@server/test/factories";
|
||||
import {
|
||||
getTestServer,
|
||||
setCloudHosted,
|
||||
setSelfHosted,
|
||||
} from "@server/test/support";
|
||||
import { getTestServer, setSelfHosted } from "@server/test/support";
|
||||
|
||||
const mockTeamInSessionId = uuidv4();
|
||||
|
||||
@@ -18,8 +14,6 @@ jest.mock("@server/utils/authentication", () => ({
|
||||
const server = getTestServer();
|
||||
|
||||
describe("#auth.info", () => {
|
||||
beforeEach(setCloudHosted);
|
||||
|
||||
it("should return current authentication", async () => {
|
||||
const team = await buildTeam();
|
||||
const team2 = await buildTeam();
|
||||
|
||||
@@ -27,7 +27,9 @@ router.post("auth.config", async (ctx: APIContext<T.AuthConfigReq>) => {
|
||||
// brand for the knowledge base and it's guest signin option is used for the
|
||||
// root login page.
|
||||
if (!env.isCloudHosted) {
|
||||
const team = await Team.scope("withAuthenticationProviders").findOne();
|
||||
const team = await Team.scope("withAuthenticationProviders").findOne({
|
||||
order: [["createdAt", "DESC"]],
|
||||
});
|
||||
|
||||
if (team) {
|
||||
ctx.body = {
|
||||
|
||||
Reference in New Issue
Block a user