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

ENG-2931 Fix error when no identity file is present #134

Merged
merged 1 commit into from
Oct 28, 2024

Conversation

fabgo
Copy link
Contributor

@fabgo fabgo commented Oct 25, 2024

Fixes the error that is shown when no identity file is present.

The CLI now again shows a message asking the user to login:

./p0 ls gcloud role oauth
Please run p0 login <organization> to use the P0 CLI.

Added unit test.

Fixes the error that is shown when no identity file is present.

The CLI now again shows a message asking the user to login:

./p0 ls gcloud role oauth
Please run `p0 login <organization>` to use the P0 CLI.

Added unit test.
@fabgo fabgo requested a review from nbrahms October 25, 2024 17:34
Copy link
Contributor

@gergas3 gergas3 left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Contributor

@nbrahms nbrahms left a comment

Choose a reason for hiding this comment

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

lgtm

export function initializeFirebase() {
const tenantConfig = getTenantConfig();
async function initializeFirebase() {
const tenantConfig = await loadConfig();
Copy link
Contributor

Choose a reason for hiding this comment

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

Is getTenantConfig used anymore?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, it's still in use.

Comment on lines +68 to +75
mockSignInWithCredential.mockImplementation(
async (_auth, _firebaseCredential) =>
Promise.resolve({
user: {
email: "user@p0.dev",
},
})
);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
mockSignInWithCredential.mockImplementation(
async (_auth, _firebaseCredential) =>
Promise.resolve({
user: {
email: "user@p0.dev",
},
})
);
mockSignInWithCredential.mockResolvedValue({
user: { email: "user@p0.dev", },
});

@fabgo fabgo merged commit 605bf37 into main Oct 28, 2024
3 checks passed
@fabgo fabgo deleted the fabian/eng-2931-fix-no-identity-file-error branch October 28, 2024 14:13
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.

3 participants