Cloudwatch: Add af-south-1 region (#26513)

* Adds af-south-1 region to cloudwatch datasource

* Fix test

Co-authored-by: Sofia Papagiannaki <papagian@gmail.com>
This commit is contained in:
Ruan Bekker 2020-07-23 13:02:25 +02:00 committed by GitHub
parent 2e931a0ee1
commit b972963934
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 4 deletions

View File

@ -23,7 +23,7 @@ import (
// Known AWS regions.
var knownRegions = []string{
"ap-east-1", "ap-northeast-1", "ap-northeast-2", "ap-northeast-3", "ap-south-1", "ap-southeast-1",
"af-south-1", "ap-east-1", "ap-northeast-1", "ap-northeast-2", "ap-northeast-3", "ap-south-1", "ap-southeast-1",
"ap-southeast-2", "ca-central-1", "cn-north-1", "cn-northwest-1", "eu-central-1", "eu-north-1", "eu-west-1",
"eu-west-2", "eu-west-3", "me-south-1", "sa-east-1", "us-east-1", "us-east-2", "us-gov-east-1", "us-gov-west-1",
"us-iso-east-1", "us-isob-east-1", "us-west-1", "us-west-2",

View File

@ -123,9 +123,10 @@ func TestCloudWatchMetrics(t *testing.T) {
result, err := executor.handleGetRegions(context.Background(), simplejson.New(), &tsdb.TsdbQuery{})
require.NoError(t, err)
assert.Equal(t, "ap-east-1", result[0].Text)
assert.Equal(t, "ap-northeast-1", result[1].Text)
assert.Equal(t, "ap-northeast-2", result[2].Text)
assert.Equal(t, "af-south-1", result[0].Text)
assert.Equal(t, "ap-east-1", result[1].Text)
assert.Equal(t, "ap-northeast-1", result[2].Text)
assert.Equal(t, "ap-northeast-2", result[3].Text)
})
t.Run("When calling handleGetEc2InstanceAttribute", func(t *testing.T) {

View File

@ -70,6 +70,7 @@ export class ConfigEditor extends PureComponent<Props, State> {
},
(err: any) => {
const regions = [
'af-south-1',
'ap-east-1',
'ap-northeast-1',
'ap-northeast-2',