Skip to content

Commit

Permalink
Fix test cases
Browse files Browse the repository at this point in the history
Signed-off-by: Sayali Gaikawad <[email protected]>
  • Loading branch information
gaiksaya committed Dec 15, 2023
1 parent 4fee943 commit 7d72e1a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/infra/infra-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ export class InfraStack extends Stack {
value: nlb.loadBalancerDnsName,
});

if (props.enableMonitoring){
if (props.enableMonitoring) {
const monitoring = new InfraStackMonitoring(this, props.dashboardsUrl);
}
}
Expand Down
1 change: 1 addition & 0 deletions lib/monitoring/alarms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export class InfraStackMonitoring {
openSearchProcessNotFound: Metric | MathExpression,
openSearchDashboardsProcessNotFound?: Metric | MathExpression,
}

public readonly alarms: Alarm[] = []

constructor(infraStack: InfraStack, dashboardsUrl: string) {
Expand Down
4 changes: 2 additions & 2 deletions lib/os-cluster-entrypoint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,8 @@ export class OsClusterEntrypoint {
const remoteStore = `${scope.node.tryGetContext('enableRemoteStore')}`;
const enableRemoteStore = remoteStore === 'true';

const enableMonitoringAndAlarms = scope.node.tryGetContext('enableMonitoring');
const enableMonitoring = enableMonitoringAndAlarms === 'true'
const monitoringAndAlarms = `${scope.node.tryGetContext('enableMonitoring')}`;
const enableMonitoring = monitoringAndAlarms === 'true';

const customRoleArn = `${scope.node.tryGetContext('customRoleArn')}`;

Expand Down
1 change: 1 addition & 0 deletions test/os-cluster.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ test('Test Resources with security disabled multi-node default instance types',
additionalOsdConfig: '{ "something.enabled": "true", "something_else.enabled": "false" }',
// eslint-disable-next-line max-len
customConfigFiles: '{"test/data/config.yml": "opensearch/config/opensearch-security/config.yml", "test/data/roles.yml": "opensearch/config/opensearch-security/roles.yml"}',
enableMonitoring: true,
},
});

Expand Down

0 comments on commit 7d72e1a

Please sign in to comment.