-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Refactoring test codebase accordind to recomendations #22544
Conversation
@@ -70,30 +66,31 @@ suite('Workspace using a parent test suite', function (): void { | |||
const firstExpectedQuickPick: QuickPickItem | undefined = await input.findQuickPick('1. This command from the devfile'); | |||
const secondExpectedQuickPick: QuickPickItem | undefined = await input.findQuickPick('2. This command from the parent'); | |||
expect(firstExpectedQuickPick).not.eqls(undefined); | |||
expect(secondExpectedQuickPick).not.eqls(undefined); | |||
expect(secondExpectedQuickPick).not.undefined; |
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.
expect(firstExpectedQuickPick).not.eqls(undefined);
expect(secondExpectedQuickPick).not.undefined;
could it be in one style?
@@ -25,4 +26,11 @@ export class ShellExecutor { | |||
Logger.debug(command); | |||
return exec(command); | |||
} | |||
executeArbitraryShellScript(command: string): string { | |||
const output: ShellString = this.executeCommand(command); |
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.
Lets add Logger.debug() to show when method was called?
podName = executeArbitraryShellScript(getPodNameCommand); | ||
const containerNames: string = executeArbitraryShellScript( | ||
podName = shellExecutor.executeArbitraryShellScript(getPodNameCommand); | ||
const containerNames: string = shellExecutor.executeArbitraryShellScript( | ||
`${API_TEST_CONSTANTS.TS_API_TEST_KUBERNETES_COMMAND_LINE_TOOL} get pod ${podName} --output jsonpath=\'{.spec.containers[*].name}\'` | ||
); | ||
expect(containerNames).contain('tools'); | ||
expect(containerNames).contains('che-gateway'); |
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.
expect(containerNames).contain('tools');
expect(containerNames).contains('che-gateway');
expect(envList).contain('DEVFILE_ENV_VAR=true');
expect(envList).contain('PARENT_ENV_VAR=true');
this can be replaced with .and:
expect(envList).contains('DEVFILE_ENV_VAR=true').and.contains('PARENT_ENV_VAR=true');
4fac163
to
f0bda13
Compare
What does this PR do?
Apple changes according to the comments in the #22506 and #22538
Screenshot/screencast of this PR
What issues does this PR fix or reference?
[
How to test this PR?
Set up all env vars and run with npm or yarn as usual
PR Checklist
As the author of this Pull Request I made sure that:
What issues does this PR fix or reference
andHow to test this PR
completedReviewers
Reviewers, please comment how you tested the PR when approving it.