diff --git a/core/src/commands/get/get-status.ts b/core/src/commands/get/get-status.ts index 2f97ca2270..296baf3765 100644 --- a/core/src/commands/get/get-status.ts +++ b/core/src/commands/get/get-status.ts @@ -125,7 +125,7 @@ async function getTestStatuses(garden: Garden, configGraph: ConfigGraph, log: Lo const result = await actions.getTestResult({ module, log, - test: testFromConfig(module, testConfig), + test: testFromConfig(module, testConfig, configGraph), }) return [`${module.name}.${testConfig.name}`, runStatus(result)] }) diff --git a/core/src/commands/get/get-test-result.ts b/core/src/commands/get/get-test-result.ts index 4a343cc0f0..2088bd3aa2 100644 --- a/core/src/commands/get/get-test-result.ts +++ b/core/src/commands/get/get-test-result.ts @@ -69,7 +69,7 @@ export class GetTestResultCommand extends Command { const actions = await garden.getActionRouter() const module = graph.getModule(moduleName) - const test = testFromModule(module, testName) + const test = testFromModule(module, testName, graph) const testResult = await actions.getTestResult({ log, diff --git a/core/src/commands/run/test.ts b/core/src/commands/run/test.ts index 4f13cbc5e9..8eda6c5382 100644 --- a/core/src/commands/run/test.ts +++ b/core/src/commands/run/test.ts @@ -113,7 +113,7 @@ export class RunTestCommand extends Command { }) } - const test = testFromConfig(module, testConfig) + const test = testFromConfig(module, testConfig, graph) if ((module.disabled || test.disabled) && !opts.force) { throw new CommandError( diff --git a/core/src/config-graph.ts b/core/src/config-graph.ts index 612c42302f..4176625672 100644 --- a/core/src/config-graph.ts +++ b/core/src/config-graph.ts @@ -325,7 +325,7 @@ export class ConfigGraph { */ getTest(moduleName: string, testName: string, includeDisabled?: boolean): GardenTest { const module = this.getModule(moduleName, includeDisabled) - return testFromModule(module, testName) + return testFromModule(module, testName, this) } /* diff --git a/core/src/tasks/test.ts b/core/src/tasks/test.ts index 170510249e..c59f3b6efa 100644 --- a/core/src/tasks/test.ts +++ b/core/src/tasks/test.ts @@ -239,7 +239,7 @@ export async function getTestTasks({ log, force, forceBuild, - test: testFromConfig(module, testConfig), + test: testFromConfig(module, testConfig, graph), hotReloadServiceNames, }) ) diff --git a/core/src/types/test.ts b/core/src/types/test.ts index 9eb74916c8..a85dca2c1c 100644 --- a/core/src/types/test.ts +++ b/core/src/types/test.ts @@ -8,10 +8,14 @@ import { GardenModule } from "./module" import { TestConfig, testConfigSchema } from "../config/test" -import { getEntityVersion } from "../vcs/vcs" +import { getEntityVersion, hashStrings, versionStringPrefix } from "../vcs/vcs" import { findByName } from "../util/util" import { NotFoundError } from "../exceptions" import { joi, joiUserIdentifier, versionStringSchema } from "../config/common" +import { ConfigGraph } from "../config-graph" +import { makeTestTaskName } from "../tasks/helpers" +import { sortBy } from "lodash" +import { serializeConfig } from "../config/module" export interface GardenTest { name: string @@ -35,23 +39,43 @@ export const testSchema = () => version: versionStringSchema().description("The version of the test."), }) -export function testFromConfig(module: M, config: TestConfig): GardenTest { +export function testFromConfig( + module: M, + config: TestConfig, + graph: ConfigGraph +): GardenTest { + const deps = graph.getDependencies({ + nodeType: "test", + name: makeTestTaskName(module.name, config.name), + recursive: true, + }) + // We sort the dependencies by type and name to avoid unnecessary cache invalidation due to possible ordering changes. + const depHashes = [ + ...sortBy(deps.build, (mod) => mod.name).map((mod) => mod.version), + ...sortBy(deps.deploy, (s) => s.module.name).map((s) => serializeConfig(s)), + ...sortBy(deps.run, (t) => t.module.name).map((t) => serializeConfig(t)), + ] + const version = `${versionStringPrefix}${hashStrings([getEntityVersion(module, config), ...depHashes])}` return { name: config.name, module, disabled: module.disabled || config.disabled, config, spec: config.spec, - version: getEntityVersion(module, config), + version, } } -export function testFromModule(module: M, name: string): GardenTest { +export function testFromModule( + module: M, + name: string, + graph: ConfigGraph +): GardenTest { const config = findByName(module.testConfigs, name) if (!config) { throw new NotFoundError(`Could not find test ${name} in module ${module.name}`, { module, name }) } - return testFromConfig(module, config) + return testFromConfig(module, config, graph) } diff --git a/core/src/vcs/vcs.ts b/core/src/vcs/vcs.ts index bd2288a0ea..e2f1c07b3b 100644 --- a/core/src/vcs/vcs.ts +++ b/core/src/vcs/vcs.ts @@ -312,7 +312,7 @@ export function getEntityVersion(module: GardenModule, entityConfig: ServiceConf return `${versionStringPrefix}${hashStrings([module.version.versionString, configString])}` } -function hashStrings(hashes: string[]) { +export function hashStrings(hashes: string[]) { const versionHash = createHash("sha256") versionHash.update(hashes.join(".")) return versionHash.digest("hex").slice(0, 10) diff --git a/core/test/integ/src/plugins/hadolint/hadolint.ts b/core/test/integ/src/plugins/hadolint/hadolint.ts index def9f285e8..539a528993 100644 --- a/core/test/integ/src/plugins/hadolint/hadolint.ts +++ b/core/test/integ/src/plugins/hadolint/hadolint.ts @@ -186,7 +186,7 @@ describe("hadolint provider", () => { garden, log: garden.log, graph, - test: testFromConfig(module, module.testConfigs[0]), + test: testFromConfig(module, module.testConfigs[0], graph), force: true, forceBuild: false, }) @@ -248,7 +248,7 @@ describe("hadolint provider", () => { garden, log: garden.log, graph, - test: testFromConfig(module, module.testConfigs[0]), + test: testFromConfig(module, module.testConfigs[0], graph), force: true, forceBuild: false, }) @@ -305,7 +305,7 @@ describe("hadolint provider", () => { garden, log: garden.log, graph, - test: testFromConfig(module, module.testConfigs[0]), + test: testFromConfig(module, module.testConfigs[0], graph), force: true, forceBuild: false, }) @@ -356,7 +356,7 @@ describe("hadolint provider", () => { garden, log: garden.log, graph, - test: testFromConfig(module, module.testConfigs[0]), + test: testFromConfig(module, module.testConfigs[0], graph), force: true, forceBuild: false, }) @@ -397,7 +397,7 @@ describe("hadolint provider", () => { garden, log: garden.log, graph, - test: testFromConfig(module, module.testConfigs[0]), + test: testFromConfig(module, module.testConfigs[0], graph), force: true, forceBuild: false, }) @@ -439,7 +439,7 @@ describe("hadolint provider", () => { const testTask = new TestTask({ garden, - test: testFromConfig(module, module.testConfigs[0]), + test: testFromConfig(module, module.testConfigs[0], graph), log: garden.log, graph, force: true, diff --git a/core/test/integ/src/plugins/kubernetes/container/container.ts b/core/test/integ/src/plugins/kubernetes/container/container.ts index e827c5e390..b5fa6ed887 100644 --- a/core/test/integ/src/plugins/kubernetes/container/container.ts +++ b/core/test/integ/src/plugins/kubernetes/container/container.ts @@ -184,7 +184,7 @@ describe("kubernetes container module handlers", () => { const testTask = new TestTask({ garden, graph, - test: testFromModule(module, "echo-test"), + test: testFromModule(module, "echo-test", graph), log: garden.log, force: true, forceBuild: false, @@ -203,7 +203,7 @@ describe("kubernetes container module handlers", () => { const testConfig = findByName(module.testConfigs, "echo-test")! testConfig.spec.command = ["bork"] // this will fail - const test = testFromConfig(module, testConfig) + const test = testFromConfig(module, testConfig, graph) const testTask = new TestTask({ garden, @@ -240,7 +240,7 @@ describe("kubernetes container module handlers", () => { const testTask = new TestTask({ garden, graph, - test: testFromModule(module, "artifacts-test"), + test: testFromModule(module, "artifacts-test", graph), log: garden.log, force: true, forceBuild: false, @@ -260,7 +260,7 @@ describe("kubernetes container module handlers", () => { const testTask = new TestTask({ garden, graph, - test: testFromModule(module, "artifacts-test-fail"), + test: testFromModule(module, "artifacts-test-fail", graph), log: garden.log, force: true, forceBuild: false, @@ -282,7 +282,7 @@ describe("kubernetes container module handlers", () => { const testTask = new TestTask({ garden, graph, - test: testFromModule(module, "globs-test"), + test: testFromModule(module, "globs-test", graph), log: garden.log, force: true, forceBuild: false, @@ -302,7 +302,7 @@ describe("kubernetes container module handlers", () => { const testTask = new TestTask({ garden, graph, - test: testFromConfig(module, module.testConfigs[0]), + test: testFromConfig(module, module.testConfigs[0], graph), log: garden.log, force: true, forceBuild: false, @@ -326,7 +326,7 @@ describe("kubernetes container module handlers", () => { const testTask = new TestTask({ garden, graph, - test: testFromConfig(module, module.testConfigs[0]), + test: testFromConfig(module, module.testConfigs[0], graph), log: garden.log, force: true, forceBuild: false, diff --git a/core/test/integ/src/plugins/kubernetes/helm/test.ts b/core/test/integ/src/plugins/kubernetes/helm/test.ts index e2067f62bd..7281b771e5 100644 --- a/core/test/integ/src/plugins/kubernetes/helm/test.ts +++ b/core/test/integ/src/plugins/kubernetes/helm/test.ts @@ -35,7 +35,7 @@ describe("testHelmModule", () => { const testTask = new TestTask({ garden, graph, - test: testFromModule(module, "echo-test"), + test: testFromModule(module, "echo-test", graph), log: garden.log, force: true, forceBuild: false, @@ -55,7 +55,7 @@ describe("testHelmModule", () => { const testTask = new TestTask({ garden, graph, - test: testFromModule(module, "echo-test"), + test: testFromModule(module, "echo-test", graph), log: garden.log, force: true, forceBuild: false, @@ -75,7 +75,7 @@ describe("testHelmModule", () => { const testConfig = findByName(module.testConfigs, "echo-test")! testConfig.spec.command = ["bork"] // this will fail - const test = testFromConfig(module, testConfig) + const test = testFromConfig(module, testConfig, graph) const testTask = new TestTask({ garden, @@ -110,7 +110,7 @@ describe("testHelmModule", () => { const testTask = new TestTask({ garden, graph, - test: testFromModule(module, "artifacts-test"), + test: testFromModule(module, "artifacts-test", graph), log: garden.log, force: true, forceBuild: false, @@ -130,7 +130,7 @@ describe("testHelmModule", () => { const testTask = new TestTask({ garden, graph, - test: testFromModule(module, "artifacts-test-fail"), + test: testFromModule(module, "artifacts-test-fail", graph), log: garden.log, force: true, forceBuild: false, @@ -152,7 +152,7 @@ describe("testHelmModule", () => { const testTask = new TestTask({ garden, graph, - test: testFromModule(module, "globs-test"), + test: testFromModule(module, "globs-test", graph), log: garden.log, force: true, forceBuild: false, diff --git a/core/test/integ/src/plugins/kubernetes/kubernetes-module/test.ts b/core/test/integ/src/plugins/kubernetes/kubernetes-module/test.ts index 6d7cc690ca..dd66c3ecf6 100644 --- a/core/test/integ/src/plugins/kubernetes/kubernetes-module/test.ts +++ b/core/test/integ/src/plugins/kubernetes/kubernetes-module/test.ts @@ -35,7 +35,7 @@ describe("testKubernetesModule", () => { const testTask = new TestTask({ garden, graph, - test: testFromModule(module, "echo-test"), + test: testFromModule(module, "echo-test", graph), log: garden.log, force: true, forceBuild: false, @@ -55,7 +55,7 @@ describe("testKubernetesModule", () => { const testTask = new TestTask({ garden, graph, - test: testFromModule(module, "with-namespace-test"), + test: testFromModule(module, "with-namespace-test", graph), log: garden.log, force: true, forceBuild: false, @@ -75,7 +75,7 @@ describe("testKubernetesModule", () => { const testConfig = findByName(module.testConfigs, "echo-test")! testConfig.spec.command = ["bork"] // this will fail - const test = testFromConfig(module, testConfig) + const test = testFromConfig(module, testConfig, graph) const testTask = new TestTask({ garden, @@ -110,7 +110,7 @@ describe("testKubernetesModule", () => { const testTask = new TestTask({ garden, graph, - test: testFromModule(module, "artifacts-test"), + test: testFromModule(module, "artifacts-test", graph), log: garden.log, force: true, forceBuild: false, @@ -130,7 +130,7 @@ describe("testKubernetesModule", () => { const testTask = new TestTask({ garden, graph, - test: testFromModule(module, "artifacts-test-fail"), + test: testFromModule(module, "artifacts-test-fail", graph), log: garden.log, force: true, forceBuild: false, @@ -152,7 +152,7 @@ describe("testKubernetesModule", () => { const testTask = new TestTask({ garden, graph, - test: testFromModule(module, "globs-test"), + test: testFromModule(module, "globs-test", graph), log: garden.log, force: true, forceBuild: false, diff --git a/core/test/integ/src/plugins/kubernetes/system.ts b/core/test/integ/src/plugins/kubernetes/system.ts index c4dacc42fa..33969030a9 100644 --- a/core/test/integ/src/plugins/kubernetes/system.ts +++ b/core/test/integ/src/plugins/kubernetes/system.ts @@ -61,7 +61,7 @@ describe("System services", () => { const modules = graph.getModules().filter((module) => module.name.startsWith("conftest-")) await Bluebird.map(modules, async (module) => { - const test = testFromConfig(module, module.testConfigs[0]) + const test = testFromConfig(module, module.testConfigs[0], graph) const testTask = new TestTask({ garden: systemGarden, test, diff --git a/core/test/unit/src/actions.ts b/core/test/unit/src/actions.ts index 041291337e..8d40e9abd7 100644 --- a/core/test/unit/src/actions.ts +++ b/core/test/unit/src/actions.ts @@ -38,11 +38,13 @@ import { emptyDir, pathExists, ensureFile, readFile } from "fs-extra" import { join } from "path" import { DashboardPage } from "../../../src/types/plugin/provider/getDashboardPage" import { testFromModule, testFromConfig } from "../../../src/types/test" +import { ConfigGraph } from "../../../src/config-graph" const now = new Date() describe("ActionRouter", () => { let garden: TestGarden + let graph: ConfigGraph let log: LogEntry let actions: ActionRouter let module: GardenModule @@ -69,7 +71,7 @@ describe("ActionRouter", () => { }) log = garden.log actions = await garden.getActionRouter() - const graph = await garden.getConfigGraph(garden.log) + graph = await garden.getConfigGraph(garden.log) module = graph.getModule("module-a") service = graph.getService("service-a") runtimeContext = await prepareRuntimeContext({ @@ -127,7 +129,7 @@ describe("ActionRouter", () => { describe("augmentGraph", () => { it("should return modules and/or dependency relations to add to the stack graph", async () => { - const graph = await garden.getConfigGraph(garden.log) + graph = await garden.getConfigGraph(garden.log) const modules = graph.getModules() const providers = await garden.resolveProviders(garden.log) const result = await actions.augmentGraph({ @@ -322,13 +324,17 @@ describe("ActionRouter", () => { describe("testModule", () => { it("should correctly call the corresponding plugin handler", async () => { - const test = testFromConfig(module, { - name: "test", - dependencies: [], - disabled: false, - timeout: 1234, - spec: {}, - }) + const test = testFromConfig( + module, + { + name: "test", + dependencies: [], + disabled: false, + timeout: 1234, + spec: {}, + }, + graph + ) const result = await actions.testModule({ log, module, @@ -366,13 +372,17 @@ describe("ActionRouter", () => { dependencies: [], }, silent: false, - test: testFromConfig(module, { - name: "test", - dependencies: [], - disabled: false, - timeout: 1234, - spec: {}, - }), + test: testFromConfig( + module, + { + name: "test", + dependencies: [], + disabled: false, + timeout: 1234, + spec: {}, + }, + graph + ), }) const event = garden.events.eventLog[0] expect(event).to.exist @@ -403,7 +413,7 @@ describe("ActionRouter", () => { }, } - const test = testFromConfig(module, testConfig) + const test = testFromConfig(module, testConfig, graph) await actions.testModule({ log, @@ -438,7 +448,7 @@ describe("ActionRouter", () => { describe("getTestResult", () => { it("should correctly call the corresponding plugin handler", async () => { - const test = testFromModule(module, "unit") + const test = testFromModule(module, "unit", graph) const result = await actions.getTestResult({ log, module, @@ -465,7 +475,7 @@ describe("ActionRouter", () => { await actions.getTestResult({ log, module, - test: testFromModule(module, "unit"), + test: testFromModule(module, "unit", graph), }) const event = garden.events.eventLog[0] expect(event).to.exist @@ -771,7 +781,7 @@ describe("ActionRouter", () => { it("should copy artifacts exported by the handler to the artifacts directory", async () => { await emptyDir(garden.artifactsPath) - const graph = await garden.getConfigGraph(garden.log) + graph = await garden.getConfigGraph(garden.log) const _task = graph.getTask("task-a") _task.spec.artifacts = [ @@ -1435,7 +1445,7 @@ describe("ActionRouter", () => { }, }) - const graph = await garden.getConfigGraph(garden.log) + graph = await garden.getConfigGraph(garden.log) const moduleA = graph.getModule("module-a") const base = Object.assign( @@ -1474,7 +1484,7 @@ describe("ActionRouter", () => { }, }) - const graph = await garden.getConfigGraph(garden.log) + graph = await garden.getConfigGraph(garden.log) const serviceA = graph.getService("service-a") const base = Object.assign( @@ -1517,7 +1527,7 @@ describe("ActionRouter", () => { garden["moduleConfigs"]["module-a"].spec.foo = "${runtime.services.service-b.outputs.foo}" - const graph = await garden.getConfigGraph(garden.log) + graph = await garden.getConfigGraph(garden.log) const serviceA = graph.getService("service-a") const serviceB = graph.getService("service-b") @@ -1570,7 +1580,7 @@ describe("ActionRouter", () => { garden["moduleConfigs"]["module-a"].spec.services[0].foo = "${runtime.services.service-b.outputs.foo}" - const graph = await garden.getConfigGraph(garden.log) + graph = await garden.getConfigGraph(garden.log) const serviceA = graph.getService("service-a") const _runtimeContext = await prepareRuntimeContext({ @@ -1621,7 +1631,7 @@ describe("ActionRouter", () => { }, }) - const graph = await garden.getConfigGraph(garden.log) + graph = await garden.getConfigGraph(garden.log) const taskA = graph.getTask("task-a") const base = Object.assign( @@ -1680,7 +1690,7 @@ describe("ActionRouter", () => { garden["moduleConfigs"]["module-a"].spec.tasks[0].foo = "${runtime.services.service-b.outputs.foo}" - const graph = await garden.getConfigGraph(garden.log) + graph = await garden.getConfigGraph(garden.log) const taskA = graph.getTask("task-a") const serviceB = graph.getService("service-b") @@ -1744,7 +1754,7 @@ describe("ActionRouter", () => { garden["moduleConfigs"]["module-a"].spec.tasks[0].foo = "${runtime.services.service-b.outputs.foo}" - const graph = await garden.getConfigGraph(garden.log) + graph = await garden.getConfigGraph(garden.log) const taskA = graph.getTask("task-a") const _runtimeContext = await prepareRuntimeContext({ diff --git a/core/test/unit/src/plugins/exec.ts b/core/test/unit/src/plugins/exec.ts index 899c14ec53..2bc9ce431f 100644 --- a/core/test/unit/src/plugins/exec.ts +++ b/core/test/unit/src/plugins/exec.ts @@ -367,15 +367,19 @@ describe("exec plugin", () => { dependencies: [], }, silent: false, - test: testFromConfig(module, { - name: "test", - dependencies: [], - disabled: false, - timeout: 1234, - spec: { - command: ["pwd"], + test: testFromConfig( + module, + { + name: "test", + dependencies: [], + disabled: false, + timeout: 1234, + spec: { + command: ["pwd"], + }, }, - }), + graph + ), }) expect(res.log).to.eql(join(projectRoot, "module-local")) }) @@ -392,15 +396,19 @@ describe("exec plugin", () => { dependencies: [], }, silent: false, - test: testFromConfig(module, { - name: "test", - dependencies: [], - disabled: false, - timeout: 1234, - spec: { - command: ["echo", "$GARDEN_MODULE_VERSION"], + test: testFromConfig( + module, + { + name: "test", + dependencies: [], + disabled: false, + timeout: 1234, + spec: { + command: ["echo", "$GARDEN_MODULE_VERSION"], + }, }, - }), + graph + ), }) expect(res.log).to.equal(module.version.versionString) }) diff --git a/core/test/unit/src/tasks/test.ts b/core/test/unit/src/tasks/test.ts index abe31642cf..de197c70bd 100644 --- a/core/test/unit/src/tasks/test.ts +++ b/core/test/unit/src/tasks/test.ts @@ -34,7 +34,7 @@ describe("TestTask", () => { garden, log, graph, - test: testFromConfig(moduleA, testConfig), + test: testFromConfig(moduleA, testConfig, graph), force: true, forceBuild: false, }) diff --git a/core/test/unit/src/types/test.ts b/core/test/unit/src/types/test.ts index 14a863f559..03587b1ea8 100644 --- a/core/test/unit/src/types/test.ts +++ b/core/test/unit/src/types/test.ts @@ -7,9 +7,11 @@ */ import { expect } from "chai" -import { makeTestGardenA } from "../../../helpers" +import { resolve } from "path" +import { dataDir, makeTestGarden, makeTestGardenA } from "../../../helpers" import { TestConfig } from "../../../../src/config/test" import { testFromConfig } from "../../../../src/types/test" +import { cloneDeep } from "lodash" describe("testFromConfig", () => { it("should propagate the disabled flag from the config", async () => { @@ -24,7 +26,7 @@ describe("testFromConfig", () => { const garden = await makeTestGardenA() const graph = await garden.getConfigGraph(garden.log) const module = graph.getModule("module-a") - const test = testFromConfig(module, config) + const test = testFromConfig(module, config, graph) expect(test.disabled).to.be.true }) @@ -42,8 +44,37 @@ describe("testFromConfig", () => { const graph = await garden.getConfigGraph(garden.log) const module = graph.getModule("module-a") module.disabled = true - const test = testFromConfig(module, config) + const test = testFromConfig(module, config, graph) expect(test.disabled).to.be.true }) + + it("should include dependencies in version calculation", async () => { + const garden = await makeTestGarden(resolve(dataDir, "test-project-test-deps")) + let graph = await garden.getConfigGraph(garden.log) + let moduleA = graph.getModule("module-a") + const testConfig = moduleA.testConfigs[0] + const versionBeforeChange = testFromConfig(moduleA, testConfig, graph).version + const backup = cloneDeep(graph["modules"]["module-b"]) + + // Verify that changed build version is reflected in the test version + graph["modules"]["module-b"].version.versionString = "12345" + moduleA = graph.getModule("module-a") + const testAfterBuildChange = testFromConfig(moduleA, testConfig, graph) + expect(versionBeforeChange).to.not.eql(testAfterBuildChange.version) + + // Verify that changed service dependency config is reflected in the test version + graph["modules"]["module-b"] = backup + graph["serviceConfigs"]["service-b"].config.spec["command"] = ["echo", "something-else"] + moduleA = graph.getModule("module-a") + const testAfterServiceConfigChange = testFromConfig(moduleA, testConfig, graph) + expect(versionBeforeChange).to.not.eql(testAfterServiceConfigChange.version) + + // Verify that changed task dependency config is reflected in the test version + graph["modules"]["module-b"] = backup + graph["taskConfigs"]["task-a"].config.spec["command"] = ["echo", "something-else"] + moduleA = graph.getModule("module-a") + const testAfterTaskConfigChange = testFromConfig(moduleA, testConfig, graph) + expect(versionBeforeChange).to.not.eql(testAfterTaskConfigChange.version) + }) }) diff --git a/plugins/conftest-kubernetes/test/conftest-kubernetes.ts b/plugins/conftest-kubernetes/test/conftest-kubernetes.ts index 1073dd41b6..1dc751fc89 100644 --- a/plugins/conftest-kubernetes/test/conftest-kubernetes.ts +++ b/plugins/conftest-kubernetes/test/conftest-kubernetes.ts @@ -75,7 +75,7 @@ describe("conftest-kubernetes provider", () => { garden, log: garden.log, graph, - test: testFromConfig(module, module.testConfigs[0]), + test: testFromConfig(module, module.testConfigs[0], graph), force: true, forceBuild: true, }) diff --git a/plugins/conftest/test/conftest.ts b/plugins/conftest/test/conftest.ts index eb65fb408f..7ed0d47f9e 100644 --- a/plugins/conftest/test/conftest.ts +++ b/plugins/conftest/test/conftest.ts @@ -48,7 +48,7 @@ describe("conftest provider", () => { garden, log: garden.log, graph, - test: testFromConfig(module, module.testConfigs[0]), + test: testFromConfig(module, module.testConfigs[0], graph), force: true, forceBuild: false, }) @@ -82,7 +82,7 @@ describe("conftest provider", () => { garden, log: garden.log, graph, - test: testFromConfig(module, module.testConfigs[0]), + test: testFromConfig(module, module.testConfigs[0], graph), force: true, forceBuild: false, }) @@ -107,7 +107,7 @@ describe("conftest provider", () => { garden, log: garden.log, graph, - test: testFromConfig(module, module.testConfigs[0]), + test: testFromConfig(module, module.testConfigs[0], graph), force: true, forceBuild: false, }) @@ -135,7 +135,7 @@ describe("conftest provider", () => { garden, log: garden.log, graph, - test: testFromConfig(module, module.testConfigs[0]), + test: testFromConfig(module, module.testConfigs[0], graph), force: true, forceBuild: false, })