-
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
fix: Refactor task and handler classes #1205
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Ivo Yankov <[email protected]>
# Conflicts: # src/commands/cluster/handlers.ts # src/commands/cluster/tasks.ts
Signed-off-by: Ivo Yankov <[email protected]>
Signed-off-by: Ivo Yankov <[email protected]>
Signed-off-by: Ivo Yankov <[email protected]>
Signed-off-by: Ivo Yankov <[email protected]>
Signed-off-by: Ivo Yankov <[email protected]>
# Conflicts: # src/commands/deployment.ts # src/core/config/remote/listr_config_tasks.ts
Signed-off-by: Ivo Yankov <[email protected]>
Signed-off-by: Ivo Yankov <[email protected]>
E2E Test Report 17 files 126 suites 1h 30m 40s ⏱️ Results for commit 39a3a90. ♻️ This comment has been updated with latest results. |
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferencesCodacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more Footnotes
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1205 +/- ##
==========================================
+ Coverage 82.89% 82.93% +0.03%
==========================================
Files 78 80 +2
Lines 21763 21857 +94
Branches 1824 1996 +172
==========================================
+ Hits 18041 18127 +86
+ Misses 3584 3560 -24
- Partials 138 170 +32
|
@@ -71,6 +67,7 @@ export abstract class BaseCommand extends ShellRunner { | |||
this.remoteConfigManager = opts.remoteConfigManager; | |||
} | |||
|
|||
// TODO remove |
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.
TODO
@@ -32,7 +32,8 @@ export class ClusterCommand extends BaseCommand { | |||
constructor(opts: Opts) { | |||
super(opts); | |||
|
|||
this.handlers = new ClusterCommandHandlers(this, new ClusterCommandTasks(this, this.k8), this.remoteConfigManager); | |||
// TODO properly inject |
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.
TODO
remoteConfigManager: opts.remoteConfigManager, | ||
}); | ||
|
||
// TODO properly inject |
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.
TODO
this.configManager = patchInject(configManager, ConfigManager, this.constructor.name); | ||
} | ||
|
||
commandActionBuilder(actionTasks: any, options: any, errorString: string, lease: Lease | null) { |
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.
add scope modifier public to method, add return type
* Setup home directories | ||
* @param dirs a list of directories that need to be created in sequence | ||
*/ | ||
setupHomeDirectory( |
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.
add scope modifier public to method, add return type
return dirs; | ||
} | ||
|
||
setupHomeDirectoryTask() { |
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.
add scope modifier public to method, add return type
} | ||
|
||
// Config related methods: | ||
getConfig(configName: string, flags: CommandFlag[], extraProperties: string[] = []): object { |
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.
add scope modifier public to method
return getConfig(this.configManager, this._configMaps, configName, flags, extraProperties); | ||
} | ||
|
||
getUnusedConfigs(configName: string): 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.
add scope modifier public to method
@@ -228,16 +241,26 @@ describe('ClusterCommand unit tests', () => { | |||
certificateManager: sandbox.createStubInstance(CertificateManager), | |||
remoteConfigManager: remoteConfigManagerStub, | |||
} as Opts; | |||
|
|||
// stubDependencies([Object.values(options)]); |
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.
delete commented out code
}; | ||
|
||
function stubDependencies(deps: any[]) { |
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 this still being used if it is commented out on line 245?
Description
This pull request changes the following:
Related Issues