From cb80cb1507a4279074f99a3bc4f4a11573b3fc9c Mon Sep 17 00:00:00 2001 From: Pengyuan Zhao Date: Wed, 13 Sep 2023 09:01:34 -0400 Subject: [PATCH] fix(api): change alert_source Aws to AWS (#1376) --- api/_examples/alert-rules/main.go | 2 +- api/alert_rules.go | 2 +- api/alert_rules_test.go | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/api/_examples/alert-rules/main.go b/api/_examples/alert-rules/main.go index ca679ef21..c739962fc 100644 --- a/api/_examples/alert-rules/main.go +++ b/api/_examples/alert-rules/main.go @@ -40,7 +40,7 @@ func main() { ResourceGroups: []string{"TECHALLY_000000000000AAAAAAAAAAAAAAAAAAAA"}, EventCategories: []string{"Compliance"}, AlertCategories: []string{"Policy"}, - AlertSources: []string{"Aws"}, + AlertSources: []string{"AWS"}, } myAlertRule := api.NewAlertRule("MyTestAlertRule", diff --git a/api/alert_rules.go b/api/alert_rules.go index a048e5a47..a0a0f610c 100644 --- a/api/alert_rules.go +++ b/api/alert_rules.go @@ -32,7 +32,7 @@ type AlertRulesService struct { } // Valid inputs for AlertRule Source property -var AlertRuleSources = []string{"Agent", "Aws", "Azure", "Gcp", "K8s"} +var AlertRuleSources = []string{"Agent", "AWS", "Azure", "Gcp", "K8s"} // Valid inputs for AlertRule Categories property var AlertRuleCategories = []string{"Anomaly", "Policy", "Composite"} diff --git a/api/alert_rules_test.go b/api/alert_rules_test.go index daecfc94f..1eff0b609 100644 --- a/api/alert_rules_test.go +++ b/api/alert_rules_test.go @@ -227,7 +227,7 @@ func TestAlertRuleUpdate(t *testing.T) { Severities: api.AlertRuleSeverities{api.AlertRuleSeverityHigh}, ResourceGroups: []string{"TECHALLY_100000000000AAAAAAAAAAAAAAAAAAAB"}, EventCategories: []string{"Compliance", "SystemCall"}, - AlertSources: []string{"Aws", "Agent", "K8s"}, + AlertSources: []string{"AWS", "Agent", "K8s"}, AlertCategories: []string{"Policy", "Anomaly"}, }, ) @@ -242,7 +242,7 @@ func TestAlertRuleUpdate(t *testing.T) { assert.Equal(t, intgGUID, response.Data.Guid) assert.Contains(t, response.Data.Filter.EventCategories, "Compliance", "SystemCall") assert.Contains(t, response.Data.Filter.AlertCategories, "Policy", "Anomaly") - assert.Contains(t, response.Data.Filter.AlertSources, "Aws", "Agent", "K8s") + assert.Contains(t, response.Data.Filter.AlertSources, "AWS", "Agent", "K8s") assert.Contains(t, response.Data.Filter.ResourceGroups, "TECHALLY_100000000000AAAAAAAAAAAAAAAAAAAB") assert.Contains(t, response.Data.Channels, "TECHALLY_000000000000AAAAAAAAAAAAAAAAAAAA") } @@ -316,7 +316,7 @@ func singleMockAlertRule(id string) string { "Anomaly" ], "source": [ - "Aws", + "AWS", "Agent", "K8s" ]