Skip to content

Commit d35a0f1

Browse files
authored
fix: unflake services and dependency-proxy tests (#1747)
Mock docker login rejection in dependency-proxy test to avoid reliance on actual Docker behavior, and increase timeout for multiport-job test which can exceed 60s in CI.
1 parent 3a5c446 commit d35a0f1

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

tests/test-cases/dependency-proxy/integration.test.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,16 @@ describe("dependency-proxy", () => {
3636
});
3737

3838
test("docker", async () => {
39+
40+
initSpawnSpyReject([
41+
{
42+
cmdArgs: "docker login gitlab.com:443".split(" "),
43+
rejection: {
44+
stderr: "Cannot perform an interactive login from a non TTY device",
45+
},
46+
},
47+
]);
48+
3949
try {
4050
const writeStreams = new WriteStreamsMock();
4151
await handler({

tests/test-cases/services/integration.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ test.concurrent("services <multiport-job>", async () => {
8181
chalk`{black.bgGreenBright PASS } {blueBright multiport-job}`,
8282
];
8383
expect(writeStreams.stdoutLines).toEqual(expect.arrayContaining(expected));
84-
});
84+
}, 120000);
8585

8686
test.concurrent("services <alias-job>", async () => {
8787
const writeStreams = new WriteStreamsMock();

0 commit comments

Comments
 (0)