diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 697f3bb..5e97759 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -50,7 +50,7 @@ jobs: - name: Run integration tests working-directory: integration - run: bash ./run_it.sh + run: bash ./run_its.sh - name: Upload coverage reports if: ${{ matrix.node == env.MAIN_NODE_VER }} diff --git a/integration/expected_component b/integration/langs/java/expected_component similarity index 100% rename from integration/expected_component rename to integration/langs/java/expected_component diff --git a/integration/expected_stack_html b/integration/langs/java/expected_stack_html similarity index 100% rename from integration/expected_stack_html rename to integration/langs/java/expected_stack_html diff --git a/integration/expected_stack_json b/integration/langs/java/expected_stack_json similarity index 100% rename from integration/expected_stack_json rename to integration/langs/java/expected_stack_json diff --git a/integration/expected_stack_json_summary b/integration/langs/java/expected_stack_json_summary similarity index 100% rename from integration/expected_stack_json_summary rename to integration/langs/java/expected_stack_json_summary diff --git a/integration/pom.xml b/integration/langs/java/pom.xml similarity index 100% rename from integration/pom.xml rename to integration/langs/java/pom.xml diff --git a/integration/run_it.sh b/integration/run_its.sh similarity index 59% rename from integration/run_it.sh rename to integration/run_its.sh index 90dbed4..732721d 100755 --- a/integration/run_it.sh +++ b/integration/run_its.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash +###### DO NOT FORGET 'npm run compile' on root prior to running this script ###### + # utility function takes file name and a command # used for matching the file content and the command output match() { @@ -39,14 +41,15 @@ then fi echo "- SUCCESSFUL" -echo "RUNNING JavaScript integration test for Stack Analysis report in Html" -match "expected_stack_html" "node javascript/index.js stack pom.xml true" +#### JAVA MAVEN +echo "RUNNING JavaScript integration test for Stack Analysis report in Html for Java Maven" +match "langs/java/expected_stack_html" "node javascript/index.js stack langs/java/pom.xml true" -echo "RUNNING JavaScript integration test for Stack Analysis report in Json" -match "expected_stack_json" "node javascript/index.js stack pom.xml false" +echo "RUNNING JavaScript integration test for Stack Analysis report in Json for Java Maven" +match "langs/java/expected_stack_json" "node javascript/index.js stack langs/java/pom.xml false" -echo "RUNNING JavaScript integration test for Component Analysis report" -match "expected_component" "node javascript/index.js component pom.xml '$( { test(`verify maven data provided for stack analysis with scenario ${scenario}`, async () => { // load the expected graph for the scenario - let expectedGraph = fs.readFileSync(`test/providers/tst_manifests/${testCase}/expected_dot_graph`,).toString() + let expectedGraph = fs.readFileSync(`test/providers/tst_manifests/${testCase}/stack_expected_dot_graph`,).toString() // invoke sut stack analysis for scenario manifest let providedDataForStack = await javaMvnProvider.provideStack(`test/providers/tst_manifests/${testCase}/pom.xml`) // verify returned data matches expectation diff --git a/test/providers/tst_manifests/pom_deps_with_ignore_on_artifact/expected_dot_graph b/test/providers/tst_manifests/pom_deps_with_ignore_on_artifact/stack_expected_dot_graph similarity index 100% rename from test/providers/tst_manifests/pom_deps_with_ignore_on_artifact/expected_dot_graph rename to test/providers/tst_manifests/pom_deps_with_ignore_on_artifact/stack_expected_dot_graph diff --git a/test/providers/tst_manifests/pom_deps_with_ignore_on_dependency/expected_dot_graph b/test/providers/tst_manifests/pom_deps_with_ignore_on_dependency/stack_expected_dot_graph similarity index 100% rename from test/providers/tst_manifests/pom_deps_with_ignore_on_dependency/expected_dot_graph rename to test/providers/tst_manifests/pom_deps_with_ignore_on_dependency/stack_expected_dot_graph diff --git a/test/providers/tst_manifests/pom_deps_with_ignore_on_group/expected_dot_graph b/test/providers/tst_manifests/pom_deps_with_ignore_on_group/stack_expected_dot_graph similarity index 100% rename from test/providers/tst_manifests/pom_deps_with_ignore_on_group/expected_dot_graph rename to test/providers/tst_manifests/pom_deps_with_ignore_on_group/stack_expected_dot_graph diff --git a/test/providers/tst_manifests/pom_deps_with_ignore_on_version/expected_dot_graph b/test/providers/tst_manifests/pom_deps_with_ignore_on_version/stack_expected_dot_graph similarity index 100% rename from test/providers/tst_manifests/pom_deps_with_ignore_on_version/expected_dot_graph rename to test/providers/tst_manifests/pom_deps_with_ignore_on_version/stack_expected_dot_graph diff --git a/test/providers/tst_manifests/pom_deps_with_ignore_on_wrong/expected_dot_graph b/test/providers/tst_manifests/pom_deps_with_ignore_on_wrong/stack_expected_dot_graph similarity index 100% rename from test/providers/tst_manifests/pom_deps_with_ignore_on_wrong/expected_dot_graph rename to test/providers/tst_manifests/pom_deps_with_ignore_on_wrong/stack_expected_dot_graph diff --git a/test/providers/tst_manifests/pom_deps_with_no_ignore/expected_dot_graph b/test/providers/tst_manifests/pom_deps_with_no_ignore/stack_expected_dot_graph similarity index 100% rename from test/providers/tst_manifests/pom_deps_with_no_ignore/expected_dot_graph rename to test/providers/tst_manifests/pom_deps_with_no_ignore/stack_expected_dot_graph