-
Notifications
You must be signed in to change notification settings - Fork 25
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
Fix up tests #392
base: xdmod11.0
Are you sure you want to change the base?
Fix up tests #392
Conversation
@@ -70,13 +72,15 @@ private function fetchResourceId() | |||
private function invalidSupremmDbstatsEntries($db) | |||
{ | |||
// without performing validation : expect to receive a 401 | |||
// ensure user is logged out | |||
self::$xdmodhelper->logoutDashboard(); |
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.
Why logoutDashboard
instead of just logout
?
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 see, because this is testing the internal dashboard. I would recommend authenticateDashboard
instead of authenticate
then.
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.
So after a little bit of digging, it seems that the logout
/authenticate
(without Dashboard
) is probably more desirable here. The authenticateDashboard
does not work for these REST calls because even though they are in the internal dashboard, endpoints tested here such as supremm_dataflow/dbstats
are part of the new REST stack. I need to double-check, but it seems that the {logout,authenticate}Dashboard
does not properly authenticate the user for the required REST calls.
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.
In DashboardSupremmTest
, Instead of logging out at the top of functions, I would recommend that for each call to authenticate
there is a corresponding call to logout
that happens after the request(s) have been made. In most cases, the logout would be after a single call to get
, except for testResourceEnableDisable
in which it would be after the three calls to get
. The goal would be that each test resets the state back to where it found it.
This is identical to #390 (see writeup in that PR). There was an issue with my CircleCI account where it was running the tests under my own account and not under the
ubccr
account. I made a config change that resolves the issue, but it requires a new PR to apply the change.Description
Motivation and Context
Tests performed
Types of changes
Checklist: