Skip to content

Commit

Permalink
initial test stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
chakrabortyr committed Mar 7, 2019
1 parent 60dc43a commit af60ab9
Show file tree
Hide file tree
Showing 26 changed files with 318 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,31 @@ REF_DIR=/var/tmp/referencedata

sudo -u xdmod xdmod-shredder -r openstack -d $REF_DIR/openstack_upgrade -f openstack
sudo -u xdmod xdmod-ingestor

phpunit="$(readlink -f ../../../../vendor/bin/phpunit)"

if [ "$1" = "--junit-output-dir" ];
then
REGUSER="--log-junit $2/xdmod-regression-user.xml"
PI="--log-junit $2/xdmod-regression-principalinvestigator.xml"
CD="--log-junit $2/xdmod-regression-centerdirector.xml"
CS="--log-junit $2/xdmod-regression-centerstaff.xml"
PUB="--log-junit $2/xdmod-regression-public.xml"
fi

REG_TEST_USER_ROLE=usr $phpunit $REGUSER lib/Controllers/UsageExplorerCloudTest.php & usrpid=$!
REG_TEST_USER_ROLE=pi $phpunit $PI lib/Controllers/UsageExplorerCloudTest.php & pipid=$!
REG_TEST_USER_ROLE=cd $phpunit $CD lib/Controllers/UsageExplorerCloudTest.php & cdpid=$!
REG_TEST_USER_ROLE=cs $phpunit $CS lib/Controllers/UsageExplorerCloudTest.php & cspid=$!
$phpunit $PUB lib/Controllers/UsageExplorerCloudTest.php & pubpid=$!

EXIT_STATUS=0
for pid in $usrpid $pipid $cdpid $cspid $pubpid;
do
wait "$pid"
if [ "$?" -ne "0" ];
then
EXIT_STATUS=1
fi
done
exit $EXIT_STATUS
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php

namespace Controllers;

class UsageExplorerCloudPostIngestTest extends UsageExplorerTest
{

public function csvExportProvider(){
parent::$baseDir = __DIR__ . '/../../../tests/artifacts/xdmod-test-artifacts/xdmod/post_ingest/';
parent::defaultSetup();

$statistics = array(
'cloud_num_sessions_ended',
'cloud_num_sessions_running',
'cloud_num_sessions_started',
);

$group_bys = array(
'none',
);

$varSettings = array(
'realm' => array('Cloud'),
'dataset_type' => array('aggregate', 'timeseries'),
'statistic' => $statistics,
'group_by' => $group_bys,
'aggregation_unit' => array_keys($this->aggregationUnits)
);

return parent::generateTests($varSettings, '2018-06-01', '2018-06-07');
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
title
"Number of Sessions Ended"
parameters

start,end
2018-06-01,2018-06-07
---------
Summary,"Number of Sessions Ended"
Screwdriver,23
---------
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
title
"Number of Sessions Ended"
parameters

start,end
2018-06-01,2018-06-07
---------
Summary,"Number of Sessions Ended"
Screwdriver,23
---------
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
title
"Number of Sessions Ended"
parameters

start,end
2018-06-01,2018-06-07
---------
Summary,"Number of Sessions Ended"
Screwdriver,23
---------
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
title
"Number of Sessions Ended"
parameters

start,end
2018-06-01,2018-06-07
---------
Summary,"Number of Sessions Ended"
Screwdriver,23
---------
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
title
"Number of Sessions Ended"
parameters

start,end
2018-06-01,2018-06-07
---------
Day,"[Screwdriver] Number of Sessions Ended"
2018-06-01,0
2018-06-02,0
2018-06-03,0
2018-06-04,0
2018-06-05,3
2018-06-06,0
2018-06-07,20
---------
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
title
"Number of Sessions Ended"
parameters

start,end
2018-06-01,2018-06-07
---------
Month,"[Screwdriver] Number of Sessions Ended"
2018-04,23
---------
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
title
"Number of Sessions Ended"
parameters

start,end
2018-06-01,2018-06-07
---------
Quarter,"[Screwdriver] Number of Sessions Ended"
"2018 Q2",23
---------
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
title
"Number of Sessions Ended"
parameters

start,end
2018-06-01,2018-06-07
---------
Year,"[Screwdriver] Number of Sessions Ended"
2018,23
---------
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
title
"Number of Active Sessions"
parameters

start,end
2018-06-01,2018-06-07
---------
Summary,"Number of Active Sessions (Number of Sessions)"
Screwdriver,23
---------
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
title
"Number of Active Sessions"
parameters

start,end
2018-06-01,2018-06-07
---------
Summary,"Number of Active Sessions (Number of Sessions)"
Screwdriver,23
---------
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
title
"Number of Active Sessions"
parameters

start,end
2018-06-01,2018-06-07
---------
Summary,"Number of Active Sessions (Number of Sessions)"
Screwdriver,23
---------
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
title
"Number of Active Sessions"
parameters

start,end
2018-06-01,2018-06-07
---------
Summary,"Number of Active Sessions (Number of Sessions)"
Screwdriver,23
---------
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
title
"Number of Active Sessions"
parameters

start,end
2018-06-01,2018-06-07
---------
Day,"[Screwdriver] Number of Active Sessions (Number of Sessions)"
2018-06-01,17
2018-06-02,17
2018-06-03,17
2018-06-04,17
2018-06-05,23
2018-06-06,20
2018-06-07,20
---------
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
title
"Number of Active Sessions"
parameters

start,end
2018-06-01,2018-06-07
---------
Month,"[Screwdriver] Number of Active Sessions (Number of Sessions)"
2018-04,23
---------
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
title
"Number of Active Sessions"
parameters

start,end
2018-06-01,2018-06-07
---------
Quarter,"[Screwdriver] Number of Active Sessions (Number of Sessions)"
"2018 Q2",23
---------
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
title
"Number of Active Sessions"
parameters

start,end
2018-06-01,2018-06-07
---------
Year,"[Screwdriver] Number of Active Sessions (Number of Sessions)"
2018,23
---------
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
title
"Number of Sessions Started"
parameters

start,end
2018-06-01,2018-06-07
---------
Summary,"Number of Sessions Started"
Screwdriver,23
---------
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
title
"Number of Sessions Started"
parameters

start,end
2018-06-01,2018-06-07
---------
Summary,"Number of Sessions Started"
Screwdriver,23
---------
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
title
"Number of Sessions Started"
parameters

start,end
2018-06-01,2018-06-07
---------
Summary,"Number of Sessions Started"
Screwdriver,23
---------
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
title
"Number of Sessions Started"
parameters

start,end
2018-06-01,2018-06-07
---------
Summary,"Number of Sessions Started"
Screwdriver,23
---------
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
title
"Number of Sessions Started"
parameters

start,end
2018-06-01,2018-06-07
---------
Day,"[Screwdriver] Number of Sessions Started"
2018-06-01,17
2018-06-02,0
2018-06-03,0
2018-06-04,0
2018-06-05,6
2018-06-06,0
2018-06-07,0
---------
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
title
"Number of Sessions Started"
parameters

start,end
2018-06-01,2018-06-07
---------
Month,"[Screwdriver] Number of Sessions Started"
2018-04,23
---------
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
title
"Number of Sessions Started"
parameters

start,end
2018-06-01,2018-06-07
---------
Quarter,"[Screwdriver] Number of Sessions Started"
"2018 Q2",23
---------
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
title
"Number of Sessions Started"
parameters

start,end
2018-06-01,2018-06-07
---------
Year,"[Screwdriver] Number of Sessions Started"
2018,23
---------

0 comments on commit af60ab9

Please sign in to comment.