-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
90a42f7
commit 55aed11
Showing
11 changed files
with
276 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
...xdmod/modules/xdmod/regression_tests/lib/Controllers/UsageExplorerCloudPostIngestTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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-05-19', '2018-05-19'); | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
open_xdmod/modules/xdmod/regression_tests/post_ingest_test.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/bin/sh | ||
# Tests that cloud ETL works after upgrade + reingestion | ||
|
||
BASEDIR=./open_xdmod/modules/xdmod/regression_tests | ||
REF_DIR=/var/tmp/referencedata | ||
last_modified_start_date=$(date +'%F %T') | ||
|
||
oldCount=$(mysql -N -B -e "SELECT SUM(num_sessions_ended) FROM modw_cloud.cloudfact_by_month WHERE month = 4;") | ||
|
||
if [ $oldCount -ne 53 ] | ||
then | ||
echo " Count $oldCount did not match expected result of 53" | ||
exit 1 | ||
fi | ||
|
||
sudo -u xdmod xdmod-shredder -r openstack -d $REF_DIR/openstack_upgrade -f openstack | ||
sudo -u xdmod xdmod-ingestor --datatype=openstack --last-modified-start-date "$last_modified_start_date" | ||
sudo -u xdmod xdmod-ingestor --aggregate=cloud --last-modified-start-date "$last_modified_start_date" | ||
|
||
newCount=$(mysql -N -B -e "SELECT SUM(num_sessions_ended) FROM modw_cloud.cloudfact_by_month WHERE month = 4;") | ||
|
||
if [ $newCount -ne 52 ] | ||
then | ||
echo " Count $newCount did not match expected result of 52" | ||
exit 1 | ||
|
||
fi | ||
|
||
newRows=$(mysql -N -B -e "SELECT SUM(num_sessions_ended) FROM modw_cloud.cloudfact_by_month WHERE month = 5;") | ||
|
||
if [ $newRows -ne 2 ] | ||
then | ||
echo " Count $newRows did not match expected result of 2" | ||
exit 1 | ||
|
||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.