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

OIDC e2e tests #645

Draft
wants to merge 17 commits into
base: main
Choose a base branch
from
Draft

OIDC e2e tests #645

wants to merge 17 commits into from

Conversation

himanshusinghs
Copy link
Contributor

Draft version

Description

Checklist

Motivation and Context

  • Bugfix
  • New feature
  • Dependency update
  • Misc

Open Questions

Dependents

Types of changes

  • Backport Needed
  • Patch (non-breaking change which fixes an issue)
  • Minor (non-breaking change which adds functionality)
  • Major (fix or feature that would cause existing functionality to change)

- wdio-vscode-service
- wdio-wait-for
- "@wdio/globals"
- "@wdio/types"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In Compass and mongosh our depcheckrcs often have comments about why a specific dependency is in the ignore list, this might be an opportunity to also introduce this pattern here 🙂

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense - I will make sure to do that.


before(async function () {
if (process.platform !== 'linux') {
// return;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^

just so we don't forget

async () => {
const notifs = await workbench.getNotifications();
const messages = await Promise.all(notifs.map((n) => n.getMessage()));
return messages.includes('MongoDB connection successful.');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there some easy way of verifying that we connected as an authenticated user (and in particular that the connection attempt did not accidentally succeed because it is fully unauthenticated and makes use of the MongoDB localhost exception)?

In Compass and mongosh we use connectionStatus and/or check that the OIDC IDP has actually issued a token by looking at the contents of oidcMockProviderEndpointAccesses, those might be good things to try here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yea in addition to what is suggested I also wanted to include the authInfo check which unfortunately due to limitations being posed right now, I am unable to. Will be looking into this today but thank you for this ⭐

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.

None yet

3 participants