Skip to content

Commit

Permalink
NEW TEST mode (jobs & list-jobs)
Browse files Browse the repository at this point in the history
  • Loading branch information
sfarouq-ext committed Mar 5, 2025
1 parent da502d0 commit 42ec00a
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/apps/backup/veeam/vbem/restapi/mode/listjobs.pm
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ sub run {
my ($self, %options) = @_;

my $results = $self->manage_selection(%options);
foreach my $uid (keys %$results) {
foreach my $uid (sort keys %$results) {
$self->{output}->output_add(
long_msg => sprintf(
'[uid: %s][jobName: %s][jobType: %s]',
Expand Down
34 changes: 34 additions & 0 deletions tests/apps/backup/veeam/vbem/restapi/list-jobs.robot
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
*** Settings ***
Documentation Check Veeam Backup Enterprise Manager using Rest API,Check jobs.
Resource ${CURDIR}${/}..${/}..${/}..${/}..${/}..${/}resources/import.resource

Suite Setup Start Mockoon ${MOCKOON_JSON}
Suite Teardown Stop Mockoon
Test Timeout 120s


*** Variables ***
${MOCKOON_JSON} ${CURDIR}${/}restapi.json

${cmd} ${CENTREON_PLUGINS}
... --plugin=apps::backup::veeam::vbem::restapi::plugin
... --mode=list-jobs
... --hostname=${HOSTNAME}
... --api-username='username'
... --api-password='password'
... --proto='http'
... --port=${APIPORT}

*** Test Cases ***
list-jobs ${tc}
[Tags] apps backup veeam vbem restapi list-jobs
${command} Catenate
... ${cmd}
... ${extraoptions}

Ctn Verify Command Output ${command} ${expected_result}

Examples: tc extraoptions expected_result --
... 1 --timeframe='' List jobs: [uid: urn:veeam:Job][jobName: Backup client 2 - Tous les jours][jobType: Backup] [uid: urn:veeam:Job:xxxxxxxx-yyyy-zzzz-1111-aaaaaaaaaaaa][jobName: PROD Job 1][jobType: Backup]

0 comments on commit 42ec00a

Please sign in to comment.