test/plugin/constants.rb in fluent-plugin-google-cloud-0.8.7 vs test/plugin/constants.rb in fluent-plugin-google-cloud-0.9.0

- old
+ new

@@ -431,10 +431,60 @@ CONFIG_UNKNOWN_MONITORING_TYPE = %( enable_monitoring true monitoring_type not_prometheus ).freeze + # rubocop:disable Metrics/LineLength + CONFIG_METRICS_RESOURCE_JSON = %( + enable_monitoring true + monitoring_type opencensus + metrics_resource {"type":"custom_resource","labels":{"label1":"123","label2":"abc"}} + ).freeze + + CONFIG_METRICS_RESOURCE_HASH = %( + enable_monitoring true + monitoring_type opencensus + metrics_resource type:custom_resource, labels.label1:123, labels.label2:abc + ).freeze + + CONFIG_METRICS_RESOURCE_JSON_HASH = %( + enable_monitoring true + monitoring_type opencensus + metrics_resource {"type":"custom_resource","labels.label1":"123","labels.label2":"abc"} + ).freeze + + CONFIG_METRICS_RESOURCE_JSON_NO_TYPE = %( + enable_monitoring true + monitoring_type opencensus + metrics_resource {"labels":{"label1":"123","label2":"abc"}} + ).freeze + + CONFIG_METRICS_RESOURCE_JSON_BAD_LABELS = %( + enable_monitoring true + monitoring_type opencensus + metrics_resource {"type":"custom_resource","labels":"123"} + ).freeze + + CONFIG_METRICS_RESOURCE_JSON_BAD_KEYS = %( + enable_monitoring true + monitoring_type opencensus + metrics_resource {"type":"custom_resource","labels":{"label1":"123"},"random":"x"} + ).freeze + + CONFIG_METRICS_RESOURCE_JSON_BAD_KEYS_LABELS = %( + enable_monitoring true + monitoring_type opencensus + metrics_resource {"type":"custom_resource","labels":{"label1":"123"},"labels.random":"x"} + ).freeze + + CONFIG_METRICS_RESOURCE_JSON_BAD_KEYS_NO_LABELS = %( + enable_monitoring true + monitoring_type opencensus + metrics_resource {"type":"custom_resource","labels.label1":"123","random":"x"} + ).freeze + # rubocop:enable Metrics/LineLength + # For statusz. CONFIG_STATUSZ = %( statusz_port 5678 adjust_invalid_timestamps false @@ -470,14 +520,22 @@ vm_name test.hostname.org zone asia-east2 ).freeze # For analyze_config. - CONFIG_ANALYZE_CONFIG = %( + CONFIG_ANALYZE_CONFIG_PROMETHEUS = %( google_fluentd_config_path \ test/plugin/data/google-fluentd-custom.conf google_fluentd_baseline_config_path \ test/plugin/data/google-fluentd-baseline.conf + monitoring_type prometheus + ).freeze + CONFIG_ANALYZE_CONFIG_OPENCENSUS = %( + google_fluentd_config_path \ + test/plugin/data/google-fluentd-custom.conf + google_fluentd_baseline_config_path \ + test/plugin/data/google-fluentd-baseline.conf + monitoring_type opencensus ).freeze # Service configurations for various services. # GCE.