Esempio n. 1
0
 def test_validate_deployment_samples(self):
     furano_url = environment.get_env_with_default_value(environment.VALIDATE_DEPLOYMENT_URL, 'https://app.kth.se/jsonschema/dizin/deployment')
     for sample in mock_data.get_deployment_samples():
         del sample["expected-enriched-values"]
         result = requests.post(furano_url, json=sample, allow_redirects=False)
         self.assertEqual(result.json(), {})
         self.assertEqual(result.status_code, 200)
Esempio n. 2
0
 def test_private_operations_documentation_url(self):
     for sample in mock_data.get_deployment_samples():
         sample = deployment_enricher.enrich(sample)
         url = deployment_util.get_private_operations_documentation_url(
             sample)
         if url and url != '':
             self.assertEqual(
                 mock_data.expected_value(
                     sample, 'privateOperationsDocumentationUrl'), url)
Esempio n. 3
0
 def test_get_about_url_from_samples(self):
     for sample in mock_data.get_deployment_samples():
         sample = deployment_enricher.enrich(sample)
         self.assertEqual(mock_data.expected_value(sample, 'aboutUrl'),
                          deployment_util.get_about_url(sample))
Esempio n. 4
0
 def test_get_importance_from_samples(self):
     for sample in mock_data.get_deployment_samples():
         sample = deployment_enricher.enrich(sample)
         self.assertEqual(mock_data.expected_value(sample, 'importance'),
                          deployment_util.get_importance(sample))
Esempio n. 5
0
 def test_get_friendly_name_from_samples(self):
     for sample in mock_data.get_deployment_samples():
         sample = deployment_enricher.enrich(sample)
         self.assertEqual(mock_data.expected_value(sample, 'friendlyName'),
                          deployment_util.get_friendly_name(sample))
Esempio n. 6
0
 def test_get_monitor_pattern(self):
     for sample in mock_data.get_deployment_samples():
         sample = deployment_enricher.enrich(sample)
         self.assertEqual(
             mock_data.expected_value(sample, 'monitorPattern'),
             deployment_util.get_monitor_pattern(sample))