You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ma...@apache.org on 2024/03/21 18:46:12 UTC
(superset) 02/02: add fix to supersetbot + unit test
This is an automated email from the ASF dual-hosted git repository.
maximebeauchemin pushed a commit to branch fix_docker_base
in repository https://gitbox.apache.org/repos/asf/superset.git
commit 1bebd507438a14ac4abe0238736dfbc8136b963b
Author: Maxime Beauchemin <ma...@gmail.com>
AuthorDate: Thu Mar 21 11:45:52 2024 -0700
add fix to supersetbot + unit test
---
.github/supersetbot/src/cli.test.js | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/.github/supersetbot/src/cli.test.js b/.github/supersetbot/src/cli.test.js
new file mode 100644
index 0000000000..c2f1e8ecf5
--- /dev/null
+++ b/.github/supersetbot/src/cli.test.js
@@ -0,0 +1,19 @@
+import { spawnSync } from 'child_process';
+
+describe('CLI Test', () => {
+ it('should contain "--target dev" in the output when calling "supersetbot docker --preset dev --dry-run"', () => {
+ // Run the CLI command
+ const result = spawnSync('./src/supersetbot', ['docker', '--preset', 'dev', '--dry-run']);
+
+ if (result.error) {
+ // Handle the error, for example, by failing the test
+ throw new Error(result.error.message);
+ }
+
+ // Convert the stdout buffer to a string
+ const output = result.stdout.toString();
+
+ // Check if the output contains "--target dev"
+ expect(output).toContain('--target dev');
+ });
+});