Skip to content

Commit e572c49

Browse files
committed
chore: createEnvironment is still a bit vague, breaking it down
1 parent af745d3 commit e572c49

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

test/setup/index.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,7 @@ export async function removeMonitor(): Promise<void> {
7171
}
7272
}
7373

74-
async function createEnvironment(imageNameAndTag: string): Promise<void> {
75-
await kubectl.downloadKubectl();
76-
await platforms.kind.create(imageNameAndTag);
77-
74+
async function createEnvironment(): Promise<void> {
7875
// TODO: we probably want to use k8s-api for that, not kubectl
7976
const servicesNamespace = 'services';
8077
await kubectl.createNamespace(servicesNamespace);
@@ -132,8 +129,10 @@ export async function deployMonitor(): Promise<string> {
132129
'snyk/kubernetes-monitor:local',
133130
);
134131

132+
await kubectl.downloadKubectl();
135133
// this bit is probably where we act upon the decision of which platform we'll use
136-
await createEnvironment(imageNameAndTag);
134+
await platforms.kind.create(imageNameAndTag);
135+
await createEnvironment();
137136
const integrationId = await installKubernetesMonitor(imageNameAndTag);
138137
await waiters.waitForMonitorToBeReady();
139138
console.log(`Deployed the snyk-monitor with integration ID ${integrationId}`);

0 commit comments

Comments
 (0)