Skip to content

Commit

Permalink
chore: save
Browse files Browse the repository at this point in the history
  • Loading branch information
Eyþór Magnússon committed Nov 12, 2024
1 parent 95d5bad commit ac842ca
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion core/test/integ/src/plugins/kubernetes/helm/deployment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ describe("helmDeploy in local-mode", () => {
})
})

describe("helmDeploy", () => {
describe.only("helmDeploy", () => {
let garden: TestGarden
let provider: KubernetesProvider
let ctx: KubernetesPluginContext
Expand Down Expand Up @@ -464,6 +464,7 @@ describe("helmDeploy", () => {

const action = graph.getDeploy("api") as HelmDeployAction
action._config.spec.values["args"] = ["/bin/sh", "-c", "echo 'hello' && exit 1"]
action._config.spec.values["ingress"]!["enabled"] = false
action._config.spec.releaseName = `api-${randomString(4)}`
const resolvedAction = await garden.resolveAction<HelmDeployAction>({
action,
Expand All @@ -486,6 +487,10 @@ describe("helmDeploy", () => {
force: false,
}),
(err) => {
console.log("ERR IS***")
console.log("should include K8s events and Pod logs with errors")
console.log(err)
console.log("ERR IS***")
const message = stripAnsi(err.message)
expect(message).to.include(`Latest events from Deployment ${releaseName}`)
expect(message).to.include(`BackOff`)
Expand All @@ -499,6 +504,7 @@ describe("helmDeploy", () => {

const action = graph.getDeploy("api") as HelmDeployAction
action._config.spec.values["args"] = ["/bin/sh", "-c", "echo 'hello' && exit 1"]
action._config.spec.values["ingress"]!["enabled"] = false
action._config.spec.releaseName = `api-${randomString(4)}`
const resolvedAction = await garden.resolveAction<HelmDeployAction>({
action,
Expand All @@ -520,6 +526,10 @@ describe("helmDeploy", () => {
force: false,
}),
(err) => {
console.log("ERR IS***")
console.log("should fail fast if one of the resources is unhealthy")
console.log(err)
console.log("ERR IS***")
expect(err).to.be.instanceOf(DeploymentError)
}
)
Expand Down Expand Up @@ -580,6 +590,7 @@ describe("helmDeploy", () => {
force: false,
}),
(err) => {
console.log(err)
const message = stripAnsi(err.message)
expect(err).to.be.instanceOf(ChildProcessError)
expect(message).to.include(`release ${releaseName} failed`)
Expand Down Expand Up @@ -620,6 +631,7 @@ describe("helmDeploy", () => {
force: false,
}),
(err) => {
console.log(err)
const message = stripAnsi(err.message)
expect(message).to.include(`Latest events from Deployment ${releaseName}`)
expect(message).to.include(`BackOff`)
Expand Down Expand Up @@ -659,6 +671,7 @@ describe("helmDeploy", () => {
}),
(err) => {
const message = stripAnsi(err.message)
console.log(err)
expect(err).to.be.instanceOf(ChildProcessError)
expect(message).to.include(`Error: UPGRADE FAILED`)
}
Expand Down

0 comments on commit ac842ca

Please sign in to comment.