rebranding tests
This commit is contained in:
@@ -13,7 +13,7 @@ WHITE := $(shell tput -Txterm setaf 7)
|
||||
RESET := $(shell tput -Txterm sgr0)
|
||||
|
||||
## default values only for sub-make calls
|
||||
COMPOSE_FILE ?= src/redis.yml:src/ocis-base.yml:src/acceptance.yml
|
||||
COMPOSE_FILE ?= src/redis.yml:src/opencloud-base.yml:src/acceptance.yml
|
||||
|
||||
## user input
|
||||
BEHAT_FEATURE ?=
|
||||
@@ -26,9 +26,9 @@ else
|
||||
endif
|
||||
OC_IMAGE_TAG ?= dev
|
||||
|
||||
# run tests with ociswrapper by default
|
||||
# run tests with ocwrapper by default
|
||||
WITH_WRAPPER ?= true
|
||||
OC_WRAPPER := ../../ociswrapper/bin/ociswrapper
|
||||
OC_WRAPPER := ../../ocwrapper/bin/ocwrapper
|
||||
|
||||
ifdef START_TIKA
|
||||
ifeq ($(START_TIKA),true)
|
||||
@@ -46,47 +46,47 @@ DIVIDE_INTO_NUM_PARTS := 10
|
||||
PARTS = 1 2 3 4 5 6 7 8 9 10
|
||||
LOCAL_API_SUITES = $(shell ls ../features | grep ^api*)
|
||||
|
||||
COMPOSE_PROJECT_NAME := ocis-acceptance-tests
|
||||
COMPOSE_PROJECT_NAME := opencloud-acceptance-tests
|
||||
|
||||
## make definition
|
||||
.PHONY: help
|
||||
help:
|
||||
@echo "Please use 'make <target>' where <target> is one of the following:"
|
||||
@echo
|
||||
@echo -e "${PURPLE}docs: https://owncloud.dev/ocis/development/testing/#testing-with-test-suite-in-docker${RESET}\n"
|
||||
@echo -e "${PURPLE}docs: https://docs.opencloud.eu/opencloud/development/testing/#testing-with-test-suite-in-docker${RESET}\n"
|
||||
@echo
|
||||
@echo -e "oCIS feature tests and test suites can be found here:"
|
||||
@echo -e "\thttps://github.com/owncloud/ocis/tree/master/tests/acceptance/features"
|
||||
@echo -e "OpenCloud feature tests and test suites can be found here:"
|
||||
@echo -e "\thttps://github.com/opencloud-eu/opencloud/tree/master/tests/acceptance/features"
|
||||
@echo
|
||||
@echo -e "test suites that test ownCloud 10 API core compatibility are found here and they start with prefix coreApi-:"
|
||||
@echo -e "\thttps://github.com/owncloud/ocis/tree/master/tests/acceptance/features"
|
||||
@echo -e "test suites that test core compatibility are found here and they start with prefix coreApi-:"
|
||||
@echo -e "\thttps://github.com/opencloud-eu/opencloud/tree/master/tests/acceptance/features"
|
||||
@echo
|
||||
@echo -e "The oCIS to be tested will be build from your current working state."
|
||||
@echo -e "You also can select the oCIS Docker image for all tests by setting"
|
||||
@echo -e "The OpenCloud to be tested will be build from your current working state."
|
||||
@echo -e "You also can select the OpenCloud Docker image for all tests by setting"
|
||||
@echo -e "\tmake ... ${YELLOW}OC_IMAGE_TAG=latest${RESET}"
|
||||
@echo -e "where ${YELLOW}latest${RESET} is an example for any valid Docker image tag from"
|
||||
@echo -e "https://hub.docker.com/r/owncloud/ocis."
|
||||
@echo -e "https://hub.docker.com/r/opencloud/opencloud."
|
||||
@echo
|
||||
@echo -e "${GREEN}Run full oCIS test suites against oCIS with oCIS storage:${RESET}\n"
|
||||
@echo -e "${GREEN}Run full OpenCloud test suites with ocis storage:${RESET}\n"
|
||||
@echo -e "\tmake localApiTests-apiAccountsHashDifficulty-ocis\t\t${BLUE}run apiAccountsHashDifficulty test suite, where available test suite are apiAccountsHashDifficulty apiArchiver apiContract apiGraph apiSpaces apiSpacesShares apiAsyncUpload apiCors${RESET}"
|
||||
@echo
|
||||
@echo -e "${GREEN}Run full oCIS test suites against oCIS with s3ng storage:${RESET}\n"
|
||||
@echo -e "${GREEN}Run full OpenCloud test suites with s3ng storage:${RESET}\n"
|
||||
@echo -e "\tmake localApiTests-apiAccountsHashDifficulty-s3ng\t\t${BLUE}run apiAccountsHashDifficulty test suite, where available test suite are apiAccountsHashDifficulty apiArchiver apiContract apiGraph apiSpaces apiSpacesShares apiAsyncUpload apiCors${RESET}"
|
||||
@echo
|
||||
@echo -e "${GREEN}Run full ownCloud test suites against oCIS with oCIS storage:${RESET}\n"
|
||||
@echo -e "${GREEN}Run full OpenCloud test suites with ocis storage:${RESET}\n"
|
||||
@echo -e "\tmake Core-API-Tests-ocis-storage-${RED}X${RESET}\t\t${BLUE}run test suite number X, where ${RED}X = 1 .. 10${RESET}"
|
||||
@echo
|
||||
@echo -e "${GREEN}Run full ownCloud test suites against oCIS with s3ng storage:${RESET}\n"
|
||||
@echo -e "${GREEN}Run full OpenCloud test suites with s3ng storage:${RESET}\n"
|
||||
@echo -e "\tmake Core-API-Tests-s3ng-storage-${RED}X${RESET}\t\t${BLUE}run test suite number X, where ${RED}X = 1 .. 10${RESET}"
|
||||
@echo
|
||||
@echo -e "${GREEN}Run an oCIS feature test against oCIS with oCIS storage:${RESET}\n"
|
||||
@echo -e "\tmake test-ocis-feature-ocis-storage ${YELLOW}BEHAT_FEATURE='...'${RESET}\t${BLUE}run single feature test${RESET}"
|
||||
@echo -e "${GREEN}Run an OpenCloud feature test with ocis storage:${RESET}\n"
|
||||
@echo -e "\tmake test-opencloud-feature-ocis-storage ${YELLOW}BEHAT_FEATURE='...'${RESET}\t${BLUE}run single feature test${RESET}"
|
||||
@echo
|
||||
@echo -e "\twhere ${YELLOW}BEHAT_FEATURE='...'${RESET} contains a relative path to the feature definition."
|
||||
@echo -e "\texample: ${RED}tests/acceptance/features/apiAccountsHashDifficulty/addUser.feature${RESET}"
|
||||
@echo
|
||||
@echo -e "${GREEN}Run an oCIS feature test against oCIS with s3ng storage:${RESET}\n"
|
||||
@echo -e "\tmake test-ocis-feature-s3ng-storage ${YELLOW}BEHAT_FEATURE='...'${RESET}\t${BLUE}run single feature test${RESET}"
|
||||
@echo -e "${GREEN}Run an OpenCloud feature test with s3ng storage:${RESET}\n"
|
||||
@echo -e "\tmake test-opencloud-feature-s3ng-storage ${YELLOW}BEHAT_FEATURE='...'${RESET}\t${BLUE}run single feature test${RESET}"
|
||||
@echo
|
||||
@echo -e "\twhere ${YELLOW}BEHAT_FEATURE='...'${RESET} contains a relative path to the feature definition."
|
||||
@echo -e "\texample: ${RED}tests/acceptance/features/apiAccountsHashDifficulty/addUser.feature${RESET}"
|
||||
@@ -94,13 +94,13 @@ help:
|
||||
@echo -e "\twhere ${YELLOW}BEHAT_FEATURE='...'${RESET} contains a relative path to the feature definition."
|
||||
@echo -e "\texample: ${RED}tests/acceptance/features/apiAccountsHashDifficulty/addUser.feature${RESET}"
|
||||
@echo
|
||||
@echo -e "${GREEN}Run an ownCloud feature test against oCIS with oCIS storage:${RESET}\n"
|
||||
@echo -e "${GREEN}Run a core test against OpenCloud with ocis storage:${RESET}\n"
|
||||
@echo -e "\tmake test-core-feature-ocis-storage ${YELLOW}BEHAT_FEATURE='...'${RESET}\t${BLUE}run single feature test${RESET}"
|
||||
@echo
|
||||
@echo -e "\twhere ${YELLOW}BEHAT_FEATURE='...'${RESET} contains a relative path to the feature definition."
|
||||
@echo -e "\texample: ${RED}tests/acceptance/features/coreApiAuth/webDavAuth.feature${RESET}"
|
||||
@echo
|
||||
@echo -e "${GREEN}Run an ownCloud feature test against oCIS with s3ng storage:${RESET}\n"
|
||||
@echo -e "${GREEN}Run a core test against OpenCloud with s3ng storage:${RESET}\n"
|
||||
@echo -e "\tmake test-core-feature-s3ng-storage ${YELLOW}BEHAT_FEATURE='...'${RESET}\t${BLUE}run single feature test${RESET}"
|
||||
@echo
|
||||
@echo -e "\twhere ${YELLOW}BEHAT_FEATURE='...'${RESET} contains a relative path to the feature definition."
|
||||
@@ -119,41 +119,41 @@ help:
|
||||
@echo -e "\tmake clean-docker-container\t\t${BLUE}stops and removes used docker containers${RESET}"
|
||||
@echo -e "\tmake clean-docker-volumes\t\t${BLUE}removes used docker volumes (used for caching)${RESET}"
|
||||
@echo
|
||||
.PHONY: test-ocis-feature-ocis-storage
|
||||
test-ocis-feature-ocis-storage: ## test a ocis feature with oCIS storage, usage: make ... BEHAT_FEATURE='tests/acceptance/features/apiAccountsHashDifficulty/addUser.feature:10'
|
||||
@TEST_SOURCE=ocis \
|
||||
.PHONY: test-opencloud-feature-ocis-storage
|
||||
test-opencloud-feature-ocis-storage: ## test a OpenCloud feature with ocis storage, usage: make ... BEHAT_FEATURE='tests/acceptance/features/apiAccountsHashDifficulty/addUser.feature:10'
|
||||
@TEST_SOURCE=opencloud \
|
||||
STORAGE_DRIVER=ocis \
|
||||
BEHAT_FEATURE=$(BEHAT_FEATURE) \
|
||||
$(MAKE) --no-print-directory testSuite
|
||||
|
||||
.PHONY: test-ocis-feature-s3ng-storage
|
||||
test-ocis-feature-s3ng-storage: ## test a ocis feature with s3ng storage, usage: make ... BEHAT_FEATURE='tests/acceptance/features/apiAccountsHashDifficulty/addUser.feature:10'
|
||||
@TEST_SOURCE=ocis \
|
||||
.PHONY: test-opencloud-feature-s3ng-storage
|
||||
test-opencloud-feature-s3ng-storage: ## test a OpenCloud feature with s3ng storage, usage: make ... BEHAT_FEATURE='tests/acceptance/features/apiAccountsHashDifficulty/addUser.feature:10'
|
||||
@TEST_SOURCE=opencloud \
|
||||
STORAGE_DRIVER=s3ng \
|
||||
BEHAT_FEATURE=$(BEHAT_FEATURE) \
|
||||
START_CEPH=1 \
|
||||
$(MAKE) --no-print-directory testSuite
|
||||
|
||||
.PHONY: test-core-feature-ocis-storage
|
||||
test-core-feature-ocis-storage: ## test a core feature with oCIS storage, usage: make ... BEHAT_FEATURE='tests/acceptance/features/coreApiAuth/webDavAuth.feature'
|
||||
@TEST_SOURCE=oc10 \
|
||||
test-core-feature-ocis-storage: ## test a core feature with ocis storage, usage: make ... BEHAT_FEATURE='tests/acceptance/features/coreApiAuth/webDavAuth.feature'
|
||||
@TEST_SOURCE=core \
|
||||
STORAGE_DRIVER=ocis \
|
||||
BEHAT_FEATURE=$(BEHAT_FEATURE) \
|
||||
$(MAKE) --no-print-directory testSuite
|
||||
|
||||
.PHONY: test-core-feature-s3ng-storage
|
||||
test-core-feature-s3ng-storage: ## test a core feature with s3ng storage, usage: make ... BEHAT_FEATURE='tests/acceptance/features/coreApiAuth/webDavAuth.feature'
|
||||
@TEST_SOURCE=oc10 \
|
||||
@TEST_SOURCE=core \
|
||||
STORAGE_DRIVER=s3ng \
|
||||
BEHAT_FEATURE=$(BEHAT_FEATURE) \
|
||||
START_CEPH=1 \
|
||||
$(MAKE) --no-print-directory testSuite
|
||||
|
||||
localSuiteOcis = $(addprefix localApiTests-, $(addsuffix -ocis,${LOCAL_API_SUITES}))
|
||||
.PHONY: $(localSuiteOcis)
|
||||
$(localSuiteOcis): ## run local api test suite with ocis storage
|
||||
localSuiteOpencloud = $(addprefix localApiTests-, $(addsuffix -ocis,${LOCAL_API_SUITES}))
|
||||
.PHONY: $(localSuiteOpencloud)
|
||||
$(localSuiteOpencloud): ## run local api test suite with ocis storage
|
||||
@$(eval BEHAT_SUITE=$(shell echo "$@" | cut -d'-' -f2))
|
||||
@TEST_SOURCE=ocis \
|
||||
@TEST_SOURCE=opencloud \
|
||||
STORAGE_DRIVER=ocis \
|
||||
BEHAT_SUITE=$(BEHAT_SUITE) \
|
||||
$(MAKE) --no-print-directory testSuite
|
||||
@@ -162,16 +162,16 @@ localSuites3ng = $(addprefix localApiTests-, $(addsuffix -s3ng,${LOCAL_API_SUITE
|
||||
.PHONY: $(localSuites3ng)
|
||||
$(localSuites3ng): ## run local api test suite with s3 storage
|
||||
@$(eval BEHAT_SUITE=$(shell echo "$@" | cut -d'-' -f2))
|
||||
@TEST_SOURCE=ocis \
|
||||
@TEST_SOURCE=opencloud \
|
||||
STORAGE_DRIVER=s3ng \
|
||||
BEHAT_SUITE=$(BEHAT_SUITE) \
|
||||
$(MAKE) --no-print-directory testSuite
|
||||
|
||||
targetsOCIS = $(addprefix Core-API-Tests-ocis-storage-,$(PARTS))
|
||||
.PHONY: $(targetsOCIS)
|
||||
$(targetsOCIS):
|
||||
targetsOC = $(addprefix Core-API-Tests-ocis-storage-,$(PARTS))
|
||||
.PHONY: $(targetsOC)
|
||||
$(targetsOC):
|
||||
@$(eval RUN_PART=$(shell echo "$@" | tr -dc '0-9'))
|
||||
@TEST_SOURCE=oc10 \
|
||||
@TEST_SOURCE=core \
|
||||
STORAGE_DRIVER=ocis \
|
||||
RUN_PART=$(RUN_PART) \
|
||||
$(MAKE) --no-print-directory testSuite
|
||||
@@ -180,7 +180,7 @@ targetsS3ng = $(addprefix Core-API-Tests-s3ng-storage-,$(PARTS))
|
||||
.PHONY: $(targetsS3ng)
|
||||
$(targets):
|
||||
@$(eval RUN_PART=$(shell echo "$@" | tr -dc '0-9'))
|
||||
@TEST_SOURCE=oc10 \
|
||||
@TEST_SOURCE=core \
|
||||
STORAGE_DRIVER=s3ng \
|
||||
RUN_PART=$(RUN_PART) \
|
||||
$(MAKE) --no-print-directory testSuite
|
||||
@@ -231,18 +231,18 @@ show-test-logs: ## show logs of test
|
||||
|
||||
$(OC_WRAPPER):
|
||||
@if [ "$(WITH_WRAPPER)" == "true" ]; then \
|
||||
$(MAKE) --no-print-directory -C ../../ociswrapper build \
|
||||
$(MAKE) --no-print-directory -C ../../ocwrapper build \
|
||||
; fi;
|
||||
|
||||
.PHONY: build-dev-image
|
||||
build-dev-image:
|
||||
@if [ $(BUILD_DEV_IMAGE) -eq 1 ]; then \
|
||||
$(MAKE) --no-print-directory -C ../../../ocis dev-docker \
|
||||
$(MAKE) --no-print-directory -C ../../../opencloud dev-docker \
|
||||
; fi;
|
||||
|
||||
.PHONY: clean-dev-docker-image
|
||||
clean-dev-docker-image: ## clean docker image built during acceptance tests
|
||||
@docker image rm owncloud/ocis:dev || true
|
||||
@docker image rm opencloud/opencloud:dev || true
|
||||
|
||||
.PHONY: clean-docker-container
|
||||
clean-docker-container: ## clean docker containers created during acceptance tests
|
||||
|
||||
Reference in New Issue
Block a user