mattjackson220 commented on a change in pull request #4356: Update generic API Create to allow arrays in POST if set on object URL: https://github.com/apache/trafficcontrol/pull/4356#discussion_r379601219
########## File path: traffic_ops/testing/api/v1/profile_parameters_test.go ########## @@ -60,6 +60,61 @@ func CreateTestProfileParameters(t *testing.T) { } +func CreateMultipleTestProfileParameters(t *testing.T) { + + firstProfile := testData.Profiles[0] + profileResp, _, err := TOSession.GetProfileByName(firstProfile.Name) + if err != nil { + t.Errorf("cannot GET Profile by name: %v - %v", firstProfile.Name, err) + } + + firstParameter := testData.Parameters[0] + paramResp, _, err := TOSession.GetParameterByName(firstParameter.Name) + if err != nil { + t.Errorf("cannot GET Parameter by name: %v - %v", firstParameter.Name, err) + } + + profileID := profileResp[0].ID + parameterID := paramResp[0].ID + + pp := tc.ProfileParameter{ + ProfileID: profileID, + ParameterID: parameterID, + } + + secondProfile := testData.Profiles[1] + secondProfileResp, _, err := TOSession.GetProfileByName(secondProfile.Name) + if err != nil { + t.Errorf("cannot GET Profile by name: %v - %v", secondProfile.Name, err) + } + + secondParameter := testData.Parameters[0] + secondParamResp, _, err := TOSession.GetParameterByName(secondParameter.Name) + if err != nil { + t.Errorf("cannot GET Parameter by name: %v - %v", firstParameter.Name, err) Review comment: done ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services