Skip to content

Commit

Permalink
style: empty lines and spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
vvagaytsev committed Jul 4, 2024
1 parent 8d8bb8e commit 8274dde
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions core/test/integ/src/plugins/kubernetes/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,7 @@ describe("kubernetes Pod runner functions", () => {
provider: helmCtx.provider,
})
})

beforeEach(async () => {
helmTarget = await getTargetResource({
ctx: helmCtx,
Expand Down Expand Up @@ -708,7 +709,6 @@ describe("kubernetes Pod runner functions", () => {
action: helmAction,
args: ["sh", "-c"],
command: ["echo", "foo"],

envVars: {},
resources, // <---
description: "Helm module",
Expand Down Expand Up @@ -762,7 +762,6 @@ describe("kubernetes Pod runner functions", () => {
action: helmAction,
args: ["sh", "-c"],
command: ["echo", "foo"],

envVars: {},
resources, // <---
description: "Helm module",
Expand Down Expand Up @@ -838,7 +837,9 @@ describe("kubernetes Pod runner functions", () => {
...helmContainer,
volumeMounts,
}

sanitizeVolumesForPodRunner(podSpecWithVolumes, helmContainerWithVolumeMounts)

const generatedPodSpec = await prepareRunPodSpec({
podSpec: podSpecWithVolumes,
getArtifacts: false,
Expand All @@ -848,7 +849,6 @@ describe("kubernetes Pod runner functions", () => {
action: helmAction,
args: ["sh", "-c"],
command: ["echo", "foo"],

envVars: {},
resources,
description: "Helm module",
Expand All @@ -863,6 +863,7 @@ describe("kubernetes Pod runner functions", () => {
expect(generatedPodSpec.volumes).to.eql(volumes)
expect(generatedPodSpec.containers[0].volumeMounts).to.eql(volumeMounts)
})

it("should not include persistentVolumes in the generated pod spec", async () => {
const podSpecWithPersistentVolume = getResourcePodSpec(helmTarget)
const volumes: V1Volume[] = [
Expand All @@ -884,7 +885,9 @@ describe("kubernetes Pod runner functions", () => {
...helmContainer,
volumeMounts,
}

sanitizeVolumesForPodRunner(podSpecWithPersistentVolume, helmContainerWithVolumeMounts)

const generatedPodSpec = await prepareRunPodSpec({
podSpec: podSpecWithPersistentVolume,
getArtifacts: false,
Expand All @@ -894,7 +897,6 @@ describe("kubernetes Pod runner functions", () => {
action: helmAction,
args: ["sh", "-c"],
command: ["echo", "foo"],

envVars: {},
resources,
description: "Helm module",
Expand All @@ -908,6 +910,7 @@ describe("kubernetes Pod runner functions", () => {
expect(generatedPodSpec.volumes).to.eql([])
expect(generatedPodSpec.containers[0].volumeMounts).to.eql([])
})

it("should make sure configMap file permissions are in octal", async () => {
const podSpecWithConfigMap = getResourcePodSpec(helmTarget)
const volumes = [
Expand All @@ -930,7 +933,9 @@ describe("kubernetes Pod runner functions", () => {
...helmContainer,
volumeMounts,
}

sanitizeVolumesForPodRunner(podSpecWithConfigMap, helmContainerWithVolumeMounts)

const generatedPodSpec = await prepareRunPodSpec({
podSpec: podSpecWithConfigMap,
getArtifacts: false,
Expand All @@ -940,7 +945,6 @@ describe("kubernetes Pod runner functions", () => {
action: helmAction,
args: ["sh", "-c"],
command: ["echo", "foo"],

envVars: {},
resources,
description: "Helm module",
Expand All @@ -953,6 +957,7 @@ describe("kubernetes Pod runner functions", () => {
})
expect(generatedPodSpec.volumes![0].configMap?.defaultMode).to.eql(493)
})

it("should apply security context fields to the main container when provided", async () => {
const generatedPodSpec = await prepareRunPodSpec({
podSpec: undefined,
Expand All @@ -963,7 +968,6 @@ describe("kubernetes Pod runner functions", () => {
action: helmAction,
args: ["sh", "-c"],
command: ["echo", "foo"],

envVars: {},
resources, // <---
description: "Helm module",
Expand Down Expand Up @@ -1048,7 +1052,6 @@ describe("kubernetes Pod runner functions", () => {
action: helmAction,
args: ["sh", "-c"],
command: ["echo", "foo"],

envVars: {},
description: "Helm module",
mainContainerName: "main",
Expand Down Expand Up @@ -1125,7 +1128,6 @@ describe("kubernetes Pod runner functions", () => {
action: helmAction,
args: ["sh", "-c"],
command: ["echo", "foo"],

envVars: {},
description: "Helm module",
mainContainerName: "main",
Expand Down

0 comments on commit 8274dde

Please sign in to comment.