From 812b674191b0e8d0ffce34729a933d39d8a894f6 Mon Sep 17 00:00:00 2001 From: "stu126940@mail.uni-kiel.de" <stu126940@mail.uni-kiel.de> Date: Tue, 30 Nov 2021 09:51:06 +0100 Subject: [PATCH] fix test --- .../kotlin/theodolite/benchmark/ActionCommandTest.kt | 10 ---------- .../theodolite/execution/operator/BenchmarkCRDummy.kt | 7 +++++++ .../theodolite/execution/operator/ControllerTest.kt | 7 ++++--- .../execution/operator/ExecutionEventHandlerTest.kt | 4 ++-- 4 files changed, 13 insertions(+), 15 deletions(-) diff --git a/theodolite/src/test/kotlin/theodolite/benchmark/ActionCommandTest.kt b/theodolite/src/test/kotlin/theodolite/benchmark/ActionCommandTest.kt index 0b9f89aa0..ef73d8973 100644 --- a/theodolite/src/test/kotlin/theodolite/benchmark/ActionCommandTest.kt +++ b/theodolite/src/test/kotlin/theodolite/benchmark/ActionCommandTest.kt @@ -10,15 +10,5 @@ class ActionCommandTest { @Test fun testAction() { - val action = ActionCommand(DefaultKubernetesClient().inNamespace("default")) - val result = action.exec(mutableMapOf( - Pair("app.kubernetes.io/name","grafana") - ), - container = "grafana", - command = "ls /") - println("out is: " + result.first) - println("error is: " + result.second) - - } } \ No newline at end of file diff --git a/theodolite/src/test/kotlin/theodolite/execution/operator/BenchmarkCRDummy.kt b/theodolite/src/test/kotlin/theodolite/execution/operator/BenchmarkCRDummy.kt index e294ea539..b4d595054 100644 --- a/theodolite/src/test/kotlin/theodolite/execution/operator/BenchmarkCRDummy.kt +++ b/theodolite/src/test/kotlin/theodolite/execution/operator/BenchmarkCRDummy.kt @@ -34,6 +34,13 @@ class BenchmarkCRDummy(name: String) { benchmark.sut.resources = emptyList() benchmark.loadGenerator.resources = emptyList() + benchmark.infrastructure.beforeActions = emptyList() + benchmark.infrastructure.afterActions = emptyList() + benchmark.sut.beforeActions = emptyList() + benchmark.sut.afterActions = emptyList() + benchmark.loadGenerator.beforeActions = emptyList() + benchmark.loadGenerator.afterActions = emptyList() + benchmark.resourceTypes = emptyList() benchmark.loadTypes = emptyList() benchmark.kafkaConfig = kafkaConfig diff --git a/theodolite/src/test/kotlin/theodolite/execution/operator/ControllerTest.kt b/theodolite/src/test/kotlin/theodolite/execution/operator/ControllerTest.kt index 7e0532aff..6ea696898 100644 --- a/theodolite/src/test/kotlin/theodolite/execution/operator/ControllerTest.kt +++ b/theodolite/src/test/kotlin/theodolite/execution/operator/ControllerTest.kt @@ -32,10 +32,11 @@ class ControllerTest { @BeforeEach fun setUp() { server.before() - this.controller = TheodoliteOperator().getController( + val operator = TheodoliteOperator() + this.controller = operator.getController( client = server.client, - executionStateHandler = ExecutionStateHandler(server.client), - benchmarkStateHandler = BenchmarkStateHandler(server.client) + executionStateHandler = operator.getExecutionStateHandler(client = server.client), + benchmarkStateChecker = operator.getBenchmarkStateChecker(client = server.client) ) // benchmark diff --git a/theodolite/src/test/kotlin/theodolite/execution/operator/ExecutionEventHandlerTest.kt b/theodolite/src/test/kotlin/theodolite/execution/operator/ExecutionEventHandlerTest.kt index d8db7ab3b..c850e84f2 100644 --- a/theodolite/src/test/kotlin/theodolite/execution/operator/ExecutionEventHandlerTest.kt +++ b/theodolite/src/test/kotlin/theodolite/execution/operator/ExecutionEventHandlerTest.kt @@ -36,8 +36,8 @@ class ExecutionEventHandlerTest { val operator = TheodoliteOperator() this.controller = operator.getController( client = server.client, - executionStateHandler = ExecutionStateHandler(client = server.client), - benchmarkStateHandler = BenchmarkStateHandler(client = server.client) + executionStateHandler = operator.getExecutionStateHandler(client = server.client), + benchmarkStateChecker = operator.getBenchmarkStateChecker(client = server.client) ) this.factory = operator.getExecutionEventHandler(this.controller, server.client) -- GitLab