Skip to content

Commit

Permalink
♻️ [Test] Added new set of test cases to test JobEngine Device Manage…
Browse files Browse the repository at this point in the history
…ment Keystore Target Processors

Signed-off-by: Alberto Codutti <[email protected]>
  • Loading branch information
Coduz committed Jan 20, 2025
1 parent 82b5b18 commit 2523285
Show file tree
Hide file tree
Showing 12 changed files with 127 additions and 219 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/kapua-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ jobs:
uses: actions/checkout@v4
- uses: ./.github/actions/runTestsTaggedAs
with:
tag: '@jobEngineOperations'
tag: '@jobEngine'
needs-docker-images: 'true'
test-jobsIntegration:
needs: build
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
@RunWith(Cucumber.class)
@CucumberOptions(
features = {
"classpath:features/jobEngine/JobEngineServiceOperations.feature",
// "classpath:features/jobEngine/JobEngineServiceOperations.feature",
"classpath:features/jobEngine/JobEngineServiceProcessorKeystoreI9n.feature",
},
glue = {
"org.eclipse.kapua.service.job.steps",
Expand All @@ -31,9 +32,9 @@
},
plugin = {
"pretty",
"html:target/cucumber/JobEngineServiceOfflineDeviceI9n",
"json:target/JobEngineServiceOfflineDeviceI9n_cucumber.json"
"html:target/cucumber/RunJobEngineServiceI9n",
"json:target/RunJobEngineServiceI9n_cucumber.json"
},
monochrome = true)
public class RunJobEngineService9nTest {
public class RunJobEngineServiceI9nTest {
}

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@
@jobEngine
@jobEngineOperations

Feature: JobEngineService stop job tests with online device
Job Engine Service test scenarios for stopping job. This feature file contains scenarios for stopping job with one target and one step,
one target and multiple steps, multiple targets and one step and multiple targets and multiple steps.
Feature: Job Engine Service - Operations
Job Engine Service tests for basic operations

@setup
Scenario: Setup test resources
Expand All @@ -30,15 +29,15 @@ Feature: JobEngineService stop job tests with online device
| broker-auth-service |
| consumer-lifecycle |

Scenario: Start a Job - Without JobTarget
Scenario: Start - Without JobTarget

Given I login as user with name "kapua-sys" and password "kapua-password"
And I create a job with the name "Test Job - Empty Targets"
Then I expect the exception "JobMissingTargetException" with the text "does not have targets configured"
And I start a job
And An exception was thrown

Scenario: Start a Job - Without JobStep
Scenario: Start - Without JobStep

Given I login as user with name "kapua-sys" and password "kapua-password"
And I create a device with name "Test Target"
Expand All @@ -49,7 +48,7 @@ Feature: JobEngineService stop job tests with online device
And I start a job
And An exception was thrown

Scenario: Start a Job - JobTarget ok
Scenario: Start - JobTarget ok

Given I login as user with name "kapua-sys" and password "kapua-password"
And I start the Kura Mock
Expand All @@ -69,7 +68,7 @@ Feature: JobEngineService stop job tests with online device
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"

Scenario: Start a Job - JobTarget failed
Scenario: Start - JobTarget failed

Given I login as user with name "kapua-sys" and password "kapua-password"
And I create a device with name "Test Target"
Expand All @@ -87,7 +86,7 @@ Feature: JobEngineService stop job tests with online device
Then I confirm that job has 1 job execution
And I confirm that job target in job has step index 0 and status "PROCESS_FAILED"

Scenario: Start a Job - JobTarget ok then ok
Scenario: Start - JobTarget ok then ok

Given I login as user with name "kapua-sys" and password "kapua-password"
And I start the Kura Mock
Expand All @@ -111,7 +110,7 @@ Feature: JobEngineService stop job tests with online device
Then I confirm that job has 2 job execution
And I confirm that job target in job has step index 0 and status "PROCESS_OK"

Scenario: Start a Job - JobTarget failed then ok
Scenario: Start - JobTarget failed then ok

Given I login as user with name "kapua-sys" and password "kapua-password"
And I create a device with name "rpione3"
Expand All @@ -136,7 +135,7 @@ Feature: JobEngineService stop job tests with online device
Then I confirm that job has 2 job execution
And I confirm that job target in job has step index 0 and status "PROCESS_OK"

Scenario: Start a Job - Two JobSteps
Scenario: Start - Two JobSteps

Given I login as user with name "kapua-sys" and password "kapua-password"
And I start the Kura Mock
Expand All @@ -162,7 +161,7 @@ Feature: JobEngineService stop job tests with online device
Then I confirm that job has 1 job execution
And I confirm that job target in job has step index 1 and status "PROCESS_OK"

Scenario: Check a Job - Running status
Scenario: Is Running - Check running status

Given I login as user with name "kapua-sys" and password "kapua-password"
And I start the Kura Mock
Expand All @@ -186,7 +185,7 @@ Feature: JobEngineService stop job tests with online device
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"

Scenario: Stop a Job - Not running, never run
Scenario: Stop - Not running, never run
Given I login as user with name "kapua-sys" and password "kapua-password"
And I create a device with name "Test Target"
And I create a job with the name "TestJob"
Expand All @@ -202,7 +201,7 @@ Feature: JobEngineService stop job tests with online device
And I stop the job
And An exception was thrown

Scenario: Stop a Job - Not running, but was
Scenario: Stop - Not running, but was

Given I login as user with name "kapua-sys" and password "kapua-password"
And I start the Kura Mock
Expand All @@ -223,7 +222,7 @@ Feature: JobEngineService stop job tests with online device
And I stop the job
And An exception was thrown

Scenario: Stop a Job - Running
Scenario: Stop - Running
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
Expand Down
Loading

0 comments on commit 2523285

Please sign in to comment.