mhoppa commented on a change in pull request #3744: Rewrote jobs endpoints to go
URL: https://github.com/apache/trafficcontrol/pull/3744#discussion_r329231593
 
 

 ##########
 File path: traffic_ops/testing/api/v14/jobs_test.go
 ##########
 @@ -103,3 +126,44 @@ func GetTestJobs(t *testing.T) {
                }
        }
 }
+
+func GetTestInvalidationJobs(t *testing.T) {
+       jobs, _, err := TOSession.GetInvalidationJobs(nil, nil)
+       if err != nil {
+               t.Fatalf("error getting invalidation jobs: %v\n", err)
+       }
+
+       toDSes, _, err := TOSession.GetDeliveryServices()
+       if err != nil {
+               t.Fatalf("cannot GET DeliveryServices: %v - %v\n", err, toDSes)
+       }
+
+       dsIDNames := map[uint]string{}
+       for _, ds := range toDSes {
+               if ds.ID <= 0 {
+                       t.Fatalf("Erroneous Delivery Service - has invalid ID: 
%+v\n", ds)
+               }
+               dsIDNames[uint(ds.ID)] = ds.XMLID
 
 Review comment:
   is this map used all at? 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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

Reply via email to