Skip to content

Commit 8dd61ac

Browse files
author
Alan Christie
committed
feat: Add test environment
1 parent 184680c commit 8dd61ac

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

decoder/job-definition-schema.yaml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,14 @@ definitions:
275275
$ref: '#/definitions/test'
276276
minProperties: 1
277277

278-
# An individual Test
278+
# An individual Test.
279+
# The user defines inputs and options
280+
# along with environment variables (that have to exist)
281+
# and will be injected into the running Job. For each
282+
# environment variable defined jote will ensure that it exists.
283+
# The user can also define a series of 'checks'
284+
# that are used to check files expected to be created
285+
# by the job under test.
279286
test:
280287
type: object
281288
additionalProperties: false
@@ -293,6 +300,10 @@ definitions:
293300
$ref: '#/definitions/test-input'
294301
options:
295302
$ref: '#/definitions/test-option'
303+
environment:
304+
type: array
305+
items:
306+
$ref: '#/definitions/env-var-name'
296307
checks:
297308
type: object
298309
properties:

tests/test_validate_job_schema.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ def test_validate_two_basic_tests():
153153
"timeout-minutes": 30,
154154
"inputs": {"files": ["blob-1.txt", "blob-2.txt"]},
155155
"options": {"param-1": 32, "param-2": "a"},
156+
"environment": ['ENV_1', 'ENV_2'],
156157
"checks": {
157158
"exitCode": 0,
158159
"outputs": [

0 commit comments

Comments
 (0)