diff --git a/qa/integration/src/test/java/org/eclipse/kapua/integration/service/jobEngine/RunJobEngineServiceI9nTest.java b/qa/integration/src/test/java/org/eclipse/kapua/integration/service/jobEngine/RunJobEngineServiceI9nTest.java index 8fa5eda1dfc..139f8aafb60 100644 --- a/qa/integration/src/test/java/org/eclipse/kapua/integration/service/jobEngine/RunJobEngineServiceI9nTest.java +++ b/qa/integration/src/test/java/org/eclipse/kapua/integration/service/jobEngine/RunJobEngineServiceI9nTest.java @@ -20,7 +20,8 @@ @CucumberOptions( features = { // "classpath:features/jobEngine/JobEngineServiceOperations.feature", - "classpath:features/jobEngine/JobEngineServiceProcessorKeystoreI9n.feature", +// "classpath:features/jobEngine/JobEngineServiceProcessorKeystoreI9n.feature", + "classpath:features/jobEngine/JobEngineServiceProcessorAssetI9n.feature", }, glue = { "org.eclipse.kapua.service.job.steps", diff --git a/qa/integration/src/test/resources/features/jobEngine/JobEngineServiceProcessorAssetI9n.feature b/qa/integration/src/test/resources/features/jobEngine/JobEngineServiceProcessorAssetI9n.feature new file mode 100644 index 00000000000..f584b4aa641 --- /dev/null +++ b/qa/integration/src/test/resources/features/jobEngine/JobEngineServiceProcessorAssetI9n.feature @@ -0,0 +1,58 @@ +############################################################################### +# Copyright (c) 2024, 2024 Eurotech and/or its affiliates and others +# +# This program and the accompanying materials are made +# available under the terms of the Eclipse Public License 2.0 +# which is available at https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# Eurotech - initial API and implementation +############################################################################### +@env_docker +@it +@jobEngine +@jobEngineTargetProcessors + +Feature: Job Engine Service - Asset Step Processors + Tests for Device Management Asset Processor + + @setup + Scenario: Setup test resources + Given Init Security Context + And Start Docker environment with resources + | db | + | events-broker | + | job-engine | + | message-broker | + | broker-auth-service | + | consumer-lifecycle | + + Scenario: Asset Write + + Given I login as user with name "kapua-sys" and password "kapua-password" + And I start the Kura Mock + And Device birth message is sent + And Device "rpione3" is connected within 10s + And I create a job with the name "TestJob" + And I add device targets to job + | rpione3 | + And I search for step definition with the name + | Asset Write | + And I add job step to job with name "Test Step - Asset Write" and with selected job step definition and properties + | name | type | value | + | assets | org.eclipse.kapua.service.device.management.asset.DeviceAssets | assetNamebinaryEGVzdCBzdHJpbmcgdmFsdWU=binaryTest | + | timeout | java.lang.Long | 5000 | + When I start a job + And I wait job to finish its execution up to 10s + Then I confirm that job has 1 job execution + And I confirm that job target in job has step index 0 and status "PROCESS_OK" + # TODO: check that asset has been written when KuraMock gets refactored + + @teardown + Scenario: Tear down test resources + Given I logout + And KuraMock is disconnected + And Stop Docker environment + And Clean Locator Instance \ No newline at end of file diff --git a/qa/integration/src/test/resources/features/jobEngine/JobEngineServiceProcessorKeystoreI9n.feature b/qa/integration/src/test/resources/features/jobEngine/JobEngineServiceProcessorKeystoreI9n.feature index 0cc4d37aa12..a620ee29c6a 100644 --- a/qa/integration/src/test/resources/features/jobEngine/JobEngineServiceProcessorKeystoreI9n.feature +++ b/qa/integration/src/test/resources/features/jobEngine/JobEngineServiceProcessorKeystoreI9n.feature @@ -16,7 +16,7 @@ @jobEngineTargetProcessors Feature: Job Engine Service - Keystore Step Processors - Tests for Device Management Keystore Processor + Tests for Device Management Keystore Processor @setup Scenario: Setup test resources @@ -71,7 +71,7 @@ Feature: Job Engine Service - Keystore Step Processors | algorithm | java.lang.String | RSA | | signatureAlgorithm | java.lang.String | SHA256withRSA | | attributes | java.lang.String | CN=Let's Encrypt Authority X3,O=Let's Encrypt,C=US | - | timeout | java.lang.Long | 10000 | + | timeout | java.lang.Long | 5000 | When I start a job And I wait job to finish its execution up to 10s Then I confirm that job has 1 job execution @@ -93,7 +93,7 @@ Feature: Job Engine Service - Keystore Step Processors | name | type | value | | keystoreId | java.lang.String | SSLKeystore | | alias | java.lang.String | qaCertificate | - | timeout | java.lang.Long | 10000 | + | timeout | java.lang.Long | 5000 | When I start a job And I wait job to finish its execution up to 10s Then I confirm that job has 1 job execution