Skip to content

Commit a169d63

Browse files
committed
cluster integ test to handle macos in github runner
1 parent fa6d616 commit a169d63

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

tests/integration/tools/atlas/clusters.test.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -238,9 +238,17 @@ describeWithAtlas("clusters", (integration) => {
238238
expect(elements[0]?.text).toContain(
239239
"You need to connect to a MongoDB instance before you can access its data."
240240
);
241-
expect(elements[1]?.text).toContain(
242-
'Please use one of the following tools: "atlas-connect-cluster", "atlas-local-connect-deployment", "connect" to connect to a MongoDB instance'
243-
);
241+
// Check if the response contains all available test tools.
242+
if (process.platform === "darwin" && process.env.GITHUB_ACTIONS === "true") {
243+
// The tool atlas-local-connect-deployment may be disabled in some test environments if Docker is not available.
244+
expect(elements[1]?.text).toContain(
245+
'Please use one of the following tools: "atlas-connect-cluster", "connect" to connect to a MongoDB instance'
246+
);
247+
} else {
248+
expect(elements[1]?.text).toContain(
249+
'Please use one of the following tools: "atlas-connect-cluster", "atlas-local-connect-deployment", "connect" to connect to a MongoDB instance'
250+
);
251+
}
244252
});
245253
});
246254
});

0 commit comments

Comments
 (0)