You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by da...@apache.org on 2016/12/16 21:16:15 UTC
[18/50] incubator-trafficcontrol git commit: update
DeliveryserviceServer to match API output
update DeliveryserviceServer to match API output
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/66c649bb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/66c649bb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/66c649bb
Branch: refs/heads/postgres
Commit: 66c649bb4da80d7e1790f44590515a7de0af3b0c
Parents: baf8a2c
Author: David Neuman <da...@gmail.com>
Authored: Thu Dec 1 09:06:38 2016 -0700
Committer: Dan Kirkwood <da...@gmail.com>
Committed: Fri Dec 16 14:10:45 2016 -0700
----------------------------------------------------------------------
traffic_ops/client/delivery_service_resources.go | 4 ++--
traffic_ops/client/fixtures/delivery_service.go | 4 ++--
traffic_ops/client/tests/delivery_service_test.go | 12 ++++++------
3 files changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/66c649bb/traffic_ops/client/delivery_service_resources.go
----------------------------------------------------------------------
diff --git a/traffic_ops/client/delivery_service_resources.go b/traffic_ops/client/delivery_service_resources.go
index 236382e..1d00c94 100644
--- a/traffic_ops/client/delivery_service_resources.go
+++ b/traffic_ops/client/delivery_service_resources.go
@@ -195,8 +195,8 @@ type DeliveryServiceServerResponse struct {
// DeliveryServiceServer ...
type DeliveryServiceServer struct {
LastUpdated string `json:"lastUpdated"`
- Server string `json:"server"`
- DeliveryService string `json:"deliveryService"`
+ Server int `json:"server"`
+ DeliveryService int `json:"deliveryService"`
}
// DeliveryServiceSSLKeysResponse ...
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/66c649bb/traffic_ops/client/fixtures/delivery_service.go
----------------------------------------------------------------------
diff --git a/traffic_ops/client/fixtures/delivery_service.go b/traffic_ops/client/fixtures/delivery_service.go
index 3f137fb..97675ab 100644
--- a/traffic_ops/client/fixtures/delivery_service.go
+++ b/traffic_ops/client/fixtures/delivery_service.go
@@ -171,8 +171,8 @@ func DeliveryServiceRouting() *client.DeliveryServiceRoutingResponse {
func DeliveryServiceServer() *client.DeliveryServiceServerResponse {
dss := client.DeliveryServiceServer{
LastUpdated: "lastUpdated",
- Server: "someServer",
- DeliveryService: "someService",
+ Server: 1,
+ DeliveryService: 1,
}
return &client.DeliveryServiceServerResponse{
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/66c649bb/traffic_ops/client/tests/delivery_service_test.go
----------------------------------------------------------------------
diff --git a/traffic_ops/client/tests/delivery_service_test.go b/traffic_ops/client/tests/delivery_service_test.go
index 47ff74b..66a5ee9 100644
--- a/traffic_ops/client/tests/delivery_service_test.go
+++ b/traffic_ops/client/tests/delivery_service_test.go
@@ -526,16 +526,16 @@ func TestDeliveryServiceServer(t *testing.T) {
testHelper.Success(t, "Should get back \"lastUpdated\" for \"LastUpdated\"")
}
- if s[0].Server != "someServer" {
- testHelper.Error(t, "Should get back \"someServer\" for \"Server\", got: %s", s[0].Server)
+ if s[0].Server != 1 {
+ testHelper.Error(t, "Should get back 1 for \"Server\", got: %s", s[0].Server)
} else {
- testHelper.Success(t, "Should get back \"someServer\" for \"Server\"")
+ testHelper.Success(t, "Should get back 1 for \"Server\"")
}
- if s[0].DeliveryService != "someService" {
- testHelper.Error(t, "Should get back \"someService\" for \"DeliveryService\", got: %s", s[0].DeliveryService)
+ if s[0].DeliveryService != 1 {
+ testHelper.Error(t, "Should get back 1 for \"DeliveryService\", got: %s", s[0].DeliveryService)
} else {
- testHelper.Success(t, "Should get back \"someService\" for \"DeliveryService\"")
+ testHelper.Success(t, "Should get back 1 for \"DeliveryService\"")
}
}