Skip to content

Conversation

@whummer
Copy link
Member

@whummer whummer commented Jan 25, 2026

Add proxy tests for the CloudWatch service (metrics + logs)

- Add test file with tests for CloudWatch Metrics and CloudWatch Logs
- Fix service name mapping (monitoring -> cloudwatch) in auth_proxy and forwarder
- Use botocore service model for protocol compatibility (LocalStack uses smithy-rpc-v2-cbor, boto3 uses query protocol)
- Implement resource name matching for CloudWatch and CloudWatch Logs

Tests added:
- test_cloudwatch_metric_operations: PutMetricData and ListMetrics
- test_cloudwatch_alarm_operations: PutMetricAlarm and DescribeAlarms
- test_cloudwatch_readonly_operations (xfail): read-only mode
- test_cloudwatch_resource_name_matching (xfail): resource pattern matching
- test_logs_group_operations: CreateLogGroup and DescribeLogGroups
- test_logs_stream_and_events: log streams and events
- test_logs_readonly_operations: read-only mode for logs
- test_logs_resource_name_matching: resource pattern matching for logs
- test_logs_filter_log_events: FilterLogEvents operation

whummer and others added 2 commits January 25, 2026 22:55
- Add test file with tests for CloudWatch Metrics and CloudWatch Logs
- Fix service name mapping (monitoring -> cloudwatch) in auth_proxy and forwarder
- Use botocore service model for protocol compatibility (LocalStack uses smithy-rpc-v2-cbor, boto3 uses query protocol)
- Implement resource name matching for CloudWatch and CloudWatch Logs

Tests added:
- test_cloudwatch_metric_operations: PutMetricData and ListMetrics
- test_cloudwatch_alarm_operations: PutMetricAlarm and DescribeAlarms
- test_cloudwatch_readonly_operations (xfail): read-only mode
- test_cloudwatch_resource_name_matching (xfail): resource pattern matching
- test_logs_group_operations: CreateLogGroup and DescribeLogGroups
- test_logs_stream_and_events: log streams and events
- test_logs_readonly_operations: read-only mode for logs
- test_logs_resource_name_matching: resource pattern matching for logs
- test_logs_filter_log_events: FilterLogEvents operation

Known limitations (2 xfail tests):
- CloudWatch read_only and resource_name_matching: form data stream consumed by LocalStack before proxy can access it (Query protocol issue)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@whummer whummer changed the title Add cloudwatch proxy tests Add CloudWatch proxy tests Jan 25, 2026
- Add DELETE endpoint to remove proxies from PROXY_INSTANCES
- Add deregister_from_instance() method in auth_proxy.py
- Update test fixture to deregister proxies during cleanup
- Remove xfail markers from CloudWatch tests that now pass
- Add _reconstruct_request_body for Query protocol services
- Add resource name matching for CloudWatch and CloudWatch Logs

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants