Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Generics in TO Integration Tests #7151

Closed
wants to merge 15 commits into from

Conversation

ericholguin
Copy link
Contributor

Updated the tests to use the new generics test struct


Which Traffic Control components are affected by this PR?

  • Traffic Ops Tests

What is the best way to verify this PR?

Run TO Integration tests

PR submission checklist

@zrhoffman zrhoffman added tech debt rework due to choosing easy/limited solution improvement The functionality exists but it could be improved in some way. Traffic Ops related to Traffic Ops tests related to tests and/or testing infrastructure labels Oct 21, 2022
Comment on lines -180 to -184
if val, ok := testCase.RequestOpts.QueryParameters["deliveryServiceId"]; ok {
if _, err := strconv.Atoi(val[0]); err != nil {
testCase.RequestOpts.QueryParameters.Set("deliveryServiceId", strconv.Itoa(GetDeliveryServiceId(t, val[0])()))
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why take this part out?

Comment on lines -220 to -225
if testCase.RequestOpts.QueryParameters.Has("type") {
val := testCase.RequestOpts.QueryParameters.Get("type")
if _, err := strconv.Atoi(val); err != nil {
testCase.RequestOpts.QueryParameters.Set("type", strconv.Itoa(GetTypeId(t, val)))
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also

@ericholguin ericholguin deleted the generics-plus-cleanup branch November 4, 2022 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement The functionality exists but it could be improved in some way. tech debt rework due to choosing easy/limited solution tests related to tests and/or testing infrastructure Traffic Ops related to Traffic Ops
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants