-
Notifications
You must be signed in to change notification settings - Fork 75
Add raw data regression tests. #1788
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add raw data regression tests. #1788
Conversation
d3953f4 to
240527c
Compare
5385b5d to
6e98c84
Compare
6e98c84 to
8aa08d6
Compare
tests/regression/bootstrap.php
Outdated
| . '/../integration/lib/' | ||
| . str_replace('\\', '/', $className) | ||
| . '.php'; | ||
| . str_replace( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please can you explain this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have added a comment above the code to explain; it is to make sure IntegrationTests\BaseTest can be resolved to ../integration/lib/BaseTest.php and IntegrationTests\TokenAuthTest can be resolved to ../integration/lib/TokenAuthTest.php, since they are directly in the lib directory and not a subdirectory; this is just as in the integration tests bootstrap.php:
xdmod/tests/integration/bootstrap.php
Lines 18 to 26 in fc4a09c
| . str_replace( | |
| '\\', | |
| '/', | |
| preg_replace( | |
| '/IntegrationTests\\\\?/', | |
| '', | |
| $className | |
| ) | |
| ) . '.php'; |
However, now that I'm looking at it again, I think I can submit another PR to address an inconsistency between the directory structure and the integration test namespaces that would make these lines in the
bootstrap.php files be unnecessary; stay tuned.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After more digging, I think it is indeed necessary to have code in the bootstrap.php files that resolves namespace prefixes (e.g., IntegrationTests) to base directories (e.g., tests/integration/lib). However, there are also namespace and directory inconsistencies that can be addressed separately in #1789.
e6644f8 to
ee4d2e3
Compare
5820bbb to
59953ef
Compare
59953ef to
00e877b
Compare
00e877b to
30f82f6
Compare
30f82f6 to
beb96e3
Compare
Description
This PR adds regression tests of the
warehouse/raw-dataREST endpoint.It also removes some of the integration tests that were made redundant by the new regression tests.
Tests for the
SUPREMMrealm will be added in ubccr/xdmod-supremm#354.Motivation and Context
There will be upcoming PRs (e.g., #1779, #1780) that modify the
warehouse/raw-dataendpoint, and the new tests from this PR will help catch any unintended changes to the response data.Tests performed
In a Docker container running
tools-ext-01.ccr.xdmod.org/xdmod-10.5.0-x86_64:rockylinux8.5-0.3:export XDMOD_TEST_MODE=fresh_install/unit-{before,after}.txtand make sure the only differences are user hashes and amount of time the tests ran./component-{before,after}.txtand make sure the only differences are test name hashes and amount of time the tests ran./integration-{before,after}.txtand make sure the differences are correct:ControllerTest::testEnumTargetAddresses.testGetRawDatatests have been removed in which the test data start withsuccess_0,success_16500, andsuccess_fields_and_filters./regression-{before,after}.txtand make sure the differences are correct:WarehouseRawDataTest::testGetRawData.export XDMOD_TEST_MODE=upgrade.Checklist: