From 3cfdfea811b012dc363c400bfd51cda4434f7ec8 Mon Sep 17 00:00:00 2001 From: GIlca Date: Mon, 16 Jan 2023 16:54:17 +0200 Subject: [PATCH] Tests Fix --- .../lang/runtime/bindings/ArgumentsBindingTest.java | 7 +++++++ .../lang/runtime/bindings/InputsBindingTest.java | 7 +++++++ .../lang/runtime/bindings/OutputsBindingTest.java | 7 +++++++ .../lang/runtime/bindings/ResultBindingTest.java | 7 +++++++ .../lang/runtime/bindings/scripts/ScriptEvaluatorTest.java | 7 +++++++ .../lang/runtime/bindings/scripts/ScriptExecutorTest.java | 7 +++++++ .../io/cloudslang/lang/runtime/steps/ActionStepsTest.java | 7 +++++++ .../cloudslang/lang/runtime/steps/ExecutableStepsTest.java | 7 +++++++ .../lang/runtime/steps/ParallelLoopStepsTest.java | 7 +++++++ .../lang/runtime/steps/StepExecutionDataTest.java | 7 +++++++ .../test/resources/META-INF/spring/systemTestContext.xml | 4 ++++ 11 files changed, 74 insertions(+) diff --git a/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/bindings/ArgumentsBindingTest.java b/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/bindings/ArgumentsBindingTest.java index 26199b0269..027fbaf931 100644 --- a/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/bindings/ArgumentsBindingTest.java +++ b/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/bindings/ArgumentsBindingTest.java @@ -22,7 +22,9 @@ import io.cloudslang.lang.entities.bindings.values.ValueFactory; import io.cloudslang.lang.runtime.bindings.scripts.ScriptEvaluator; import io.cloudslang.lang.runtime.services.ScriptsService; +import io.cloudslang.runtime.api.python.PythonExecutorConfigurationDataService; import io.cloudslang.runtime.api.python.PythonRuntimeService; +import io.cloudslang.runtime.api.python.entities.PythonExecutorDetails; import io.cloudslang.runtime.impl.python.PythonExecutionCachedEngine; import io.cloudslang.runtime.impl.python.PythonExecutionEngine; import io.cloudslang.runtime.impl.python.PythonExecutionNotCachedEngine; @@ -459,6 +461,11 @@ public PythonExecutionEngine pythonExecutionEngine() { return new PythonExecutionCachedEngine(); } + @Bean(name = "pythonExecutorConfigurationDataService") + public PythonExecutorConfigurationDataService pythonExecutorConfigurationDataService() { + return PythonExecutorDetails::new; + } + @Bean(name = "externalPythonExecutorService") public PythonRuntimeService externalPythonExecutorService() { return new ExternalPythonExecutorServiceImpl(mock(StatefulRestEasyClientsHolder.class), diff --git a/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/bindings/InputsBindingTest.java b/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/bindings/InputsBindingTest.java index de907b4d75..ecb922b5ab 100644 --- a/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/bindings/InputsBindingTest.java +++ b/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/bindings/InputsBindingTest.java @@ -21,7 +21,9 @@ import io.cloudslang.lang.entities.bindings.values.ValueFactory; import io.cloudslang.lang.runtime.bindings.scripts.ScriptEvaluator; import io.cloudslang.lang.runtime.services.ScriptsService; +import io.cloudslang.runtime.api.python.PythonExecutorConfigurationDataService; import io.cloudslang.runtime.api.python.PythonRuntimeService; +import io.cloudslang.runtime.api.python.entities.PythonExecutorDetails; import io.cloudslang.runtime.impl.python.PythonExecutionCachedEngine; import io.cloudslang.runtime.impl.python.PythonExecutionEngine; import io.cloudslang.runtime.impl.python.PythonRuntimeServiceImpl; @@ -558,6 +560,11 @@ public PythonExecutionEngine pythonExecutionEngine() { return new PythonExecutionCachedEngine(); } + @Bean(name = "pythonExecutorConfigurationDataService") + public PythonExecutorConfigurationDataService pythonExecutorConfigurationDataService() { + return PythonExecutorDetails::new; + } + @Bean(name = "externalPythonExecutorService") public PythonRuntimeService externalPythonExecutorService() { return new ExternalPythonExecutorServiceImpl(mock(StatefulRestEasyClientsHolder.class), diff --git a/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/bindings/OutputsBindingTest.java b/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/bindings/OutputsBindingTest.java index f62ed588f1..a270faa15a 100644 --- a/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/bindings/OutputsBindingTest.java +++ b/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/bindings/OutputsBindingTest.java @@ -20,7 +20,9 @@ import io.cloudslang.lang.runtime.bindings.scripts.ScriptEvaluator; import io.cloudslang.lang.runtime.services.ScriptsService; import io.cloudslang.lang.runtime.steps.ReadOnlyContextAccessor; +import io.cloudslang.runtime.api.python.PythonExecutorConfigurationDataService; import io.cloudslang.runtime.api.python.PythonRuntimeService; +import io.cloudslang.runtime.api.python.entities.PythonExecutorDetails; import io.cloudslang.runtime.impl.python.PythonExecutionCachedEngine; import io.cloudslang.runtime.impl.python.PythonExecutionEngine; import io.cloudslang.runtime.impl.python.PythonRuntimeServiceImpl; @@ -266,6 +268,11 @@ public PythonExecutionEngine pythonExecutionEngine() { return new PythonExecutionCachedEngine(); } + @Bean(name = "pythonExecutorConfigurationDataService") + public PythonExecutorConfigurationDataService pythonExecutorConfigurationDataService() { + return PythonExecutorDetails::new; + } + @Bean(name = "externalPythonExecutorService") public PythonRuntimeService externalPythonExecutorService() { return new ExternalPythonExecutorServiceImpl(mock(StatefulRestEasyClientsHolder.class), diff --git a/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/bindings/ResultBindingTest.java b/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/bindings/ResultBindingTest.java index 6ce5e68e7b..adf30f32a8 100644 --- a/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/bindings/ResultBindingTest.java +++ b/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/bindings/ResultBindingTest.java @@ -21,7 +21,9 @@ import io.cloudslang.lang.entities.bindings.values.ValueFactory; import io.cloudslang.lang.runtime.bindings.scripts.ScriptEvaluator; import io.cloudslang.lang.runtime.services.ScriptsService; +import io.cloudslang.runtime.api.python.PythonExecutorConfigurationDataService; import io.cloudslang.runtime.api.python.PythonRuntimeService; +import io.cloudslang.runtime.api.python.entities.PythonExecutorDetails; import io.cloudslang.runtime.impl.python.PythonExecutionCachedEngine; import io.cloudslang.runtime.impl.python.PythonExecutionEngine; import io.cloudslang.runtime.impl.python.PythonRuntimeServiceImpl; @@ -243,6 +245,11 @@ public PythonExecutionEngine pythonExecutionEngine() { return new PythonExecutionCachedEngine(); } + @Bean(name = "pythonExecutorConfigurationDataService") + public PythonExecutorConfigurationDataService pythonExecutorConfigurationDataService() { + return PythonExecutorDetails::new; + } + @Bean(name = "externalPythonExecutorService") public PythonRuntimeService externalPythonExecutorService() { return new ExternalPythonExecutorServiceImpl(mock(StatefulRestEasyClientsHolder.class), diff --git a/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/bindings/scripts/ScriptEvaluatorTest.java b/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/bindings/scripts/ScriptEvaluatorTest.java index 62257fdf0f..e8e04ee375 100644 --- a/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/bindings/scripts/ScriptEvaluatorTest.java +++ b/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/bindings/scripts/ScriptEvaluatorTest.java @@ -19,7 +19,9 @@ import io.cloudslang.lang.entities.bindings.values.ValueFactory; import io.cloudslang.lang.runtime.services.ScriptsService; import io.cloudslang.runtime.api.python.PythonEvaluationResult; +import io.cloudslang.runtime.api.python.PythonExecutorConfigurationDataService; import io.cloudslang.runtime.api.python.PythonRuntimeService; +import io.cloudslang.runtime.api.python.entities.PythonExecutorDetails; import io.cloudslang.runtime.impl.python.PythonExecutionCachedEngine; import io.cloudslang.runtime.impl.python.PythonExecutionEngine; import io.cloudslang.runtime.impl.python.PythonExecutor; @@ -209,6 +211,11 @@ protected PythonInterpreter initInterpreter(Set dependencies) { }; } + @Bean(name = "pythonExecutorConfigurationDataService") + public PythonExecutorConfigurationDataService pythonExecutorConfigurationDataService() { + return PythonExecutorDetails::new; + } + @Bean(name = "externalPythonExecutorService") public PythonRuntimeService externalPythonExecutorService() { return new ExternalPythonExecutorServiceImpl(mock(StatefulRestEasyClientsHolder.class), diff --git a/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/bindings/scripts/ScriptExecutorTest.java b/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/bindings/scripts/ScriptExecutorTest.java index 42466bcd25..152e6802a8 100644 --- a/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/bindings/scripts/ScriptExecutorTest.java +++ b/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/bindings/scripts/ScriptExecutorTest.java @@ -17,7 +17,9 @@ import io.cloudslang.lang.entities.bindings.values.ValueFactory; import io.cloudslang.lang.runtime.services.ScriptsService; import io.cloudslang.runtime.api.python.PythonExecutionResult; +import io.cloudslang.runtime.api.python.PythonExecutorConfigurationDataService; import io.cloudslang.runtime.api.python.PythonRuntimeService; +import io.cloudslang.runtime.api.python.entities.PythonExecutorDetails; import io.cloudslang.runtime.impl.python.PythonExecutionCachedEngine; import io.cloudslang.runtime.impl.python.PythonExecutionEngine; import io.cloudslang.runtime.impl.python.PythonExecutor; @@ -199,6 +201,11 @@ protected PythonInterpreter initInterpreter(Set dependencies) { }; } + @Bean(name = "pythonExecutorConfigurationDataService") + public PythonExecutorConfigurationDataService pythonExecutorConfigurationDataService() { + return PythonExecutorDetails::new; + } + @Bean(name = "externalPythonExecutorService") public PythonRuntimeService externalPythonExecutorService() { return new ExternalPythonExecutorServiceImpl(mock(StatefulRestEasyClientsHolder.class), diff --git a/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/steps/ActionStepsTest.java b/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/steps/ActionStepsTest.java index a232ab14a0..9041c1107f 100644 --- a/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/steps/ActionStepsTest.java +++ b/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/steps/ActionStepsTest.java @@ -27,7 +27,9 @@ import io.cloudslang.lang.runtime.services.ScriptsService; import io.cloudslang.lang.runtime.steps.ContentTestActions.NonSerializableObject; import io.cloudslang.runtime.api.java.JavaRuntimeService; +import io.cloudslang.runtime.api.python.PythonExecutorConfigurationDataService; import io.cloudslang.runtime.api.python.PythonRuntimeService; +import io.cloudslang.runtime.api.python.entities.PythonExecutorDetails; import io.cloudslang.runtime.api.sequential.SequentialExecutionService; import io.cloudslang.runtime.impl.java.JavaExecutionCachedEngine; import io.cloudslang.runtime.impl.java.JavaRuntimeServiceImpl; @@ -1206,6 +1208,11 @@ public PythonExecutionEngine pythonExecutionEngine() { return new PythonExecutionCachedEngine(); } + @Bean(name = "pythonExecutorConfigurationDataService") + public PythonExecutorConfigurationDataService pythonExecutorConfigurationDataService() { + return PythonExecutorDetails::new; + } + @Bean(name = "externalPythonExecutorService") public PythonRuntimeService externalPythonExecutorService() { return new ExternalPythonExecutorServiceImpl(mock(StatefulRestEasyClientsHolder.class), diff --git a/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/steps/ExecutableStepsTest.java b/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/steps/ExecutableStepsTest.java index d85edff130..594f0e3bee 100644 --- a/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/steps/ExecutableStepsTest.java +++ b/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/steps/ExecutableStepsTest.java @@ -40,7 +40,9 @@ import io.cloudslang.lang.runtime.env.RunEnvironment; import io.cloudslang.lang.runtime.events.LanguageEventData; import io.cloudslang.lang.runtime.services.ScriptsService; +import io.cloudslang.runtime.api.python.PythonExecutorConfigurationDataService; import io.cloudslang.runtime.api.python.PythonRuntimeService; +import io.cloudslang.runtime.api.python.entities.PythonExecutorDetails; import io.cloudslang.runtime.impl.python.PythonExecutionCachedEngine; import io.cloudslang.runtime.impl.python.PythonExecutionEngine; import io.cloudslang.runtime.impl.python.PythonRuntimeServiceImpl; @@ -510,6 +512,11 @@ public PythonExecutionEngine pythonExecutionEngine() { return new PythonExecutionCachedEngine(); } + @Bean(name = "pythonExecutorConfigurationDataService") + public PythonExecutorConfigurationDataService pythonExecutorConfigurationDataService() { + return PythonExecutorDetails::new; + } + @Bean(name = "externalPythonExecutorService") public PythonRuntimeService externalPythonExecutorService() { return new ExternalPythonExecutorServiceImpl(mock(StatefulRestEasyClientsHolder.class), diff --git a/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/steps/ParallelLoopStepsTest.java b/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/steps/ParallelLoopStepsTest.java index 8e0892b73e..69cd0c0262 100644 --- a/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/steps/ParallelLoopStepsTest.java +++ b/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/steps/ParallelLoopStepsTest.java @@ -31,7 +31,9 @@ import io.cloudslang.lang.runtime.env.RunEnvironment; import io.cloudslang.lang.runtime.events.LanguageEventData; import io.cloudslang.lang.runtime.services.ScriptsService; +import io.cloudslang.runtime.api.python.PythonExecutorConfigurationDataService; import io.cloudslang.runtime.api.python.PythonRuntimeService; +import io.cloudslang.runtime.api.python.entities.PythonExecutorDetails; import io.cloudslang.runtime.impl.python.PythonExecutionCachedEngine; import io.cloudslang.runtime.impl.python.PythonExecutionEngine; import io.cloudslang.runtime.impl.python.PythonRuntimeServiceImpl; @@ -606,6 +608,11 @@ public PythonExecutionEngine pythonExecutionEngine() { return new PythonExecutionCachedEngine(); } + @Bean(name = "pythonExecutorConfigurationDataService") + public PythonExecutorConfigurationDataService pythonExecutorConfigurationDataService() { + return PythonExecutorDetails::new; + } + @Bean(name = "externalPythonRuntimeService") public PythonRuntimeService externalPythonRuntimeService() { return new PythonRuntimeServiceImpl(); diff --git a/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/steps/StepExecutionDataTest.java b/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/steps/StepExecutionDataTest.java index bef221dfd6..7c24b33f3c 100644 --- a/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/steps/StepExecutionDataTest.java +++ b/cloudslang-runtime/src/test/java/io/cloudslang/lang/runtime/steps/StepExecutionDataTest.java @@ -37,7 +37,9 @@ import io.cloudslang.lang.runtime.env.RunEnvironment; import io.cloudslang.lang.runtime.events.LanguageEventData; import io.cloudslang.lang.runtime.services.ScriptsService; +import io.cloudslang.runtime.api.python.PythonExecutorConfigurationDataService; import io.cloudslang.runtime.api.python.PythonRuntimeService; +import io.cloudslang.runtime.api.python.entities.PythonExecutorDetails; import io.cloudslang.runtime.impl.python.PythonExecutionCachedEngine; import io.cloudslang.runtime.impl.python.PythonExecutionEngine; import io.cloudslang.runtime.impl.python.PythonRuntimeServiceImpl; @@ -642,6 +644,11 @@ public PythonExecutionEngine pythonExecutionEngine() { return new PythonExecutionCachedEngine(); } + @Bean(name = "pythonExecutorConfigurationDataService") + public PythonExecutorConfigurationDataService pythonExecutorConfigurationDataService() { + return PythonExecutorDetails::new; + } + @Bean(name = "externalPythonExecutorService") public PythonRuntimeService externalPythonExecutorService() { return new ExternalPythonExecutorServiceImpl(mock(StatefulRestEasyClientsHolder.class), diff --git a/cloudslang-tests/src/test/resources/META-INF/spring/systemTestContext.xml b/cloudslang-tests/src/test/resources/META-INF/spring/systemTestContext.xml index 559c09e7e8..d4e731ba7d 100644 --- a/cloudslang-tests/src/test/resources/META-INF/spring/systemTestContext.xml +++ b/cloudslang-tests/src/test/resources/META-INF/spring/systemTestContext.xml @@ -22,4 +22,8 @@ + + + +