From 0c245b6b77dc5270d173ba7cfd468d66aaa3acfb Mon Sep 17 00:00:00 2001 From: Rima Shah Date: Thu, 18 Jan 2024 11:11:28 -0700 Subject: [PATCH 1/3] Fixed ProfileExportResponse struct to remove undocumented alerts field. --- lib/go-tc/profiles.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/go-tc/profiles.go b/lib/go-tc/profiles.go index fa449de5ad..8e31eed2d8 100644 --- a/lib/go-tc/profiles.go +++ b/lib/go-tc/profiles.go @@ -162,8 +162,6 @@ type ProfileExportResponse struct { // Parameters associated to the profile // Parameters []ProfileExportImportParameterNullable `json:"parameters"` - - Alerts } // ProfileImportRequest is an object of the form used by Traffic Ops From 0b1c1ba92e5687544d271a06d6dac5d019e8f2e4 Mon Sep 17 00:00:00 2001 From: Rima Shah Date: Thu, 18 Jan 2024 11:15:21 -0700 Subject: [PATCH 2/3] Updated changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3282d6f9a9..03a74d7c5b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). - Updated the CacheGroups Traffic Portal page to use a more performant AG-Grid-based table. ### Fixed +- [#7917](https://github.com/apache/trafficcontrol/issues/7917) *Traffic Ops* Removed `Alerts` field from struct `ProfileExportResponse`. - [#7918](https://github.com/apache/trafficcontrol/pull/7918) *Traffic Portal* Fixed topology link under DS-Servers tables page - [#7846](https://github.com/apache/trafficcontrol/pull/7846) *Traffic Portal* Increase State character limit From e2609bfb5dafa86806e6039d70b123b229b83d30 Mon Sep 17 00:00:00 2001 From: Rima Shah Date: Thu, 18 Jan 2024 12:32:43 -0700 Subject: [PATCH 3/3] Fixed tests --- CHANGELOG.md | 2 +- traffic_ops/testing/api/v3/profiles_export_test.go | 2 +- traffic_ops/testing/api/v4/profiles_export_test.go | 2 +- traffic_ops/testing/api/v5/profiles_export_test.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 03a74d7c5b..62895a318a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,7 +15,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). - Updated the CacheGroups Traffic Portal page to use a more performant AG-Grid-based table. ### Fixed -- [#7917](https://github.com/apache/trafficcontrol/issues/7917) *Traffic Ops* Removed `Alerts` field from struct `ProfileExportResponse`. +- [#7917](https://github.com/apache/trafficcontrol/pull/7917) *Traffic Ops* Removed `Alerts` field from struct `ProfileExportResponse`. - [#7918](https://github.com/apache/trafficcontrol/pull/7918) *Traffic Portal* Fixed topology link under DS-Servers tables page - [#7846](https://github.com/apache/trafficcontrol/pull/7846) *Traffic Portal* Increase State character limit diff --git a/traffic_ops/testing/api/v3/profiles_export_test.go b/traffic_ops/testing/api/v3/profiles_export_test.go index faeaa260f4..e5a70e2cb2 100644 --- a/traffic_ops/testing/api/v3/profiles_export_test.go +++ b/traffic_ops/testing/api/v3/profiles_export_test.go @@ -54,7 +54,7 @@ func TestProfilesExport(t *testing.T) { t.Run(name, func(t *testing.T) { resp, reqInf, err := testCase.ClientSession.ExportProfile(testCase.EndpointID()) for _, check := range testCase.Expectations { - check(t, reqInf, resp, resp.Alerts, err) + check(t, reqInf, resp, tc.Alerts{}, err) } }) } diff --git a/traffic_ops/testing/api/v4/profiles_export_test.go b/traffic_ops/testing/api/v4/profiles_export_test.go index 13451189ef..8fb6925d31 100644 --- a/traffic_ops/testing/api/v4/profiles_export_test.go +++ b/traffic_ops/testing/api/v4/profiles_export_test.go @@ -56,7 +56,7 @@ func TestProfilesExport(t *testing.T) { t.Run(name, func(t *testing.T) { resp, reqInf, err := testCase.ClientSession.ExportProfile(testCase.EndpointID(), testCase.RequestOpts) for _, check := range testCase.Expectations { - check(t, reqInf, resp, resp.Alerts, err) + check(t, reqInf, resp, tc.Alerts{}, err) } }) } diff --git a/traffic_ops/testing/api/v5/profiles_export_test.go b/traffic_ops/testing/api/v5/profiles_export_test.go index ab12b47046..73b24fbc3a 100644 --- a/traffic_ops/testing/api/v5/profiles_export_test.go +++ b/traffic_ops/testing/api/v5/profiles_export_test.go @@ -55,7 +55,7 @@ func TestProfilesExport(t *testing.T) { t.Run(name, func(t *testing.T) { resp, reqInf, err := testCase.ClientSession.ExportProfile(testCase.EndpointID(), testCase.RequestOpts) for _, check := range testCase.Expectations { - check(t, reqInf, resp, resp.Alerts, err) + check(t, reqInf, resp, tc.Alerts{}, err) } }) }