From df3c1ee8a1078b3a698b36c2c2ed2adf94dd7282 Mon Sep 17 00:00:00 2001 From: Hunter Long Date: Thu, 29 Nov 2018 11:18:46 -0800 Subject: [PATCH] travis-CI only master --- .travis.yml | 5 ++-- source/tmpl/postman.json | 55 +++++++++++++++++++++++++++++++++++++++- 2 files changed, 57 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1db827093..6562fef4c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -55,8 +55,9 @@ notifications: email: true branches: - except: - - /^v\d/ + only: + - master + - dev before_install: - curl -L -s https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-amd64 -o $GOPATH/bin/dep diff --git a/source/tmpl/postman.json b/source/tmpl/postman.json index ac2cebc1a..18dd25627 100644 --- a/source/tmpl/postman.json +++ b/source/tmpl/postman.json @@ -336,7 +336,7 @@ ], "body": { "mode": "raw", - "raw": "{\n\t\"id\": 1,\n \"name\": \"Updated Google Service\",\n \"domain\": \"https://google.com\",\n \"expected\": \"\",\n \"expected_status\": 200,\n \"check_interval\": 60,\n \"type\": \"http\",\n \"method\": \"GET\",\n \"post_data\": \"\",\n \"port\": 0,\n \"timeout\": 10,\n \"order_id\": 0\n}" + "raw": "{\n\t\"id\": 1,\n \"name\": \"Updated Google Service\",\n \"domain\": \"https://google.com\",\n \"expected\": \"\",\n \"expected_status\": 200,\n \"check_interval\": 60,\n \"type\": \"http\",\n \"method\": \"GET\",\n \"post_data\": \"\",\n \"port\": 0,\n \"timeout\": 10,\n \"order_id\": 0,\n \"check_interval\": 60\n}" }, "url": { "raw": "{{endpoint}}/api/services/1", @@ -352,6 +352,59 @@ }, "response": [] }, + { + "name": "Reorder Services", + "event": [ + { + "listen": "test", + "script": { + "id": "b5a67a19-fd08-40b0-a961-3e9474ab78c6", + "exec": [ + "pm.test(\"Reorder Services\", function () {", + " var jsonData = pm.response.json();", + " pm.expect(jsonData.length).to.eql(4);", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{api_key}}", + "type": "string" + } + ] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "[{\"service\": 1, \"order\": 4},{\"service\": 2, \"order\": 3},{\"service\": 3, \"order\": 2},{\"service\": 4, \"order\": 1}]" + }, + "url": { + "raw": "{{endpoint}}/api/services/reorder", + "host": [ + "{{endpoint}}" + ], + "path": [ + "api", + "services", + "reorder" + ] + } + }, + "response": [] + }, { "name": "Delete Service", "event": [