Skip to content

Instantly share code, notes, and snippets.

@garethr
Last active February 10, 2019 17:00
Show Gist options
  • Save garethr/0b30883e3da92ad19d89a5874e8b295a to your computer and use it in GitHub Desktop.
Save garethr/0b30883e3da92ad19d89a5874e8b295a to your computer and use it in GitHub Desktop.

A sample test run using the pycnab testing example against the current example bundles.

Summarising:

  • 49 failures and 12 passed
  • 17 of 20 bundle.json files are invalid according to pycnab
  • 12 of 20 bundle.json files are invalid according to the JSON Schema
  • 20 of 20 cnab directories are invalid

Some of these are false positives I'd wager, though most I think represent genuine failures based on changes in the spec.

Sending build context to Docker daemon 13.38MB
Step 1/3 : FROM kennethreitz/pipenv
# Executing 3 build triggers
---> Using cache
---> Using cache
---> Using cache
---> 7c4d92001455
Step 2/3 : COPY . /app
---> Using cache
---> 920bab0ec607
Step 3/3 : RUN pytest
---> Running in 489eb7a681f0
============================= test session starts ==============================
platform linux -- Python 3.7.1, pytest-4.2.0, py-1.7.0, pluggy-0.8.1 -- /usr/bin/python3.7
cachedir: .pytest_cache
rootdir: /app, inifile: pytest.ini
collecting ... collected 61 items
test_validate_cnab.py::test_valid_bundles[arm-aci/bundle.json] FAILED [ 1%]
test_validate_cnab.py::test_valid_bundles[helloworld/bundle.json] FAILED [ 3%]
test_validate_cnab.py::test_valid_bundles[hellohelm/bundle.json] FAILED [ 4%]
test_validate_cnab.py::test_valid_bundles[aks-terraform/bundle.json] PASSED [ 6%]
test_validate_cnab.py::test_valid_bundles[helloazure/bundle.json] PASSED [ 8%]
test_validate_cnab.py::test_valid_bundles[example-credentials/bundle.json] FAILED [ 9%]
test_validate_cnab.py::test_valid_bundles[vote/bundle.json] FAILED [ 11%]
test_validate_cnab.py::test_valid_bundles[terraform/bundle.json] PASSED [ 13%]
test_validate_cnab.py::test_valid_bundles[ansible-azurevm/bundle.json] FAILED [ 14%]
test_validate_cnab.py::test_valid_bundles[wordpress-mysql/bundle.json] FAILED [ 16%]
test_validate_cnab.py::test_valid_bundles[aks/bundle.json] FAILED [ 18%]
test_validate_cnab.py::test_valid_bundles[makebase/bundle.json] FAILED [ 19%]
test_validate_cnab.py::test_valid_bundles[ansiblebase/bundle.json] FAILED [ 21%]
test_validate_cnab.py::test_valid_bundles[example-voting-app-sqlserver/bundle.json] FAILED [ 22%]
test_validate_cnab.py::test_valid_bundles[k8sbase/bundle.json] FAILED [ 24%]
test_validate_cnab.py::test_valid_bundles[wordpress/bundle.json] FAILED [ 26%]
test_validate_cnab.py::test_valid_bundles[pulumibase/bundle.json] FAILED [ 27%]
test_validate_cnab.py::test_valid_bundles[armbase/bundle.json] FAILED [ 29%]
test_validate_cnab.py::test_valid_bundles[example-run/bundle.json] FAILED [ 31%]
test_validate_cnab.py::test_valid_bundles[compose/bundle.json] FAILED [ 32%]
test_validate_cnab.py::test_valid_jsonschema[schemas/latest.json-arm-aci/bundle.json] FAILED [ 34%]
test_validate_cnab.py::test_valid_jsonschema[schemas/latest.json-helloworld/bundle.json] FAILED [ 36%]
test_validate_cnab.py::test_valid_jsonschema[schemas/latest.json-hellohelm/bundle.json] FAILED [ 37%]
test_validate_cnab.py::test_valid_jsonschema[schemas/latest.json-aks-terraform/bundle.json] FAILED [ 39%]
test_validate_cnab.py::test_valid_jsonschema[schemas/latest.json-helloazure/bundle.json] PASSED [ 40%]
test_validate_cnab.py::test_valid_jsonschema[schemas/latest.json-example-credentials/bundle.json] PASSED [ 42%]
test_validate_cnab.py::test_valid_jsonschema[schemas/latest.json-vote/bundle.json] PASSED [ 44%]
test_validate_cnab.py::test_valid_jsonschema[schemas/latest.json-terraform/bundle.json] FAILED [ 45%]
test_validate_cnab.py::test_valid_jsonschema[schemas/latest.json-ansible-azurevm/bundle.json] FAILED [ 47%]
test_validate_cnab.py::test_valid_jsonschema[schemas/latest.json-wordpress-mysql/bundle.json] FAILED [ 49%]
test_validate_cnab.py::test_valid_jsonschema[schemas/latest.json-aks/bundle.json] FAILED [ 50%]
test_validate_cnab.py::test_valid_jsonschema[schemas/latest.json-makebase/bundle.json] PASSED [ 52%]
test_validate_cnab.py::test_valid_jsonschema[schemas/latest.json-ansiblebase/bundle.json] FAILED [ 54%]
test_validate_cnab.py::test_valid_jsonschema[schemas/latest.json-example-voting-app-sqlserver/bundle.json] PASSED [ 55%]
test_validate_cnab.py::test_valid_jsonschema[schemas/latest.json-k8sbase/bundle.json] PASSED [ 57%]
test_validate_cnab.py::test_valid_jsonschema[schemas/latest.json-wordpress/bundle.json] PASSED [ 59%]
test_validate_cnab.py::test_valid_jsonschema[schemas/latest.json-pulumibase/bundle.json] PASSED [ 60%]
test_validate_cnab.py::test_valid_jsonschema[schemas/latest.json-armbase/bundle.json] FAILED [ 62%]
test_validate_cnab.py::test_valid_jsonschema[schemas/latest.json-example-run/bundle.json] FAILED [ 63%]
test_validate_cnab.py::test_valid_jsonschema[schemas/latest.json-compose/bundle.json] PASSED [ 65%]
test_validate_cnab.py::test_valid_invocation_image[arm-aci/cnab] FAILED [ 67%]
test_validate_cnab.py::test_valid_invocation_image[helloworld/cnab] FAILED [ 68%]
test_validate_cnab.py::test_valid_invocation_image[hellohelm/cnab] FAILED [ 70%]
test_validate_cnab.py::test_valid_invocation_image[aks-terraform/cnab] FAILED [ 72%]
test_validate_cnab.py::test_valid_invocation_image[helloazure/cnab] FAILED [ 73%]
test_validate_cnab.py::test_valid_invocation_image[example-credentials/cnab] FAILED [ 75%]
test_validate_cnab.py::test_valid_invocation_image[vote/cnab] FAILED [ 77%]
test_validate_cnab.py::test_valid_invocation_image[terraform/cnab] FAILED [ 78%]
test_validate_cnab.py::test_valid_invocation_image[ansible-azurevm/cnab] FAILED [ 80%]
test_validate_cnab.py::test_valid_invocation_image[openfaas/cnab] FAILED [ 81%]
test_validate_cnab.py::test_valid_invocation_image[wordpress-mysql/cnab] FAILED [ 83%]
test_validate_cnab.py::test_valid_invocation_image[aks/cnab] FAILED [ 85%]
test_validate_cnab.py::test_valid_invocation_image[makebase/cnab] FAILED [ 86%]
test_validate_cnab.py::test_valid_invocation_image[ansiblebase/cnab] FAILED [ 88%]
test_validate_cnab.py::test_valid_invocation_image[example-voting-app-sqlserver/cnab] FAILED [ 90%]
test_validate_cnab.py::test_valid_invocation_image[k8sbase/cnab] FAILED [ 91%]
test_validate_cnab.py::test_valid_invocation_image[wordpress/cnab] FAILED [ 93%]
test_validate_cnab.py::test_valid_invocation_image[pulumibase/cnab] FAILED [ 95%]
test_validate_cnab.py::test_valid_invocation_image[armbase/cnab] FAILED [ 96%]
test_validate_cnab.py::test_valid_invocation_image[example-run/cnab] FAILED [ 98%]
test_validate_cnab.py::test_valid_invocation_image[compose/cnab] FAILED [100%]
=================================== FAILURES ===================================
___________________ test_valid_bundles[arm-aci/bundle.json] ____________________
path = 'arm-aci/bundle.json'
@pytest.mark.parametrize("path", glob.glob("**/bundle.json"))
def test_valid_bundles(path):
"Test that any bundle.json files present are valid according to pycnab"
with open(path) as data:
> Bundle.from_dict(json.load(data))
test_validate_cnab.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.7/dist-packages/cnab/types.py:364: in from_dict
[lambda x: from_dict(Image.from_dict, x), from_none], obj.get("images")
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
fs = [<function Bundle.from_dict.<locals>.<lambda> at 0x7f0f2b158f28>, <function from_none at 0x7f0f2b184158>]
x = [{'digest': 'sha256:a3b2eb140e6881ca2c4df4d9c97bedda7468a5c17240d7c5d30a32850a2bc573', 'image': 'microsoft/aci-helloworld', 'imageType': 'docker'}]
def from_union(fs, x):
for f in fs:
try:
return f(x)
except:
pass
> assert False
E AssertionError
/usr/local/lib/python3.7/dist-packages/cnab/types.py:26: AssertionError
__________________ test_valid_bundles[helloworld/bundle.json] __________________
path = 'helloworld/bundle.json'
@pytest.mark.parametrize("path", glob.glob("**/bundle.json"))
def test_valid_bundles(path):
"Test that any bundle.json files present are valid according to pycnab"
with open(path) as data:
> Bundle.from_dict(json.load(data))
test_validate_cnab.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.7/dist-packages/cnab/types.py:364: in from_dict
[lambda x: from_dict(Image.from_dict, x), from_none], obj.get("images")
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
fs = [<function Bundle.from_dict.<locals>.<lambda> at 0x7f0f2aaa3f28>, <function from_none at 0x7f0f2b184158>]
x = []
def from_union(fs, x):
for f in fs:
try:
return f(x)
except:
pass
> assert False
E AssertionError
/usr/local/lib/python3.7/dist-packages/cnab/types.py:26: AssertionError
__________________ test_valid_bundles[hellohelm/bundle.json] ___________________
path = 'hellohelm/bundle.json'
@pytest.mark.parametrize("path", glob.glob("**/bundle.json"))
def test_valid_bundles(path):
"Test that any bundle.json files present are valid according to pycnab"
with open(path) as data:
> Bundle.from_dict(json.load(data))
test_validate_cnab.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.7/dist-packages/cnab/types.py:364: in from_dict
[lambda x: from_dict(Image.from_dict, x), from_none], obj.get("images")
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
fs = [<function Bundle.from_dict.<locals>.<lambda> at 0x7f0f2aa430d0>, <function from_none at 0x7f0f2b184158>]
x = [{'description': 'alpine', 'image': 'technosophos/demo2alpine:0.1.0', 'imageType': 'docker', 'refs': [{'field': 'image.repository', 'path': 'cnab/app/charts/alpine/values.yaml'}]}]
def from_union(fs, x):
for f in fs:
try:
return f(x)
except:
pass
> assert False
E AssertionError
/usr/local/lib/python3.7/dist-packages/cnab/types.py:26: AssertionError
_____________ test_valid_bundles[example-credentials/bundle.json] ______________
path = 'example-credentials/bundle.json'
@pytest.mark.parametrize("path", glob.glob("**/bundle.json"))
def test_valid_bundles(path):
"Test that any bundle.json files present are valid according to pycnab"
with open(path) as data:
> Bundle.from_dict(json.load(data))
test_validate_cnab.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.7/dist-packages/cnab/types.py:364: in from_dict
[lambda x: from_dict(Image.from_dict, x), from_none], obj.get("images")
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
fs = [<function Bundle.from_dict.<locals>.<lambda> at 0x7f0f2aaa3f28>, <function from_none at 0x7f0f2b184158>]
x = []
def from_union(fs, x):
for f in fs:
try:
return f(x)
except:
pass
> assert False
E AssertionError
/usr/local/lib/python3.7/dist-packages/cnab/types.py:26: AssertionError
_____________________ test_valid_bundles[vote/bundle.json] _____________________
path = 'vote/bundle.json'
@pytest.mark.parametrize("path", glob.glob("**/bundle.json"))
def test_valid_bundles(path):
"Test that any bundle.json files present are valid according to pycnab"
with open(path) as data:
> Bundle.from_dict(json.load(data))
test_validate_cnab.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.7/dist-packages/cnab/types.py:364: in from_dict
[lambda x: from_dict(Image.from_dict, x), from_none], obj.get("images")
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
fs = [<function Bundle.from_dict.<locals>.<lambda> at 0x7f0f2aa432f0>, <function from_none at 0x7f0f2b184158>]
x = []
def from_union(fs, x):
for f in fs:
try:
return f(x)
except:
pass
> assert False
E AssertionError
/usr/local/lib/python3.7/dist-packages/cnab/types.py:26: AssertionError
_______________ test_valid_bundles[ansible-azurevm/bundle.json] ________________
path = 'ansible-azurevm/bundle.json'
@pytest.mark.parametrize("path", glob.glob("**/bundle.json"))
def test_valid_bundles(path):
"Test that any bundle.json files present are valid according to pycnab"
with open(path) as data:
> Bundle.from_dict(json.load(data))
test_validate_cnab.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.7/dist-packages/cnab/types.py:364: in from_dict
[lambda x: from_dict(Image.from_dict, x), from_none], obj.get("images")
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
fs = [<function Bundle.from_dict.<locals>.<lambda> at 0x7f0f2b42fb70>, <function from_none at 0x7f0f2b184158>]
x = []
def from_union(fs, x):
for f in fs:
try:
return f(x)
except:
pass
> assert False
E AssertionError
/usr/local/lib/python3.7/dist-packages/cnab/types.py:26: AssertionError
_______________ test_valid_bundles[wordpress-mysql/bundle.json] ________________
path = 'wordpress-mysql/bundle.json'
@pytest.mark.parametrize("path", glob.glob("**/bundle.json"))
def test_valid_bundles(path):
"Test that any bundle.json files present are valid according to pycnab"
with open(path) as data:
> Bundle.from_dict(json.load(data))
test_validate_cnab.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.7/dist-packages/cnab/types.py:364: in from_dict
[lambda x: from_dict(Image.from_dict, x), from_none], obj.get("images")
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
fs = [<function Bundle.from_dict.<locals>.<lambda> at 0x7f0f2b42fc80>, <function from_none at 0x7f0f2b184158>]
x = []
def from_union(fs, x):
for f in fs:
try:
return f(x)
except:
pass
> assert False
E AssertionError
/usr/local/lib/python3.7/dist-packages/cnab/types.py:26: AssertionError
_____________________ test_valid_bundles[aks/bundle.json] ______________________
path = 'aks/bundle.json'
@pytest.mark.parametrize("path", glob.glob("**/bundle.json"))
def test_valid_bundles(path):
"Test that any bundle.json files present are valid according to pycnab"
with open(path) as data:
> Bundle.from_dict(json.load(data))
test_validate_cnab.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.7/dist-packages/cnab/types.py:364: in from_dict
[lambda x: from_dict(Image.from_dict, x), from_none], obj.get("images")
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
fs = [<function Bundle.from_dict.<locals>.<lambda> at 0x7f0f2aa43378>, <function from_none at 0x7f0f2b184158>]
x = []
def from_union(fs, x):
for f in fs:
try:
return f(x)
except:
pass
> assert False
E AssertionError
/usr/local/lib/python3.7/dist-packages/cnab/types.py:26: AssertionError
___________________ test_valid_bundles[makebase/bundle.json] ___________________
path = 'makebase/bundle.json'
@pytest.mark.parametrize("path", glob.glob("**/bundle.json"))
def test_valid_bundles(path):
"Test that any bundle.json files present are valid according to pycnab"
with open(path) as data:
> Bundle.from_dict(json.load(data))
test_validate_cnab.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.7/dist-packages/cnab/types.py:364: in from_dict
[lambda x: from_dict(Image.from_dict, x), from_none], obj.get("images")
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
fs = [<function Bundle.from_dict.<locals>.<lambda> at 0x7f0f2aa43158>, <function from_none at 0x7f0f2b184158>]
x = []
def from_union(fs, x):
for f in fs:
try:
return f(x)
except:
pass
> assert False
E AssertionError
/usr/local/lib/python3.7/dist-packages/cnab/types.py:26: AssertionError
_________________ test_valid_bundles[ansiblebase/bundle.json] __________________
path = 'ansiblebase/bundle.json'
@pytest.mark.parametrize("path", glob.glob("**/bundle.json"))
def test_valid_bundles(path):
"Test that any bundle.json files present are valid according to pycnab"
with open(path) as data:
> Bundle.from_dict(json.load(data))
test_validate_cnab.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.7/dist-packages/cnab/types.py:364: in from_dict
[lambda x: from_dict(Image.from_dict, x), from_none], obj.get("images")
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
fs = [<function Bundle.from_dict.<locals>.<lambda> at 0x7f0f2aa43c80>, <function from_none at 0x7f0f2b184158>]
x = []
def from_union(fs, x):
for f in fs:
try:
return f(x)
except:
pass
> assert False
E AssertionError
/usr/local/lib/python3.7/dist-packages/cnab/types.py:26: AssertionError
_________ test_valid_bundles[example-voting-app-sqlserver/bundle.json] _________
path = 'example-voting-app-sqlserver/bundle.json'
@pytest.mark.parametrize("path", glob.glob("**/bundle.json"))
def test_valid_bundles(path):
"Test that any bundle.json files present are valid according to pycnab"
with open(path) as data:
> Bundle.from_dict(json.load(data))
test_validate_cnab.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.7/dist-packages/cnab/types.py:364: in from_dict
[lambda x: from_dict(Image.from_dict, x), from_none], obj.get("images")
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
fs = [<function Bundle.from_dict.<locals>.<lambda> at 0x7f0f2aa43268>, <function from_none at 0x7f0f2b184158>]
x = [{'image': 'redis:alpine', 'imageType': 'docker', 'name': 'Cache', 'ref': {'field': 'services.redis.image', 'path': '....imageType': 'docker', 'name': 'Database', 'ref': {'field': 'services.db.image', 'path': './docker-compose.yaml'}, ...}]
def from_union(fs, x):
for f in fs:
try:
return f(x)
except:
pass
> assert False
E AssertionError
/usr/local/lib/python3.7/dist-packages/cnab/types.py:26: AssertionError
___________________ test_valid_bundles[k8sbase/bundle.json] ____________________
path = 'k8sbase/bundle.json'
@pytest.mark.parametrize("path", glob.glob("**/bundle.json"))
def test_valid_bundles(path):
"Test that any bundle.json files present are valid according to pycnab"
with open(path) as data:
> Bundle.from_dict(json.load(data))
test_validate_cnab.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.7/dist-packages/cnab/types.py:364: in from_dict
[lambda x: from_dict(Image.from_dict, x), from_none], obj.get("images")
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
fs = [<function Bundle.from_dict.<locals>.<lambda> at 0x7f0f2aaf0730>, <function from_none at 0x7f0f2b184158>]
x = []
def from_union(fs, x):
for f in fs:
try:
return f(x)
except:
pass
> assert False
E AssertionError
/usr/local/lib/python3.7/dist-packages/cnab/types.py:26: AssertionError
__________________ test_valid_bundles[wordpress/bundle.json] ___________________
path = 'wordpress/bundle.json'
@pytest.mark.parametrize("path", glob.glob("**/bundle.json"))
def test_valid_bundles(path):
"Test that any bundle.json files present are valid according to pycnab"
with open(path) as data:
> Bundle.from_dict(json.load(data))
test_validate_cnab.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.7/dist-packages/cnab/types.py:364: in from_dict
[lambda x: from_dict(Image.from_dict, x), from_none], obj.get("images")
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
fs = [<function Bundle.from_dict.<locals>.<lambda> at 0x7f0f2aa43f28>, <function from_none at 0x7f0f2b184158>]
x = []
def from_union(fs, x):
for f in fs:
try:
return f(x)
except:
pass
> assert False
E AssertionError
/usr/local/lib/python3.7/dist-packages/cnab/types.py:26: AssertionError
__________________ test_valid_bundles[pulumibase/bundle.json] __________________
path = 'pulumibase/bundle.json'
@pytest.mark.parametrize("path", glob.glob("**/bundle.json"))
def test_valid_bundles(path):
"Test that any bundle.json files present are valid according to pycnab"
with open(path) as data:
> Bundle.from_dict(json.load(data))
test_validate_cnab.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.7/dist-packages/cnab/types.py:364: in from_dict
[lambda x: from_dict(Image.from_dict, x), from_none], obj.get("images")
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
fs = [<function Bundle.from_dict.<locals>.<lambda> at 0x7f0f2aa43c80>, <function from_none at 0x7f0f2b184158>]
x = [{'description': 'image called from within Pulumi script', 'image': 'nginx:latest', 'imageType': 'docker'}]
def from_union(fs, x):
for f in fs:
try:
return f(x)
except:
pass
> assert False
E AssertionError
/usr/local/lib/python3.7/dist-packages/cnab/types.py:26: AssertionError
___________________ test_valid_bundles[armbase/bundle.json] ____________________
path = 'armbase/bundle.json'
@pytest.mark.parametrize("path", glob.glob("**/bundle.json"))
def test_valid_bundles(path):
"Test that any bundle.json files present are valid according to pycnab"
with open(path) as data:
> Bundle.from_dict(json.load(data))
test_validate_cnab.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.7/dist-packages/cnab/types.py:364: in from_dict
[lambda x: from_dict(Image.from_dict, x), from_none], obj.get("images")
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
fs = [<function Bundle.from_dict.<locals>.<lambda> at 0x7f0f2aa430d0>, <function from_none at 0x7f0f2b184158>]
x = []
def from_union(fs, x):
for f in fs:
try:
return f(x)
except:
pass
> assert False
E AssertionError
/usr/local/lib/python3.7/dist-packages/cnab/types.py:26: AssertionError
_________________ test_valid_bundles[example-run/bundle.json] __________________
path = 'example-run/bundle.json'
@pytest.mark.parametrize("path", glob.glob("**/bundle.json"))
def test_valid_bundles(path):
"Test that any bundle.json files present are valid according to pycnab"
with open(path) as data:
> Bundle.from_dict(json.load(data))
test_validate_cnab.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.7/dist-packages/cnab/types.py:364: in from_dict
[lambda x: from_dict(Image.from_dict, x), from_none], obj.get("images")
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
fs = [<function Bundle.from_dict.<locals>.<lambda> at 0x7f0f2aa43510>, <function from_none at 0x7f0f2b184158>]
x = []
def from_union(fs, x):
for f in fs:
try:
return f(x)
except:
pass
> assert False
E AssertionError
/usr/local/lib/python3.7/dist-packages/cnab/types.py:26: AssertionError
___________________ test_valid_bundles[compose/bundle.json] ____________________
path = 'compose/bundle.json'
@pytest.mark.parametrize("path", glob.glob("**/bundle.json"))
def test_valid_bundles(path):
"Test that any bundle.json files present are valid according to pycnab"
with open(path) as data:
> Bundle.from_dict(json.load(data))
test_validate_cnab.py:44:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.7/dist-packages/cnab/types.py:364: in from_dict
[lambda x: from_dict(Image.from_dict, x), from_none], obj.get("images")
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
fs = [<function Bundle.from_dict.<locals>.<lambda> at 0x7f0f2aa43598>, <function from_none at 0x7f0f2b184158>]
x = [{'digest': 'sha256:7121cdf8e9f01816653a3b2d2f4fc7bfe1dab956f00db5c7e7689e5f1454029a', 'image': 'wordpress:4.9.8-apach...sha256:1d8f471c7e2929ee1e2bfbc1d16fc8afccd2e070afed24805487e726ce601a6d', 'image': 'mysql:5.7', 'imageType': 'docker'}]
def from_union(fs, x):
for f in fs:
try:
return f(x)
except:
pass
> assert False
E AssertionError
/usr/local/lib/python3.7/dist-packages/cnab/types.py:26: AssertionError
________ test_valid_jsonschema[schemas/latest.json-arm-aci/bundle.json] ________
schema = {'$id': 'http://cnab.io/v1/bundle.schema.json', '$schema': 'http://json-schema.org/draft-07/schema#', 'additionalPrope...ed for non-string parameters)', 'type': 'integer'}, ...}, 'required': ['type', 'destination'], 'type': 'object'}}, ...}
path = 'arm-aci/bundle.json'
@pytest.mark.parametrize("path", glob.glob("**/bundle.json"))
def test_valid_jsonschema(schema, path):
"Test that any bundle.json files present are valid according to the JSON Schema"
with open(path) as data:
> validate(json.load(data), schema)
test_validate_cnab.py:51:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.7/dist-packages/jsonschema/validators.py:541: in validate
cls(schema, *args, **kwargs).validate(instance)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <jsonschema.validators.create.<locals>.Validator object at 0x7f0f2aaeecf8>
args = ({'credentials': {'client_id': {'env': 'AZURE_CLIENT_ID'}, 'client_secret': {'env': 'AZURE_CLIENT_SECRET'}, 'subscript...': 'docker'}], 'invocationImages': [{'image': 'cnab/arm-aci:latest', 'imageType': 'docker'}], 'name': 'arm-aci', ...},)
kwargs = {}, error = <ValidationError: "'destination' is a required property">
def validate(self, *args, **kwargs):
for error in self.iter_errors(*args, **kwargs):
> raise error
E jsonschema.exceptions.ValidationError: 'destination' is a required property
E
E Failed validating 'required' in schema['properties']['parameters']['additionalProperties']:
E {'description': 'A paramter that can be passed into the invocation '
E 'image',
E 'properties': {'allowedValues': {'description': 'An optional '
E 'exhaustive list of '
E 'allowed values',
E 'type': 'array'},
E 'defaultValue': {'anyOf': [{'type': 'string'},
E {'type': 'integer'},
E {'type': 'boolean'},
E {'type': 'null'}],
E 'description': 'The default value of '
E 'this parameter'},
E 'destination': {'properties': {'description': {'description': 'A '
E 'user-friendly '
E 'description '
E 'of '
E 'this '
E 'parameter',
E 'type': 'string'},
E 'env': {'description': 'The '
E 'environment '
E 'variable '
E 'name, '
E 'such '
E 'as '
E 'MY_VALUE, '
E 'in '
E 'which '
E 'the '
E 'parameter '
E 'value '
E 'is '
E 'stored',
E 'type': 'string'},
E 'path': {'description': 'The '
E 'path '
E 'inside '
E 'of '
E 'the '
E 'invocation '
E 'image '
E 'where '
E 'parameter '
E 'data '
E 'is '
E 'mounted',
E 'type': 'string'}},
E 'type': 'object'},
E 'maxLength': {'description': 'Maximum string length '
E '(ignored for non-string '
E 'parameters)',
E 'type': 'integer'},
E 'maxValue': {'description': 'Maximum integer value '
E '(ignored for non-integer '
E 'parameters)',
E 'type': 'integer'},
E 'metadata': {'description': 'Extra data about the '
E 'parameter',
E 'properties': {'description': {'description': 'Description '
E 'of '
E 'this '
E 'parameter',
E 'type': 'string'}},
E 'type': 'object'},
E 'minLength': {'description': 'Minimum string length '
E '(ignored for non-string '
E 'parameters)',
E 'type': 'integer'},
E 'minValue': {'description': 'Minimum integer value '
E '(ignored for non-integer '
E 'parameters)',
E 'type': 'integer'},
E 'required': {'description': 'If true, this parameter '
E 'must be supplied',
E 'type': 'boolean'},
E 'type': {'description': 'The data type of the '
E 'parameter',
E 'pattern': '^(string|int|boolean)$',
E 'type': 'string'}},
E 'required': ['type', 'destination'],
E 'type': 'object'}
E
E On instance['parameters']['azure_location']:
E {'defaultValue': 'useast', 'type': 'string'}
/usr/local/lib/python3.7/dist-packages/jsonschema/validators.py:130: ValidationError
______ test_valid_jsonschema[schemas/latest.json-helloworld/bundle.json] _______
schema = {'$id': 'http://cnab.io/v1/bundle.schema.json', '$schema': 'http://json-schema.org/draft-07/schema#', 'additionalPrope...ed for non-string parameters)', 'type': 'integer'}, ...}, 'required': ['type', 'destination'], 'type': 'object'}}, ...}
path = 'helloworld/bundle.json'
@pytest.mark.parametrize("path", glob.glob("**/bundle.json"))
def test_valid_jsonschema(schema, path):
"Test that any bundle.json files present are valid according to the JSON Schema"
with open(path) as data:
> validate(json.load(data), schema)
test_validate_cnab.py:51:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.7/dist-packages/jsonschema/validators.py:541: in validate
cls(schema, *args, **kwargs).validate(instance)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <jsonschema.validators.create.<locals>.Validator object at 0x7f0f2aa0fe80>
args = ({'images': [], 'invocationImages': [{'image': 'cnab/helloworld:latest', 'imageType': 'docker'}], 'name': 'helloworld', 'parameters': {'port': {'defaultValue': 8080, 'type': 'int'}}, ...},)
kwargs = {}, error = <ValidationError: "'destination' is a required property">
def validate(self, *args, **kwargs):
for error in self.iter_errors(*args, **kwargs):
> raise error
E jsonschema.exceptions.ValidationError: 'destination' is a required property
E
E Failed validating 'required' in schema['properties']['parameters']['additionalProperties']:
E {'description': 'A paramter that can be passed into the invocation '
E 'image',
E 'properties': {'allowedValues': {'description': 'An optional '
E 'exhaustive list of '
E 'allowed values',
E 'type': 'array'},
E 'defaultValue': {'anyOf': [{'type': 'string'},
E {'type': 'integer'},
E {'type': 'boolean'},
E {'type': 'null'}],
E 'description': 'The default value of '
E 'this parameter'},
E 'destination': {'properties': {'description': {'description': 'A '
E 'user-friendly '
E 'description '
E 'of '
E 'this '
E 'parameter',
E 'type': 'string'},
E 'env': {'description': 'The '
E 'environment '
E 'variable '
E 'name, '
E 'such '
E 'as '
E 'MY_VALUE, '
E 'in '
E 'which '
E 'the '
E 'parameter '
E 'value '
E 'is '
E 'stored',
E 'type': 'string'},
E 'path': {'description': 'The '
E 'path '
E 'inside '
E 'of '
E 'the '
E 'invocation '
E 'image '
E 'where '
E 'parameter '
E 'data '
E 'is '
E 'mounted',
E 'type': 'string'}},
E 'type': 'object'},
E 'maxLength': {'description': 'Maximum string length '
E '(ignored for non-string '
E 'parameters)',
E 'type': 'integer'},
E 'maxValue': {'description': 'Maximum integer value '
E '(ignored for non-integer '
E 'parameters)',
E 'type': 'integer'},
E 'metadata': {'description': 'Extra data about the '
E 'parameter',
E 'properties': {'description': {'description': 'Description '
E 'of '
E 'this '
E 'parameter',
E 'type': 'string'}},
E 'type': 'object'},
E 'minLength': {'description': 'Minimum string length '
E '(ignored for non-string '
E 'parameters)',
E 'type': 'integer'},
E 'minValue': {'description': 'Minimum integer value '
E '(ignored for non-integer '
E 'parameters)',
E 'type': 'integer'},
E 'required': {'description': 'If true, this parameter '
E 'must be supplied',
E 'type': 'boolean'},
E 'type': {'description': 'The data type of the '
E 'parameter',
E 'pattern': '^(string|int|boolean)$',
E 'type': 'string'}},
E 'required': ['type', 'destination'],
E 'type': 'object'}
E
E On instance['parameters']['port']:
E {'defaultValue': 8080, 'type': 'int'}
/usr/local/lib/python3.7/dist-packages/jsonschema/validators.py:130: ValidationError
_______ test_valid_jsonschema[schemas/latest.json-hellohelm/bundle.json] _______
schema = {'$id': 'http://cnab.io/v1/bundle.schema.json', '$schema': 'http://json-schema.org/draft-07/schema#', 'additionalPrope...ed for non-string parameters)', 'type': 'integer'}, ...}, 'required': ['type', 'destination'], 'type': 'object'}}, ...}
path = 'hellohelm/bundle.json'
@pytest.mark.parametrize("path", glob.glob("**/bundle.json"))
def test_valid_jsonschema(schema, path):
"Test that any bundle.json files present are valid according to the JSON Schema"
with open(path) as data:
> validate(json.load(data), schema)
test_validate_cnab.py:51:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.7/dist-packages/jsonschema/validators.py:541: in validate
cls(schema, *args, **kwargs).validate(instance)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <jsonschema.validators.create.<locals>.Validator object at 0x7f0f2aa1bba8>
args = ({'credentials': {'kubeconfig': {'path': '/root/.kube/config'}}, 'images': [{'description': 'alpine', 'image': 'techno...yaml'}]}], 'invocationImages': [{'image': 'cnab/hellohelm:latest', 'imageType': 'docker'}], 'name': 'hellohelm', ...},)
kwargs = {}, error = <ValidationError: "'destination' is a required property">
def validate(self, *args, **kwargs):
for error in self.iter_errors(*args, **kwargs):
> raise error
E jsonschema.exceptions.ValidationError: 'destination' is a required property
E
E Failed validating 'required' in schema['properties']['parameters']['additionalProperties']:
E {'description': 'A paramter that can be passed into the invocation '
E 'image',
E 'properties': {'allowedValues': {'description': 'An optional '
E 'exhaustive list of '
E 'allowed values',
E 'type': 'array'},
E 'defaultValue': {'anyOf': [{'type': 'string'},
E {'type': 'integer'},
E {'type': 'boolean'},
E {'type': 'null'}],
E 'description': 'The default value of '
E 'this parameter'},
E 'destination': {'properties': {'description': {'description': 'A '
E 'user-friendly '
E 'description '
E 'of '
E 'this '
E 'parameter',
E 'type': 'string'},
E 'env': {'description': 'The '
E 'environment '
E 'variable '
E 'name, '
E 'such '
E 'as '
E 'MY_VALUE, '
E 'in '
E 'which '
E 'the '
E 'parameter '
E 'value '
E 'is '
E 'stored',
E 'type': 'string'},
E 'path': {'description': 'The '
E 'path '
E 'inside '
E 'of '
E 'the '
E 'invocation '
E 'image '
E 'where '
E 'parameter '
E 'data '
E 'is '
E 'mounted',
E 'type': 'string'}},
E 'type': 'object'},
E 'maxLength': {'description': 'Maximum string length '
E '(ignored for non-string '
E 'parameters)',
E 'type': 'integer'},
E 'maxValue': {'description': 'Maximum integer value '
E '(ignored for non-integer '
E 'parameters)',
E 'type': 'integer'},
E 'metadata': {'description': 'Extra data about the '
E 'parameter',
E 'properties': {'description': {'description': 'Description '
E 'of '
E 'this '
E 'parameter',
E 'type': 'string'}},
E 'type': 'object'},
E 'minLength': {'description': 'Minimum string length '
E '(ignored for non-string '
E 'parameters)',
E 'type': 'integer'},
E 'minValue': {'description': 'Minimum integer value '
E '(ignored for non-integer '
E 'parameters)',
E 'type': 'integer'},
E 'required': {'description': 'If true, this parameter '
E 'must be supplied',
E 'type': 'boolean'},
E 'type': {'description': 'The data type of the '
E 'parameter',
E 'pattern': '^(string|int|boolean)$',
E 'type': 'string'}},
E 'required': ['type', 'destination'],
E 'type': 'object'}
E
E On instance['parameters']['port']:
E {'defaultValue': 8080, 'type': 'int'}
/usr/local/lib/python3.7/dist-packages/jsonschema/validators.py:130: ValidationError
_____ test_valid_jsonschema[schemas/latest.json-aks-terraform/bundle.json] _____
schema = {'$id': 'http://cnab.io/v1/bundle.schema.json', '$schema': 'http://json-schema.org/draft-07/schema#', 'additionalPrope...ed for non-string parameters)', 'type': 'integer'}, ...}, 'required': ['type', 'destination'], 'type': 'object'}}, ...}
path = 'aks-terraform/bundle.json'
@pytest.mark.parametrize("path", glob.glob("**/bundle.json"))
def test_valid_jsonschema(schema, path):
"Test that any bundle.json files present are valid according to the JSON Schema"
with open(path) as data:
> validate(json.load(data), schema)
test_validate_cnab.py:51:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.7/dist-packages/jsonschema/validators.py:541: in validate
cls(schema, *args, **kwargs).validate(instance)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <jsonschema.validators.create.<locals>.Validator object at 0x7f0f2aa1b9b0>
args = ({'credentials': {'client_id': {'env': 'TF_VAR_client_id'}, 'client_secret': {'env': 'TF_VAR_client_secret'}, 'ssh_aut... 'type': 'string'}, 'backend_storage_container': {'defaultValue': 'aksterraformduffle', 'type': 'string'}, ...}, ...},)
kwargs = {}, error = <ValidationError: "'destination' is a required property">
def validate(self, *args, **kwargs):
for error in self.iter_errors(*args, **kwargs):
> raise error
E jsonschema.exceptions.ValidationError: 'destination' is a required property
E
E Failed validating 'required' in schema['properties']['parameters']['additionalProperties']:
E {'description': 'A paramter that can be passed into the invocation '
E 'image',
E 'properties': {'allowedValues': {'description': 'An optional '
E 'exhaustive list of '
E 'allowed values',
E 'type': 'array'},
E 'defaultValue': {'anyOf': [{'type': 'string'},
E {'type': 'integer'},
E {'type': 'boolean'},
E {'type': 'null'}],
E 'description': 'The default value of '
E 'this parameter'},
E 'destination': {'properties': {'description': {'description': 'A '
E 'user-friendly '
E 'description '
E 'of '
E 'this '
E 'parameter',
E 'type': 'string'},
E 'env': {'description': 'The '
E 'environment '
E 'variable '
E 'name, '
E 'such '
E 'as '
E 'MY_VALUE, '
E 'in '
E 'which '
E 'the '
E 'parameter '
E 'value '
E 'is '
E 'stored',
E 'type': 'string'},
E 'path': {'description': 'The '
E 'path '
E 'inside '
E 'of '
E 'the '
E 'invocation '
E 'image '
E 'where '
E 'parameter '
E 'data '
E 'is '
E 'mounted',
E 'type': 'string'}},
E 'type': 'object'},
E 'maxLength': {'description': 'Maximum string length '
E '(ignored for non-string '
E 'parameters)',
E 'type': 'integer'},
E 'maxValue': {'description': 'Maximum integer value '
E '(ignored for non-integer '
E 'parameters)',
E 'type': 'integer'},
E 'metadata': {'description': 'Extra data about the '
E 'parameter',
E 'properties': {'description': {'description': 'Description '
E 'of '
E 'this '
E 'parameter',
E 'type': 'string'}},
E 'type': 'object'},
E 'minLength': {'description': 'Minimum string length '
E '(ignored for non-string '
E 'parameters)',
E 'type': 'integer'},
E 'minValue': {'description': 'Minimum integer value '
E '(ignored for non-integer '
E 'parameters)',
E 'type': 'integer'},
E 'required': {'description': 'If true, this parameter '
E 'must be supplied',
E 'type': 'boolean'},
E 'type': {'description': 'The data type of the '
E 'parameter',
E 'pattern': '^(string|int|boolean)$',
E 'type': 'string'}},
E 'required': ['type', 'destination'],
E 'type': 'object'}
E
E On instance['parameters']['cluster_name']:
E {'defaultValue': 'akstest', 'type': 'string'}
/usr/local/lib/python3.7/dist-packages/jsonschema/validators.py:130: ValidationError
_______ test_valid_jsonschema[schemas/latest.json-terraform/bundle.json] _______
schema = {'$id': 'http://cnab.io/v1/bundle.schema.json', '$schema': 'http://json-schema.org/draft-07/schema#', 'additionalPrope...ed for non-string parameters)', 'type': 'integer'}, ...}, 'required': ['type', 'destination'], 'type': 'object'}}, ...}
path = 'terraform/bundle.json'
@pytest.mark.parametrize("path", glob.glob("**/bundle.json"))
def test_valid_jsonschema(schema, path):
"Test that any bundle.json files present are valid according to the JSON Schema"
with open(path) as data:
> validate(json.load(data), schema)
test_validate_cnab.py:51:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.7/dist-packages/jsonschema/validators.py:541: in validate
cls(schema, *args, **kwargs).validate(instance)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <jsonschema.validators.create.<locals>.Validator object at 0x7f0f2aa07b70>
args = ({'credentials': {'client_id': {'env': 'TF_VAR_client_id'}, 'client_secret': {'env': 'TF_VAR_client_secret'}, 'ssh_aut...geType': 'docker'}], 'name': 'terraform', 'parameters': {'backend': {'defaultValue': False, 'type': 'boolean'}}, ...},)
kwargs = {}, error = <ValidationError: "'destination' is a required property">
def validate(self, *args, **kwargs):
for error in self.iter_errors(*args, **kwargs):
> raise error
E jsonschema.exceptions.ValidationError: 'destination' is a required property
E
E Failed validating 'required' in schema['properties']['parameters']['additionalProperties']:
E {'description': 'A paramter that can be passed into the invocation '
E 'image',
E 'properties': {'allowedValues': {'description': 'An optional '
E 'exhaustive list of '
E 'allowed values',
E 'type': 'array'},
E 'defaultValue': {'anyOf': [{'type': 'string'},
E {'type': 'integer'},
E {'type': 'boolean'},
E {'type': 'null'}],
E 'description': 'The default value of '
E 'this parameter'},
E 'destination': {'properties': {'description': {'description': 'A '
E 'user-friendly '
E 'description '
E 'of '
E 'this '
E 'parameter',
E 'type': 'string'},
E 'env': {'description': 'The '
E 'environment '
E 'variable '
E 'name, '
E 'such '
E 'as '
E 'MY_VALUE, '
E 'in '
E 'which '
E 'the '
E 'parameter '
E 'value '
E 'is '
E 'stored',
E 'type': 'string'},
E 'path': {'description': 'The '
E 'path '
E 'inside '
E 'of '
E 'the '
E 'invocation '
E 'image '
E 'where '
E 'parameter '
E 'data '
E 'is '
E 'mounted',
E 'type': 'string'}},
E 'type': 'object'},
E 'maxLength': {'description': 'Maximum string length '
E '(ignored for non-string '
E 'parameters)',
E 'type': 'integer'},
E 'maxValue': {'description': 'Maximum integer value '
E '(ignored for non-integer '
E 'parameters)',
E 'type': 'integer'},
E 'metadata': {'description': 'Extra data about the '
E 'parameter',
E 'properties': {'description': {'description': 'Description '
E 'of '
E 'this '
E 'parameter',
E 'type': 'string'}},
E 'type': 'object'},
E 'minLength': {'description': 'Minimum string length '
E '(ignored for non-string '
E 'parameters)',
E 'type': 'integer'},
E 'minValue': {'description': 'Minimum integer value '
E '(ignored for non-integer '
E 'parameters)',
E 'type': 'integer'},
E 'required': {'description': 'If true, this parameter '
E 'must be supplied',
E 'type': 'boolean'},
E 'type': {'description': 'The data type of the '
E 'parameter',
E 'pattern': '^(string|int|boolean)$',
E 'type': 'string'}},
E 'required': ['type', 'destination'],
E 'type': 'object'}
E
E On instance['parameters']['backend']:
E {'defaultValue': False, 'type': 'boolean'}
/usr/local/lib/python3.7/dist-packages/jsonschema/validators.py:130: ValidationError
____ test_valid_jsonschema[schemas/latest.json-ansible-azurevm/bundle.json] ____
schema = {'$id': 'http://cnab.io/v1/bundle.schema.json', '$schema': 'http://json-schema.org/draft-07/schema#', 'additionalPrope...ed for non-string parameters)', 'type': 'integer'}, ...}, 'required': ['type', 'destination'], 'type': 'object'}}, ...}
path = 'ansible-azurevm/bundle.json'
@pytest.mark.parametrize("path", glob.glob("**/bundle.json"))
def test_valid_jsonschema(schema, path):
"Test that any bundle.json files present are valid according to the JSON Schema"
with open(path) as data:
> validate(json.load(data), schema)
test_validate_cnab.py:51:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.7/dist-packages/jsonschema/validators.py:541: in validate
cls(schema, *args, **kwargs).validate(instance)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <jsonschema.validators.create.<locals>.Validator object at 0x7f0f2a963630>
args = ({'credentials': {'client_id': {'env': 'AZURE_CLIENT_ID'}, 'client_secret': {'env': 'AZURE_SECRET'}, 'subscription_id'...invocationImages': [{'image': 'cnab/ansible-azurevm:latest', 'imageType': 'docker'}], 'name': 'ansible-azurevm', ...},)
kwargs = {}, error = <ValidationError: "'destination' is a required property">
def validate(self, *args, **kwargs):
for error in self.iter_errors(*args, **kwargs):
> raise error
E jsonschema.exceptions.ValidationError: 'destination' is a required property
E
E Failed validating 'required' in schema['properties']['parameters']['additionalProperties']:
E {'description': 'A paramter that can be passed into the invocation '
E 'image',
E 'properties': {'allowedValues': {'description': 'An optional '
E 'exhaustive list of '
E 'allowed values',
E 'type': 'array'},
E 'defaultValue': {'anyOf': [{'type': 'string'},
E {'type': 'integer'},
E {'type': 'boolean'},
E {'type': 'null'}],
E 'description': 'The default value of '
E 'this parameter'},
E 'destination': {'properties': {'description': {'description': 'A '
E 'user-friendly '
E 'description '
E 'of '
E 'this '
E 'parameter',
E 'type': 'string'},
E 'env': {'description': 'The '
E 'environment '
E 'variable '
E 'name, '
E 'such '
E 'as '
E 'MY_VALUE, '
E 'in '
E 'which '
E 'the '
E 'parameter '
E 'value '
E 'is '
E 'stored',
E 'type': 'string'},
E 'path': {'description': 'The '
E 'path '
E 'inside '
E 'of '
E 'the '
E 'invocation '
E 'image '
E 'where '
E 'parameter '
E 'data '
E 'is '
E 'mounted',
E 'type': 'string'}},
E 'type': 'object'},
E 'maxLength': {'description': 'Maximum string length '
E '(ignored for non-string '
E 'parameters)',
E 'type': 'integer'},
E 'maxValue': {'description': 'Maximum integer value '
E '(ignored for non-integer '
E 'parameters)',
E 'type': 'integer'},
E 'metadata': {'description': 'Extra data about the '
E 'parameter',
E 'properties': {'description': {'description': 'Description '
E 'of '
E 'this '
E 'parameter',
E 'type': 'string'}},
E 'type': 'object'},
E 'minLength': {'description': 'Minimum string length '
E '(ignored for non-string '
E 'parameters)',
E 'type': 'integer'},
E 'minValue': {'description': 'Minimum integer value '
E '(ignored for non-integer '
E 'parameters)',
E 'type': 'integer'},
E 'required': {'description': 'If true, this parameter '
E 'must be supplied',
E 'type': 'boolean'},
E 'type': {'description': 'The data type of the '
E 'parameter',
E 'pattern': '^(string|int|boolean)$',
E 'type': 'string'}},
E 'required': ['type', 'destination'],
E 'type': 'object'}
E
E On instance['parameters']['check']:
E {'defaultValue': False, 'type': 'boolean'}
/usr/local/lib/python3.7/dist-packages/jsonschema/validators.py:130: ValidationError
____ test_valid_jsonschema[schemas/latest.json-wordpress-mysql/bundle.json] ____
schema = {'$id': 'http://cnab.io/v1/bundle.schema.json', '$schema': 'http://json-schema.org/draft-07/schema#', 'additionalPrope...ed for non-string parameters)', 'type': 'integer'}, ...}, 'required': ['type', 'destination'], 'type': 'object'}}, ...}
path = 'wordpress-mysql/bundle.json'
@pytest.mark.parametrize("path", glob.glob("**/bundle.json"))
def test_valid_jsonschema(schema, path):
"Test that any bundle.json files present are valid according to the JSON Schema"
with open(path) as data:
> validate(json.load(data), schema)
test_validate_cnab.py:51:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.7/dist-packages/jsonschema/validators.py:541: in validate
cls(schema, *args, **kwargs).validate(instance)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <jsonschema.validators.create.<locals>.Validator object at 0x7f0f2aaeebe0>
args = ({'credentials': {'azure_profile': {'path': '/root/.azure/azureProfile.json'}, 'azure_tokens': {'path': '/root/.azure/...9ad610614310b169e9d', 'image': 'cnab/wordpress-mysql:0.2.0', 'imageType': 'docker'}], 'name': 'wordpress-mysql', ...},)
kwargs = {}, error = <ValidationError: "'destination' is a required property">
def validate(self, *args, **kwargs):
for error in self.iter_errors(*args, **kwargs):
> raise error
E jsonschema.exceptions.ValidationError: 'destination' is a required property
E
E Failed validating 'required' in schema['properties']['parameters']['additionalProperties']:
E {'description': 'A paramter that can be passed into the invocation '
E 'image',
E 'properties': {'allowedValues': {'description': 'An optional '
E 'exhaustive list of '
E 'allowed values',
E 'type': 'array'},
E 'defaultValue': {'anyOf': [{'type': 'string'},
E {'type': 'integer'},
E {'type': 'boolean'},
E {'type': 'null'}],
E 'description': 'The default value of '
E 'this parameter'},
E 'destination': {'properties': {'description': {'description': 'A '
E 'user-friendly '
E 'description '
E 'of '
E 'this '
E 'parameter',
E 'type': 'string'},
E 'env': {'description': 'The '
E 'environment '
E 'variable '
E 'name, '
E 'such '
E 'as '
E 'MY_VALUE, '
E 'in '
E 'which '
E 'the '
E 'parameter '
E 'value '
E 'is '
E 'stored',
E 'type': 'string'},
E 'path': {'description': 'The '
E 'path '
E 'inside '
E 'of '
E 'the '
E 'invocation '
E 'image '
E 'where '
E 'parameter '
E 'data '
E 'is '
E 'mounted',
E 'type': 'string'}},
E 'type': 'object'},
E 'maxLength': {'description': 'Maximum string length '
E '(ignored for non-string '
E 'parameters)',
E 'type': 'integer'},
E 'maxValue': {'description': 'Maximum integer value '
E '(ignored for non-integer '
E 'parameters)',
E 'type': 'integer'},
E 'metadata': {'description': 'Extra data about the '
E 'parameter',
E 'properties': {'description': {'description': 'Description '
E 'of '
E 'this '
E 'parameter',
E 'type': 'string'}},
E 'type': 'object'},
E 'minLength': {'description': 'Minimum string length '
E '(ignored for non-string '
E 'parameters)',
E 'type': 'integer'},
E 'minValue': {'description': 'Minimum integer value '
E '(ignored for non-integer '
E 'parameters)',
E 'type': 'integer'},
E 'required': {'description': 'If true, this parameter '
E 'must be supplied',
E 'type': 'boolean'},
E 'type': {'description': 'The data type of the '
E 'parameter',
E 'pattern': '^(string|int|boolean)$',
E 'type': 'string'}},
E 'required': ['type', 'destination'],
E 'type': 'object'}
E
E On instance['parameters']['mysql_db_service_name']:
E {'defaultValue': 'mymysqldb', 'type': 'string'}
/usr/local/lib/python3.7/dist-packages/jsonschema/validators.py:130: ValidationError
__________ test_valid_jsonschema[schemas/latest.json-aks/bundle.json] __________
schema = {'$id': 'http://cnab.io/v1/bundle.schema.json', '$schema': 'http://json-schema.org/draft-07/schema#', 'additionalPrope...ed for non-string parameters)', 'type': 'integer'}, ...}, 'required': ['type', 'destination'], 'type': 'object'}}, ...}
path = 'aks/bundle.json'
@pytest.mark.parametrize("path", glob.glob("**/bundle.json"))
def test_valid_jsonschema(schema, path):
"Test that any bundle.json files present are valid according to the JSON Schema"
with open(path) as data:
> validate(json.load(data), schema)
test_validate_cnab.py:51:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.7/dist-packages/jsonschema/validators.py:541: in validate
cls(schema, *args, **kwargs).validate(instance)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <jsonschema.validators.create.<locals>.Validator object at 0x7f0f2aad7d68>
args = ({'credentials': {'azure_cloud_config': {'path': '/root/.azure/clouds.config'}, 'azure_profiles': {'path': '/root/.azu...e7d0c8369f38f3157a54802736eb8eaa7decca3d12', 'image': 'cnab/aks:latest', 'imageType': 'docker'}], 'name': 'aks', ...},)
kwargs = {}, error = <ValidationError: "'destination' is a required property">
def validate(self, *args, **kwargs):
for error in self.iter_errors(*args, **kwargs):
> raise error
E jsonschema.exceptions.ValidationError: 'destination' is a required property
E
E Failed validating 'required' in schema['properties']['parameters']['additionalProperties']:
E {'description': 'A paramter that can be passed into the invocation '
E 'image',
E 'properties': {'allowedValues': {'description': 'An optional '
E 'exhaustive list of '
E 'allowed values',
E 'type': 'array'},
E 'defaultValue': {'anyOf': [{'type': 'string'},
E {'type': 'integer'},
E {'type': 'boolean'},
E {'type': 'null'}],
E 'description': 'The default value of '
E 'this parameter'},
E 'destination': {'properties': {'description': {'description': 'A '
E 'user-friendly '
E 'description '
E 'of '
E 'this '
E 'parameter',
E 'type': 'string'},
E 'env': {'description': 'The '
E 'environment '
E 'variable '
E 'name, '
E 'such '
E 'as '
E 'MY_VALUE, '
E 'in '
E 'which '
E 'the '
E 'parameter '
E 'value '
E 'is '
E 'stored',
E 'type': 'string'},
E 'path': {'description': 'The '
E 'path '
E 'inside '
E 'of '
E 'the '
E 'invocation '
E 'image '
E 'where '
E 'parameter '
E 'data '
E 'is '
E 'mounted',
E 'type': 'string'}},
E 'type': 'object'},
E 'maxLength': {'description': 'Maximum string length '
E '(ignored for non-string '
E 'parameters)',
E 'type': 'integer'},
E 'maxValue': {'description': 'Maximum integer value '
E '(ignored for non-integer '
E 'parameters)',
E 'type': 'integer'},
E 'metadata': {'description': 'Extra data about the '
E 'parameter',
E 'properties': {'description': {'description': 'Description '
E 'of '
E 'this '
E 'parameter',
E 'type': 'string'}},
E 'type': 'object'},
E 'minLength': {'description': 'Minimum string length '
E '(ignored for non-string '
E 'parameters)',
E 'type': 'integer'},
E 'minValue': {'description': 'Minimum integer value '
E '(ignored for non-integer '
E 'parameters)',
E 'type': 'integer'},
E 'required': {'description': 'If true, this parameter '
E 'must be supplied',
E 'type': 'boolean'},
E 'type': {'description': 'The data type of the '
E 'parameter',
E 'pattern': '^(string|int|boolean)$',
E 'type': 'string'}},
E 'required': ['type', 'destination'],
E 'type': 'object'}
E
E On instance['parameters']['resource_group']:
E {'defaultValue': 'duffle-aks', 'type': 'string'}
/usr/local/lib/python3.7/dist-packages/jsonschema/validators.py:130: ValidationError
______ test_valid_jsonschema[schemas/latest.json-ansiblebase/bundle.json] ______
schema = {'$id': 'http://cnab.io/v1/bundle.schema.json', '$schema': 'http://json-schema.org/draft-07/schema#', 'additionalPrope...ed for non-string parameters)', 'type': 'integer'}, ...}, 'required': ['type', 'destination'], 'type': 'object'}}, ...}
path = 'ansiblebase/bundle.json'
@pytest.mark.parametrize("path", glob.glob("**/bundle.json"))
def test_valid_jsonschema(schema, path):
"Test that any bundle.json files present are valid according to the JSON Schema"
with open(path) as data:
> validate(json.load(data), schema)
test_validate_cnab.py:51:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.7/dist-packages/jsonschema/validators.py:541: in validate
cls(schema, *args, **kwargs).validate(instance)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <jsonschema.validators.create.<locals>.Validator object at 0x7f0f2aa42be0>
args = ({'credentials': {'client_id': {'env': 'AZURE_CLIENT_ID'}, 'client_secret': {'env': 'AZURE_SECRET'}, 'subscription_id'...': [], 'invocationImages': [{'image': 'cnab/ansiblebase:latest', 'imageType': 'docker'}], 'name': 'ansiblebase', ...},)
kwargs = {}, error = <ValidationError: "'destination' is a required property">
def validate(self, *args, **kwargs):
for error in self.iter_errors(*args, **kwargs):
> raise error
E jsonschema.exceptions.ValidationError: 'destination' is a required property
E
E Failed validating 'required' in schema['properties']['parameters']['additionalProperties']:
E {'description': 'A paramter that can be passed into the invocation '
E 'image',
E 'properties': {'allowedValues': {'description': 'An optional '
E 'exhaustive list of '
E 'allowed values',
E 'type': 'array'},
E 'defaultValue': {'anyOf': [{'type': 'string'},
E {'type': 'integer'},
E {'type': 'boolean'},
E {'type': 'null'}],
E 'description': 'The default value of '
E 'this parameter'},
E 'destination': {'properties': {'description': {'description': 'A '
E 'user-friendly '
E 'description '
E 'of '
E 'this '
E 'parameter',
E 'type': 'string'},
E 'env': {'description': 'The '
E 'environment '
E 'variable '
E 'name, '
E 'such '
E 'as '
E 'MY_VALUE, '
E 'in '
E 'which '
E 'the '
E 'parameter '
E 'value '
E 'is '
E 'stored',
E 'type': 'string'},
E 'path': {'description': 'The '
E 'path '
E 'inside '
E 'of '
E 'the '
E 'invocation '
E 'image '
E 'where '
E 'parameter '
E 'data '
E 'is '
E 'mounted',
E 'type': 'string'}},
E 'type': 'object'},
E 'maxLength': {'description': 'Maximum string length '
E '(ignored for non-string '
E 'parameters)',
E 'type': 'integer'},
E 'maxValue': {'description': 'Maximum integer value '
E '(ignored for non-integer '
E 'parameters)',
E 'type': 'integer'},
E 'metadata': {'description': 'Extra data about the '
E 'parameter',
E 'properties': {'description': {'description': 'Description '
E 'of '
E 'this '
E 'parameter',
E 'type': 'string'}},
E 'type': 'object'},
E 'minLength': {'description': 'Minimum string length '
E '(ignored for non-string '
E 'parameters)',
E 'type': 'integer'},
E 'minValue': {'description': 'Minimum integer value '
E '(ignored for non-integer '
E 'parameters)',
E 'type': 'integer'},
E 'required': {'description': 'If true, this parameter '
E 'must be supplied',
E 'type': 'boolean'},
E 'type': {'description': 'The data type of the '
E 'parameter',
E 'pattern': '^(string|int|boolean)$',
E 'type': 'string'}},
E 'required': ['type', 'destination'],
E 'type': 'object'}
E
E On instance['parameters']['check']:
E {'defaultValue': False, 'type': 'boolean'}
/usr/local/lib/python3.7/dist-packages/jsonschema/validators.py:130: ValidationError
________ test_valid_jsonschema[schemas/latest.json-armbase/bundle.json] ________
schema = {'$id': 'http://cnab.io/v1/bundle.schema.json', '$schema': 'http://json-schema.org/draft-07/schema#', 'additionalPrope...ed for non-string parameters)', 'type': 'integer'}, ...}, 'required': ['type', 'destination'], 'type': 'object'}}, ...}
path = 'armbase/bundle.json'
@pytest.mark.parametrize("path", glob.glob("**/bundle.json"))
def test_valid_jsonschema(schema, path):
"Test that any bundle.json files present are valid according to the JSON Schema"
with open(path) as data:
> validate(json.load(data), schema)
test_validate_cnab.py:51:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.7/dist-packages/jsonschema/validators.py:541: in validate
cls(schema, *args, **kwargs).validate(instance)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <jsonschema.validators.create.<locals>.Validator object at 0x7f0f2aa0ec88>
args = ({'credentials': {'client_id': {'env': 'AZURE_CLIENT_ID'}, 'client_secret': {'env': 'AZURE_CLIENT_SECRET'}, 'subscript..., 'images': [], 'invocationImages': [{'image': 'cnab/armbase:0.1.0', 'imageType': 'docker'}], 'name': 'armbase', ...},)
kwargs = {}, error = <ValidationError: "'destination' is a required property">
def validate(self, *args, **kwargs):
for error in self.iter_errors(*args, **kwargs):
> raise error
E jsonschema.exceptions.ValidationError: 'destination' is a required property
E
E Failed validating 'required' in schema['properties']['parameters']['additionalProperties']:
E {'description': 'A paramter that can be passed into the invocation '
E 'image',
E 'properties': {'allowedValues': {'description': 'An optional '
E 'exhaustive list of '
E 'allowed values',
E 'type': 'array'},
E 'defaultValue': {'anyOf': [{'type': 'string'},
E {'type': 'integer'},
E {'type': 'boolean'},
E {'type': 'null'}],
E 'description': 'The default value of '
E 'this parameter'},
E 'destination': {'properties': {'description': {'description': 'A '
E 'user-friendly '
E 'description '
E 'of '
E 'this '
E 'parameter',
E 'type': 'string'},
E 'env': {'description': 'The '
E 'environment '
E 'variable '
E 'name, '
E 'such '
E 'as '
E 'MY_VALUE, '
E 'in '
E 'which '
E 'the '
E 'parameter '
E 'value '
E 'is '
E 'stored',
E 'type': 'string'},
E 'path': {'description': 'The '
E 'path '
E 'inside '
E 'of '
E 'the '
E 'invocation '
E 'image '
E 'where '
E 'parameter '
E 'data '
E 'is '
E 'mounted',
E 'type': 'string'}},
E 'type': 'object'},
E 'maxLength': {'description': 'Maximum string length '
E '(ignored for non-string '
E 'parameters)',
E 'type': 'integer'},
E 'maxValue': {'description': 'Maximum integer value '
E '(ignored for non-integer '
E 'parameters)',
E 'type': 'integer'},
E 'metadata': {'description': 'Extra data about the '
E 'parameter',
E 'properties': {'description': {'description': 'Description '
E 'of '
E 'this '
E 'parameter',
E 'type': 'string'}},
E 'type': 'object'},
E 'minLength': {'description': 'Minimum string length '
E '(ignored for non-string '
E 'parameters)',
E 'type': 'integer'},
E 'minValue': {'description': 'Minimum integer value '
E '(ignored for non-integer '
E 'parameters)',
E 'type': 'integer'},
E 'required': {'description': 'If true, this parameter '
E 'must be supplied',
E 'type': 'boolean'},
E 'type': {'description': 'The data type of the '
E 'parameter',
E 'pattern': '^(string|int|boolean)$',
E 'type': 'string'}},
E 'required': ['type', 'destination'],
E 'type': 'object'}
E
E On instance['parameters']['azure_location']:
E {'defaultValue': 'useast', 'type': 'string'}
/usr/local/lib/python3.7/dist-packages/jsonschema/validators.py:130: ValidationError
______ test_valid_jsonschema[schemas/latest.json-example-run/bundle.json] ______
schema = {'$id': 'http://cnab.io/v1/bundle.schema.json', '$schema': 'http://json-schema.org/draft-07/schema#', 'additionalPrope...ed for non-string parameters)', 'type': 'integer'}, ...}, 'required': ['type', 'destination'], 'type': 'object'}}, ...}
path = 'example-run/bundle.json'
@pytest.mark.parametrize("path", glob.glob("**/bundle.json"))
def test_valid_jsonschema(schema, path):
"Test that any bundle.json files present are valid according to the JSON Schema"
with open(path) as data:
> validate(json.load(data), schema)
test_validate_cnab.py:51:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python3.7/dist-packages/jsonschema/validators.py:541: in validate
cls(schema, *args, **kwargs).validate(instance)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <jsonschema.validators.create.<locals>.Validator object at 0x7f0f2aa0f208>
args = ({'actions': {'greet': {'modifies': False}, 'migrate': {'modifies': True}}, 'images': [], 'invocationImages': [{'image': 'cnab/example-run:latest', 'imageType': 'docker'}], 'name': 'example-run', ...},)
kwargs = {}, error = <ValidationError: "'destination' is a required property">
def validate(self, *args, **kwargs):
for error in self.iter_errors(*args, **kwargs):
> raise error
E jsonschema.exceptions.ValidationError: 'destination' is a required property
E
E Failed validating 'required' in schema['properties']['parameters']['additionalProperties']:
E {'description': 'A paramter that can be passed into the invocation '
E 'image',
E 'properties': {'allowedValues': {'description': 'An optional '
E 'exhaustive list of '
E 'allowed values',
E 'type': 'array'},
E 'defaultValue': {'anyOf': [{'type': 'string'},
E {'type': 'integer'},
E {'type': 'boolean'},
E {'type': 'null'}],
E 'description': 'The default value of '
E 'this parameter'},
E 'destination': {'properties': {'description': {'description': 'A '
E 'user-friendly '
E 'description '
E 'of '
E 'this '
E 'parameter',
E 'type': 'string'},
E 'env': {'description': 'The '
E 'environment '
E 'variable '
E 'name, '
E 'such '
E 'as '
E 'MY_VALUE, '
E 'in '
E 'which '
E 'the '
E 'parameter '
E 'value '
E 'is '
E 'stored',
E 'type': 'string'},
E 'path': {'description': 'The '
E 'path '
E 'inside '
E 'of '
E 'the '
E 'invocation '
E 'image '
E 'where '
E 'parameter '
E 'data '
E 'is '
E 'mounted',
E 'type': 'string'}},
E 'type': 'object'},
E 'maxLength': {'description': 'Maximum string length '
E '(ignored for non-string '
E 'parameters)',
E 'type': 'integer'},
E 'maxValue': {'description': 'Maximum integer value '
E '(ignored for non-integer '
E 'parameters)',
E 'type': 'integer'},
E 'metadata': {'description': 'Extra data about the '
E 'parameter',
E 'properties': {'description': {'description': 'Description '
E 'of '
E 'this '
E 'parameter',
E 'type': 'string'}},
E 'type': 'object'},
E 'minLength': {'description': 'Minimum string length '
E '(ignored for non-string '
E 'parameters)',
E 'type': 'integer'},
E 'minValue': {'description': 'Minimum integer value '
E '(ignored for non-integer '
E 'parameters)',
E 'type': 'integer'},
E 'required': {'description': 'If true, this parameter '
E 'must be supplied',
E 'type': 'boolean'},
E 'type': {'description': 'The data type of the '
E 'parameter',
E 'pattern': '^(string|int|boolean)$',
E 'type': 'string'}},
E 'required': ['type', 'destination'],
E 'type': 'object'}
E
E On instance['parameters']['greeting']:
E {'defaultValue': 'hello',
E 'metadata': {'description': 'this will be in $GREETING'},
E 'type': 'string'}
/usr/local/lib/python3.7/dist-packages/jsonschema/validators.py:130: ValidationError
__________________ test_valid_invocation_image[arm-aci/cnab] ___________________
path = 'arm-aci/cnab'
@pytest.mark.parametrize("path", glob.glob("**/cnab"))
def test_valid_invocation_image(path):
"Test that CNAB build directories for adherence to the spec"
head, tail = os.path.split(path)
directory = CNABDirectory(head)
> directory.valid()
test_validate_cnab.py:59:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <cnab.invocation_image.CNABDirectory object at 0x7f0f2aa056d8>
def valid(self) -> bool:
errors = []
if not self.has_executable_run():
errors.append("Run entrypoint is not executable")
if not self.has_run():
errors.append("Missing a run entrypoint")
if not self.has_app_directory():
errors.append("Missing the app directory")
if not self.has_cnab_directory():
errors.append("Missing the cnab directory")
if not self.has_no_misc_files_in_cnab_dir():
errors.append("Has additional files in the cnab directory")
if len(errors) == 0:
return True
else:
> raise InvalidCNABDirectoryError(errors)
E cnab.invocation_image.InvalidCNABDirectoryError: ['Run entrypoint is not executable', 'Missing a run entrypoint', 'Has additional files in the cnab directory']
/usr/local/lib/python3.7/dist-packages/cnab/invocation_image.py:83: InvalidCNABDirectoryError
_________________ test_valid_invocation_image[helloworld/cnab] _________________
path = 'helloworld/cnab'
@pytest.mark.parametrize("path", glob.glob("**/cnab"))
def test_valid_invocation_image(path):
"Test that CNAB build directories for adherence to the spec"
head, tail = os.path.split(path)
directory = CNABDirectory(head)
> directory.valid()
test_validate_cnab.py:59:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <cnab.invocation_image.CNABDirectory object at 0x7f0f2a973a20>
def valid(self) -> bool:
errors = []
if not self.has_executable_run():
errors.append("Run entrypoint is not executable")
if not self.has_run():
errors.append("Missing a run entrypoint")
if not self.has_app_directory():
errors.append("Missing the app directory")
if not self.has_cnab_directory():
errors.append("Missing the cnab directory")
if not self.has_no_misc_files_in_cnab_dir():
errors.append("Has additional files in the cnab directory")
if len(errors) == 0:
return True
else:
> raise InvalidCNABDirectoryError(errors)
E cnab.invocation_image.InvalidCNABDirectoryError: ['Has additional files in the cnab directory']
/usr/local/lib/python3.7/dist-packages/cnab/invocation_image.py:83: InvalidCNABDirectoryError
_________________ test_valid_invocation_image[hellohelm/cnab] __________________
path = 'hellohelm/cnab'
@pytest.mark.parametrize("path", glob.glob("**/cnab"))
def test_valid_invocation_image(path):
"Test that CNAB build directories for adherence to the spec"
head, tail = os.path.split(path)
directory = CNABDirectory(head)
> directory.valid()
test_validate_cnab.py:59:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <cnab.invocation_image.CNABDirectory object at 0x7f0f2a94bd30>
def valid(self) -> bool:
errors = []
if not self.has_executable_run():
errors.append("Run entrypoint is not executable")
if not self.has_run():
errors.append("Missing a run entrypoint")
if not self.has_app_directory():
errors.append("Missing the app directory")
if not self.has_cnab_directory():
errors.append("Missing the cnab directory")
if not self.has_no_misc_files_in_cnab_dir():
errors.append("Has additional files in the cnab directory")
if len(errors) == 0:
return True
else:
> raise InvalidCNABDirectoryError(errors)
E cnab.invocation_image.InvalidCNABDirectoryError: ['Run entrypoint is not executable', 'Missing a run entrypoint', 'Has additional files in the cnab directory']
/usr/local/lib/python3.7/dist-packages/cnab/invocation_image.py:83: InvalidCNABDirectoryError
_______________ test_valid_invocation_image[aks-terraform/cnab] ________________
path = 'aks-terraform/cnab'
@pytest.mark.parametrize("path", glob.glob("**/cnab"))
def test_valid_invocation_image(path):
"Test that CNAB build directories for adherence to the spec"
head, tail = os.path.split(path)
directory = CNABDirectory(head)
> directory.valid()
test_validate_cnab.py:59:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <cnab.invocation_image.CNABDirectory object at 0x7f0f2a9700f0>
def valid(self) -> bool:
errors = []
if not self.has_executable_run():
errors.append("Run entrypoint is not executable")
if not self.has_run():
errors.append("Missing a run entrypoint")
if not self.has_app_directory():
errors.append("Missing the app directory")
if not self.has_cnab_directory():
errors.append("Missing the cnab directory")
if not self.has_no_misc_files_in_cnab_dir():
errors.append("Has additional files in the cnab directory")
if len(errors) == 0:
return True
else:
> raise InvalidCNABDirectoryError(errors)
E cnab.invocation_image.InvalidCNABDirectoryError: ['Run entrypoint is not executable', 'Missing a run entrypoint', 'Has additional files in the cnab directory']
/usr/local/lib/python3.7/dist-packages/cnab/invocation_image.py:83: InvalidCNABDirectoryError
_________________ test_valid_invocation_image[helloazure/cnab] _________________
path = 'helloazure/cnab'
@pytest.mark.parametrize("path", glob.glob("**/cnab"))
def test_valid_invocation_image(path):
"Test that CNAB build directories for adherence to the spec"
head, tail = os.path.split(path)
directory = CNABDirectory(head)
> directory.valid()
test_validate_cnab.py:59:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <cnab.invocation_image.CNABDirectory object at 0x7f0f2a973f28>
def valid(self) -> bool:
errors = []
if not self.has_executable_run():
errors.append("Run entrypoint is not executable")
if not self.has_run():
errors.append("Missing a run entrypoint")
if not self.has_app_directory():
errors.append("Missing the app directory")
if not self.has_cnab_directory():
errors.append("Missing the cnab directory")
if not self.has_no_misc_files_in_cnab_dir():
errors.append("Has additional files in the cnab directory")
if len(errors) == 0:
return True
else:
> raise InvalidCNABDirectoryError(errors)
E cnab.invocation_image.InvalidCNABDirectoryError: ['Has additional files in the cnab directory']
/usr/local/lib/python3.7/dist-packages/cnab/invocation_image.py:83: InvalidCNABDirectoryError
____________ test_valid_invocation_image[example-credentials/cnab] _____________
path = 'example-credentials/cnab'
@pytest.mark.parametrize("path", glob.glob("**/cnab"))
def test_valid_invocation_image(path):
"Test that CNAB build directories for adherence to the spec"
head, tail = os.path.split(path)
directory = CNABDirectory(head)
> directory.valid()
test_validate_cnab.py:59:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <cnab.invocation_image.CNABDirectory object at 0x7f0f2aa9b198>
def valid(self) -> bool:
errors = []
if not self.has_executable_run():
errors.append("Run entrypoint is not executable")
if not self.has_run():
errors.append("Missing a run entrypoint")
if not self.has_app_directory():
errors.append("Missing the app directory")
if not self.has_cnab_directory():
errors.append("Missing the cnab directory")
if not self.has_no_misc_files_in_cnab_dir():
errors.append("Has additional files in the cnab directory")
if len(errors) == 0:
return True
else:
> raise InvalidCNABDirectoryError(errors)
E cnab.invocation_image.InvalidCNABDirectoryError: ['Has additional files in the cnab directory']
/usr/local/lib/python3.7/dist-packages/cnab/invocation_image.py:83: InvalidCNABDirectoryError
____________________ test_valid_invocation_image[vote/cnab] ____________________
path = 'vote/cnab'
@pytest.mark.parametrize("path", glob.glob("**/cnab"))
def test_valid_invocation_image(path):
"Test that CNAB build directories for adherence to the spec"
head, tail = os.path.split(path)
directory = CNABDirectory(head)
> directory.valid()
test_validate_cnab.py:59:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <cnab.invocation_image.CNABDirectory object at 0x7f0f2aa2ecc0>
def valid(self) -> bool:
errors = []
if not self.has_executable_run():
errors.append("Run entrypoint is not executable")
if not self.has_run():
errors.append("Missing a run entrypoint")
if not self.has_app_directory():
errors.append("Missing the app directory")
if not self.has_cnab_directory():
errors.append("Missing the cnab directory")
if not self.has_no_misc_files_in_cnab_dir():
errors.append("Has additional files in the cnab directory")
if len(errors) == 0:
return True
else:
> raise InvalidCNABDirectoryError(errors)
E cnab.invocation_image.InvalidCNABDirectoryError: ['Run entrypoint is not executable', 'Missing a run entrypoint', 'Has additional files in the cnab directory']
/usr/local/lib/python3.7/dist-packages/cnab/invocation_image.py:83: InvalidCNABDirectoryError
_________________ test_valid_invocation_image[terraform/cnab] __________________
path = 'terraform/cnab'
@pytest.mark.parametrize("path", glob.glob("**/cnab"))
def test_valid_invocation_image(path):
"Test that CNAB build directories for adherence to the spec"
head, tail = os.path.split(path)
directory = CNABDirectory(head)
> directory.valid()
test_validate_cnab.py:59:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <cnab.invocation_image.CNABDirectory object at 0x7f0f2aa35dd8>
def valid(self) -> bool:
errors = []
if not self.has_executable_run():
errors.append("Run entrypoint is not executable")
if not self.has_run():
errors.append("Missing a run entrypoint")
if not self.has_app_directory():
errors.append("Missing the app directory")
if not self.has_cnab_directory():
errors.append("Missing the cnab directory")
if not self.has_no_misc_files_in_cnab_dir():
errors.append("Has additional files in the cnab directory")
if len(errors) == 0:
return True
else:
> raise InvalidCNABDirectoryError(errors)
E cnab.invocation_image.InvalidCNABDirectoryError: ['Run entrypoint is not executable', 'Has additional files in the cnab directory']
/usr/local/lib/python3.7/dist-packages/cnab/invocation_image.py:83: InvalidCNABDirectoryError
______________ test_valid_invocation_image[ansible-azurevm/cnab] _______________
path = 'ansible-azurevm/cnab'
@pytest.mark.parametrize("path", glob.glob("**/cnab"))
def test_valid_invocation_image(path):
"Test that CNAB build directories for adherence to the spec"
head, tail = os.path.split(path)
directory = CNABDirectory(head)
> directory.valid()
test_validate_cnab.py:59:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <cnab.invocation_image.CNABDirectory object at 0x7f0f2a93bb00>
def valid(self) -> bool:
errors = []
if not self.has_executable_run():
errors.append("Run entrypoint is not executable")
if not self.has_run():
errors.append("Missing a run entrypoint")
if not self.has_app_directory():
errors.append("Missing the app directory")
if not self.has_cnab_directory():
errors.append("Missing the cnab directory")
if not self.has_no_misc_files_in_cnab_dir():
errors.append("Has additional files in the cnab directory")
if len(errors) == 0:
return True
else:
> raise InvalidCNABDirectoryError(errors)
E cnab.invocation_image.InvalidCNABDirectoryError: ['Run entrypoint is not executable', 'Missing a run entrypoint', 'Has additional files in the cnab directory']
/usr/local/lib/python3.7/dist-packages/cnab/invocation_image.py:83: InvalidCNABDirectoryError
__________________ test_valid_invocation_image[openfaas/cnab] __________________
path = 'openfaas/cnab'
@pytest.mark.parametrize("path", glob.glob("**/cnab"))
def test_valid_invocation_image(path):
"Test that CNAB build directories for adherence to the spec"
head, tail = os.path.split(path)
directory = CNABDirectory(head)
> directory.valid()
test_validate_cnab.py:59:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <cnab.invocation_image.CNABDirectory object at 0x7f0f2aa2e048>
def valid(self) -> bool:
errors = []
if not self.has_executable_run():
errors.append("Run entrypoint is not executable")
if not self.has_run():
errors.append("Missing a run entrypoint")
if not self.has_app_directory():
errors.append("Missing the app directory")
if not self.has_cnab_directory():
errors.append("Missing the cnab directory")
if not self.has_no_misc_files_in_cnab_dir():
errors.append("Has additional files in the cnab directory")
if len(errors) == 0:
return True
else:
> raise InvalidCNABDirectoryError(errors)
E cnab.invocation_image.InvalidCNABDirectoryError: ['Run entrypoint is not executable', 'Missing a run entrypoint', 'Has additional files in the cnab directory']
/usr/local/lib/python3.7/dist-packages/cnab/invocation_image.py:83: InvalidCNABDirectoryError
______________ test_valid_invocation_image[wordpress-mysql/cnab] _______________
path = 'wordpress-mysql/cnab'
@pytest.mark.parametrize("path", glob.glob("**/cnab"))
def test_valid_invocation_image(path):
"Test that CNAB build directories for adherence to the spec"
head, tail = os.path.split(path)
directory = CNABDirectory(head)
> directory.valid()
test_validate_cnab.py:59:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <cnab.invocation_image.CNABDirectory object at 0x7f0f2a94bd68>
def valid(self) -> bool:
errors = []
if not self.has_executable_run():
errors.append("Run entrypoint is not executable")
if not self.has_run():
errors.append("Missing a run entrypoint")
if not self.has_app_directory():
errors.append("Missing the app directory")
if not self.has_cnab_directory():
errors.append("Missing the cnab directory")
if not self.has_no_misc_files_in_cnab_dir():
errors.append("Has additional files in the cnab directory")
if len(errors) == 0:
return True
else:
> raise InvalidCNABDirectoryError(errors)
E cnab.invocation_image.InvalidCNABDirectoryError: ['Has additional files in the cnab directory']
/usr/local/lib/python3.7/dist-packages/cnab/invocation_image.py:83: InvalidCNABDirectoryError
____________________ test_valid_invocation_image[aks/cnab] _____________________
path = 'aks/cnab'
@pytest.mark.parametrize("path", glob.glob("**/cnab"))
def test_valid_invocation_image(path):
"Test that CNAB build directories for adherence to the spec"
head, tail = os.path.split(path)
directory = CNABDirectory(head)
> directory.valid()
test_validate_cnab.py:59:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <cnab.invocation_image.CNABDirectory object at 0x7f0f2a93b898>
def valid(self) -> bool:
errors = []
if not self.has_executable_run():
errors.append("Run entrypoint is not executable")
if not self.has_run():
errors.append("Missing a run entrypoint")
if not self.has_app_directory():
errors.append("Missing the app directory")
if not self.has_cnab_directory():
errors.append("Missing the cnab directory")
if not self.has_no_misc_files_in_cnab_dir():
errors.append("Has additional files in the cnab directory")
if len(errors) == 0:
return True
else:
> raise InvalidCNABDirectoryError(errors)
E cnab.invocation_image.InvalidCNABDirectoryError: ['Has additional files in the cnab directory']
/usr/local/lib/python3.7/dist-packages/cnab/invocation_image.py:83: InvalidCNABDirectoryError
__________________ test_valid_invocation_image[makebase/cnab] __________________
path = 'makebase/cnab'
@pytest.mark.parametrize("path", glob.glob("**/cnab"))
def test_valid_invocation_image(path):
"Test that CNAB build directories for adherence to the spec"
head, tail = os.path.split(path)
directory = CNABDirectory(head)
> directory.valid()
test_validate_cnab.py:59:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <cnab.invocation_image.CNABDirectory object at 0x7f0f2a93fd30>
def valid(self) -> bool:
errors = []
if not self.has_executable_run():
errors.append("Run entrypoint is not executable")
if not self.has_run():
errors.append("Missing a run entrypoint")
if not self.has_app_directory():
errors.append("Missing the app directory")
if not self.has_cnab_directory():
errors.append("Missing the cnab directory")
if not self.has_no_misc_files_in_cnab_dir():
errors.append("Has additional files in the cnab directory")
if len(errors) == 0:
return True
else:
> raise InvalidCNABDirectoryError(errors)
E cnab.invocation_image.InvalidCNABDirectoryError: ['Has additional files in the cnab directory']
/usr/local/lib/python3.7/dist-packages/cnab/invocation_image.py:83: InvalidCNABDirectoryError
________________ test_valid_invocation_image[ansiblebase/cnab] _________________
path = 'ansiblebase/cnab'
@pytest.mark.parametrize("path", glob.glob("**/cnab"))
def test_valid_invocation_image(path):
"Test that CNAB build directories for adherence to the spec"
head, tail = os.path.split(path)
directory = CNABDirectory(head)
> directory.valid()
test_validate_cnab.py:59:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <cnab.invocation_image.CNABDirectory object at 0x7f0f2a973f28>
def valid(self) -> bool:
errors = []
if not self.has_executable_run():
errors.append("Run entrypoint is not executable")
if not self.has_run():
errors.append("Missing a run entrypoint")
if not self.has_app_directory():
errors.append("Missing the app directory")
if not self.has_cnab_directory():
errors.append("Missing the cnab directory")
if not self.has_no_misc_files_in_cnab_dir():
errors.append("Has additional files in the cnab directory")
if len(errors) == 0:
return True
else:
> raise InvalidCNABDirectoryError(errors)
E cnab.invocation_image.InvalidCNABDirectoryError: ['Run entrypoint is not executable', 'Has additional files in the cnab directory']
/usr/local/lib/python3.7/dist-packages/cnab/invocation_image.py:83: InvalidCNABDirectoryError
________ test_valid_invocation_image[example-voting-app-sqlserver/cnab] ________
path = 'example-voting-app-sqlserver/cnab'
@pytest.mark.parametrize("path", glob.glob("**/cnab"))
def test_valid_invocation_image(path):
"Test that CNAB build directories for adherence to the spec"
head, tail = os.path.split(path)
directory = CNABDirectory(head)
> directory.valid()
test_validate_cnab.py:59:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <cnab.invocation_image.CNABDirectory object at 0x7f0f2aa05f60>
def valid(self) -> bool:
errors = []
if not self.has_executable_run():
errors.append("Run entrypoint is not executable")
if not self.has_run():
errors.append("Missing a run entrypoint")
if not self.has_app_directory():
errors.append("Missing the app directory")
if not self.has_cnab_directory():
errors.append("Missing the cnab directory")
if not self.has_no_misc_files_in_cnab_dir():
errors.append("Has additional files in the cnab directory")
if len(errors) == 0:
return True
else:
> raise InvalidCNABDirectoryError(errors)
E cnab.invocation_image.InvalidCNABDirectoryError: ['Run entrypoint is not executable', 'Missing a run entrypoint', 'Has additional files in the cnab directory']
/usr/local/lib/python3.7/dist-packages/cnab/invocation_image.py:83: InvalidCNABDirectoryError
__________________ test_valid_invocation_image[k8sbase/cnab] ___________________
path = 'k8sbase/cnab'
@pytest.mark.parametrize("path", glob.glob("**/cnab"))
def test_valid_invocation_image(path):
"Test that CNAB build directories for adherence to the spec"
head, tail = os.path.split(path)
directory = CNABDirectory(head)
> directory.valid()
test_validate_cnab.py:59:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <cnab.invocation_image.CNABDirectory object at 0x7f0f2aa334a8>
def valid(self) -> bool:
errors = []
if not self.has_executable_run():
errors.append("Run entrypoint is not executable")
if not self.has_run():
errors.append("Missing a run entrypoint")
if not self.has_app_directory():
errors.append("Missing the app directory")
if not self.has_cnab_directory():
errors.append("Missing the cnab directory")
if not self.has_no_misc_files_in_cnab_dir():
errors.append("Has additional files in the cnab directory")
if len(errors) == 0:
return True
else:
> raise InvalidCNABDirectoryError(errors)
E cnab.invocation_image.InvalidCNABDirectoryError: ['Has additional files in the cnab directory']
/usr/local/lib/python3.7/dist-packages/cnab/invocation_image.py:83: InvalidCNABDirectoryError
_________________ test_valid_invocation_image[wordpress/cnab] __________________
path = 'wordpress/cnab'
@pytest.mark.parametrize("path", glob.glob("**/cnab"))
def test_valid_invocation_image(path):
"Test that CNAB build directories for adherence to the spec"
head, tail = os.path.split(path)
directory = CNABDirectory(head)
> directory.valid()
test_validate_cnab.py:59:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <cnab.invocation_image.CNABDirectory object at 0x7f0f2aa319b0>
def valid(self) -> bool:
errors = []
if not self.has_executable_run():
errors.append("Run entrypoint is not executable")
if not self.has_run():
errors.append("Missing a run entrypoint")
if not self.has_app_directory():
errors.append("Missing the app directory")
if not self.has_cnab_directory():
errors.append("Missing the cnab directory")
if not self.has_no_misc_files_in_cnab_dir():
errors.append("Has additional files in the cnab directory")
if len(errors) == 0:
return True
else:
> raise InvalidCNABDirectoryError(errors)
E cnab.invocation_image.InvalidCNABDirectoryError: ['Has additional files in the cnab directory']
/usr/local/lib/python3.7/dist-packages/cnab/invocation_image.py:83: InvalidCNABDirectoryError
_________________ test_valid_invocation_image[pulumibase/cnab] _________________
path = 'pulumibase/cnab'
@pytest.mark.parametrize("path", glob.glob("**/cnab"))
def test_valid_invocation_image(path):
"Test that CNAB build directories for adherence to the spec"
head, tail = os.path.split(path)
directory = CNABDirectory(head)
> directory.valid()
test_validate_cnab.py:59:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <cnab.invocation_image.CNABDirectory object at 0x7f0f2a970ba8>
def valid(self) -> bool:
errors = []
if not self.has_executable_run():
errors.append("Run entrypoint is not executable")
if not self.has_run():
errors.append("Missing a run entrypoint")
if not self.has_app_directory():
errors.append("Missing the app directory")
if not self.has_cnab_directory():
errors.append("Missing the cnab directory")
if not self.has_no_misc_files_in_cnab_dir():
errors.append("Has additional files in the cnab directory")
if len(errors) == 0:
return True
else:
> raise InvalidCNABDirectoryError(errors)
E cnab.invocation_image.InvalidCNABDirectoryError: ['Has additional files in the cnab directory']
/usr/local/lib/python3.7/dist-packages/cnab/invocation_image.py:83: InvalidCNABDirectoryError
__________________ test_valid_invocation_image[armbase/cnab] ___________________
path = 'armbase/cnab'
@pytest.mark.parametrize("path", glob.glob("**/cnab"))
def test_valid_invocation_image(path):
"Test that CNAB build directories for adherence to the spec"
head, tail = os.path.split(path)
directory = CNABDirectory(head)
> directory.valid()
test_validate_cnab.py:59:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <cnab.invocation_image.CNABDirectory object at 0x7f0f2aa2ea58>
def valid(self) -> bool:
errors = []
if not self.has_executable_run():
errors.append("Run entrypoint is not executable")
if not self.has_run():
errors.append("Missing a run entrypoint")
if not self.has_app_directory():
errors.append("Missing the app directory")
if not self.has_cnab_directory():
errors.append("Missing the cnab directory")
if not self.has_no_misc_files_in_cnab_dir():
errors.append("Has additional files in the cnab directory")
if len(errors) == 0:
return True
else:
> raise InvalidCNABDirectoryError(errors)
E cnab.invocation_image.InvalidCNABDirectoryError: ['Run entrypoint is not executable', 'Has additional files in the cnab directory']
/usr/local/lib/python3.7/dist-packages/cnab/invocation_image.py:83: InvalidCNABDirectoryError
________________ test_valid_invocation_image[example-run/cnab] _________________
path = 'example-run/cnab'
@pytest.mark.parametrize("path", glob.glob("**/cnab"))
def test_valid_invocation_image(path):
"Test that CNAB build directories for adherence to the spec"
head, tail = os.path.split(path)
directory = CNABDirectory(head)
> directory.valid()
test_validate_cnab.py:59:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <cnab.invocation_image.CNABDirectory object at 0x7f0f2aa35b00>
def valid(self) -> bool:
errors = []
if not self.has_executable_run():
errors.append("Run entrypoint is not executable")
if not self.has_run():
errors.append("Missing a run entrypoint")
if not self.has_app_directory():
errors.append("Missing the app directory")
if not self.has_cnab_directory():
errors.append("Missing the cnab directory")
if not self.has_no_misc_files_in_cnab_dir():
errors.append("Has additional files in the cnab directory")
if len(errors) == 0:
return True
else:
> raise InvalidCNABDirectoryError(errors)
E cnab.invocation_image.InvalidCNABDirectoryError: ['Has additional files in the cnab directory']
/usr/local/lib/python3.7/dist-packages/cnab/invocation_image.py:83: InvalidCNABDirectoryError
__________________ test_valid_invocation_image[compose/cnab] ___________________
path = 'compose/cnab'
@pytest.mark.parametrize("path", glob.glob("**/cnab"))
def test_valid_invocation_image(path):
"Test that CNAB build directories for adherence to the spec"
head, tail = os.path.split(path)
directory = CNABDirectory(head)
> directory.valid()
test_validate_cnab.py:59:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <cnab.invocation_image.CNABDirectory object at 0x7f0f2aa9bd30>
def valid(self) -> bool:
errors = []
if not self.has_executable_run():
errors.append("Run entrypoint is not executable")
if not self.has_run():
errors.append("Missing a run entrypoint")
if not self.has_app_directory():
errors.append("Missing the app directory")
if not self.has_cnab_directory():
errors.append("Missing the cnab directory")
if not self.has_no_misc_files_in_cnab_dir():
errors.append("Has additional files in the cnab directory")
if len(errors) == 0:
return True
else:
> raise InvalidCNABDirectoryError(errors)
E cnab.invocation_image.InvalidCNABDirectoryError: ['Run entrypoint is not executable', 'Missing a run entrypoint', 'Has additional files in the cnab directory']
/usr/local/lib/python3.7/dist-packages/cnab/invocation_image.py:83: InvalidCNABDirectoryError
===================== 49 failed, 12 passed in 1.93 seconds =====================
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment