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
Fix Helm repositories and pod logs integration tests #2015
Conversation
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
integration/helpers/utils.ts
Outdated
export async function listHelmRepositories(retries = 0): Promise<string> { | ||
if (retries < 5) { | ||
try { | ||
const { stdout: reposJson } = await promiseExec("helm repo list -o json"); | ||
|
||
return reposJson; | ||
} catch { | ||
await new Promise(r => setTimeout(r, 2000)); // if no repositories, wait for Lens adding bitnami repository | ||
|
||
return await listHelmRepositories((retries + 1)); | ||
} | ||
} | ||
|
||
return "[]"; | ||
} |
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 really think that this should return any[]
or maybe even { name: string, url: string}[]
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 agree with @Nokel81 , feels weird to return string
and not array of objects (basically parsed json).
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.
Actually it's not parsed json that is returned. Should we return parsed json instead?
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.
Actually it's not parsed json that is returned. Should we return parsed json instead?
I think it would make more sense to return parsed json.
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.
changed
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
let podMenuItemEnabled = false; | ||
|
||
// Wait until extensions are enabled on renderer | ||
while (!podMenuItemEnabled) { |
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.
Fine for this PR but I think we need to have a better fix for this in future. Buttons should appear when an extension gets loaded.
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.
Agree
await app.client.waitForVisible(".LogResourceSelector"); | ||
await app.client.waitForVisible(".LogResourceSelector .SearchInput"); | ||
await app.client.waitForVisible(".LogResourceSelector .SearchInput input"); | ||
//await app.client.waitForVisible(".LogSearch .SearchInput"); |
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.
A line to remove probably.
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 yes...forgot to remove that line after testing that it's redundant.
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.
Maybe remove it next time (trying not to dismiss an approvements).
Signed-off-by: Lauri Nevala lauri.nevala@gmail.com