From cf3b8effa1c4eb1d6cb5fa6504883f55f26205a4 Mon Sep 17 00:00:00 2001 From: Jeffrey Aven Date: Sun, 28 Apr 2024 18:54:07 +1000 Subject: [PATCH 1/2] logging update --- lib/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/utils.js b/lib/utils.js index bc78ee9..3b4a422 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -114,7 +114,7 @@ async function getStackqlCommand(core) { try { const stackQLCommand = `${stackQLExecutable} ${args.join(" ")}`; core.exportVariable('STACKQL_COMMAND', `${stackQLCommand}`); - core.info(`STACKQL_COMMAND: ${stackQLCommand}`); + core.debug(`STACKQL_COMMAND: ${stackQLCommand}`); } catch (error) { core.error(error); core.setFailed("error when executing stackql"); From 3bd4e3e17ee3a6932603fade5ec88fd72045066c Mon Sep 17 00:00:00 2001 From: Jeffrey Aven Date: Sun, 28 Apr 2024 19:02:27 +1000 Subject: [PATCH 2/2] logging update --- .github/workflows/stackql-exec-test.yml | 2 +- lib/tests/failed-result.json | 1 - lib/tests/success-result.json | 1 - lib/tests/test-auth.json | 1 - lib/tests/utils.test.js | 2 ++ 5 files changed, 3 insertions(+), 4 deletions(-) delete mode 100644 lib/tests/failed-result.json delete mode 100644 lib/tests/success-result.json delete mode 100644 lib/tests/test-auth.json diff --git a/.github/workflows/stackql-exec-test.yml b/.github/workflows/stackql-exec-test.yml index 472d472..9f23d7c 100644 --- a/.github/workflows/stackql-exec-test.yml +++ b/.github/workflows/stackql-exec-test.yml @@ -1,4 +1,4 @@ -name: 'stackql query tests' +name: 'stackql-exec tests' on: push: diff --git a/lib/tests/failed-result.json b/lib/tests/failed-result.json deleted file mode 100644 index 82e6d31..0000000 --- a/lib/tests/failed-result.json +++ /dev/null @@ -1 +0,0 @@ -[{"name":"stackql-demo-001","status":"RUNNING"}] \ No newline at end of file diff --git a/lib/tests/success-result.json b/lib/tests/success-result.json deleted file mode 100644 index 030276f..0000000 --- a/lib/tests/success-result.json +++ /dev/null @@ -1 +0,0 @@ -[{"name":"stackql-demo-001","status":"TERMINATED"}] \ No newline at end of file diff --git a/lib/tests/test-auth.json b/lib/tests/test-auth.json deleted file mode 100644 index d8de066..0000000 --- a/lib/tests/test-auth.json +++ /dev/null @@ -1 +0,0 @@ -{ "google": { "type": "service_account", "credentialsfilepath": "sa-key.json" }} \ No newline at end of file diff --git a/lib/tests/utils.test.js b/lib/tests/utils.test.js index 5a74e71..759495c 100644 --- a/lib/tests/utils.test.js +++ b/lib/tests/utils.test.js @@ -4,7 +4,9 @@ describe("Utils Functions Tests", () => { let core; beforeEach(() => { + core = { + debug: jest.fn().mockImplementation((message) => console.log(`DEBUG: ${message}`)), setFailed: jest.fn().mockImplementation((message) => console.error(message)), info: jest.fn().mockImplementation((message) => console.log(message)), exportVariable: jest.fn(),