Skip to content

Commit

Permalink
remove acceptance-tests-config make target
Browse files Browse the repository at this point in the history
  • Loading branch information
asalan316 committed Jan 13, 2025
1 parent 2e1a231 commit c795638
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 13 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ build-acceptance-tests:
@make --directory='./src/acceptance' build_tests

.PHONY: acceptance-tests
acceptance-tests: build-test-app acceptance-tests-config ## Run acceptance tests against OSS dev environment (requrires a previous deployment of the autoscaler)
acceptance-tests: build-test-app #acceptance-tests-config ## Run acceptance tests against OSS dev environment (requires a previous deployment of the autoscaler)
@make --directory='./src/acceptance' run-acceptance-tests
.PHONY: acceptance-cleanup
acceptance-cleanup:
Expand All @@ -399,7 +399,7 @@ cf-login: ## Login to OSS CF dev environment
@${CI_DIR}/autoscaler/scripts/cf-login.sh

.PHONY: setup-performance
setup-performance: build-test-app acceptance-tests-config
setup-performance: build-test-app #acceptance-tests-config
export NODES=1;\
export SUITES="setup_performance";\
export DEPLOYMENT_NAME="autoscaler-performance";\
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

set -eu -o pipefail
set -eu -ox pipefail

script_dir="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
source "${script_dir}/vars.source.sh"
Expand Down Expand Up @@ -30,7 +30,7 @@ function write_app_config() {
local -r config_path="$1"
local -r use_existing_organization="$2"
local -r use_existing_space="$3"
local -r existing_org="$4"
local -r existing_organization="$4"
local -r existing_space="$5"

cat > "${config_path}" << EOF
Expand All @@ -45,7 +45,7 @@ function write_app_config() {
"service_plan": "autoscaler-free-plan",
"service_broker": "${deployment_name}",
"use_existing_organization": ${use_existing_organization},
"existing_organization": "${existing_org}",
"existing_organization": "${existing_organization}",
"use_existing_space": ${use_existing_space},
"existing_space": "${existing_space}",
"aggregate_interval": 120,
Expand All @@ -63,7 +63,3 @@ function write_app_config() {
}
EOF
}

write_app_config \
"${ACCEPTANCE_CONFIG_PATH}" \
"${use_existing_organization}" "${use_existing_space}" "${existing_organization}" "${existing_space}"
8 changes: 5 additions & 3 deletions ci/autoscaler/scripts/run-acceptance-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
set -eu -o pipefail
script_dir="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
source "${script_dir}/vars.source.sh"
source "${script_dir}/acceptance-tests-config.source.sh"

skip_teardown="${SKIP_TEARDOWN:-false}"
suites="${SUITES:-"api app broker"}"
Expand All @@ -16,6 +17,10 @@ then
exit 1;
fi

write_test_config \
"${autoscaler_acceptance_dir}/acceptance_config.json" \
"${USE_EXISTING_ORGANIZATION:-false}" "${USE_EXISTING_SPACE:-false}" "${EXISTING_ORGANIZATION:-false}" "${EXISTING_SPACE:-false}"

if [[ ! -f "${autoscaler_dir}/src/acceptance/acceptance_config.json" ]]
then
echo 'FAILED: Did not find file acceptance_config.json.'
Expand All @@ -34,9 +39,6 @@ done

step "running ${suites_to_run}"

# debug
cat "${PWD}/acceptance_config.json"

#run suites
if [ "${suites_to_run}" != "" ]; then
# shellcheck disable=SC2086
Expand Down
7 changes: 6 additions & 1 deletion ci/autoscaler/scripts/vars.source.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# NOTE: to turn on debug use DEBUG=true
# shellcheck disable=SC2155,SC2034
#
Expand Down Expand Up @@ -83,6 +83,11 @@ export CI_DIR="$(realpath -e "${CI_DIR}")"
debug "CI_DIR: ${CI_DIR}"
ci_dir="${CI_DIR}"

AUTOSCALER_ACCEPTANCE_DIR="${AUTOSCALER_ACCEPTANCE_DIR:-${root_dir}/src/acceptance}"
export AUTOSCALER_ACCEPTANCE_DIR="$(realpath -e "${AUTOSCALER_ACCEPTANCE_DIR}" )"
debug "AUTOSCALER_ACCEPTANCE_DIR: ${AUTOSCALER_ACCEPTANCE_DIR}"
autoscaler_acceptance_dir="${AUTOSCALER_ACCEPTANCE_DIR}"

export SERVICE_NAME="${DEPLOYMENT_NAME}"
debug "SERVICE_NAME: ${SERVICE_NAME}"
service_name="%{SERVICE_NAME"
Expand Down

0 comments on commit c795638

Please sign in to comment.