rimashah25 commented on code in PR #7099:
URL: https://github.com/apache/trafficcontrol/pull/7099#discussion_r1025532355
##########
traffic_ops/testing/api/utils/utils.go:
##########
@@ -86,29 +94,32 @@ func Compare(t *testing.T, expected []string, alertsStrs
[]string) {
}
// CreateV3Session creates a session for client v4 using the passed in
username and password.
-func CreateV3Session(t *testing.T, TrafficOpsURL string, username string,
password string, toReqTimeout int) *v3client.Session {
- userSession, _, err := v3client.LoginWithAgent(TrafficOpsURL, username,
password, true, "to-api-v3-client-tests", false,
time.Second*time.Duration(toReqTimeout))
+func CreateV3Session(t *testing.T, trafficOpsURL string, username string,
password string, toReqTimeout int) *v3client.Session {
+ t.Helper()
+ userSession, _, err := v3client.LoginWithAgent(trafficOpsURL, username,
password, true, "to-api-v3-client-tests", false,
time.Second*time.Duration(toReqTimeout))
assert.RequireNoError(t, err, "Could not login with user %v: %v",
username, err)
return userSession
}
// CreateV4Session creates a session for client v4 using the passed in
username and password.
-func CreateV4Session(t *testing.T, TrafficOpsURL string, username string,
password string, toReqTimeout int) *v4client.Session {
- userSession, _, err := v4client.LoginWithAgent(TrafficOpsURL, username,
password, true, "to-api-v4-client-tests", false,
time.Second*time.Duration(toReqTimeout))
+func CreateV4Session(t *testing.T, trafficOpsURL string, username string,
password string, toReqTimeout int) *v4client.Session {
+ t.Helper()
+ userSession, _, err := v4client.LoginWithAgent(trafficOpsURL, username,
password, true, "to-api-v4-client-tests", false,
time.Second*time.Duration(toReqTimeout))
assert.RequireNoError(t, err, "Could not login with user %v: %v",
username, err)
return userSession
}
// CreateV5Session creates a session for client v5 using the passed in
username and password.
-func CreateV5Session(t *testing.T, TrafficOpsURL, username, password string,
toReqTimeout int) *v5client.Session {
- userSession, _, err := v5client.LoginWithAgent(TrafficOpsURL, username,
password, true, "to-api-v5-client-tests", false,
time.Second*time.Duration(toReqTimeout))
+func CreateV5Session(t *testing.T, trafficOpsURL, username, password string,
toReqTimeout int) *v5client.Session {
+ t.Helper()
+ userSession, _, err := v5client.LoginWithAgent(trafficOpsURL, username,
password, true, "to-api-v5-client-tests", false,
time.Second*time.Duration(toReqTimeout))
assert.RequireNoError(t, err, "Could not login with user %v: %v",
username, err)
return userSession
}
// V3TestData represents the data needed for testing the v3 api endpoints.
type V3TestData struct {
- EndpointId func() int
+ EndpointID func() int
Review Comment:
I agree it creates a bigger diff and he had removed it. But since I had
already reviewed it multiple times and tested it, I asked him to add it to give
continuity to my review.
##########
traffic_ops/testing/api/utils/utils.go:
##########
@@ -119,7 +130,7 @@ type V3TestData struct {
// V3TestDataT represents the data needed for testing the v3 api endpoints.
type V3TestDataT[B any] struct {
- EndpointId func() int
+ EndpointID func() int
Review Comment:
I agree it creates a bigger diff and he had removed it. But since I had
already reviewed it multiple times and tested it, I asked him to add it to give
continuity to my review.
--
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]