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/95aa06c5 Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/95aa06c5 Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/95aa06c5 Branch: refs/heads/psql-rebase Commit: 95aa06c580bec38b06470bdd787b4369bff0b071 Parents: df8378b Author: David Neuman <david.neuma...@gmail.com> Authored: Thu Dec 1 09:06:38 2016 -0700 Committer: Dave Neuman <neu...@apache.org> Committed: Fri Dec 2 15:22:55 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/95aa06c5/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/95aa06c5/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/95aa06c5/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\"") } }