From 4d9048a99a9824ab7cb719771699a92c582b5bf2 Mon Sep 17 00:00:00 2001 From: Gilbert Roulot Date: Wed, 6 Jun 2018 15:21:06 +0000 Subject: First version --- test/test.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 test/test.sh (limited to 'test/test.sh') diff --git a/test/test.sh b/test/test.sh new file mode 100755 index 0000000..c77ec1d --- /dev/null +++ b/test/test.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +set -e + +# Clone the Ruby Bundler test repository. +echo "Cloning the test repository https://gitlab.com/gitlab-org/security-products/tests/ruby-bundler.git" +git clone https://gitlab.com/gitlab-org/security-products/tests/ruby-bundler.git /code + +# Run license management on it. +echo "Running license management on the cloned repository" +cd /code +/run.sh analyze . + +# Compare results with expected results. +set +e +diff /code/gl-license-management-report.json /test/results/ruby-bundler.json > /diff.txt + +if [ -s /diff.txt ] ; then + echo "Unexpected result. Here is the diff between actual results and those expected :" + cat /diff.txt + exit 1 +else + echo "All tests are OK." +fi + -- cgit v1.2.3