#2711 - Register default S3 metrics in CloudWatch
This commit is contained in:
parent
66b26cd7b0
commit
c3865532f9
6 changed files with 133 additions and 17 deletions
|
|
@ -154,7 +154,7 @@ def test_put_metric_data_no_dimensions():
|
|||
metrics.should.have.length_of(1)
|
||||
metric = metrics[0]
|
||||
metric["Namespace"].should.equal("tester")
|
||||
metric["MetricName"].should.equal("metric")
|
||||
metric["MetricName"].should.equal("Metric:metric")
|
||||
|
||||
|
||||
@mock_cloudwatch
|
||||
|
|
@ -182,7 +182,7 @@ def test_put_metric_data_with_statistics():
|
|||
metrics.should.have.length_of(1)
|
||||
metric = metrics[0]
|
||||
metric["Namespace"].should.equal("tester")
|
||||
metric["MetricName"].should.equal("statmetric")
|
||||
metric["MetricName"].should.equal("Metric:statmetric")
|
||||
# TODO: test statistics - https://github.com/spulec/moto/issues/1615
|
||||
|
||||
|
||||
|
|
@ -233,8 +233,16 @@ def test_list_metrics():
|
|||
# Verify format
|
||||
res.should.equal(
|
||||
[
|
||||
{u"Namespace": "list_test_1/", u"Dimensions": [], u"MetricName": "metric1"},
|
||||
{u"Namespace": "list_test_1/", u"Dimensions": [], u"MetricName": "metric1"},
|
||||
{
|
||||
u"Namespace": "list_test_1/",
|
||||
u"Dimensions": [],
|
||||
u"MetricName": "Metric:metric1",
|
||||
},
|
||||
{
|
||||
u"Namespace": "list_test_1/",
|
||||
u"Dimensions": [],
|
||||
u"MetricName": "Metric:metric1",
|
||||
},
|
||||
]
|
||||
)
|
||||
# Verify unknown namespace still has no results
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue