From b91fa9e030e8c8af5a2d9b07a5e640258e7772f2 Mon Sep 17 00:00:00 2001 From: Christine Dodrill Date: Wed, 12 Aug 2015 18:22:56 -0700 Subject: [PATCH] tests for everything --- client/go/test.sh | 6 ++++++ client/nim/ponyapi.nim | 8 ++------ client/nim/test.sh | 5 ++++- client/python/test.sh | 6 ++++++ client/test.sh | 12 ++++++++++++ 5 files changed, 30 insertions(+), 7 deletions(-) create mode 100755 client/go/test.sh create mode 100755 client/python/test.sh create mode 100755 client/test.sh diff --git a/client/go/test.sh b/client/go/test.sh new file mode 100755 index 0000000..792bb83 --- /dev/null +++ b/client/go/test.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +set -e +set -x + +go test -v . diff --git a/client/nim/ponyapi.nim b/client/nim/ponyapi.nim index d57fc17..1b205e7 100644 --- a/client/nim/ponyapi.nim +++ b/client/nim/ponyapi.nim @@ -13,12 +13,8 @@ type episode*: int ## the episode number in the season is_movie*: bool ## does this record represent a movie? -when defined(isTesting): - const - API_ENDPOINT: string = "http://127.0.0.1:5000" -else: - const - API_ENDPOINT: string = "http://ponyapi.apps.xeserv.us" +const + API_ENDPOINT: string = "http://ponyapi.apps.xeserv.us" proc getJson(endpoint: string): json.JsonNode = ## get the HTTP body for the API base endpoint catted with the specific endpoint diff --git a/client/nim/test.sh b/client/nim/test.sh index 746603a..bb6aa10 100755 --- a/client/nim/test.sh +++ b/client/nim/test.sh @@ -1,3 +1,6 @@ #!/bin/bash -nim c -d:isTesting -r ponyapi +set -e +set -x + +nim c -r ponyapi diff --git a/client/python/test.sh b/client/python/test.sh new file mode 100755 index 0000000..bb118ec --- /dev/null +++ b/client/python/test.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +set -e +set -x + +python ./test.py diff --git a/client/test.sh b/client/test.sh new file mode 100755 index 0000000..12308f9 --- /dev/null +++ b/client/test.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +set -e +set -x + +for client in * +do + if [ -d $client ] + then + (cd $client && ./test.sh) + fi +done