Skip to content

Commit

Permalink
👷(project) test production builds
Browse files Browse the repository at this point in the history
To ensure that our production builds are able to start and respond with
a HTTP requests we now start the CMS & LMS production services using
docker-compose and use curl to test them.
  • Loading branch information
jmaupetit committed Sep 5, 2019
1 parent 5d5ec96 commit fb51868
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,15 @@ build_steps: &build_steps
source releases/${CIRCLE_JOB}/activate
make dev-build
# Check that the production build starts
- run:
name: Check production build
command: |
source releases/${CIRCLE_JOB}/activate
make run
make test-cms
make test-lms
# List openedx-docker jobs that will be integrated and executed in a workflow
jobs:
# Quality jobs
Expand Down
32 changes: 32 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,38 @@ superuser: ## create a super user
$(MANAGE_LMS) createsuperuser
.PHONY: superuser

test: \
test-cms \
test-lms \
test-cms-dev \
test-lms-dev
test: ## test services (production & development)
.PHONY: test

test-cms: ## test the CMS (production) service
@echo -n "Testing CMS (production): "
@curl -vLk --header "Accept: text/html" "http://localhost:8083" 2>&1 | grep "< HTTP/1.1 200 OK" > /dev/null
@echo "$(COLOR_SUCCESS)OK$(COLOR_RESET)"
.PHONY: test-cms

test-cms-dev: ## test the CMS (development) service
@echo -n "Testing CMS (development): "
@curl -vLk --header "Accept: text/html" "http://localhost:8082" 2>&1 | grep "< HTTP/1.0 200 OK" > /dev/null
@echo "$(COLOR_SUCCESS)OK$(COLOR_RESET)"
.PHONY: test-cms-dev

test-lms: ## test the LMS (production) service
@echo -n "Testing LMS (production): "
@curl -vLk --header "Accept: text/html" "http://localhost:8073" 2>&1 | grep "< HTTP/1.1 200 OK" > /dev/null
@echo "$(COLOR_SUCCESS)OK$(COLOR_RESET)"
.PHONY: test-lms

test-lms-dev: ## test the LMS (development) service
@echo -n "Testing LMS (development): "
@curl -vLk --header "Accept: text/html" "http://localhost:8072" 2>&1 | grep "< HTTP/1.0 200 OK" > /dev/null
@echo "$(COLOR_SUCCESS)OK$(COLOR_RESET)"
.PHONY: test-lms-dev

tree: \
$(FLAVORED_EDX_RELEASE_PATH)/data/static/production/.keep \
$(FLAVORED_EDX_RELEASE_PATH)/data/static/development/.keep \
Expand Down

0 comments on commit fb51868

Please sign in to comment.