Skip to content

Commit

Permalink
fix(api): change alert_source Aws to AWS (#1376)
Browse files Browse the repository at this point in the history
  • Loading branch information
PengyuanZhao authored Sep 13, 2023
1 parent 29dc321 commit cb80cb1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion api/_examples/alert-rules/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion api/alert_rules.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"}
Expand Down
6 changes: 3 additions & 3 deletions api/alert_rules_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
},
)
Expand All @@ -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")
}
Expand Down Expand Up @@ -316,7 +316,7 @@ func singleMockAlertRule(id string) string {
"Anomaly"
],
"source": [
"Aws",
"AWS",
"Agent",
"K8s"
]
Expand Down

0 comments on commit cb80cb1

Please sign in to comment.