Skip to content

Commit da75a03

Browse files
committed
cloudwatch tests
1 parent 6e77af5 commit da75a03

File tree

4 files changed

+17
-19
lines changed

4 files changed

+17
-19
lines changed

pkg/acquisition/modules/cloudwatch/cloudwatch_test.go

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -422,25 +422,6 @@ group_name: test_group
422422
stream_name: test_stream`,
423423
expectedStartErr: "The specified log group does not exist",
424424
},
425-
{
426-
config: `
427-
xxx: cloudwatch
428-
labels:
429-
type: test_source
430-
group_name: test_group
431-
stream_name: test_stream`,
432-
expectedCfgErr: `[2:1] unknown field "xxx"`,
433-
},
434-
{
435-
name: "missing_group_name",
436-
config: `
437-
source: cloudwatch
438-
aws_region: us-east-1
439-
labels:
440-
type: test_source
441-
stream_name: test_stream`,
442-
expectedCfgErr: "group_name is mandatory for CloudwatchSource",
443-
},
444425
}
445426

446427
for _, tc := range tests {
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# wantErr: datasource of type cloudwatch: aws_region is not specified, specify it or aws_config_dir
2+
source: cloudwatch
3+
labels:
4+
type: sometype
5+
group_name: testgroup
6+
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# wantErr: datasource of type cloudwatch: cannot parse: [5:1] unknown field "xxx"
2+
source: cloudwatch
3+
labels:
4+
type: sometype
5+
xxx: dummy
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
source: cloudwatch
2+
labels:
3+
type: sometype
4+
group_name: testgroup
5+
aws_region: eu-west-1
6+

0 commit comments

Comments
 (0)