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