Skip to content

Commit

Permalink
test: ensure that custom applyArgs are passed in and applied
Browse files Browse the repository at this point in the history
  • Loading branch information
vvagaytsev committed Sep 3, 2024
1 parent fadd230 commit 263ce22
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ type: kubernetes

spec:
applyArgs:
- --server-side
- --unknown-apply-flag
files:
- manifests.yaml
- manifests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import cloneDeep from "fast-copy"

import tmp from "tmp-promise"

import type { TestGarden } from "../../../../../helpers.js"
import { expectError, TestGarden } from "../../../../../helpers.js"
import { getKubernetesTestGarden } from "./common.js"
import { DeployTask } from "../../../../../../src/tasks/deploy.js"
import {
Expand Down Expand Up @@ -491,11 +491,11 @@ describe("kubernetes-type handlers", () => {
await kubernetesDeploy(configMapList.deployParams)
})

it("should successfully deploy with custom applyArgs", async () => {
it("should apply the custom applyArgs to the deployment", async () => {
// This example has a bad custom argument - it is `--unknown-apply-flag`.
const { deployParams } = await prepareActionDeployParams("apply-args", {})

const status = await kubernetesDeploy(deployParams)
expect(status.state).to.eql("ready")
await expectError(() => kubernetesDeploy(deployParams), { contains: "error: unknown flag: --unknown-apply-flag" })
})
})

Expand Down

0 comments on commit 263ce22

Please sign in to comment.