Skip to content

Commit

Permalink
fix acceptance-release target
Browse files Browse the repository at this point in the history
  • Loading branch information
asalan316 committed Dec 2, 2024
1 parent db65e28 commit 3fc59be
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ mta-release: mta-build
@echo " - building mtar release '${VERSION}' to dir: '${DEST}' "

.PHONY: acceptance-release
acceptance-release: clean-acceptance go-mod-tidy go-mod-vendor build-test-app
acceptance-release: generate-fakes generate-openapi-generated-clients-and-servers clean-acceptance go-mod-tidy go-mod-vendor build-test-app
@echo " - building acceptance test release '${VERSION}' to dir: '${DEST}' "
@mkdir -p ${DEST}
${AUTOSCALER_DIR}/scripts/compile-acceptance-tests.sh
Expand Down
1 change: 1 addition & 0 deletions src/acceptance/api/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ var _ = Describe("AutoScaler Public API", func() {
var expectedPolicy string
var actualPolicy []byte
BeforeEach(func() {
BindServiceToApp(cfg, appName, instanceName)
expectedPolicy = GenerateBindingsWithScalingPolicy("bound_app", 1, 2, "memoryused", 30, 100)
actualPolicy, status = createPolicy(expectedPolicy)
Expect(status).To(Equal(200))
Expand Down
9 changes: 3 additions & 6 deletions src/acceptance/assets/app/go_app/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,11 @@ function deploy(){
fi

# `create-org/space` is idempotent and will simply keep the potentially already existing org/space as is
cf create-org "${org}" || true
cf target -o "${org}" || true
cf create-space "${space}" || true
cf create-org "${org}"
cf target -o "${org}"
cf create-space "${space}"
cf target -s "${space}"

echo "current org ${org}"
echo "current space ${space}"

local app_name app_domain service_name memory_mb service_broker service_plan
app_name="test_app"
app_domain="$(getConfItem apps_domain)"
Expand Down
2 changes: 1 addition & 1 deletion src/autoscaler/api/publicapiserver/public_api_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ func (h *PublicApiHandler) AttachScalingPolicy(w http.ResponseWriter, r *http.Re

policy, errResults := h.policyValidator.ParseAndValidatePolicy(policyBytes)
if errResults != nil {
logger.Info("Failed to validate policy", lager.Data{"errResults": errResults})
logger.Info("Failed to validate policy", lager.Data{"errResults": errResults, "policy": string(policyBytes)})
handlers.WriteJSONResponse(w, http.StatusBadRequest, errResults)
return
}
Expand Down

0 comments on commit 3fc59be

Please sign in to comment.