diff --git a/.circleci/config.yml b/.circleci/config.yml index 60611f6e9..957ee6b9b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -126,6 +126,41 @@ workflows: - unit-tests: matrix: parameters: - index: [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120] + index: + - app-json + - apps + - build-env + - buildpacks + - certs + - checks + - client + - config-oddities + - config + - core_1 + - core_2 + - docker-options + - domains + - events + - git + - init + - network + - nginx-vhosts_1 + - nginx-vhosts_2 + - nginx-vhosts_3 + - plugin + - proxy + - ps-dockerfile + - ps-general + - ps-herokuish + - repo + - report + - resource + - scheduler-docker-local + - ssh_keys + - storage + - tags + - tar + - trace + - version requires: - build diff --git a/tests/unit/50_init_1.bats b/tests/unit/50_init_1.bats deleted file mode 100644 index 98581d63b..000000000 --- a/tests/unit/50_init_1.bats +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env bats - -load test_helper - -setup() { - global_setup - create_app -} - -teardown() { - destroy_app - global_teardown -} - -@test "(init) buildpack" { - source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" - local APP="zombies-buildpack" - deploy_app "$APP" - local CIDS=$(get_app_container_ids "$APP") - - run "$DOCKER_BIN" container top "$CIDS" - echo "output: $output" - assert_output_contains "" "0" -} diff --git a/tests/unit/50_init_2.bats b/tests/unit/50_init_2.bats deleted file mode 100644 index c0b5d459a..000000000 --- a/tests/unit/50_init_2.bats +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env bats - -load test_helper - -setup() { - global_setup - create_app -} - -teardown() { - destroy_app - global_teardown -} - -@test "(init) dockerfile no tini" { - source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" - local APP="zombies-dockerfile-no-tini" - deploy_app "$APP" - local CIDS=$(get_app_container_ids "$APP") - - run "$DOCKER_BIN" container top "$CIDS" - echo "output: $output" - assert_output_contains "" "0" -} diff --git a/tests/unit/50_init_3.bats b/tests/unit/50_init_3.bats deleted file mode 100644 index 77c354b1b..000000000 --- a/tests/unit/50_init_3.bats +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env bats - -load test_helper - -setup() { - global_setup - create_app -} - -teardown() { - destroy_app - global_teardown -} - -@test "(init) dockerfile with tini" { - source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" - local APP="zombies-dockerfile-tini" - deploy_app "$APP" - local CIDS=$(get_app_container_ids "$APP") - - run "$DOCKER_BIN" container top "$CIDS" - echo "output: $output" - assert_output_contains "" "0" -} diff --git a/tests/unit/40_app-json.bats b/tests/unit/app-json.bats similarity index 100% rename from tests/unit/40_app-json.bats rename to tests/unit/app-json.bats diff --git a/tests/unit/60_apps.bats b/tests/unit/apps.bats similarity index 100% rename from tests/unit/60_apps.bats rename to tests/unit/apps.bats diff --git a/tests/unit/20_build-env.bats b/tests/unit/build-env.bats similarity index 100% rename from tests/unit/20_build-env.bats rename to tests/unit/build-env.bats diff --git a/tests/unit/30_buildpacks.bats b/tests/unit/buildpacks.bats similarity index 100% rename from tests/unit/30_buildpacks.bats rename to tests/unit/buildpacks.bats diff --git a/tests/unit/10_certs.bats b/tests/unit/certs.bats similarity index 100% rename from tests/unit/10_certs.bats rename to tests/unit/certs.bats diff --git a/tests/unit/10_checks.bats b/tests/unit/checks.bats similarity index 100% rename from tests/unit/10_checks.bats rename to tests/unit/checks.bats diff --git a/tests/unit/30_client.bats b/tests/unit/client.bats similarity index 100% rename from tests/unit/30_client.bats rename to tests/unit/client.bats diff --git a/tests/unit/30_config-oddities.bats b/tests/unit/config-oddities.bats similarity index 100% rename from tests/unit/30_config-oddities.bats rename to tests/unit/config-oddities.bats diff --git a/tests/unit/20_config.bats b/tests/unit/config.bats similarity index 100% rename from tests/unit/20_config.bats rename to tests/unit/config.bats diff --git a/tests/unit/90_core_1.bats b/tests/unit/core_1.bats similarity index 100% rename from tests/unit/90_core_1.bats rename to tests/unit/core_1.bats diff --git a/tests/unit/90_core_2.bats b/tests/unit/core_2.bats similarity index 100% rename from tests/unit/90_core_2.bats rename to tests/unit/core_2.bats diff --git a/tests/unit/20_docker-options.bats b/tests/unit/docker-options.bats similarity index 100% rename from tests/unit/20_docker-options.bats rename to tests/unit/docker-options.bats diff --git a/tests/unit/20_domains.bats b/tests/unit/domains.bats similarity index 100% rename from tests/unit/20_domains.bats rename to tests/unit/domains.bats diff --git a/tests/unit/30_events.bats b/tests/unit/events.bats similarity index 100% rename from tests/unit/30_events.bats rename to tests/unit/events.bats diff --git a/tests/unit/120_git.bats b/tests/unit/git.bats similarity index 100% rename from tests/unit/120_git.bats rename to tests/unit/git.bats diff --git a/tests/unit/init.bats b/tests/unit/init.bats new file mode 100644 index 000000000..80b1bbf33 --- /dev/null +++ b/tests/unit/init.bats @@ -0,0 +1,46 @@ +#!/usr/bin/env bats + +load test_helper + +setup() { + global_setup + create_app +} + +teardown() { + destroy_app + global_teardown +} + +@test "(init) buildpack" { + source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" + local APP="zombies-buildpack" + deploy_app "$APP" + local CIDS=$(get_app_container_ids "$APP") + + run "$DOCKER_BIN" container top "$CIDS" + echo "output: $output" + assert_output_contains "" "0" +} + +@test "(init) dockerfile no tini" { + source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" + local APP="zombies-dockerfile-no-tini" + deploy_app "$APP" + local CIDS=$(get_app_container_ids "$APP") + + run "$DOCKER_BIN" container top "$CIDS" + echo "output: $output" + assert_output_contains "" "0" +} + +@test "(init) dockerfile with tini" { + source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions" + local APP="zombies-dockerfile-tini" + deploy_app "$APP" + local CIDS=$(get_app_container_ids "$APP") + + run "$DOCKER_BIN" container top "$CIDS" + echo "output: $output" + assert_output_contains "" "0" +} diff --git a/tests/unit/20_network.bats b/tests/unit/network.bats similarity index 100% rename from tests/unit/20_network.bats rename to tests/unit/network.bats diff --git a/tests/unit/70_nginx-vhosts_1.bats b/tests/unit/nginx-vhosts_1.bats similarity index 100% rename from tests/unit/70_nginx-vhosts_1.bats rename to tests/unit/nginx-vhosts_1.bats diff --git a/tests/unit/110_nginx-vhosts_2.bats b/tests/unit/nginx-vhosts_2.bats similarity index 100% rename from tests/unit/110_nginx-vhosts_2.bats rename to tests/unit/nginx-vhosts_2.bats diff --git a/tests/unit/70_nginx-vhosts_3.bats b/tests/unit/nginx-vhosts_3.bats similarity index 100% rename from tests/unit/70_nginx-vhosts_3.bats rename to tests/unit/nginx-vhosts_3.bats diff --git a/tests/unit/40_plugin.bats b/tests/unit/plugin.bats similarity index 100% rename from tests/unit/40_plugin.bats rename to tests/unit/plugin.bats diff --git a/tests/unit/40_proxy.bats b/tests/unit/proxy.bats similarity index 100% rename from tests/unit/40_proxy.bats rename to tests/unit/proxy.bats diff --git a/tests/unit/80_ps-dockerfile.bats b/tests/unit/ps-dockerfile.bats similarity index 100% rename from tests/unit/80_ps-dockerfile.bats rename to tests/unit/ps-dockerfile.bats diff --git a/tests/unit/80_ps-general.bats b/tests/unit/ps-general.bats similarity index 100% rename from tests/unit/80_ps-general.bats rename to tests/unit/ps-general.bats diff --git a/tests/unit/80_ps-herokuish.bats b/tests/unit/ps-herokuish.bats similarity index 100% rename from tests/unit/80_ps-herokuish.bats rename to tests/unit/ps-herokuish.bats diff --git a/tests/unit/10_repo.bats b/tests/unit/repo.bats similarity index 100% rename from tests/unit/10_repo.bats rename to tests/unit/repo.bats diff --git a/tests/unit/40_report.bats b/tests/unit/report.bats similarity index 100% rename from tests/unit/40_report.bats rename to tests/unit/report.bats diff --git a/tests/unit/100_resource.bats b/tests/unit/resource.bats similarity index 100% rename from tests/unit/100_resource.bats rename to tests/unit/resource.bats diff --git a/tests/unit/30_scheduler-docker-local.bats b/tests/unit/scheduler-docker-local.bats similarity index 100% rename from tests/unit/30_scheduler-docker-local.bats rename to tests/unit/scheduler-docker-local.bats diff --git a/tests/unit/30_ssh_keys.bats b/tests/unit/ssh_keys.bats similarity index 100% rename from tests/unit/30_ssh_keys.bats rename to tests/unit/ssh_keys.bats diff --git a/tests/unit/20_storage.bats b/tests/unit/storage.bats similarity index 100% rename from tests/unit/20_storage.bats rename to tests/unit/storage.bats diff --git a/tests/unit/40_tags.bats b/tests/unit/tags.bats similarity index 100% rename from tests/unit/40_tags.bats rename to tests/unit/tags.bats diff --git a/tests/unit/10_tar.bats b/tests/unit/tar.bats similarity index 100% rename from tests/unit/10_tar.bats rename to tests/unit/tar.bats diff --git a/tests/unit/40_trace.bats b/tests/unit/trace.bats similarity index 100% rename from tests/unit/40_trace.bats rename to tests/unit/trace.bats diff --git a/tests/unit/10_version.bats b/tests/unit/version.bats similarity index 100% rename from tests/unit/10_version.bats rename to tests/unit/version.bats