Exemplo n.º 1
0
 def test_dvp_config_fail_no_maxDVPDurationHours(self):
     config = {
         "dvpConfig": {
             "baseRollup": "LONGROLLUP",
         }
     }
     builder = Builder(self.pipeline_, config, False)
     with self.assertRaises(ValidationError):
         builder._validate_dvp_config_json_schema()
Exemplo n.º 2
0
 def test_dvp_config_ok_SHORTROLLUP(self):
     config = {
         "dvpConfig": {
             "baseRollup": "SHORTROLLUP",
             "maxDVPDurationHours": 24,
             "gaugeValue": {"keepLastValue": True},
             "counterValue": {"value": 5}
         }
     }
     builder = Builder(self.pipeline_, config, False)
     self.assertIsNone(builder._validate_dvp_config_json_schema())
Exemplo n.º 3
0
 def test_dvp_config_fail_maxDVPDurationHours(self):
     config = {
         "dvpConfig": {
             "baseRollup": "LONGLONGROLLUP",
             "maxDVPDurationHours": 1000,
             "gaugeValue": {"keepLastValue": True},
             "counterValue": {"value": 5}
         }
     }
     builder = Builder(self.pipeline_, config, False)
     with self.assertRaises(ValidationError):
         builder._validate_dvp_config_json_schema()
Exemplo n.º 4
0
 def test_dvp_config_fail_gaugeValue_inner(self):
     config = {
         "dvpConfig": {
             "baseRollup": "LONGROLLUP",
             "maxDVPDurationHours": 24,
             "gaugeValue": {
                 "wrong_property": "test"
             }
         }
     }
     builder = Builder(self.pipeline_, config, False)
     with self.assertRaises(ValidationError):
         builder._validate_dvp_config_json_schema()