Exemplo n.º 1
0
 def test_return_empty_reports_on_operations_without_duplication(self):
     operations.validate_different_intervals(
         [
             {"name": "monitor", "interval": "10s"},
             {"name": "monitor", "interval": "5s"},
             {"name": "start", "interval": "5s"},
         ]
     )
Exemplo n.º 2
0
 def test_return_report_on_duplicated_intervals(self):
     assert_report_item_list_equal(
         operations.validate_different_intervals(
             [
                 {"name": "monitor", "interval": "3600s"},
                 {"name": "monitor", "interval": "60m"},
                 {"name": "monitor", "interval": "1h"},
                 {"name": "monitor", "interval": "60s"},
                 {"name": "monitor", "interval": "1m"},
                 {"name": "monitor", "interval": "5s"},
             ]
         ),
         [
             (
                 severities.ERROR,
                 report_codes.RESOURCE_OPERATION_INTERVAL_DUPLICATION,
                 {
                     "duplications": {
                         "monitor": [
                             ["3600s", "60m", "1h"],
                             ["60s", "1m"],
                         ],
                     },
                 },
             )
         ],
     )
Exemplo n.º 3
0
 def test_return_report_on_duplicated_intervals(self):
     assert_report_item_list_equal(
         operations.validate_different_intervals([
             {"name": "monitor", "interval": "3600s"},
             {"name": "monitor", "interval": "60m"},
             {"name": "monitor", "interval": "1h"},
             {"name": "monitor", "interval": "60s"},
             {"name": "monitor", "interval": "1m"},
             {"name": "monitor", "interval": "5s"},
         ]),
         [(
             severities.ERROR,
             report_codes.RESOURCE_OPERATION_INTERVAL_DUPLICATION,
             {
                 "duplications": {
                     "monitor": [
                         ["3600s", "60m", "1h"],
                         ["60s", "1m"],
                     ],
                 },
             },
         )]
     )
Exemplo n.º 4
0
 def test_return_empty_reports_on_empty_list(self):
     operations.validate_different_intervals([])
Exemplo n.º 5
0
 def test_return_empty_reports_on_operations_without_duplication(self):
     operations.validate_different_intervals([
         {"name": "monitor", "interval": "10s"},
         {"name": "monitor", "interval": "5s"},
         {"name": "start", "interval": "5s"},
     ])
Exemplo n.º 6
0
 def test_return_empty_reports_on_empty_list(self):
     operations.validate_different_intervals([])