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

Fix up tests #392

Open
wants to merge 2 commits into
base: xdmod11.0
Choose a base branch
from
Open

Fix up tests #392

wants to merge 2 commits into from

Conversation

connersaeli
Copy link
Collaborator

@connersaeli connersaeli commented Aug 22, 2024

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

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project as found in the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@connersaeli connersaeli self-assigned this Aug 22, 2024
@connersaeli connersaeli added this to the 11.0.0 milestone Aug 22, 2024
@connersaeli connersaeli marked this pull request as ready for review August 22, 2024 14:30
@aaronweeden aaronweeden mentioned this pull request Aug 22, 2024
6 tasks
@@ -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();
Copy link
Contributor

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?

Copy link
Contributor

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.

Copy link
Collaborator Author

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.

Copy link
Contributor

@aaronweeden aaronweeden left a 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.

@jpwhite4 jpwhite4 modified the milestones: 11.0.0, 11.5.0 Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants