Skip to content

Commit a8f2eef

Browse files
committed
Removed Chalice references
1 parent 85dc25a commit a8f2eef

File tree

4 files changed

+2
-42
lines changed

4 files changed

+2
-42
lines changed

packages/tracing/src/Tracer.ts

+1-5
Original file line numberDiff line numberDiff line change
@@ -186,10 +186,6 @@ class Tracer implements TracerInterface {
186186
private getEnvVarsService(): EnvironmentVariablesService {
187187
return <EnvironmentVariablesService> this.envVarsService;
188188
}
189-
190-
private isChaliceCli(): boolean {
191-
return this.getEnvVarsService()?.getChaliceLocal() !== '';
192-
}
193189

194190
private isLambdaExecutionEnv(): boolean {
195191
return this.getEnvVarsService()?.getAwsExecutionEnv() !== '';
@@ -303,7 +299,7 @@ class Tracer implements TracerInterface {
303299
return;
304300
}
305301

306-
if (this.isLambdaSamCli() || this.isChaliceCli() || this.isLambdaExecutionEnv() === false) {
302+
if (this.isLambdaSamCli() || this.isLambdaExecutionEnv() === false) {
307303
this.tracingEnabled = false;
308304
}
309305
}

packages/tracing/src/config/EnvironmentVariablesService.ts

+1-6
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@ import { ConfigService } from '.';
22

33
class EnvironmentVariablesService extends ConfigService {
44

5-
// Reserved environment variables
5+
// Environment variables
66
private awsExecutionEnv = 'AWS_EXECUTION_ENV';
7-
private chaliceLocalVariable = 'AWS_CHALICE_CLI_MODE';
87
private samLocalVariable = 'AWS_SAM_LOCAL';
98
private xRayTraceIdVariable = '_X_AMZN_TRACE_ID';
109

@@ -16,10 +15,6 @@ class EnvironmentVariablesService extends ConfigService {
1615
return this.get(this.awsExecutionEnv);
1716
}
1817

19-
public getChaliceLocal(): string {
20-
return this.get(this.chaliceLocalVariable);
21-
}
22-
2318
public getSamLocal(): string {
2419
return this.get(this.samLocalVariable);
2520
}

packages/tracing/tests/unit/config/EnvironmentVariablesService.test.ts

-17
Original file line numberDiff line numberDiff line change
@@ -147,23 +147,6 @@ describe('Class: EnvironmentVariablesService', () => {
147147

148148
});
149149

150-
describe('Method: getChaliceLocal', () => {
151-
152-
test('It returns the value of the environment variable AWS_CHALICE_CLI_MODE', () => {
153-
154-
// Prepare
155-
process.env.AWS_CHALICE_CLI_MODE = 'true';
156-
const service = new EnvironmentVariablesService();
157-
158-
// Act
159-
const value = service.getChaliceLocal();
160-
161-
// Assess
162-
expect(value).toEqual('true');
163-
});
164-
165-
});
166-
167150
describe('Method: getAwsExecutionEnv', () => {
168151

169152
test('It returns the value of the environment variable AWS_EXECUTION_ENV', () => {

packages/tracing/tests/unit/helpers.test.ts

-14
Original file line numberDiff line numberDiff line change
@@ -157,20 +157,6 @@ describe('Helper: createLogger function', () => {
157157

158158
});
159159

160-
test('when AWS_CHALICE_CLI_MODE environment variable is set, tracing is disabled', () => {
161-
// Prepare
162-
process.env.AWS_CHALICE_CLI_MODE = 'true';
163-
164-
// Act
165-
const tracer = createTracer();
166-
167-
// Assess
168-
expect(tracer).toEqual(expect.objectContaining({
169-
tracingEnabled: false,
170-
}));
171-
172-
});
173-
174160
test('when AWS_EXECUTION_ENV environment variable is set, tracing is enabled', () => {
175161
// Prepare
176162
process.env.AWS_EXECUTION_ENV = 'nodejs14.x';

0 commit comments

Comments
 (0)