Skip to content

Commit be32708

Browse files
committed
chore: instruct containers to sleep when creating a deployment from an image
right now the containers will use their default command, usually resulting in nothing or a loop of crashing. this creates race conditions in the Kubernetes Monitor and adds some sporadic behaviours to our tests. for the consistent tests, let's make the behaviour of the containers consistent - just instructing them to sleep.
1 parent e49d587 commit be32708

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/helpers/kubectl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export async function applyK8sYaml(pathToYamlDeployment: string): Promise<void>
5656

5757
export async function createDeploymentFromImage(name: string, image: string, namespace: string) {
5858
console.log(`Letting Kubernetes decide how to manage image ${image} with name ${name}`);
59-
await exec(`./kubectl run ${name} --image=${image} -n ${namespace}`);
59+
await exec(`./kubectl run ${name} --image=${image} -n ${namespace} -- sleep 999999999`);
6060
console.log(`Done Letting Kubernetes decide how to manage image ${image} with name ${name}`);
6161
}
6262

0 commit comments

Comments
 (0)