-
Notifications
You must be signed in to change notification settings - Fork 8
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
Resolves #33 Add MINIKUBE_HOME configuration #48
Conversation
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.
Oh, sorry, didn't notice that it was in commit. Revert this unintended changes. |
Thank you @tony-sol . It looks like you also pushed your |
Done ^_^ |
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
just syncing with upstream |
@benoitf may i ask you for review pls? |
const { config } = vi.hoisted(() => { | ||
return { | ||
config: { | ||
get: vi.fn(), | ||
has: vi.fn(), | ||
update: vi.fn(), | ||
}, | ||
}; | ||
}); | ||
|
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.
we don't need the hoisted block, you can return mock (vi.fn) directly in getConfiguration method
using the vi.mockImplementation we have typechecking while here we don't
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.
I've tried, but not figured out, how to make this return different value on different tests. I tried to do like other tests in this project and podman-desktop project, but without success 😞
a little help, like example would be awesome
src/util.ts
Outdated
export function getMinikubeHome(): string { | ||
const minikubeHome = minikubeConfiguration.get<string>('home'); | ||
// Check env if configuration is not applied in UI | ||
if (!minikubeHome) { | ||
const env = process.env; | ||
return env.MINIKUBE_HOME; | ||
} else { | ||
return minikubeHome; | ||
} | ||
} | ||
|
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.
the function in case of missing env var will return undefined so the signature seems invalid (should be string | undefined
)
@tony-sol Can you please rebase? Seems like we got conflicts there and CI is not passing... |
|
@tony-sol can you remote yarn.lock from this PR as it should not be updated |
Signed-off-by: Tony-Sol <tony.kent.nar.earth@gmail.com>
done |
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
Thanks for this, @tony-sol |
This is second try of making extension follows actual
MINIKUBE_HOME
instead of default.Previous context