Skip to content

Commit

Permalink
more renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
duncanista committed Mar 20, 2024
1 parent 8193896 commit 4ed69aa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/metrics/extension.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ describe("isExtensionRunning", () => {
afterEach(() => {
mock.restore();
});
it("returns true when agent exists and responds", async () => {
it("returns true when extension exists and responds", async () => {
mock({
"/opt/extensions/datadog-agent": Buffer.from([0]),
});
const ran = await isExtensionRunning();
expect(ran).toBeTruthy();
});
it("returns false when agent doesn't exist", async () => {
it("returns false when extension doesn't exist", async () => {
mock({});
const scope = nock(EXTENSION_URL).get("/lambda/hello").replyWithError("Unreachable");
const ran = await isExtensionRunning();
Expand All @@ -23,7 +23,7 @@ describe("isExtensionRunning", () => {
});
});
describe("flushExtension", () => {
it("calls flush on the agent", async () => {
it("calls flush on the extension", async () => {
const scope = nock(EXTENSION_URL).post("/lambda/flush", JSON.stringify({})).reply(200);
await flushExtension();
expect(scope.isDone()).toBeTruthy();
Expand Down
2 changes: 1 addition & 1 deletion src/metrics/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const LOCAL_FLUSH_TIMEOUT_MS = 100;
export async function isExtensionRunning() {
const extensionExists = await fileExists(EXTENSION_PATH);
if (!extensionExists) {
logDebug(`Agent isn't present in sandbox`);
logDebug(`Extension Layer is not present`);
return false;
}
return true;
Expand Down

0 comments on commit 4ed69aa

Please sign in to comment.