mitchell852 closed pull request #2117: removed status comments and fixed the
test cases
URL: https://github.com/apache/incubator-trafficcontrol/pull/2117
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/traffic_ops/testing/api/v13/statuses_test.go
b/traffic_ops/testing/api/v13/statuses_test.go
index d8d798a28..afe375ba6 100644
--- a/traffic_ops/testing/api/v13/statuses_test.go
+++ b/traffic_ops/testing/api/v13/statuses_test.go
@@ -25,9 +25,9 @@ import (
func TestStatuses(t *testing.T) {
CreateTestStatuses(t)
- //UpdateTestStatuses(t)
- //GetTestStatuses(t)
- //DeleteTestStatuses(t)
+ UpdateTestStatuses(t)
+ GetTestStatuses(t)
+ DeleteTestStatuses(t)
}
@@ -52,8 +52,8 @@ func UpdateTestStatuses(t *testing.T) {
t.Errorf("cannot GET Status by name: %v - %v\n",
firstStatus.Name, err)
}
remoteStatus := resp[0]
- expectedStatusName := "testStatus1"
- remoteStatus.Name = expectedStatusName
+ expectedStatusDesc := "new description"
+ remoteStatus.Description = expectedStatusDesc
var alert tc.Alerts
alert, _, err = TOSession.UpdateStatusByID(remoteStatus.ID,
remoteStatus)
if err != nil {
@@ -63,11 +63,11 @@ func UpdateTestStatuses(t *testing.T) {
// Retrieve the Status to check Status name got updated
resp, _, err = TOSession.GetStatusByID(remoteStatus.ID)
if err != nil {
- t.Errorf("cannot GET Status by name: %v - %v\n",
firstStatus.Name, err)
+ t.Errorf("cannot GET Status by ID: %v - %v\n",
firstStatus.Description, err)
}
respStatus := resp[0]
- if respStatus.Name != expectedStatusName {
- t.Errorf("results do not match actual: %s, expected: %s\n",
respStatus.Name, expectedStatusName)
+ if respStatus.Description != expectedStatusDesc {
+ t.Errorf("results do not match actual: %s, expected: %s\n",
respStatus.Name, expectedStatusDesc)
}
}
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services