Skip to content

Commit

Permalink
Merge pull request #292 from holashchand/release-2.0.0-make
Browse files Browse the repository at this point in the history
Fixed make tests setup
  • Loading branch information
srprasanna authored Feb 27, 2024
2 parents 9401888 + 0fdd8ef commit 69194d3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 46 deletions.
12 changes: 0 additions & 12 deletions Dockerfile

This file was deleted.

48 changes: 14 additions & 34 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@
rwildcard=$(wildcard $1$2) $(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2))
SOURCES := $(call rwildcard,java/,*.java)
RELEASE_VERSION = v2.0.0-rc1
IMAGES := ghcr.io/sunbird-rc/sunbird-rc-core ghcr.io/sunbird-rc/sunbird-rc-nginx ghcr.io/sunbird-rc/sunbird-rc-context-proxy-service \
ghcr.io/sunbird-rc/sunbird-rc-public-key-service ghcr.io/sunbird-rc/sunbird-rc-keycloak ghcr.io/sunbird-rc/sunbird-rc-certificate-api \
ghcr.io/sunbird-rc/sunbird-rc-certificate-signer ghcr.io/sunbird-rc/sunbird-rc-notification-service ghcr.io/sunbird-rc/sunbird-rc-claim-ms \
ghcr.io/sunbird-rc/sunbird-rc-digilocker-certificate-api ghcr.io/sunbird-rc/sunbird-rc-bulk-issuance ghcr.io/sunbird-rc/sunbird-rc-metrics \
ghcr.io/sunbird-rc/id-gen-service ghcr.io/sunbird-rc/encryption-service ghcr.io/sunbird-rc/sunbird-rc-identity-service ghcr.io/sunbird-rc/sunbird-rc-credential-schema \
IMAGES := ghcr.io/sunbird-rc/sunbird-rc-core ghcr.io/sunbird-rc/sunbird-rc-claim-ms \
ghcr.io/sunbird-rc/sunbird-rc-notification-service ghcr.io/sunbird-rc/sunbird-rc-metrics \
ghcr.io/sunbird-rc/id-gen-service ghcr.io/sunbird-rc/encryption-service \
ghcr.io/sunbird-rc/sunbird-rc-identity-service ghcr.io/sunbird-rc/sunbird-rc-credential-schema \
ghcr.io/sunbird-rc/sunbird-rc-credentials-service
build: java/registry/target/registry.jar
echo ${SOURCES}
Expand All @@ -20,8 +19,6 @@ build: java/registry/target/registry.jar
make -C services/identity-service/ docker
make -C services/credential-schema docker
make -C services/credentials-service/ docker
docker build -t ghcr.io/sunbird-rc/sunbird-rc-nginx .
docker build -t dockerhub/sunbird-rc-nginx .


java/registry/target/registry.jar: $(SOURCES)
Expand All @@ -30,46 +27,29 @@ java/registry/target/registry.jar: $(SOURCES)
cd java && ./mvnw clean install

test: build
@docker-compose down
@docker-compose -f docker-compose-v1.yml down
@rm -rf db-data* || echo "no permission to delete"
# test with distributed definition manager and native search
@docker-compose --env-file test_environments/test_with_distributedDefManager_nativeSearch.env up -d db keycloak registry certificate-signer certificate-api redis
@docker-compose -f docker-compose-v1.yml --env-file test_environments/test_with_distributedDefManager_nativeSearch.env up -d db keycloak registry certificate-signer certificate-api redis
@echo "Starting the test" && sh build/wait_for_port.sh 8080
@echo "Starting the test" && sh build/wait_for_port.sh 8081
@docker-compose ps
@docker-compose -f docker-compose-v1.yml ps
@curl -v http://localhost:8081/health
@cd java/apitest && ../mvnw -Pe2e test
@docker-compose down
@docker-compose -f docker-compose-v1.yml down
@rm -rf db-data-1 || echo "no permission to delete"
# test with kafka(async), events, notifications,
@docker-compose --env-file test_environments/test_with_asyncCreate_events_notifications.env up -d db es clickhouse redis keycloak registry certificate-signer certificate-api kafka zookeeper notification-ms metrics
@docker-compose -f docker-compose-v1.yml --env-file test_environments/test_with_asyncCreate_events_notifications.env up -d db es clickhouse redis keycloak registry certificate-signer certificate-api kafka zookeeper notification-ms metrics
@echo "Starting the test" && sh build/wait_for_port.sh 8080
@echo "Starting the test" && sh build/wait_for_port.sh 8081
@docker-compose ps
@docker-compose -f docker-compose-v1.yml ps
@curl -v http://localhost:8081/health
@cd java/apitest && MODE=async ../mvnw -Pe2e test
@docker-compose down
@docker-compose -f docker-compose-v1.yml down
@rm -rf db-data-2 || echo "no permission to delete"
# test with fusionauth
@docker-compose --env-file test_environments/test_with_fusionauth.env -f docker-compose.yml -f services/sample-fusionauth-service/docker-compose.yml up -d db es fusionauth fusionauthwrapper
sleep 20
@echo "Starting the test" && sh build/wait_for_port.sh 9011
@echo "Starting the test" && sh build/wait_for_port.sh 3990
sleep 20
@docker-compose --env-file test_environments/test_with_fusionauth.env -f docker-compose.yml -f services/sample-fusionauth-service/docker-compose.yml up -d --no-deps registry
@echo "Starting the test" && sh build/wait_for_port.sh 8081
@docker-compose -f docker-compose.yml -f services/sample-fusionauth-service/docker-compose.yml ps
@curl -v http://localhost:8081/health
@cd java/apitest && MODE=fusionauth ../mvnw -Pe2e test || echo 'Tests failed'
@docker-compose -f docker-compose.yml -f services/sample-fusionauth-service/docker-compose.yml down
@rm -rf db-data-3 || echo "no permission to delete"
make -C services/certificate-signer test
make -C services/public-key-service test
make -C services/context-proxy-service test
make -C services/bulk_issuance test
make -C services/identity-service test
make -C services/credential-schema test
make -C services/credentials-service test
# make -C services/identity-service test
# make -C services/credential-schema test
# make -C services/credentials-service test

clean:
@rm -rf target || true
Expand Down

0 comments on commit 69194d3

Please sign in to comment.