Skip to content
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

Re-added integration test harness. #79

Merged
merged 2 commits into from
Mar 29, 2017

Conversation

jpwhite4
Copy link
Member

Description

This harness used to be in XDMoD and was not copied across when the
repo was originally made public.

Also include a couple of example test files that check the metric
explorer and usage explorer controllers. These files are intended to
be used as templates to help developers write their own integration
tests.

Motivation and Context

testing == good

Tests performed

Yes

This harness used to be in XDMoD and was not copied across when the
repo was originally made public.

Also include a couple of example test files that check the metric
explorer and usage explorer controllers. These files are intended to
be used as templates to help developers write their own integration
tests.
@jsperhac jsperhac merged commit cd32523 into ubccr:xdmod6.6 Mar 29, 2017
@jsperhac
Copy link
Contributor

I merged this pull request, since it was approved...however, there are a couple of issues as written:

  • Exceptions as thrown from XdmodTestHelper.php do not work:
    Fatal error: Call to undefined function Exception() in /data/www/dev/jsperhac/xdmod/open_xdmod/modules/xdmod/integration_tests/lib/TestHarness/XdmodTestHelper.php on line 114

  • The authentication call in XdmodTestHelper does not appear to be working, an error is encountered when the token that should have been returned is retrieved:
    `1) IntegrationTests\REST\Warehouse\JobViewerTest::testResourceEndPoint
    Illegal string offset 'results'

/data/www/dev/jsperhac/xdmod/open_xdmod/modules/xdmod/integration_tests/lib/TestHarness/XdmodTestHelper.php:119
/data/www/dev/jsperhac/xdmod-supremm/tests/integration_tests/lib/REST/Warehouse/JobViewerTest.php:23`

@jsperhac
Copy link
Contributor

When I use my dev port on xdmod-dev as the target url, I see the above illegal string offset on authorization calls. When I use the xdmod-dev instance itself, all authorizations just fail:
2) IntegrationTests\REST\Warehouse\JobViewerTest::testInvalidJobSearch Failed asserting that 400 matches expected 403.

@smgallo
Copy link
Contributor

smgallo commented Mar 29, 2017

In XdmodTestHelper.php the there is a new missing when throwing the exception. It should be

throw new \Exception("User role $userrole not defined in .secrets file");

@jsperhac
Copy link
Contributor

Steve is right. Aside from that, the majority of the problem was fixed with proper configuration.

@tyearke tyearke added the qa label Apr 3, 2017
@tyearke tyearke added this to the v6.6.0 milestone Apr 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants