We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d15658c commit db6e98bCopy full SHA for db6e98b
tests/test_validate_job_schema.py
@@ -0,0 +1,29 @@
1
+# Tests for the schema validator.
2
+from typing import Any, Dict
3
+
4
+import pytest
5
+pytestmark = pytest.mark.unit
6
7
+from decoder import decoder
8
9
10
+def test_validate_minimal():
11
+ # Arrange
12
+ text: Dict[str, Any] = {
13
+ 'kind': 'DataManagerJobDefinition',
14
+ 'kind-version': '2021.1',
15
+ 'collection': 'test',
16
+ 'repository-url': 'https://example.com',
17
+ 'repository-tag': '1.0.0',
18
+ 'jobs': {'demo': {'version': '1.0.0',
19
+ 'name': 'test',
20
+ 'image': {'name': 'blob',
21
+ 'tag': '1.0.0',
22
+ 'project-directory': '/data'},
23
+ 'command': 'sys.exit(1)'}}}
24
25
+ # Act
26
+ error = decoder.validate_job_schema(text)
27
28
+ # Assert
29
+ assert error is None
0 commit comments