Skip to content

Commit ca6217e

Browse files
committed
chore(test): pact_broker --version cmd
1 parent a2f4139 commit ca6217e

3 files changed

Lines changed: 10 additions & 0 deletions

File tree

packaging/pact-broker-app.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
if ARGV.include?("--version")
2+
require "pact_broker/version"
3+
puts PactBroker::VERSION
4+
exit
5+
end
6+
17
unless ARGV.any? { |arg| arg =~ /\.ru$/ }
28
ARGV.push("#{File.dirname(__FILE__)}/config.ru")
39
end

script/test.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,15 @@ tools=(
6767
pact-provider-verifier
6868
pact-stub-service
6969
pactflow
70+
pact-broker-app
7071
)
7172

7273
test_cmd=""
7374
for tool in ${tools[@]}; do
7475
echo testing $tool
7576
if [ "$BINARY_OS" = "windows" ] ; then FILE_EXT=.bat; fi
7677
if [ "$tool" = "pact-mock-service" ]; then test_cmd="--help" ; fi
78+
if [ "$tool" = "pact-broker-app" ]; then test_cmd="--version" ; fi
7779
echo executing ${tool}${FILE_EXT}
7880
${PATH_TO_BIN}${tool}${FILE_EXT} ${test_cmd};
7981
done

script/unpack-and-test.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ tools=(
7474
pact-provider-verifier
7575
pact-stub-service
7676
pactflow
77+
pact-broker-app
7778
)
7879
# ruby version check
7980
if [ "$BINARY_OS" = "windows" ] ; then FILE_EXT=.bat; fi
@@ -85,6 +86,7 @@ test_cmd=""
8586
for tool in ${tools[@]}; do
8687
echo testing $tool
8788
if [ "$tool" = "pact-mock-service" ]; then test_cmd="--help" ; fi
89+
if [ "$tool" = "pact-broker-app" ]; then test_cmd="--version" ; fi
8890
echo executing ${tool}${FILE_EXT}
8991
${PATH_TO_BIN}${tool}${FILE_EXT} ${test_cmd};
9092
done

0 commit comments

Comments
 (0)