From e2c4f731887a74d48e522d9ec1c6f9eae1849d8c Mon Sep 17 00:00:00 2001 From: Daniel Bily Date: Mon, 2 Jan 2023 18:35:06 +0100 Subject: [PATCH] add resolution_risk to relevant structs in testdata --- testdata/testdata.go | 188 +++++++++++++++++++++++-------------------- 1 file changed, 99 insertions(+), 89 deletions(-) diff --git a/testdata/testdata.go b/testdata/testdata.go index 5e33d2d8b..f63987952 100644 --- a/testdata/testdata.go +++ b/testdata/testdata.go @@ -227,10 +227,11 @@ var ( Impact: RuleErrorKey1.Impact, Name: "test_impact", }, - Likelihood: RuleErrorKey1.Likelihood, - PublishDate: timeToStr(RuleErrorKey1.PublishDate), - Status: statusToStr(RuleErrorKey1.Active), - Tags: RuleErrorKey1.Tags, + Likelihood: RuleErrorKey1.Likelihood, + ResolutionRisk: RuleErrorKey1.ResolutionRisk, + PublishDate: timeToStr(RuleErrorKey1.PublishDate), + Status: statusToStr(RuleErrorKey1.Active), + Tags: RuleErrorKey1.Tags, }, }, }, @@ -261,10 +262,11 @@ var ( Impact: RuleErrorKey2.Impact, Name: "test_impact", }, - Likelihood: RuleErrorKey2.Likelihood, - PublishDate: timeToStr(RuleErrorKey2.PublishDate), - Status: statusToStr(RuleErrorKey2.Active), - Tags: RuleErrorKey2.Tags, + Likelihood: RuleErrorKey2.Likelihood, + ResolutionRisk: RuleErrorKey2.ResolutionRisk, + PublishDate: timeToStr(RuleErrorKey2.PublishDate), + Status: statusToStr(RuleErrorKey2.Active), + Tags: RuleErrorKey2.Tags, }, }, }, @@ -295,10 +297,11 @@ var ( Impact: RuleErrorKey3.Impact, Name: "test_impact", }, - Likelihood: RuleErrorKey3.Likelihood, - PublishDate: timeToStr(RuleErrorKey3.PublishDate), - Status: statusToStr(RuleErrorKey3.Active), - Tags: RuleErrorKey3.Tags, + Likelihood: RuleErrorKey3.Likelihood, + ResolutionRisk: RuleErrorKey3.ResolutionRisk, + PublishDate: timeToStr(RuleErrorKey3.PublishDate), + Status: statusToStr(RuleErrorKey3.Active), + Tags: RuleErrorKey3.Tags, }, }, }, @@ -329,10 +332,11 @@ var ( Impact: RuleErrorKey4.Impact, Name: "test_impact", }, - Likelihood: RuleErrorKey4.Likelihood, - PublishDate: "2019-10-29 15:00:00", - Status: statusToStr(RuleErrorKey4.Active), - Tags: RuleErrorKey4.Tags, + Likelihood: RuleErrorKey4.Likelihood, + ResolutionRisk: RuleErrorKey4.ResolutionRisk, + PublishDate: "2019-10-29 15:00:00", + Status: statusToStr(RuleErrorKey4.Active), + Tags: RuleErrorKey4.Tags, }, }, }, @@ -363,10 +367,11 @@ var ( Impact: RuleErrorKey5.Impact, Name: "test_impact", }, - Likelihood: RuleErrorKey5.Likelihood, - PublishDate: timeToStr(RuleErrorKey5.PublishDate), - Status: statusToStr(RuleErrorKey5.Active), - Tags: RuleErrorKey5.Tags, + Likelihood: RuleErrorKey5.Likelihood, + ResolutionRisk: RuleErrorKey5.ResolutionRisk, + PublishDate: timeToStr(RuleErrorKey5.PublishDate), + Status: statusToStr(RuleErrorKey5.Active), + Tags: RuleErrorKey5.Tags, }, }, }, @@ -405,83 +410,88 @@ var ( } RuleErrorKey1 = types.RuleErrorKey{ - ErrorKey: ErrorKey1, - RuleModule: Rule1ID, - Condition: "condition1", - Description: "description1", - Impact: 1, - Likelihood: 2, - PublishDate: LastCheckedAt, - Active: false, - Generic: "generic1", - Summary: "summary1", - Reason: "reason1", - Resolution: "resolution1", - MoreInfo: "moreinfo1", - Tags: []string{"openshift", "service_availability", "osd_customer"}, + ErrorKey: ErrorKey1, + RuleModule: Rule1ID, + Condition: "condition1", + Description: "description1", + Impact: 1, + Likelihood: 2, + ResolutionRisk: 3, + PublishDate: LastCheckedAt, + Active: false, + Generic: "generic1", + Summary: "summary1", + Reason: "reason1", + Resolution: "resolution1", + MoreInfo: "moreinfo1", + Tags: []string{"openshift", "service_availability", "osd_customer"}, } RuleErrorKey2 = types.RuleErrorKey{ - ErrorKey: ErrorKey2, - RuleModule: Rule2ID, - Condition: "condition2", - Description: "description2", - Impact: 2, - Likelihood: 3, - PublishDate: LastCheckedAt, - Active: true, - Generic: "generic2", - Summary: "summary2", - Reason: "reason2", - Resolution: "resolution2", - MoreInfo: "moreinfo2", + ErrorKey: ErrorKey2, + RuleModule: Rule2ID, + Condition: "condition2", + Description: "description2", + Impact: 2, + Likelihood: 3, + ResolutionRisk: 4, + PublishDate: LastCheckedAt, + Active: true, + Generic: "generic2", + Summary: "summary2", + Reason: "reason2", + Resolution: "resolution2", + MoreInfo: "moreinfo2", } RuleErrorKey3 = types.RuleErrorKey{ - ErrorKey: ErrorKey3, - RuleModule: Rule3ID, - Condition: "condition3", - Description: "description3", - Impact: 2, - Likelihood: 3, - PublishDate: LastCheckedAt, - Active: true, - Generic: "generic3", - Summary: "summary3", - Reason: "reason3", - Resolution: "resolution3", - MoreInfo: "moreinfo3", - Tags: []string{}, + ErrorKey: ErrorKey3, + RuleModule: Rule3ID, + Condition: "condition3", + Description: "description3", + Impact: 2, + Likelihood: 3, + ResolutionRisk: 1, + PublishDate: LastCheckedAt, + Active: true, + Generic: "generic3", + Summary: "summary3", + Reason: "reason3", + Resolution: "resolution3", + MoreInfo: "moreinfo3", + Tags: []string{}, } RuleErrorKey4 = types.RuleErrorKey{ - ErrorKey: ErrorKey4, - RuleModule: Rule4ID, - Condition: "condition1", - Description: "description1", - Impact: 1, - Likelihood: 2, - PublishDate: LastCheckedAt, - Active: false, - Generic: "generic4", - Summary: "summary4", - Reason: "reason4", - Resolution: "resolution4", - MoreInfo: "moreinfo4", - Tags: []string{"openshift", "service_availability"}, + ErrorKey: ErrorKey4, + RuleModule: Rule4ID, + Condition: "condition1", + Description: "description1", + Impact: 1, + Likelihood: 2, + ResolutionRisk: 3, + PublishDate: LastCheckedAt, + Active: false, + Generic: "generic4", + Summary: "summary4", + Reason: "reason4", + Resolution: "resolution4", + MoreInfo: "moreinfo4", + Tags: []string{"openshift", "service_availability"}, } RuleErrorKey5 = types.RuleErrorKey{ - ErrorKey: ErrorKey5, - RuleModule: Rule5ID, - Condition: "condition1", - Description: "description1", - Impact: 1, - Likelihood: 2, - PublishDate: LastCheckedAt, - Active: false, - Generic: "generic5", - Summary: "summary5", - Reason: "reason5", - Resolution: "resolution5", - MoreInfo: "moreinfo5", - Tags: []string{"openshift", "service_availability"}, + ErrorKey: ErrorKey5, + RuleModule: Rule5ID, + Condition: "condition1", + Description: "description1", + Impact: 1, + Likelihood: 2, + ResolutionRisk: 2, + PublishDate: LastCheckedAt, + Active: false, + Generic: "generic5", + Summary: "summary5", + Reason: "reason5", + Resolution: "resolution5", + MoreInfo: "moreinfo5", + Tags: []string{"openshift", "service_availability"}, } RuleWithContent1 = types.RuleWithContent{ Module: Rule1.Module,