-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
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.
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.
lgtm
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.
lgtm
export function initializeFirebase() { | ||
const tenantConfig = getTenantConfig(); | ||
async function initializeFirebase() { | ||
const tenantConfig = await loadConfig(); |
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.
Is getTenantConfig
used anymore?
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.
Yes, it's still in use.
mockSignInWithCredential.mockImplementation( | ||
async (_auth, _firebaseCredential) => | ||
Promise.resolve({ | ||
user: { | ||
email: "user@p0.dev", | ||
}, | ||
}) | ||
); |
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.
mockSignInWithCredential.mockImplementation( | |
async (_auth, _firebaseCredential) => | |
Promise.resolve({ | |
user: { | |
email: "user@p0.dev", | |
}, | |
}) | |
); | |
mockSignInWithCredential.mockResolvedValue({ | |
user: { email: "user@p0.dev", }, | |
}); |
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.