diff options
| author | Olivier Gonzalez <ogonzalez@gitlab.com> | 2018-06-06 15:21:06 +0000 |
|---|---|---|
| committer | Olivier Gonzalez <ogonzalez@gitlab.com> | 2018-06-06 15:21:06 +0000 |
| commit | 09bb36aa761c60e081418da232bf440dbf0341c7 (patch) | |
| tree | b950fc5b6e4f636208d56280dc03fa5b283ed8b4 /test/test.sh | |
| parent | d706bac7750c57bf9092c9d2c9ef177ff5b8503f (diff) | |
| parent | 4d9048a99a9824ab7cb719771699a92c582b5bf2 (diff) | |
Merge branch 'first_version' into 'master'
First version
See merge request gitlab-org/security-products/license-management!2
Diffstat (limited to 'test/test.sh')
| -rwxr-xr-x | test/test.sh | 25 |
1 files changed, 25 insertions, 0 deletions
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 + |
