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

Add TO Client api for Parameters Automation #5797

Merged
merged 28 commits into from
May 20, 2021
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
8ed490c
added test case for CacheGroup Pagination functionalites
dmohan001c Mar 18, 2021
4ee3688
Synced with master code
dmohan001c Apr 7, 2021
43bbb1c
Merge remote-tracking branch 'upstream/master'
dmohan001c Apr 8, 2021
05c458a
Merge remote-tracking branch 'upstream/master'
dmohan001c Apr 12, 2021
f7b7d94
Merge remote-tracking branch 'upstream/master'
dmohan001c Apr 14, 2021
acdac0d
Merge remote-tracking branch 'upstream/master'
dmohan001c Apr 22, 2021
cdf3351
Merge remote-tracking branch 'upstream/master'
dmohan001c Apr 23, 2021
6680165
Merge remote-tracking branch 'upstream/master'
dmohan001c Apr 23, 2021
526414d
Merge remote-tracking branch 'upstream/master'
dmohan001c Apr 24, 2021
60c3fef
Update cachegroups_test.go
dmohan001c Apr 25, 2021
97a5b27
added tests for parameter pagination functionality and swapped the ar…
dmohan001c Apr 29, 2021
9c2f104
updated the function call with correct parameters
dmohan001c Apr 29, 2021
5160032
added tests for getparameter
dmohan001c Apr 29, 2021
9fbe785
added tests for create parameter with invalid scenario
dmohan001c Apr 30, 2021
97ac317
Merge remote-tracking branch 'upstream/master' into parametersautomation
dmohan001c May 4, 2021
5ca8b36
added tests for update invalid
dmohan001c May 4, 2021
64c7ff5
added status code validation for delete parameter by invalid id
dmohan001c May 4, 2021
2ac5720
formatted the code using go fmt
dmohan001c May 4, 2021
7ee31bb
Fixed segfault error
dmohan001c May 5, 2021
25759d0
Added len checks for resp
dmohan001c May 5, 2021
ef00d3b
added validation for empty responses
dmohan001c May 6, 2021
357c9f5
added tests for physical location pagination
dmohan001c May 7, 2021
73fee89
Revert "added validation for empty responses"
dmohan001c May 7, 2021
52db03c
removed pagination tests for physical location
dmohan001c May 17, 2021
95c1037
Merge branch 'master' into parametersautomation
dmohan001c May 17, 2021
0fbe198
updated parameters test to support client consistency
dmohan001c May 17, 2021
3f5e6a1
added null checks and removed duplicate declaration
dmohan001c May 18, 2021
032e66d
added failure checks
dmohan001c May 20, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion infrastructure/cdn-in-a-box/enroller/enroller.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func newSession(reqTimeout time.Duration, toURL string, toUser string, toPass st
func (s session) getParameter(m tc.Parameter, header http.Header) (tc.Parameter, error) {
// TODO: s.GetParameterByxxx() does not seem to work with values with spaces --
// doing this the hard way for now
parameters, _, err := s.GetParameters(header, nil)
parameters, _, err := s.GetParameters(nil, header)
if err != nil {
return m, err
}
Expand Down
2 changes: 1 addition & 1 deletion traffic_ops/testing/api/v4/cachegroups_parameters_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func CreateTestCacheGroupParameters(t *testing.T) {
firstParameter := testData.Parameters[0]
params := url.Values{}
params.Set("name", firstParameter.Name)
paramResp, _, err := TOSession.GetParameters(nil, params)
paramResp, _, err := TOSession.GetParameters(params, nil)
if err != nil {
t.Errorf("cannot GET Parameter by name: %v - %v", firstParameter.Name, err)
}
Expand Down
2 changes: 1 addition & 1 deletion traffic_ops/testing/api/v4/crconfig_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ func UpdateTestCRConfigSnapshot(t *testing.T) {

params := url.Values{}
params.Set("name", tmURLParamName)
paramResp, _, err := TOSession.GetParameters(nil, params)
paramResp, _, err := TOSession.GetParameters(params, nil)
if err != nil {
t.Fatalf("cannot GET Parameter by name: %v - %v", tmURLParamName, err)
}
Expand Down
2 changes: 1 addition & 1 deletion traffic_ops/testing/api/v4/deliveryservices_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1044,7 +1044,7 @@ func DeleteTestDeliveryServices(t *testing.T) {
qParams := url.Values{}
qParams.Set("name", "location")
qParams.Set("configFile", "remap.config")
params, _, err := TOSession.GetParameters(nil, qParams)
params, _, err := TOSession.GetParameters(qParams, nil)
for _, param := range params {
deleted, _, err := TOSession.DeleteParameter(param.ID)
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions traffic_ops/testing/api/v4/divisions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -365,10 +365,10 @@ func GetTestPaginationSupportDivision(t *testing.T) {
func GetDivisionByInvalidId(t *testing.T) {
resp, _, err := TOSession.GetDivisionByID(10000, nil)
if err != nil {
t.Errorf("Error!! Getting Division by Invalid ID %v", err)
t.Errorf("Getting Division by Invalid ID %v", err)
}
if len(resp) >= 1 {
t.Errorf("Error!! Invalid ID shouldn't have any response %v Error %v", resp, err)
t.Errorf("Invalid ID shouldn't have any response %v Error %v", resp, err)
}
}

Expand Down
2 changes: 1 addition & 1 deletion traffic_ops/testing/api/v4/iso_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func TestGetOSVersions(t *testing.T) {
params.Set("name", p.Name)
params.Set("configFile", p.ConfigFile)
params.Set("value", p.Value)
resp, _, err := TOSession.GetParameters(nil, params)
resp, _, err := TOSession.GetParameters(params, nil)
if err != nil {
t.Fatalf("cannot GET Parameter by name: %v - %v\n", p.Name, err)
}
Expand Down