Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

Commit

Permalink
resolves the missing SNAP_TEST-TYPE in calling scripts/test.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
Mehdi Khajeh committed Jun 22, 2016
1 parent 76e5f9f commit c8eef2c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/BUILD_AND_TEST.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,5 +159,5 @@ The Snap Framework supports running tests in an isolated container as opposed to

```
$ cd $GOPATH/src/github.com/intelsdi-x/snap
$ scripts/run_tests_with_docker.sh`
$ scripts/run_tests_with_docker.sh [SNAP_TEST_TYPE]
```
11 changes: 10 additions & 1 deletion scripts/run_tests_with_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,14 @@
#See the License for the specific language governing permissions and
#limitations under the License.

if [[ $# -ne 1 ]]; then
echo "ERROR; missing SNAP_TEST_TYPE (Usage: $0 SNAP_TEST_TYPE)"
exit -2
elif [[ “$1!= “legacy” && "$1" != "small" &&$1!= “medium” &&$1!= “large” ]]; then
echo "Error; invalid SNAP_TEST_TYPE (value must be one of 'legacy', 'small', 'medium', or 'large'; received $1)"
exit -1
fi
SNAP_TEST_TYPE=$1

docker build -t intelsdi-x/snap-test -f scripts/Dockerfile .
docker run -it intelsdi-x/snap-test scripts/test.sh
docker run -it intelsdi-x/snap-test scripts/test.sh $SNAP_TEST_TYPE

0 comments on commit c8eef2c

Please sign in to comment.