dmohan001c commented on a change in pull request #6003:
URL: https://github.com/apache/trafficcontrol/pull/6003#discussion_r711587016



##########
File path: traffic_ops/testing/api/v2/profiles_test.go
##########
@@ -210,12 +210,29 @@ func GetTestProfiles(t *testing.T) {
                        t.Errorf("cannot GET Profile by name: %v - %v", err, 
resp)
                }
                profileID := resp[0].ID
-
-               resp, _, err = TOSession.GetProfileByParameter(pr.Parameter)
-               if err != nil {
-                       t.Errorf("cannot GET Profile by param: %v - %v", err, 
resp)
+               if len(pr.Parameters) > 0 {
+                       parameter := pr.Parameters[0]
+                       respParameter, _, err := 
TOSession.GetParameterByName(*parameter.Name)
+                       if err != nil {
+                               t.Errorf("Cannot GET Parameter by name: %v - 
%v", err, resp)
+                       }
+                       if len(respParameter) > 0 {
+                               parameterID := respParameter[0].ID
+                               if parameterID > 0 {
+                                       resp, _, err = 
TOSession.GetProfileByParameterId(parameterID)
+                                       if err != nil {
+                                               t.Errorf("cannot GET Profile by 
param: %v - %v", err, resp)

Review comment:
       removed the response from print statement




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to