Skip to content

Fix up tests#392

Closed
connersaeli wants to merge 3 commits intoubccr:mainfrom
connersaeli:fix-tests
Closed

Fix up tests#392
connersaeli wants to merge 3 commits intoubccr:mainfrom
connersaeli:fix-tests

Conversation

@connersaeli
Copy link
Copy Markdown
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
{
// without performing validation : expect to receive a 401
// ensure user is logged out
self::$xdmodhelper->logoutDashboard();
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

@connersaeli connersaeli mentioned this pull request Aug 22, 2024
6 tasks
@jpwhite4 jpwhite4 modified the milestones: 11.0.0, 11.5.0 Sep 10, 2024
@aaronweeden
Copy link
Copy Markdown
Contributor

Closed in favor of #391

@aaronweeden aaronweeden closed this Feb 6, 2025
@connersaeli connersaeli deleted the fix-tests branch February 4, 2026 18:33
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