Skip to content

Commit

Permalink
[Task IAC-805] Improved code coverage
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Kantchev <[email protected]>
  • Loading branch information
akantchev committed Jan 18, 2024
1 parent ee6e15b commit b010d79
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"**/build/azure-pipelines/**/*.yml": "azure-pipelines"
},
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit"
},
"eslint.validate": ["javascript", "typescript"],

Expand Down
7 changes: 3 additions & 4 deletions packages/node/vrdt-common/src/platform/BaseConfiguration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,19 @@ export abstract class BaseConfiguration {
return this.getActiveProfileImpl()
}

get pluginSettings(): VrealizeSettings {
return this.vrdev
}

private getActiveProfileImpl(): MavenProfileWrapper {
const profileName = this.vrdev.maven.profile

if (!profileName) {
throw new Error("There is no currently active maven profile. Set the 'vrdev.maven.profile' setting")
}

if (!this.allProfiles) {
throw new Error("There are no vRO profiles in ~/.m2/settings.xml")
}

const profile = this.allProfiles[profileName]

if (!profile) {
throw new Error(`Could not find profile '${profileName}' in ~/.m2/settings.xml`)
}
Expand Down
2 changes: 1 addition & 1 deletion packages/node/vrdt-common/src/rest/VroRestClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export class VroRestClient {

constructor(private settings: BaseConfiguration) {
this.auth = this.getInitialAuth()
this.isCachingEnabled = this.settings?.pluginSettings?.vro?.inventory?.cache ?? false
this.isCachingEnabled = this.settings?.vrdev?.vro?.inventory?.cache ?? false
}

private get hostname(): string {
Expand Down

0 comments on commit b010d79

Please sign in to comment.