CloudWatch: Log group variable should get all log groups (#54062)

This commit is contained in:
Isabella Siu
2022-08-23 11:43:30 -04:00
committed by GitHub
parent 1f17e9a044
commit 4f2b66ac1d
7 changed files with 149 additions and 17 deletions
+6 -2
View File
@@ -23,9 +23,11 @@ type fakeCWLogsClient struct {
calls logsQueryCalls
logGroups cloudwatchlogs.DescribeLogGroupsOutput
logGroups []cloudwatchlogs.DescribeLogGroupsOutput
logGroupFields cloudwatchlogs.GetLogGroupFieldsOutput
queryResults cloudwatchlogs.GetQueryResultsOutput
logGroupsIndex int
}
type logsQueryCalls struct {
@@ -52,7 +54,9 @@ func (m *fakeCWLogsClient) StopQueryWithContext(ctx context.Context, input *clou
}
func (m *fakeCWLogsClient) DescribeLogGroupsWithContext(ctx context.Context, input *cloudwatchlogs.DescribeLogGroupsInput, option ...request.Option) (*cloudwatchlogs.DescribeLogGroupsOutput, error) {
return &m.logGroups, nil
output := &m.logGroups[m.logGroupsIndex]
m.logGroupsIndex++
return output, nil
}
func (m *fakeCWLogsClient) GetLogGroupFieldsWithContext(ctx context.Context, input *cloudwatchlogs.GetLogGroupFieldsInput, option ...request.Option) (*cloudwatchlogs.GetLogGroupFieldsOutput, error) {