File tree 5 files changed +25
-2
lines changed
5 files changed +25
-2
lines changed Original file line number Diff line number Diff line change @@ -7,5 +7,10 @@ coverage
7
7
doc /
8
8
.ruby-version
9
9
.idea /
10
+ * .iml
10
11
.git /
11
12
.gitignore
13
+
14
+ # Jenkins/Docker
15
+ results /
16
+ Dockerfile.test
Original file line number Diff line number Diff line change 7
7
doc /
8
8
.ruby-version
9
9
.idea /
10
+ * .iml
11
+
12
+ # Jenkins/Docker
13
+ results /
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ WORKDIR /fauna/faunadb-ruby
20
20
RUN bundle install
21
21
22
22
# Define the default variables for the tests
23
- ENV FAUNA_ROOT_KEY=secret FAUNA_DOMAIN=db.fauna.com FAUNA_SCHEME=https FAUNA_PORT=443
23
+ ENV FAUNA_ROOT_KEY=secret FAUNA_DOMAIN=db.fauna.com FAUNA_SCHEME=https FAUNA_PORT=443 FAUNA_TIMEOUT=30s
24
24
25
25
# Run the tests (after target database is up)
26
- ENTRYPOINT dockerize -wait "$FAUNA_SCHEME://$FAUNA_DOMAIN:$FAUNA_PORT/ping" -timeout 30s bundle exec rake spec
26
+ CMD ["make", "docker -wait", "test"]
Original file line number Diff line number Diff line change @@ -17,6 +17,19 @@ ifdef FAUNA_PORT
17
17
DOCKER_RUN_FLAGS += -e FAUNA_PORT=$(FAUNA_PORT )
18
18
endif
19
19
20
+ ifdef FAUNA_TIMEOUT
21
+ DOCKER_RUN_FLAGS += -e FAUNA_TIMEOUT=$(FAUNA_TIMEOUT )
22
+ endif
23
+
24
+ test :
25
+ bundle exec rake spec
26
+
27
+ jenkins-test :
28
+ bundle exec rspec --format progress --format RspecJunitFormatter --out results/report.xml
29
+
30
+ docker-wait :
31
+ dockerize -wait $(FAUNA_SCHEME ) ://$(FAUNA_DOMAIN ) :$(FAUNA_PORT ) /ping -timeout $(FAUNA_TIMEOUT )
32
+
20
33
docker-test :
21
34
docker build -f Dockerfile.test -t faunadb-ruby-test:latest --build-arg RUNTIME_IMAGE=$(RUNTIME_IMAGE ) .
22
35
docker run $(DOCKER_RUN_FLAGS ) faunadb-ruby-test:latest
Original file line number Diff line number Diff line change @@ -23,4 +23,5 @@ Gem::Specification.new do |s|
23
23
s . add_development_dependency 'rspec' , '~> 3.4'
24
24
s . add_development_dependency 'rubocop' , '~> 0.38.0'
25
25
s . add_development_dependency 'codecov' , '~> 0.1.5'
26
+ s . add_development_dependency 'rspec_junit_formatter' , '~> 0.3.0'
26
27
end
You can’t perform that action at this time.
0 commit comments