Skip to content

Commit

Permalink
Split integration tests (cloudfoundry#546)
Browse files Browse the repository at this point in the history
* Split tests of current and legacy components

* Run the split tests in separate travis jobs
* Cache maven artifacts
* Update Linux and Go versions to current

(cherry picked from commit 8904e44)

* duplicate Integration_Operator_Others tests

for golang API server: deviation from node api server: attach policy
always return 200, no longer 201 when attaching the policy for the first
time

(cherry picked from commit 37b28f3)

* Forgotten file

(cherry picked from commit f052895)
  • Loading branch information
silvestre authored and cdlliuy committed Dec 4, 2019
1 parent fbc694a commit e97bb9b
Show file tree
Hide file tree
Showing 24 changed files with 2,748 additions and 393 deletions.
90 changes: 52 additions & 38 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@


os: linux
dist: xenial
sudo: required

env:
global:
- DBURL=postgres://postgres@localhost/autoscaler?sslmode=disable
- NODE_VERSION=6.2
- GO_VERSION=1.11
- GO_VERSION=1.13.3
- LOGLEVEL=info
language: java
cache:
directories:
- $HOME/.m2
jdk:
- openjdk8
- openjdk8
services:
- postgresql
addons:
Expand All @@ -21,7 +22,7 @@ before_install:
install:
- mvn package
- npm install npm@latest -g
- nvm install $NODE_VERSION
- nvm install $NODE_VERSION --silent
- eval "$(gimme $GO_VERSION)"
- go install github.com/onsi/ginkgo/ginkgo

Expand All @@ -47,37 +48,50 @@ before_script:
- java -cp 'db/target/lib/*' liquibase.integration.commandline.Main --url jdbc:mysql://127.0.0.1/autoscaler --driver=com.mysql.cj.jdbc.Driver --changeLogFile=api/db/api.db.changelog.yml --username=root update
- java -cp 'db/target/lib/*' liquibase.integration.commandline.Main --url jdbc:mysql://127.0.0.1/autoscaler --driver=com.mysql.cj.jdbc.Driver --changeLogFile=scheduler/db/scheduler.changelog-master.yaml --username=root update
- java -cp 'db/target/lib/*' liquibase.integration.commandline.Main --url jdbc:mysql://127.0.0.1/autoscaler --driver=com.mysql.cj.jdbc.Driver --changeLogFile=scheduler/db/quartz.changelog-master.yaml --username=root update
matrix:
jobs:
include:
- name: unit test
script:
# Unit test
- pushd api
- npm install
- npm test
- popd
- pushd servicebroker
- npm install
- npm test
- popd
- pushd src/autoscaler
- ginkgo -r -race -randomizeAllSpecs
- popd
- pushd scheduler
- mvn test
- mvn test -Dspring.profiles.active=mysql
- popd
- name: unit test
script:
# Unit test
- pushd src/autoscaler
- ginkgo -r -race -randomizeAllSpecs
- popd
- pushd scheduler
- mvn test
- mvn test -Dspring.profiles.active=mysql

- name: integration test
script:
# Integration test
- pushd scheduler
- mvn package -DskipTests
- popd
- ginkgo -r -race -randomizeAllSpecs src/integration

# Tests for legacy components (node apiserver, broker and metricscollector)
- name: legacy unit test
script:
- pushd api
- npm install
- npm test
- popd
- pushd servicebroker
- npm install
- npm test
- popd

- name: legacy integration test
script:
- pushd api
- npm install
- npm test
- popd
- pushd servicebroker
- npm install
- npm test
- popd
- pushd scheduler
- mvn package -DskipTests
- popd
- ginkgo -r -race -randomizeAllSpecs src/integration_legacy

- name: integration test
script:
# Integration test
- pushd api
- npm install
- popd
- pushd servicebroker
- npm install
- popd
- pushd scheduler
- mvn package -DskipTests
- popd
- ginkgo -r -race -randomizeAllSpecs src/integration
Loading

0 comments on commit e97bb9b

Please sign in to comment.