diff --git a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/Shutdown.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/Shutdown.kt index ce828e2df91c589df0faf4f823fcc750ff6ac5c8..68a5f81425724f6dad3890a33314e4e650f51bde 100644 --- a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/Shutdown.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/Shutdown.kt @@ -2,7 +2,7 @@ package rocks.theodolite.kubernetes import io.fabric8.kubernetes.client.NamespacedKubernetesClient import mu.KotlinLogging -import rocks.theodolite.kubernetes.execution.KubernetesExecutionRunner +import rocks.theodolite.kubernetes.benchmark.KubernetesBenchmarkDeploymentBuilder import rocks.theodolite.kubernetes.model.BenchmarkExecution import rocks.theodolite.kubernetes.model.KubernetesBenchmark @@ -24,11 +24,11 @@ class Shutdown(private val benchmarkExecution: BenchmarkExecution, */ fun run() { // Build Configuration to teardown - val kubernetesExecutionRunner = KubernetesExecutionRunner(benchmark, this.client) + val benchmarkDeploymentBuilder = KubernetesBenchmarkDeploymentBuilder(benchmark, this.client) try { logger.info { "Received shutdown signal -> Shutting down" } val deployment = - kubernetesExecutionRunner.buildDeployment( + benchmarkDeploymentBuilder.buildDeployment( load = 0, loadPatcherDefinitions = emptyList(), resource = 0, diff --git a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/benchmark/Benchmark.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/benchmark/BenchmarkDeploymentBuilder.kt similarity index 65% rename from theodolite/src/main/kotlin/rocks/theodolite/kubernetes/benchmark/Benchmark.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/benchmark/BenchmarkDeploymentBuilder.kt index f4030d31dead7d8638af47e2f756079979ea0bf5..c0d7871cb339c6e0c9d8f2a5c71996772c7a9d2b 100644 --- a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/benchmark/Benchmark.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/benchmark/BenchmarkDeploymentBuilder.kt @@ -1,20 +1,12 @@ package rocks.theodolite.kubernetes.benchmark -import io.quarkus.runtime.annotations.RegisterForReflection -import rocks.theodolite.kubernetes.util.ConfigurationOverride import rocks.theodolite.kubernetes.patcher.PatcherDefinition +import rocks.theodolite.kubernetes.util.ConfigurationOverride /** - * A Benchmark contains: - * - The Resource that can be scaled for the benchmark. - * - The Load that can be scaled the benchmark. - * - additional [ConfigurationOverride]s. + * This interface is needed for test purposes. */ -@RegisterForReflection -interface Benchmark { - - fun setupInfrastructure() - fun teardownInfrastructure() +interface BenchmarkDeploymentBuilder { /** * Builds a Deployment that can be deployed. @@ -29,4 +21,4 @@ interface Benchmark { loadGenerationDelay: Long, afterTeardownDelay: Long ): BenchmarkDeployment -} +} \ No newline at end of file diff --git a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/benchmark/KubernetesBenchmarkDeployment.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/benchmark/KubernetesBenchmarkDeployment.kt index 2ee6212763ba127497f619459f9d89c477a79189..2e0f447cf9aae29dc43954d5789b963e7672b178 100644 --- a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/benchmark/KubernetesBenchmarkDeployment.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/benchmark/KubernetesBenchmarkDeployment.kt @@ -41,6 +41,8 @@ class KubernetesBenchmarkDeployment( private val LAG_EXPORTER_POD_LABEL_NAME = "app.kubernetes.io/name" private val LAG_EXPORTER_POD_LABEL_VALUE = "kafka-exporter" + + /** * Setup a [KubernetesBenchmark] using the [TopicManager] and the [K8sManager]: * - Create the needed topics. diff --git a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/KubernetesExecutionRunner.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/benchmark/KubernetesBenchmarkDeploymentBuilder.kt similarity index 61% rename from theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/KubernetesExecutionRunner.kt rename to theodolite/src/main/kotlin/rocks/theodolite/kubernetes/benchmark/KubernetesBenchmarkDeploymentBuilder.kt index 34ef809411db7c0ed11bb1fcd478beda46b75384..19f7ad052310b8c454d9273d71458c99b5a3e256 100644 --- a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/KubernetesExecutionRunner.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/benchmark/KubernetesBenchmarkDeploymentBuilder.kt @@ -1,52 +1,18 @@ -package rocks.theodolite.kubernetes.execution +package rocks.theodolite.kubernetes.benchmark -import io.fabric8.kubernetes.api.model.HasMetadata -import io.fabric8.kubernetes.api.model.KubernetesResource import io.fabric8.kubernetes.client.NamespacedKubernetesClient import mu.KotlinLogging -import rocks.theodolite.kubernetes.benchmark.* -import rocks.theodolite.kubernetes.k8s.K8sManager import rocks.theodolite.kubernetes.model.KubernetesBenchmark import rocks.theodolite.kubernetes.patcher.PatcherFactory import rocks.theodolite.kubernetes.util.ConfigurationOverride import rocks.theodolite.kubernetes.patcher.PatcherDefinition -import rocks.theodolite.kubernetes.resourceSet.ResourceSets +import rocks.theodolite.kubernetes.resourceSet.loadKubernetesResources private val logger = KotlinLogging.logger {} -class KubernetesExecutionRunner(val kubernetesBenchmark: KubernetesBenchmark, - private var client: NamespacedKubernetesClient) : Benchmark { - - /** - * Loads [KubernetesResource]s. - * It first loads them via the [YamlParserFromFile] to check for their concrete type and afterwards initializes them using - * the [K8sResourceLoader] - */ - @Deprecated("Use `loadResourceSet` from `ResourceSets`") - fun loadKubernetesResources(resourceSet: List<ResourceSets>): Collection<Pair<String, HasMetadata>> { - return loadResources(resourceSet) - } - - private fun loadResources(resourceSet: List<ResourceSets>): Collection<Pair<String, HasMetadata>> { - return resourceSet.flatMap { it.loadResourceSet(this.client) } - } - - - override fun setupInfrastructure() { - kubernetesBenchmark.infrastructure.beforeActions.forEach { it.exec(client = client) } - val kubernetesManager = K8sManager(this.client) - loadResources(kubernetesBenchmark.infrastructure.resources) - .map { it.second } - .forEach { kubernetesManager.deploy(it) } - } - - override fun teardownInfrastructure() { - val kubernetesManager = K8sManager(this.client) - loadResources(kubernetesBenchmark.infrastructure.resources) - .map { it.second } - .forEach { kubernetesManager.remove(it) } - kubernetesBenchmark.infrastructure.afterActions.forEach { it.exec(client = client) } - } +class KubernetesBenchmarkDeploymentBuilder (val kubernetesBenchmark: KubernetesBenchmark, + private var client: NamespacedKubernetesClient) + : BenchmarkDeploymentBuilder { /** @@ -70,8 +36,8 @@ class KubernetesExecutionRunner(val kubernetesBenchmark: KubernetesBenchmark, ): BenchmarkDeployment { logger.info { "Using ${this.client.namespace} as namespace." } - val appResources = loadResources(kubernetesBenchmark.sut.resources) - val loadGenResources = loadResources(kubernetesBenchmark.loadGenerator.resources) + val appResources = loadKubernetesResources(kubernetesBenchmark.sut.resources, this.client) + val loadGenResources = loadKubernetesResources(kubernetesBenchmark.loadGenerator.resources, this.client) val patcherFactory = PatcherFactory() diff --git a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/ExperimentRunnerImpl.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/ExperimentRunnerImpl.kt index a33e9518fb746819814ad203b21f6d1a1ab9ca64..d139eb88ec622867888016610b7f20bf756bceec 100644 --- a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/ExperimentRunnerImpl.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/ExperimentRunnerImpl.kt @@ -1,11 +1,11 @@ package rocks.theodolite.kubernetes.execution -import io.fabric8.kubernetes.client.NamespacedKubernetesClient import io.quarkus.runtime.annotations.RegisterForReflection import mu.KotlinLogging import rocks.theodolite.core.ExperimentRunner import rocks.theodolite.core.Results -import rocks.theodolite.kubernetes.benchmark.Benchmark +import rocks.theodolite.kubernetes.benchmark.BenchmarkDeploymentBuilder +import rocks.theodolite.kubernetes.benchmark.KubernetesBenchmarkDeploymentBuilder import rocks.theodolite.kubernetes.model.KubernetesBenchmark.Slo import rocks.theodolite.kubernetes.util.ConfigurationOverride import rocks.theodolite.kubernetes.operator.EventCreator @@ -21,7 +21,7 @@ private val logger = KotlinLogging.logger {} @RegisterForReflection class ExperimentRunnerImpl( results: Results, - private val benchmark: Benchmark, + private val benchmarkDeploymentBuilder: BenchmarkDeploymentBuilder, private val executionDuration: Duration, private val configurationOverrides: List<ConfigurationOverride?>, private val slos: List<Slo>, @@ -74,7 +74,7 @@ class ExperimentRunnerImpl( } private fun runSingleExperiment(load: Int, resource: Int): Pair<Instant, Instant> { - val benchmarkDeployment = benchmark.buildDeployment( + val benchmarkDeployment = benchmarkDeploymentBuilder.buildDeployment( load, this.loadPatcherDefinitions, resource, diff --git a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/TheodoliteExecutor.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/TheodoliteExecutor.kt index 1dc3d4d52f9ad1cab9b0a34f0a48c954ab0cb3ba..157ecf655d1b295cabd07529e419ab9699d46565 100644 --- a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/TheodoliteExecutor.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/execution/TheodoliteExecutor.kt @@ -1,5 +1,6 @@ package rocks.theodolite.kubernetes.execution +import io.fabric8.kubernetes.client.NamespacedKubernetesClient import mu.KotlinLogging import rocks.theodolite.core.ExecutionRunner import rocks.theodolite.core.ExperimentRunner @@ -10,6 +11,10 @@ import rocks.theodolite.core.strategies.StrategyFactory import rocks.theodolite.core.Config import rocks.theodolite.core.IOHandler import rocks.theodolite.core.Results +import rocks.theodolite.kubernetes.benchmark.KubernetesBenchmarkDeploymentBuilder +import rocks.theodolite.kubernetes.k8s.K8sManager +import rocks.theodolite.kubernetes.model.KubernetesBenchmark +import rocks.theodolite.kubernetes.resourceSet.loadKubernetesResources import rocks.theodolite.kubernetes.slo.SloFactory import java.io.File import java.time.Duration @@ -26,14 +31,14 @@ private val logger = KotlinLogging.logger {} */ class TheodoliteExecutor( private val benchmarkExecution: BenchmarkExecution, - private val kubernetesExecutionRunner: KubernetesExecutionRunner + private val benchmark: KubernetesBenchmark, + private val client: NamespacedKubernetesClient ) { /** * An executor object, configured with the specified benchmark, evaluation method, experiment duration * and overrides which are given in the execution. */ lateinit var experimentRunner: ExperimentRunner - private val kubernetesBenchmark = kubernetesExecutionRunner.kubernetesBenchmark /** * Creates all required components to start Theodolite. @@ -51,20 +56,20 @@ class TheodoliteExecutor( val resourcePatcherDefinition = PatcherDefinitionFactory().createPatcherDefinition( benchmarkExecution.resources.resourceType, - this.kubernetesBenchmark.resourceTypes + this.benchmark.resourceTypes ) val loadDimensionPatcherDefinition = PatcherDefinitionFactory().createPatcherDefinition( benchmarkExecution.loads.loadType, - this.kubernetesBenchmark.loadTypes + this.benchmark.loadTypes ) - val slos = SloFactory().createSlos(this.benchmarkExecution, this.kubernetesBenchmark) + val slos = SloFactory().createSlos(this.benchmarkExecution, this.benchmark) experimentRunner = ExperimentRunnerImpl( - benchmark = kubernetesExecutionRunner, + benchmarkDeploymentBuilder = KubernetesBenchmarkDeploymentBuilder(this.benchmark,this.client), results = results, executionDuration = executionDuration, configurationOverrides = benchmarkExecution.configOverrides, @@ -109,14 +114,14 @@ class TheodoliteExecutor( * all experiments which are specified in the corresponding execution and benchmark objects. */ fun setupAndRunExecution() { - kubernetesExecutionRunner.setupInfrastructure() + setupInfrastructure() val ioHandler = IOHandler() val resultsFolder = ioHandler.getResultFolderURL() this.benchmarkExecution.executionId = getAndIncrementExecutionID(resultsFolder + "expID.txt") ioHandler.writeToJSONFile(this.benchmarkExecution, "${resultsFolder}exp${this.benchmarkExecution.executionId}-execution-configuration") ioHandler.writeToJSONFile( - kubernetesBenchmark, + benchmark, "${resultsFolder}exp${this.benchmarkExecution.executionId}-benchmark-configuration" ) @@ -127,7 +132,23 @@ class TheodoliteExecutor( executionRunner.run() - kubernetesExecutionRunner.teardownInfrastructure() + teardownInfrastructure() + } + + private fun setupInfrastructure() { + benchmark.infrastructure.beforeActions.forEach { it.exec(client = client) } + val kubernetesManager = K8sManager(this.client) + loadKubernetesResources(benchmark.infrastructure.resources, this.client) + .map { it.second } + .forEach { kubernetesManager.deploy(it) } + } + + private fun teardownInfrastructure() { + val kubernetesManager = K8sManager(this.client) + loadKubernetesResources(benchmark.infrastructure.resources, this.client) + .map { it.second } + .forEach { kubernetesManager.remove(it) } + benchmark.infrastructure.afterActions.forEach { it.exec(client = client) } } private fun getAndIncrementExecutionID(fileURL: String): Int { diff --git a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/operator/BenchmarkStateChecker.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/operator/BenchmarkStateChecker.kt index 4b160504547e770d199890255a5123ad9f3c995c..c9588b576963b4e64484d8ca25994008dfed4069 100644 --- a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/operator/BenchmarkStateChecker.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/operator/BenchmarkStateChecker.kt @@ -1,6 +1,5 @@ package rocks.theodolite.kubernetes.operator -import io.fabric8.kubernetes.api.model.KubernetesResource import io.fabric8.kubernetes.api.model.apps.Deployment import io.fabric8.kubernetes.api.model.apps.StatefulSet import io.fabric8.kubernetes.client.NamespacedKubernetesClient @@ -13,6 +12,7 @@ import rocks.theodolite.kubernetes.resourceSet.ResourceSets import rocks.theodolite.kubernetes.model.crd.BenchmarkCRD import rocks.theodolite.kubernetes.model.crd.BenchmarkState import rocks.theodolite.kubernetes.model.crd.KubernetesBenchmarkList +import rocks.theodolite.kubernetes.resourceSet.loadKubernetesResources class BenchmarkStateChecker( private val benchmarkCRDClient: MixedOperation<BenchmarkCRD, KubernetesBenchmarkList, Resource<BenchmarkCRD>>, @@ -130,7 +130,7 @@ class BenchmarkStateChecker( * @return true if the required resources are found, else false */ fun checkIfResourceIsInfrastructure(resourcesSets: List<ResourceSets>, selector: ActionSelector): Boolean { - val resources = resourcesSets.flatMap { it.loadResourceSet(this.client) } + val resources = loadKubernetesResources(resourcesSets, this.client) if (resources.isEmpty()) { return false } @@ -177,9 +177,9 @@ class BenchmarkStateChecker( fun checkResources(benchmark: KubernetesBenchmark): BenchmarkState { return try { val appResources = - loadKubernetesResources(resourceSet = benchmark.sut.resources) + loadKubernetesResources(resourceSet = benchmark.sut.resources, this.client) val loadGenResources = - loadKubernetesResources(resourceSet = benchmark.loadGenerator.resources) + loadKubernetesResources(resourceSet = benchmark.loadGenerator.resources, this.client) if (appResources.isNotEmpty() && loadGenResources.isNotEmpty()) { BenchmarkState.READY } else { @@ -190,13 +190,7 @@ class BenchmarkStateChecker( } } - /** - * Loads [KubernetesResource]s. - * It first loads them via the [YamlParserFromFile] to check for their concrete type and afterwards initializes them. - */ - private fun loadKubernetesResources(resourceSet: List<ResourceSets>): Collection<Pair<String, KubernetesResource>> { - return resourceSet.flatMap { it.loadResourceSet(this.client) } - } + } private fun <K, V> MutableMap<K, V>.containsMatchLabels(matchLabels: MutableMap<V, V>): Boolean { diff --git a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/operator/TheodoliteController.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/operator/TheodoliteController.kt index a8c79c8d29c8d841dfa0234ac61e796a2ca116e5..ddb081b83a9c9dbbc7690a3e0d84bea9c51cfe84 100644 --- a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/operator/TheodoliteController.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/operator/TheodoliteController.kt @@ -1,6 +1,5 @@ package rocks.theodolite.kubernetes.operator -import io.fabric8.kubernetes.api.model.KubernetesResource import io.fabric8.kubernetes.client.NamespacedKubernetesClient import io.fabric8.kubernetes.client.dsl.MixedOperation import io.fabric8.kubernetes.client.dsl.Resource @@ -10,12 +9,11 @@ import rocks.theodolite.kubernetes.model.crd.BenchmarkCRD import rocks.theodolite.kubernetes.model.crd.ExecutionState import rocks.theodolite.kubernetes.model.crd.KubernetesBenchmarkList import rocks.theodolite.kubernetes.model.KubernetesBenchmark -import rocks.theodolite.kubernetes.execution.KubernetesExecutionRunner import rocks.theodolite.kubernetes.execution.TheodoliteExecutor import rocks.theodolite.kubernetes.model.crd.* import rocks.theodolite.kubernetes.patcher.ConfigOverrideModifier import rocks.theodolite.kubernetes.model.crd.ExecutionStateComparator -import rocks.theodolite.kubernetes.resourceSet.ResourceSets +import rocks.theodolite.kubernetes.resourceSet.loadKubernetesResources import java.lang.Thread.sleep private val logger = KotlinLogging.logger {} @@ -78,8 +76,8 @@ class TheodoliteController( try { val modifier = ConfigOverrideModifier( execution = execution, - resources = loadKubernetesResources(benchmark.sut.resources).map { it.first } - + loadKubernetesResources(benchmark.loadGenerator.resources).map { it.first } + resources = loadKubernetesResources(benchmark.sut.resources, this.client).map { it.first } + + loadKubernetesResources(benchmark.loadGenerator.resources, this.client).map { it.first } ) modifier.setAdditionalLabels( labelValue = execution.name, @@ -97,7 +95,7 @@ class TheodoliteController( executionStateHandler.setExecutionState(execution.name, ExecutionState.RUNNING) executionStateHandler.startDurationStateTimer(execution.name) - executor = TheodoliteExecutor(execution, KubernetesExecutionRunner(benchmark, this.client)) + executor = TheodoliteExecutor(execution, benchmark, this.client) executor.setupAndRunExecution() when (executionStateHandler.getExecutionState(execution.name)) { ExecutionState.RESTART -> runExecution(execution, benchmark) @@ -179,12 +177,4 @@ class TheodoliteController( if (!::executor.isInitialized) return false return this.executor.getExecution().name == executionName } - - /** - * Loads [KubernetesResource]s. - * It first loads them via the [YamlParserFromFile] to check for their concrete type and afterwards initializes them. - */ - private fun loadKubernetesResources(resourceSet: List<ResourceSets>): Collection<Pair<String, KubernetesResource>> { - return resourceSet.flatMap { it.loadResourceSet(this.client) } - } } \ No newline at end of file diff --git a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/resourceSet/ResourceSets.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/resourceSet/ResourceSets.kt index 403d4345e86034cd8870d2d5aa2f62ea26141f3a..986ab52244e39c075b52d8fa534f20f1192e8437 100644 --- a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/resourceSet/ResourceSets.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/resourceSet/ResourceSets.kt @@ -9,6 +9,13 @@ import io.fabric8.kubernetes.client.NamespacedKubernetesClient import io.quarkus.runtime.annotations.RegisterForReflection import rocks.theodolite.kubernetes.util.exception.DeploymentFailedException +/** + * Loads [KubernetesResource]s. + */ +fun loadKubernetesResources(resourceSet: List<ResourceSets>, client: NamespacedKubernetesClient): Collection<Pair<String, HasMetadata>> { + return resourceSet.flatMap { it.loadResourceSet(client) } +} + @JsonDeserialize @RegisterForReflection class ResourceSets: KubernetesResource { @@ -20,14 +27,15 @@ class ResourceSets: KubernetesResource { @JsonInclude(JsonInclude.Include.NON_NULL) var fileSystem: FileSystemResourceSet? = null + fun loadResourceSet(client: NamespacedKubernetesClient): Collection<Pair<String, HasMetadata>> { // TODO Find out whether field access (::configMap) is really what we want to do here (see #362) return if (::configMap != null) { - configMap?.getResourceSet(client= client) !! - } else if (::fileSystem != null) { - fileSystem?.getResourceSet(client= client ) !! - } else { - throw DeploymentFailedException("Could not load resourceSet.") - } + configMap?.getResourceSet(client= client) !! + } else if (::fileSystem != null) { + fileSystem?.getResourceSet(client= client ) !! + } else { + throw DeploymentFailedException("Could not load resourceSet.") + } } } \ No newline at end of file diff --git a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/standalone/TheodoliteStandalone.kt b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/standalone/TheodoliteStandalone.kt index 95092edf3cce94daa8f312c194b072b04d56ca1d..bddbee80f356c1e13986fbeed47df2c37f49b0b8 100644 --- a/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/standalone/TheodoliteStandalone.kt +++ b/theodolite/src/main/kotlin/rocks/theodolite/kubernetes/standalone/TheodoliteStandalone.kt @@ -4,7 +4,6 @@ import io.fabric8.kubernetes.client.NamespacedKubernetesClient import mu.KotlinLogging import rocks.theodolite.kubernetes.model.BenchmarkExecution import rocks.theodolite.kubernetes.model.KubernetesBenchmark -import rocks.theodolite.kubernetes.execution.KubernetesExecutionRunner import rocks.theodolite.kubernetes.execution.TheodoliteExecutor import rocks.theodolite.kubernetes.util.YamlParserFromFile import rocks.theodolite.kubernetes.util.exception.EvaluationFailedException @@ -57,7 +56,7 @@ class TheodoliteStandalone (private val client: NamespacedKubernetesClient) { Runtime.getRuntime().addShutdownHook(shutdown) try { - TheodoliteExecutor(benchmarkExecution, KubernetesExecutionRunner(benchmark, client)).setupAndRunExecution() + TheodoliteExecutor(benchmarkExecution, benchmark, client).setupAndRunExecution() } catch (e: EvaluationFailedException) { logger.error { "Evaluation failed with error: ${e.message}" } }catch (e: ExecutionFailedException) { diff --git a/theodolite/src/test/kotlin/theodolite/util/IOHandlerTest.kt b/theodolite/src/test/kotlin/rocks/theodolite/core/IOHandlerTest.kt similarity index 98% rename from theodolite/src/test/kotlin/theodolite/util/IOHandlerTest.kt rename to theodolite/src/test/kotlin/rocks/theodolite/core/IOHandlerTest.kt index 8f25f2ea26c9d750ad37b32d0d5ec97b6ec39716..65e84d7dd37eb5b68f77bc2d47d212db2f720a90 100644 --- a/theodolite/src/test/kotlin/theodolite/util/IOHandlerTest.kt +++ b/theodolite/src/test/kotlin/rocks/theodolite/core/IOHandlerTest.kt @@ -1,4 +1,4 @@ -package theodolite.util +package rocks.theodolite.core import com.google.gson.GsonBuilder import io.quarkus.test.junit.QuarkusTest @@ -11,7 +11,6 @@ import org.junit.jupiter.api.Test import org.junit.rules.TemporaryFolder import org.junitpioneer.jupiter.ClearEnvironmentVariable import org.junitpioneer.jupiter.SetEnvironmentVariable -import rocks.theodolite.core.IOHandler const val FOLDER_URL = "Test-Folder" diff --git a/theodolite/src/test/kotlin/theodolite/util/ResultsTest.kt b/theodolite/src/test/kotlin/rocks/theodolite/core/ResultsTest.kt similarity index 97% rename from theodolite/src/test/kotlin/theodolite/util/ResultsTest.kt rename to theodolite/src/test/kotlin/rocks/theodolite/core/ResultsTest.kt index 70ea1e2cd185f08793d21c9aa1bc3ef2ef2266fa..2dbeb44b90f780975af884028335a7e398c7cfdc 100644 --- a/theodolite/src/test/kotlin/theodolite/util/ResultsTest.kt +++ b/theodolite/src/test/kotlin/rocks/theodolite/core/ResultsTest.kt @@ -1,11 +1,10 @@ -package theodolite.util +package rocks.theodolite.core import io.quarkus.test.junit.QuarkusTest import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Assertions.assertNotNull import org.junit.jupiter.api.Test import rocks.theodolite.core.strategies.Metric -import rocks.theodolite.core.Results @QuarkusTest internal class ResultsTest { diff --git a/theodolite/src/test/kotlin/theodolite/strategies/restriction/LowerBoundRestrictionTest.kt b/theodolite/src/test/kotlin/rocks/theodolite/core/strategies/restrictionstrategy/LowerBoundRestrictionTest.kt similarity index 98% rename from theodolite/src/test/kotlin/theodolite/strategies/restriction/LowerBoundRestrictionTest.kt rename to theodolite/src/test/kotlin/rocks/theodolite/core/strategies/restrictionstrategy/LowerBoundRestrictionTest.kt index 4adf3dfdd222acd2c972992eb82aba78bac4e20e..79fadb4867a155ee7b4dc86e4bb165947a4f15a4 100644 --- a/theodolite/src/test/kotlin/theodolite/strategies/restriction/LowerBoundRestrictionTest.kt +++ b/theodolite/src/test/kotlin/rocks/theodolite/core/strategies/restrictionstrategy/LowerBoundRestrictionTest.kt @@ -1,4 +1,4 @@ -package theodolite.strategies.restriction +package rocks.theodolite.core.strategies.restrictionstrategy import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Assertions.assertNotNull diff --git a/theodolite/src/test/kotlin/theodolite/InitialGuessSearchStrategyTest.kt b/theodolite/src/test/kotlin/rocks/theodolite/core/strategies/searchstrategy/InitialGuessSearchStrategyTest.kt similarity index 88% rename from theodolite/src/test/kotlin/theodolite/InitialGuessSearchStrategyTest.kt rename to theodolite/src/test/kotlin/rocks/theodolite/core/strategies/searchstrategy/InitialGuessSearchStrategyTest.kt index 16d3279fa7c4a76a60f279d152658d44576d85ed..2439d33014e5c3d24b3e94cf8af05275f596e507 100644 --- a/theodolite/src/test/kotlin/theodolite/InitialGuessSearchStrategyTest.kt +++ b/theodolite/src/test/kotlin/rocks/theodolite/core/strategies/searchstrategy/InitialGuessSearchStrategyTest.kt @@ -1,12 +1,13 @@ -package theodolite +package rocks.theodolite.core.strategies.searchstrategy import io.quarkus.test.junit.QuarkusTest import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Test import rocks.theodolite.core.strategies.Metric import mu.KotlinLogging +import rocks.theodolite.kubernetes.benchmark.TestBenchmarkDeploymentBuilder +import rocks.theodolite.kubernetes.execution.TestExperimentRunnerImpl import rocks.theodolite.core.strategies.guessstrategy.PrevInstanceOptGuess -import rocks.theodolite.core.strategies.searchstrategy.InitialGuessSearchStrategy import rocks.theodolite.core.Results import rocks.theodolite.kubernetes.model.KubernetesBenchmark.Slo @@ -29,10 +30,10 @@ class InitialGuessSearchStrategyTest { val mockLoads: List<Int> = (0..6).toList() val mockResources: List<Int> = (0..6).toList() val results = Results(Metric.from("demand")) - val benchmark = TestBenchmark() + val benchmarkDeploymentBuilder = TestBenchmarkDeploymentBuilder() val guessStrategy = PrevInstanceOptGuess() val sloChecker: Slo = Slo() - val benchmarkExecutor = TestExperimentRunnerImpl(results, mockResults, benchmark, listOf(sloChecker), 0, 0, 5) + val benchmarkExecutor = TestExperimentRunnerImpl(results, mockResults, benchmarkDeploymentBuilder, listOf(sloChecker), 0, 0, 5) val strategy = InitialGuessSearchStrategy(benchmarkExecutor,guessStrategy, results) val actual: ArrayList<Int?> = ArrayList() @@ -67,10 +68,10 @@ class InitialGuessSearchStrategyTest { val mockLoads: List<Int> = (0..6).toList() val mockResources: List<Int> = (0..6).toList() val results = Results(Metric.from("demand")) - val benchmark = TestBenchmark() + val benchmarkDeploymentBuilder = TestBenchmarkDeploymentBuilder() val guessStrategy = PrevInstanceOptGuess() val sloChecker: Slo = Slo() - val benchmarkExecutor = TestExperimentRunnerImpl(results, mockResults, benchmark, listOf(sloChecker), 0, 0, 5) + val benchmarkExecutor = TestExperimentRunnerImpl(results, mockResults, benchmarkDeploymentBuilder, listOf(sloChecker), 0, 0, 5) val strategy = InitialGuessSearchStrategy(benchmarkExecutor,guessStrategy, results) val actual: ArrayList<Int?> = ArrayList() @@ -105,10 +106,10 @@ class InitialGuessSearchStrategyTest { val mockLoads: List<Int> = (0..6).toList() val mockResources: List<Int> = (0..6).toList() val results = Results(Metric.from("demand")) - val benchmark = TestBenchmark() + val benchmarkDeploymentBuilder = TestBenchmarkDeploymentBuilder() val guessStrategy = PrevInstanceOptGuess() val sloChecker: Slo = Slo() - val benchmarkExecutor = TestExperimentRunnerImpl(results, mockResults, benchmark, listOf(sloChecker), 0, 0, 5) + val benchmarkExecutor = TestExperimentRunnerImpl(results, mockResults, benchmarkDeploymentBuilder, listOf(sloChecker), 0, 0, 5) val strategy = InitialGuessSearchStrategy(benchmarkExecutor, guessStrategy, results) val actual: ArrayList<Int?> = ArrayList() diff --git a/theodolite/src/test/kotlin/theodolite/RestrictionSearchTest.kt b/theodolite/src/test/kotlin/rocks/theodolite/core/strategies/searchstrategy/RestrictionSearchTest.kt similarity index 88% rename from theodolite/src/test/kotlin/theodolite/RestrictionSearchTest.kt rename to theodolite/src/test/kotlin/rocks/theodolite/core/strategies/searchstrategy/RestrictionSearchTest.kt index 3dfea28e399b6b011d93019028b45d472e567807..afb934a3d8ea5fcef7719303018cb06c2e08bf8c 100644 --- a/theodolite/src/test/kotlin/theodolite/RestrictionSearchTest.kt +++ b/theodolite/src/test/kotlin/rocks/theodolite/core/strategies/searchstrategy/RestrictionSearchTest.kt @@ -1,15 +1,13 @@ -package theodolite +package rocks.theodolite.core.strategies.searchstrategy import io.quarkus.test.junit.QuarkusTest import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Test +import rocks.theodolite.kubernetes.benchmark.TestBenchmarkDeploymentBuilder +import rocks.theodolite.kubernetes.execution.TestExperimentRunnerImpl import rocks.theodolite.core.strategies.Metric import rocks.theodolite.core.strategies.restrictionstrategy.LowerBoundRestriction -import rocks.theodolite.core.strategies.searchstrategy.BinarySearch -import rocks.theodolite.core.strategies.searchstrategy.FullSearch -import rocks.theodolite.core.strategies.searchstrategy.LinearSearch -import rocks.theodolite.core.strategies.searchstrategy.RestrictionSearch import rocks.theodolite.core.Results import rocks.theodolite.kubernetes.model.KubernetesBenchmark.Slo @@ -31,9 +29,9 @@ class RestrictionSearchTest { val mockLoads: List<Int> = (0..6).toList() val mockResources: List<Int> = (0..6).toList() val results = Results(Metric.from("demand")) - val benchmark = TestBenchmark() + val benchmarkDeploymentBuilder = TestBenchmarkDeploymentBuilder() val sloChecker: Slo = Slo() - val benchmarkExecutor = TestExperimentRunnerImpl(results, mockResults, benchmark, listOf(sloChecker), 0, 0, 5) + val benchmarkExecutor = TestExperimentRunnerImpl(results, mockResults, benchmarkDeploymentBuilder, listOf(sloChecker), 0, 0, 5) val linearSearch = LinearSearch(benchmarkExecutor) val lowerBoundRestriction = LowerBoundRestriction(results) val strategy = @@ -64,9 +62,9 @@ class RestrictionSearchTest { val mockLoads: List<Int> = (0..6).toList() val mockResources: List<Int> = (0..6).toList() val results = Results(Metric.from("demand")) - val benchmark = TestBenchmark() + val benchmarkDeploymentBuilder = TestBenchmarkDeploymentBuilder() val sloChecker: Slo = Slo() - val benchmarkExecutor = TestExperimentRunnerImpl(results, mockResults, benchmark, listOf(sloChecker), 0, 0, 5) + val benchmarkExecutor = TestExperimentRunnerImpl(results, mockResults, benchmarkDeploymentBuilder, listOf(sloChecker), 0, 0, 5) val fullSearch = FullSearch(benchmarkExecutor) val lowerBoundRestriction = LowerBoundRestriction(results) val strategy = @@ -97,10 +95,10 @@ class RestrictionSearchTest { val mockLoads: List<Int> = (0..6).toList() val mockResources: List<Int> = (0..6).toList() val results = Results(Metric.from("demand")) - val benchmark = TestBenchmark() + val benchmarkDeploymentBuilder = TestBenchmarkDeploymentBuilder() val sloChecker: Slo = Slo() val benchmarkExecutorImpl = - TestExperimentRunnerImpl(results, mockResults, benchmark, listOf(sloChecker), 0, 0, 0) + TestExperimentRunnerImpl(results, mockResults, benchmarkDeploymentBuilder, listOf(sloChecker), 0, 0, 0) val binarySearch = BinarySearch(benchmarkExecutorImpl) val lowerBoundRestriction = LowerBoundRestriction(results) val strategy = RestrictionSearch(benchmarkExecutorImpl, binarySearch, setOf(lowerBoundRestriction)) @@ -130,9 +128,9 @@ class RestrictionSearchTest { val mockLoads: List<Int> = (0..6).toList() val mockResources: List<Int> = (0..7).toList() val results = Results(Metric.from("demand")) - val benchmark = TestBenchmark() + val benchmarkDeploymentBuilder = TestBenchmarkDeploymentBuilder() val sloChecker: Slo = Slo() - val benchmarkExecutor = TestExperimentRunnerImpl(results, mockResults, benchmark, listOf(sloChecker), 0, 0, 0) + val benchmarkExecutor = TestExperimentRunnerImpl(results, mockResults, benchmarkDeploymentBuilder, listOf(sloChecker), 0, 0, 0) val binarySearch = BinarySearch(benchmarkExecutor) val lowerBoundRestriction = LowerBoundRestriction(results) val strategy = diff --git a/theodolite/src/test/kotlin/theodolite/benchmark/ActionCommandTest.kt b/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/benchmark/ActionCommandTest.kt similarity index 98% rename from theodolite/src/test/kotlin/theodolite/benchmark/ActionCommandTest.kt rename to theodolite/src/test/kotlin/rocks/theodolite/kubernetes/benchmark/ActionCommandTest.kt index e88aeb1e36c91a4fe55be4fa20817d0c61c07c1d..92f7d27ae07870ac2a4a4f6e3feda71e95ba71a8 100644 --- a/theodolite/src/test/kotlin/theodolite/benchmark/ActionCommandTest.kt +++ b/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/benchmark/ActionCommandTest.kt @@ -1,4 +1,4 @@ -package theodolite.benchmark +package rocks.theodolite.kubernetes.benchmark import io.fabric8.kubernetes.api.model.Pod import io.fabric8.kubernetes.api.model.PodBuilder @@ -8,7 +8,6 @@ import io.fabric8.kubernetes.client.utils.Utils import io.quarkus.test.junit.QuarkusTest import org.junit.jupiter.api.* import org.junit.jupiter.api.Assertions.assertEquals -import rocks.theodolite.kubernetes.benchmark.* import rocks.theodolite.kubernetes.operator.TheodoliteController import rocks.theodolite.kubernetes.operator.TheodoliteOperator import rocks.theodolite.kubernetes.util.exception.ActionCommandFailedException diff --git a/theodolite/src/test/kotlin/theodolite/benchmark/ErrorChannelMessage.kt b/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/benchmark/ErrorChannelMessage.kt similarity index 93% rename from theodolite/src/test/kotlin/theodolite/benchmark/ErrorChannelMessage.kt rename to theodolite/src/test/kotlin/rocks/theodolite/kubernetes/benchmark/ErrorChannelMessage.kt index df57a2529653a39ccbde14b4a91d30352224457e..e920776ae585555b8b99f14ae8ac7e4c734fc70b 100644 --- a/theodolite/src/test/kotlin/theodolite/benchmark/ErrorChannelMessage.kt +++ b/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/benchmark/ErrorChannelMessage.kt @@ -1,4 +1,4 @@ -package theodolite.benchmark +package rocks.theodolite.kubernetes.benchmark import io.fabric8.mockwebserver.internal.WebSocketMessage import java.nio.charset.StandardCharsets diff --git a/theodolite/src/test/kotlin/theodolite/TestBenchmarkDeployment.kt b/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/benchmark/TestBenchmarkDeployment.kt similarity index 79% rename from theodolite/src/test/kotlin/theodolite/TestBenchmarkDeployment.kt rename to theodolite/src/test/kotlin/rocks/theodolite/kubernetes/benchmark/TestBenchmarkDeployment.kt index 098598ce13632f8c2a2f2695a43ab1743a950cd7..881ed6977de0b29579a72645022129db2f96c555 100644 --- a/theodolite/src/test/kotlin/theodolite/TestBenchmarkDeployment.kt +++ b/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/benchmark/TestBenchmarkDeployment.kt @@ -1,4 +1,4 @@ -package theodolite +package rocks.theodolite.kubernetes.benchmark import rocks.theodolite.kubernetes.benchmark.BenchmarkDeployment diff --git a/theodolite/src/test/kotlin/theodolite/TestBenchmark.kt b/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/benchmark/TestBenchmarkDeploymentBuilder.kt similarity index 67% rename from theodolite/src/test/kotlin/theodolite/TestBenchmark.kt rename to theodolite/src/test/kotlin/rocks/theodolite/kubernetes/benchmark/TestBenchmarkDeploymentBuilder.kt index 019d8cd26e1336e8268d92e59ec441baf50dd792..0c0c03e7c51d7a4f7a1edd4f694f970ad5d19140 100644 --- a/theodolite/src/test/kotlin/theodolite/TestBenchmark.kt +++ b/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/benchmark/TestBenchmarkDeploymentBuilder.kt @@ -1,17 +1,10 @@ -package theodolite +package rocks.theodolite.kubernetes.benchmark + -import rocks.theodolite.kubernetes.benchmark.Benchmark -import rocks.theodolite.kubernetes.benchmark.BenchmarkDeployment import rocks.theodolite.kubernetes.util.ConfigurationOverride import rocks.theodolite.kubernetes.patcher.PatcherDefinition -class TestBenchmark : Benchmark { - - override fun setupInfrastructure() { - } - - override fun teardownInfrastructure() { - } +class TestBenchmarkDeploymentBuilder(): BenchmarkDeploymentBuilder { override fun buildDeployment( load: Int, diff --git a/theodolite/src/test/kotlin/theodolite/TestExperimentRunnerImpl.kt b/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/execution/TestExperimentRunnerImpl.kt similarity index 77% rename from theodolite/src/test/kotlin/theodolite/TestExperimentRunnerImpl.kt rename to theodolite/src/test/kotlin/rocks/theodolite/kubernetes/execution/TestExperimentRunnerImpl.kt index 5032e9315cbef0b36f826b207e185bf4e3ef7244..7f862e1089632918ab6a78fcf3f5387f39b38953 100644 --- a/theodolite/src/test/kotlin/theodolite/TestExperimentRunnerImpl.kt +++ b/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/execution/TestExperimentRunnerImpl.kt @@ -1,14 +1,14 @@ -package theodolite +package rocks.theodolite.kubernetes.execution +import rocks.theodolite.kubernetes.benchmark.TestBenchmarkDeploymentBuilder import rocks.theodolite.core.Results -import rocks.theodolite.kubernetes.benchmark.Benchmark import rocks.theodolite.kubernetes.model.KubernetesBenchmark.Slo import rocks.theodolite.core.ExperimentRunner class TestExperimentRunnerImpl( results: Results, private val mockResults: Array<Array<Boolean>>, - private val benchmark: Benchmark, + private val benchmarkDeploymentBuilder: TestBenchmarkDeploymentBuilder, private val slo: List<Slo>, private val executionId: Int, private val loadGenerationDelay: Long, diff --git a/theodolite/src/test/kotlin/theodolite/k8s/K8sManagerTest.kt b/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/k8s/K8sManagerTest.kt similarity index 98% rename from theodolite/src/test/kotlin/theodolite/k8s/K8sManagerTest.kt rename to theodolite/src/test/kotlin/rocks/theodolite/kubernetes/k8s/K8sManagerTest.kt index 1aba07bb4479b6806271b60317e6ca511bd34cfb..92adf08fbaa851357e092b958d74b6c35ce5b692 100644 --- a/theodolite/src/test/kotlin/theodolite/k8s/K8sManagerTest.kt +++ b/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/k8s/K8sManagerTest.kt @@ -1,4 +1,4 @@ -package theodolite.k8s +package rocks.theodolite.kubernetes.k8s import io.fabric8.kubernetes.api.model.* import io.fabric8.kubernetes.api.model.apps.Deployment @@ -14,7 +14,6 @@ import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.DisplayName import org.junit.jupiter.api.Test import registerResource -import rocks.theodolite.kubernetes.k8s.K8sManager @QuarkusTest diff --git a/theodolite/src/test/kotlin/theodolite/execution/operator/BenchmarkCRDummy.kt b/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/model/crd/BenchmarkCRDummy.kt similarity index 90% rename from theodolite/src/test/kotlin/theodolite/execution/operator/BenchmarkCRDummy.kt rename to theodolite/src/test/kotlin/rocks/theodolite/kubernetes/model/crd/BenchmarkCRDummy.kt index 9a0307d4af6d1bbc8460dd62fd631a24a05be87e..f1baf75df2678a0abd6c784eb54409a478978557 100644 --- a/theodolite/src/test/kotlin/theodolite/execution/operator/BenchmarkCRDummy.kt +++ b/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/model/crd/BenchmarkCRDummy.kt @@ -1,8 +1,6 @@ -package theodolite.execution.operator +package rocks.theodolite.kubernetes.model.crd import rocks.theodolite.kubernetes.model.KubernetesBenchmark -import rocks.theodolite.kubernetes.model.crd.BenchmarkCRD -import rocks.theodolite.kubernetes.model.crd.KafkaConfig class BenchmarkCRDummy(name: String) { diff --git a/theodolite/src/test/kotlin/theodolite/model/crd/CRDExecutionTest.kt b/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/model/crd/CRDExecutionTest.kt similarity index 97% rename from theodolite/src/test/kotlin/theodolite/model/crd/CRDExecutionTest.kt rename to theodolite/src/test/kotlin/rocks/theodolite/kubernetes/model/crd/CRDExecutionTest.kt index 7e7ade5949246b369bad199f252b5705ce6ba0b2..a7de76acfe7aac9b92628e87b9911599a13ab438 100644 --- a/theodolite/src/test/kotlin/theodolite/model/crd/CRDExecutionTest.kt +++ b/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/model/crd/CRDExecutionTest.kt @@ -1,4 +1,4 @@ -package theodolite.model.crd +package rocks.theodolite.kubernetes.model.crd import io.fabric8.kubernetes.api.model.KubernetesResourceList import io.fabric8.kubernetes.client.dsl.MixedOperation @@ -15,7 +15,6 @@ import org.mockito.kotlin.mock import rocks.theodolite.kubernetes.operator.ExecutionEventHandler import rocks.theodolite.kubernetes.operator.ExecutionStateHandler import rocks.theodolite.kubernetes.operator.TheodoliteController -import rocks.theodolite.kubernetes.model.crd.ExecutionCRD import rocks.theodolite.kubernetes.util.ConfigurationOverride import java.io.FileInputStream diff --git a/theodolite/src/test/kotlin/theodolite/execution/operator/ExecutionCRDummy.kt b/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/model/crd/ExecutionCRDummy.kt similarity index 89% rename from theodolite/src/test/kotlin/theodolite/execution/operator/ExecutionCRDummy.kt rename to theodolite/src/test/kotlin/rocks/theodolite/kubernetes/model/crd/ExecutionCRDummy.kt index b0b768595cd92e05b3322da6a2a60689514c19bd..871471ee941f5cf2d254fb2bd70556f161d8d4de 100644 --- a/theodolite/src/test/kotlin/theodolite/execution/operator/ExecutionCRDummy.kt +++ b/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/model/crd/ExecutionCRDummy.kt @@ -1,9 +1,6 @@ -package theodolite.execution.operator +package rocks.theodolite.kubernetes.model.crd import rocks.theodolite.kubernetes.model.BenchmarkExecution -import rocks.theodolite.kubernetes.model.crd.ExecutionCRD -import rocks.theodolite.kubernetes.model.crd.ExecutionState -import rocks.theodolite.kubernetes.model.crd.ExecutionStatus class ExecutionCRDummy(name: String, benchmark: String) { diff --git a/theodolite/src/test/kotlin/theodolite/util/ExecutionStateComparatorTest.kt b/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/model/crd/ExecutionStateComparatorTest.kt similarity index 78% rename from theodolite/src/test/kotlin/theodolite/util/ExecutionStateComparatorTest.kt rename to theodolite/src/test/kotlin/rocks/theodolite/kubernetes/model/crd/ExecutionStateComparatorTest.kt index 8e2262673cc4e86f0f696dfe8140703cc32e465b..14186ef408acd3233ce866102497bc56af1cdfda 100644 --- a/theodolite/src/test/kotlin/theodolite/util/ExecutionStateComparatorTest.kt +++ b/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/model/crd/ExecutionStateComparatorTest.kt @@ -1,11 +1,8 @@ -package theodolite.util +package rocks.theodolite.kubernetes.model.crd import io.quarkus.test.junit.QuarkusTest import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Test -import theodolite.execution.operator.ExecutionCRDummy -import rocks.theodolite.kubernetes.model.crd.ExecutionState -import rocks.theodolite.kubernetes.model.crd.ExecutionStateComparator @QuarkusTest diff --git a/theodolite/src/test/kotlin/theodolite/model/crd/ExecutionStatusTest.kt b/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/model/crd/ExecutionStatusTest.kt similarity index 97% rename from theodolite/src/test/kotlin/theodolite/model/crd/ExecutionStatusTest.kt rename to theodolite/src/test/kotlin/rocks/theodolite/kubernetes/model/crd/ExecutionStatusTest.kt index 2395ee8775917ba704ac4384558561d6891ee0bc..4c9326ac2e99dd7dd9707d4db25cb2e9e360ddf9 100644 --- a/theodolite/src/test/kotlin/theodolite/model/crd/ExecutionStatusTest.kt +++ b/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/model/crd/ExecutionStatusTest.kt @@ -1,4 +1,4 @@ -package theodolite.model.crd +package rocks.theodolite.kubernetes.model.crd import com.fasterxml.jackson.databind.ObjectMapper import com.fasterxml.jackson.databind.exc.InvalidFormatException @@ -7,8 +7,6 @@ import io.fabric8.kubernetes.api.model.Duration as K8sDuration import org.junit.jupiter.api.Assertions.* import org.junit.jupiter.api.Test import org.junit.jupiter.api.assertThrows -import rocks.theodolite.kubernetes.model.crd.ExecutionState -import rocks.theodolite.kubernetes.model.crd.ExecutionStatus import java.time.Clock import java.time.Duration import java.time.Instant diff --git a/theodolite/src/test/kotlin/theodolite/execution/operator/BenchmarkStateCheckerTest.kt b/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/operator/BenchmarkStateCheckerTest.kt similarity index 96% rename from theodolite/src/test/kotlin/theodolite/execution/operator/BenchmarkStateCheckerTest.kt rename to theodolite/src/test/kotlin/rocks/theodolite/kubernetes/operator/BenchmarkStateCheckerTest.kt index 53d8d4b680d49ed95a24a73e5309f722ce550297..640aa42555118210a40706fd825fcc8b55b30cf9 100644 --- a/theodolite/src/test/kotlin/theodolite/execution/operator/BenchmarkStateCheckerTest.kt +++ b/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/operator/BenchmarkStateCheckerTest.kt @@ -1,4 +1,4 @@ -package theodolite.execution.operator +package rocks.theodolite.kubernetes.operator import com.google.gson.Gson import io.fabric8.kubernetes.api.model.ConfigMapBuilder @@ -14,11 +14,9 @@ import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Test import org.junit.jupiter.api.Assertions.* import rocks.theodolite.kubernetes.benchmark.* -import rocks.theodolite.kubernetes.operator.BenchmarkStateChecker -import rocks.theodolite.kubernetes.operator.TheodoliteOperator import rocks.theodolite.kubernetes.model.crd.BenchmarkState import rocks.theodolite.kubernetes.model.KubernetesBenchmark -import rocks.theodolite.kubernetes.execution.KubernetesExecutionRunner +import rocks.theodolite.kubernetes.model.crd.BenchmarkCRDummy import rocks.theodolite.kubernetes.resourceSet.ConfigMapResourceSet import rocks.theodolite.kubernetes.resourceSet.ResourceSets diff --git a/theodolite/src/test/kotlin/theodolite/execution/operator/ControllerTest.kt b/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/operator/ControllerTest.kt similarity index 92% rename from theodolite/src/test/kotlin/theodolite/execution/operator/ControllerTest.kt rename to theodolite/src/test/kotlin/rocks/theodolite/kubernetes/operator/ControllerTest.kt index 144bf271780e88ca773aa3ff97c8aa8fa8d58dc8..3120d7420065cfe254d1ed76735ddc8b35d2bc21 100644 --- a/theodolite/src/test/kotlin/theodolite/execution/operator/ControllerTest.kt +++ b/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/operator/ControllerTest.kt @@ -1,4 +1,4 @@ -package theodolite.execution.operator +package rocks.theodolite.kubernetes.operator import com.google.gson.Gson import com.google.gson.GsonBuilder @@ -12,11 +12,7 @@ import org.junit.jupiter.api.DisplayName import org.junit.jupiter.api.Test import rocks.theodolite.kubernetes.model.BenchmarkExecution import rocks.theodolite.kubernetes.model.KubernetesBenchmark -import rocks.theodolite.kubernetes.operator.TheodoliteController -import rocks.theodolite.kubernetes.operator.TheodoliteOperator -import rocks.theodolite.kubernetes.model.crd.BenchmarkCRD -import rocks.theodolite.kubernetes.model.crd.BenchmarkState -import rocks.theodolite.kubernetes.model.crd.ExecutionCRD +import rocks.theodolite.kubernetes.model.crd.* @QuarkusTest diff --git a/theodolite/src/test/kotlin/theodolite/execution/operator/ExecutionEventHandlerTest.kt b/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/operator/ExecutionEventHandlerTest.kt similarity index 97% rename from theodolite/src/test/kotlin/theodolite/execution/operator/ExecutionEventHandlerTest.kt rename to theodolite/src/test/kotlin/rocks/theodolite/kubernetes/operator/ExecutionEventHandlerTest.kt index 00257dc34ff477657e312a0345a959bd8ce3669c..e794ae1638bd6c7f265b3b7ffb08c2494ba76a37 100644 --- a/theodolite/src/test/kotlin/theodolite/execution/operator/ExecutionEventHandlerTest.kt +++ b/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/operator/ExecutionEventHandlerTest.kt @@ -1,4 +1,4 @@ -package theodolite.execution.operator +package rocks.theodolite.kubernetes.operator import io.fabric8.kubernetes.api.model.KubernetesResourceList import io.fabric8.kubernetes.client.dsl.MixedOperation @@ -16,9 +16,6 @@ import org.junit.jupiter.params.ParameterizedTest import org.junit.jupiter.params.provider.Arguments import org.junit.jupiter.params.provider.MethodSource import org.mockito.kotlin.* -import rocks.theodolite.kubernetes.operator.ExecutionEventHandler -import rocks.theodolite.kubernetes.operator.ExecutionStateHandler -import rocks.theodolite.kubernetes.operator.TheodoliteController import rocks.theodolite.kubernetes.model.crd.ExecutionCRD import rocks.theodolite.kubernetes.model.crd.ExecutionState import java.io.FileInputStream diff --git a/theodolite/src/test/kotlin/theodolite/execution/operator/ExecutionEventHandlerTestWithInformer.kt b/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/operator/ExecutionEventHandlerTestWithInformer.kt similarity index 97% rename from theodolite/src/test/kotlin/theodolite/execution/operator/ExecutionEventHandlerTestWithInformer.kt rename to theodolite/src/test/kotlin/rocks/theodolite/kubernetes/operator/ExecutionEventHandlerTestWithInformer.kt index b57a7a5141d6d1d750e1ef964b861ef4be325980..63a669fe67c66b644b6acbabedc5d79afff8ee31 100644 --- a/theodolite/src/test/kotlin/theodolite/execution/operator/ExecutionEventHandlerTestWithInformer.kt +++ b/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/operator/ExecutionEventHandlerTestWithInformer.kt @@ -1,4 +1,4 @@ -package theodolite.execution.operator +package rocks.theodolite.kubernetes.operator import io.fabric8.kubernetes.client.dsl.Resource import io.fabric8.kubernetes.client.server.mock.KubernetesServer @@ -11,9 +11,6 @@ import org.junit.jupiter.params.ParameterizedTest import org.junit.jupiter.params.provider.Arguments import org.junit.jupiter.params.provider.MethodSource import org.mockito.kotlin.* -import rocks.theodolite.kubernetes.operator.ExecutionEventHandler -import rocks.theodolite.kubernetes.operator.ExecutionStateHandler -import rocks.theodolite.kubernetes.operator.TheodoliteController import rocks.theodolite.kubernetes.model.crd.ExecutionCRD import rocks.theodolite.kubernetes.model.crd.ExecutionState import java.io.FileInputStream diff --git a/theodolite/src/test/kotlin/theodolite/execution/operator/ExecutionEventHandlerWrapper.kt b/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/operator/ExecutionEventHandlerWrapper.kt similarity index 95% rename from theodolite/src/test/kotlin/theodolite/execution/operator/ExecutionEventHandlerWrapper.kt rename to theodolite/src/test/kotlin/rocks/theodolite/kubernetes/operator/ExecutionEventHandlerWrapper.kt index 471c59fe475fce9584a078fdb414fa160aa59e46..43ff721bd0f964065243188465849354bc7f8b23 100644 --- a/theodolite/src/test/kotlin/theodolite/execution/operator/ExecutionEventHandlerWrapper.kt +++ b/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/operator/ExecutionEventHandlerWrapper.kt @@ -1,4 +1,4 @@ -package theodolite.execution.operator +package rocks.theodolite.kubernetes.operator import io.fabric8.kubernetes.client.informers.ResourceEventHandler import rocks.theodolite.kubernetes.operator.ExecutionEventHandler diff --git a/theodolite/src/test/kotlin/theodolite/execution/operator/StateHandlerTest.kt b/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/operator/StateHandlerTest.kt similarity index 95% rename from theodolite/src/test/kotlin/theodolite/execution/operator/StateHandlerTest.kt rename to theodolite/src/test/kotlin/rocks/theodolite/kubernetes/operator/StateHandlerTest.kt index 5ca2781762dd2fe1a7a3a075e08dff3c1d3c7572..a7c7c5caa389740446d3be86da0bf2ed0d19e154 100644 --- a/theodolite/src/test/kotlin/theodolite/execution/operator/StateHandlerTest.kt +++ b/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/operator/StateHandlerTest.kt @@ -1,4 +1,4 @@ -package theodolite.execution.operator +package rocks.theodolite.kubernetes.operator import io.fabric8.kubernetes.client.server.mock.KubernetesServer import io.quarkus.test.junit.QuarkusTest @@ -13,7 +13,6 @@ import org.junit.jupiter.api.Test import rocks.theodolite.kubernetes.k8s.K8sManager import rocks.theodolite.kubernetes.model.crd.ExecutionCRD import rocks.theodolite.kubernetes.model.crd.ExecutionState -import rocks.theodolite.kubernetes.operator.ExecutionStateHandler @QuarkusTest @WithKubernetesTestServer diff --git a/theodolite/src/test/kotlin/theodolite/patcher/ConfigOverrideModifierTest.kt b/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/patcher/ConfigOverrideModifierTest.kt similarity index 87% rename from theodolite/src/test/kotlin/theodolite/patcher/ConfigOverrideModifierTest.kt rename to theodolite/src/test/kotlin/rocks/theodolite/kubernetes/patcher/ConfigOverrideModifierTest.kt index 5dafdd60098cbadf100d50097add69f447333f35..6172454008266c987b335999b7d8bbe67bb0fc02 100644 --- a/theodolite/src/test/kotlin/theodolite/patcher/ConfigOverrideModifierTest.kt +++ b/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/patcher/ConfigOverrideModifierTest.kt @@ -1,4 +1,4 @@ -package theodolite.patcher +package rocks.theodolite.kubernetes.patcher import io.quarkus.test.junit.QuarkusTest import org.junit.jupiter.api.Assertions @@ -6,9 +6,8 @@ import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Test import rocks.theodolite.kubernetes.model.BenchmarkExecution import rocks.theodolite.kubernetes.model.KubernetesBenchmark -import rocks.theodolite.kubernetes.patcher.ConfigOverrideModifier -import theodolite.execution.operator.BenchmarkCRDummy -import theodolite.execution.operator.ExecutionCRDummy +import rocks.theodolite.kubernetes.model.crd.BenchmarkCRDummy +import rocks.theodolite.kubernetes.model.crd.ExecutionCRDummy @QuarkusTest class ConfigOverrideModifierTest { diff --git a/theodolite/src/test/kotlin/theodolite/patcher/ResourceLimitPatcherTest.kt b/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/patcher/ResourceLimitPatcherTest.kt similarity index 95% rename from theodolite/src/test/kotlin/theodolite/patcher/ResourceLimitPatcherTest.kt rename to theodolite/src/test/kotlin/rocks/theodolite/kubernetes/patcher/ResourceLimitPatcherTest.kt index d1435e489a65ed073eacc12f6794d0c70ed55307..f8ac6e904f65e43cb40669a5991ba8a4f5d88613 100644 --- a/theodolite/src/test/kotlin/theodolite/patcher/ResourceLimitPatcherTest.kt +++ b/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/patcher/ResourceLimitPatcherTest.kt @@ -1,4 +1,4 @@ -package theodolite.patcher +package rocks.theodolite.kubernetes.patcher import io.fabric8.kubernetes.client.server.mock.KubernetesServer import io.quarkus.test.junit.QuarkusTest @@ -7,8 +7,6 @@ import io.quarkus.test.kubernetes.client.WithKubernetesTestServer import org.junit.jupiter.api.Assertions.assertTrue import org.junit.jupiter.api.Disabled import org.junit.jupiter.api.Test -import rocks.theodolite.kubernetes.patcher.PatcherFactory -import rocks.theodolite.kubernetes.patcher.PatcherDefinition /** * Resource patcher test diff --git a/theodolite/src/test/kotlin/theodolite/patcher/ResourceRequestPatcherTest.kt b/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/patcher/ResourceRequestPatcherTest.kt similarity index 95% rename from theodolite/src/test/kotlin/theodolite/patcher/ResourceRequestPatcherTest.kt rename to theodolite/src/test/kotlin/rocks/theodolite/kubernetes/patcher/ResourceRequestPatcherTest.kt index d24f7c14074650073925199879f8b23f037ff615..7eee2cad4c94810614e1783b066b90d1bec1d033 100644 --- a/theodolite/src/test/kotlin/theodolite/patcher/ResourceRequestPatcherTest.kt +++ b/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/patcher/ResourceRequestPatcherTest.kt @@ -1,4 +1,4 @@ -package theodolite.patcher +package rocks.theodolite.kubernetes.patcher import io.fabric8.kubernetes.client.server.mock.KubernetesServer import io.quarkus.test.junit.QuarkusTest @@ -6,8 +6,6 @@ import io.quarkus.test.kubernetes.client.KubernetesTestServer import io.quarkus.test.kubernetes.client.WithKubernetesTestServer import io.smallrye.common.constraint.Assert.assertTrue import org.junit.jupiter.api.Test -import rocks.theodolite.kubernetes.patcher.PatcherDefinition -import rocks.theodolite.kubernetes.patcher.PatcherFactory /** * Resource patcher test diff --git a/theodolite/src/test/kotlin/theodolite/benchmark/ConfigMapResourceSetTest.kt b/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/resourceSet/ConfigMapResourceSetTest.kt similarity index 97% rename from theodolite/src/test/kotlin/theodolite/benchmark/ConfigMapResourceSetTest.kt rename to theodolite/src/test/kotlin/rocks/theodolite/kubernetes/resourceSet/ConfigMapResourceSetTest.kt index 1380b1d9160e7536e3f8688f2c27e764baa19b9b..ad856ca7a09537b1e9844963412e2aac57b671d9 100644 --- a/theodolite/src/test/kotlin/theodolite/benchmark/ConfigMapResourceSetTest.kt +++ b/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/resourceSet/ConfigMapResourceSetTest.kt @@ -1,4 +1,4 @@ -package theodolite.benchmark +package rocks.theodolite.kubernetes.resourceSet import com.fasterxml.jackson.databind.ObjectMapper import io.fabric8.kubernetes.api.model.* @@ -20,11 +20,10 @@ import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Test import org.junit.jupiter.api.assertThrows import registerResource -import theodolite.execution.operator.BenchmarkCRDummy -import theodolite.execution.operator.ExecutionClient +import rocks.theodolite.kubernetes.model.crd.BenchmarkCRDummy +import rocks.theodolite.kubernetes.operator.ExecutionClient import rocks.theodolite.kubernetes.model.crd.BenchmarkCRD import rocks.theodolite.kubernetes.model.crd.ExecutionCRD -import rocks.theodolite.kubernetes.resourceSet.ConfigMapResourceSet import rocks.theodolite.kubernetes.util.exception.DeploymentFailedException import java.io.FileInputStream diff --git a/theodolite/src/test/kotlin/theodolite/benchmark/FileSystemResourceSetTest.kt b/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/resourceSet/FileSystemResourceSetTest.kt similarity index 98% rename from theodolite/src/test/kotlin/theodolite/benchmark/FileSystemResourceSetTest.kt rename to theodolite/src/test/kotlin/rocks/theodolite/kubernetes/resourceSet/FileSystemResourceSetTest.kt index 748a33c5c192d459057fbda3d42c5a9cf850b23a..a9a57d8cf3a8a5ffce9a80005840e9e8fe289fb9 100644 --- a/theodolite/src/test/kotlin/theodolite/benchmark/FileSystemResourceSetTest.kt +++ b/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/resourceSet/FileSystemResourceSetTest.kt @@ -1,4 +1,4 @@ -package theodolite.benchmark +package rocks.theodolite.kubernetes.resourceSet import io.fabric8.kubernetes.api.model.* import io.fabric8.kubernetes.api.model.apps.Deployment @@ -15,7 +15,6 @@ import org.junit.jupiter.api.io.TempDir import registerResource import rocks.theodolite.kubernetes.model.crd.BenchmarkCRD import rocks.theodolite.kubernetes.model.crd.ExecutionCRD -import rocks.theodolite.kubernetes.resourceSet.FileSystemResourceSet import rocks.theodolite.kubernetes.util.exception.DeploymentFailedException import java.io.FileInputStream import java.nio.file.Files diff --git a/theodolite/src/test/kotlin/theodolite/execution/operator/SloFactoryTest.kt b/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/slo/SloFactoryTest.kt similarity index 63% rename from theodolite/src/test/kotlin/theodolite/execution/operator/SloFactoryTest.kt rename to theodolite/src/test/kotlin/rocks/theodolite/kubernetes/slo/SloFactoryTest.kt index 9279448c52d53d634be88789feb01f5d49b14dab..de9d4c60dbad069ccb1229bebb4a4751cf96d98d 100644 --- a/theodolite/src/test/kotlin/theodolite/execution/operator/SloFactoryTest.kt +++ b/theodolite/src/test/kotlin/rocks/theodolite/kubernetes/slo/SloFactoryTest.kt @@ -1,13 +1,10 @@ -package theodolite.execution.operator +package rocks.theodolite.kubernetes.slo import io.quarkus.test.junit.QuarkusTest +import org.junit.jupiter.api.Assertions import org.junit.jupiter.api.Test import rocks.theodolite.kubernetes.model.BenchmarkExecution -import rocks.theodolite.kubernetes.model.BenchmarkExecution.SloConfiguration -import rocks.theodolite.kubernetes.slo.SloFactory -import org.junit.jupiter.api.Assertions.* import rocks.theodolite.kubernetes.model.KubernetesBenchmark -import rocks.theodolite.kubernetes.model.KubernetesBenchmark.Slo @QuarkusTest internal class SloFactoryTest { @@ -19,7 +16,7 @@ internal class SloFactoryTest { val execution = BenchmarkExecution() // Define Benchmark SLOs - val slo = Slo() + val slo = KubernetesBenchmark.Slo() slo.name="test" slo.sloType="lag trend" slo.prometheusUrl="test.de" @@ -36,7 +33,7 @@ internal class SloFactoryTest { // Define Execution SLOs, benchmark SLO values for these properties should be overwritten - val sloConfig = SloConfiguration() + val sloConfig = BenchmarkExecution.SloConfiguration() sloConfig.name = "test" val executionSloProperties = mutableMapOf<String, String>() @@ -48,7 +45,7 @@ internal class SloFactoryTest { sloConfig.properties = executionSloProperties // SLO has 'name' that isn't defined in the benchmark, therefore it will be ignored by the SloFactory - val sloConfig2 = SloConfiguration() + val sloConfig2 = BenchmarkExecution.SloConfiguration() sloConfig2.name = "test2" sloConfig2.properties = executionSloProperties @@ -57,16 +54,16 @@ internal class SloFactoryTest { val sloFactory = SloFactory() val combinedSlos = sloFactory.createSlos(execution,benchmark) - assertEquals(1, combinedSlos.size) - assertEquals("test", combinedSlos[0].name) - assertEquals("lag trend", combinedSlos[0].sloType) - assertEquals("test.de", combinedSlos[0].prometheusUrl) - assertEquals(0, combinedSlos[0].offset) - - assertEquals(4, combinedSlos[0].properties.size) - assertEquals("3000", combinedSlos[0].properties["threshold"]) - assertEquals("http://localhost:80/evaluate-slope", combinedSlos[0].properties["externalSloUrl"]) - assertEquals("80", combinedSlos[0].properties["warmup"]) - assertEquals("extended", combinedSlos[0].properties["extensionTest"]) + Assertions.assertEquals(1, combinedSlos.size) + Assertions.assertEquals("test", combinedSlos[0].name) + Assertions.assertEquals("lag trend", combinedSlos[0].sloType) + Assertions.assertEquals("test.de", combinedSlos[0].prometheusUrl) + Assertions.assertEquals(0, combinedSlos[0].offset) + + Assertions.assertEquals(4, combinedSlos[0].properties.size) + Assertions.assertEquals("3000", combinedSlos[0].properties["threshold"]) + Assertions.assertEquals("http://localhost:80/evaluate-slope", combinedSlos[0].properties["externalSloUrl"]) + Assertions.assertEquals("80", combinedSlos[0].properties["warmup"]) + Assertions.assertEquals("extended", combinedSlos[0].properties["extensionTest"]) } } \ No newline at end of file