Skip to content

Commit

Permalink
Makefile: added make command to run litmus-tests (cs3org#1543)
Browse files Browse the repository at this point in the history
  • Loading branch information
jimil749 authored and fbx committed Apr 19, 2021
1 parent ce8e974 commit 16b2200
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
21 changes: 21 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ GIT_DIRTY=`git diff-index --quiet HEAD -- || echo "dirty-"`
VERSION=`git describe --always`
GO_VERSION=`go version | awk '{print $$3}'`
BUILD_FLAGS="-X main.gitCommit=${GIT_COMMIT} -X main.version=${VERSION} -X main.goVersion=${GO_VERSION} -X main.buildDate=${BUILD_DATE}"
LITMUS_URL_OLD="http://localhost:20080/remote.php/webdav"
LITMUS_URL_NEW="http://localhost:20080/remote.php/dav/files/4c510ada-c86b-4815-8820-42cdf82c3d51"
LITMUS_USERNAME="einstein"
LITMUS_PASSWORD="relativity"
TESTS="basic http copymove props"

default: build test lint gen-doc check-changelog
release: deps build test lint gen-doc
Expand Down Expand Up @@ -39,6 +44,22 @@ build-reva: imports
test: off
go test -race ./...

litmus-test-old: build
cd tests/oc-integration-tests/local && ../../../cmd/revad/revad -c frontend.toml &
cd tests/oc-integration-tests/local && ../../../cmd/revad/revad -c gateway.toml &
cd tests/oc-integration-tests/local && ../../../cmd/revad/revad -c storage-home.toml &
cd tests/oc-integration-tests/local && ../../../cmd/revad/revad -c storage-users.toml &
cd tests/oc-integration-tests/local && ../../../cmd/revad/revad -c users.toml &
docker run --rm --network=host -e LITMUS_URL=$(LITMUS_URL_OLD) -e LITMUS_USERNAME=$(LITMUS_USERNAME) -e LITMUS_PASSWORD=$(LITMUS_PASSWORD) -e TESTS=$(TESTS) owncloud/litmus:latest
pkill revad
litmus-test-new: build
cd tests/oc-integration-tests/local && ../../../cmd/revad/revad -c frontend.toml &
cd tests/oc-integration-tests/local && ../../../cmd/revad/revad -c gateway.toml &
cd tests/oc-integration-tests/local && ../../../cmd/revad/revad -c storage-home.toml &
cd tests/oc-integration-tests/local && ../../../cmd/revad/revad -c storage-users.toml &
cd tests/oc-integration-tests/local && ../../../cmd/revad/revad -c users.toml &
docker run --rm --network=host -e LITMUS_URL=$(LITMUS_URL_NEW) -e LITMUS_USERNAME=$(LITMUS_USERNAME) -e LITMUS_PASSWORD=$(LITMUS_PASSWORD) -e TESTS=$(TESTS) owncloud/litmus:latest
pkill revad
lint:
go run tools/check-license/check-license.go
`go env GOPATH`/bin/golangci-lint run --timeout 2m0s
Expand Down
6 changes: 6 additions & 0 deletions changelog/unreleased/makefile-litmus-test-command.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Enhancement: Make command to run litmus tests

This updates adds an extra make command to run litmus tests via make. `make litmus-test` executes the tests.

https://github.com/cs3org/reva/issues/1106
https://github.com/cs3org/reva/pull/1543

0 comments on commit 16b2200

Please sign in to comment.