Skip to content

Commit 4b67d43

Browse files
committed
add more oidc test retry conditions
1 parent 7971332 commit 4b67d43

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

tests/integration/common/connectionManager.oidc.test.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,14 +169,22 @@ describe.skipIf(process.platform !== "linux")("ConnectionManager OIDC Tests", as
169169
};
170170

171171
const status: ConnectionStatus = await vi.waitFor(async () => {
172-
const result: ConnectionStatus = (await state.serviceProvider.runCommand("admin", {
172+
const result = (await state.serviceProvider.runCommand("admin", {
173173
connectionStatus: 1,
174-
})) as unknown as ConnectionStatus;
174+
})) as unknown as ConnectionStatus | undefined;
175175

176176
if (!result) {
177177
throw new Error("Status can not be undefined. Retrying.");
178178
}
179179

180+
if (!result.authInfo.authenticatedUsers.length) {
181+
throw new Error("No authenticated users found. Retrying.");
182+
}
183+
184+
if (!result.authInfo.authenticatedUserRoles.length) {
185+
throw new Error("No authenticated user roles found. Retrying.");
186+
}
187+
180188
return result;
181189
});
182190

0 commit comments

Comments
 (0)