You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by de...@apache.org on 2018/06/25 18:19:56 UTC
[trafficcontrol] 02/02: Fix DSR API tests that are requesting an
invalid DS type
This is an automated email from the ASF dual-hosted git repository.
dewrich pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git
commit e8463e8d695265041b163f461e75c27f9ecf5e22
Author: Rawlin Peters <ra...@comcast.com>
AuthorDate: Mon Jun 25 11:56:29 2018 -0600
Fix DSR API tests that are requesting an invalid DS type
---
traffic_ops/testing/api/v13/deliveryservice_requests_test.go | 6 +++---
traffic_ops/testing/api/v13/tc-fixtures.json | 4 ++++
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/traffic_ops/testing/api/v13/deliveryservice_requests_test.go b/traffic_ops/testing/api/v13/deliveryservice_requests_test.go
index 6f83fb1..6d974ae 100644
--- a/traffic_ops/testing/api/v13/deliveryservice_requests_test.go
+++ b/traffic_ops/testing/api/v13/deliveryservice_requests_test.go
@@ -56,10 +56,10 @@ func CreateTestDeliveryServiceRequests(t *testing.T) {
respCDN := resp[0]
// Attach Type
- typ := testData.Types[19]
- respTypes, _, err := TOSession.GetTypeByName(typ.Name)
+ typ := testData.DeliveryServiceRequests[dsrGood].DeliveryService.Type.String()
+ respTypes, _, err := TOSession.GetTypeByName(typ)
if err != nil {
- t.Errorf("cannot GET Type by name: %v - %v\n", typ.Name, err)
+ t.Errorf("cannot GET Type by name: %v - %v\n", typ, err)
}
respTyp := respTypes[0]
diff --git a/traffic_ops/testing/api/v13/tc-fixtures.json b/traffic_ops/testing/api/v13/tc-fixtures.json
index 6ce32b1..c41eb8b 100644
--- a/traffic_ops/testing/api/v13/tc-fixtures.json
+++ b/traffic_ops/testing/api/v13/tc-fixtures.json
@@ -103,6 +103,7 @@
"regionalGeoBlocking": true,
"routingName": "goodroute",
"tenantId": 2,
+ "type": "HTTP",
"xmlId": "test-ds1"
},
"status": "draft"
@@ -122,6 +123,7 @@
"longDesc": "long desc",
"regionalGeoBlocking": false,
"tenantId": 1,
+ "type": "HTTP",
"xmlId": "test-ds1"
},
"status": "draft"
@@ -143,6 +145,7 @@
"regionalGeoBlocking": true,
"routingName": "x routing",
"tenantId": 2,
+ "type": "HTTP",
"xmlId": "test ds1"
},
"status": "draft"
@@ -163,6 +166,7 @@
"regionalGeoBlocking": true,
"routingName": "goodroute",
"tenantId": 2,
+ "type": "HTTP",
"xmlId": "test-transitions"
},
"status": "draft"