Skip to content

Commit

Permalink
Merge pull request #37 from cloudblue/LITE-25308_fix_validations_and_…
Browse files Browse the repository at this point in the history
…dependencies

LITE-25308 fix validations and dependencies
  • Loading branch information
ffaraone authored Oct 10, 2022
2 parents 68e3f94 + 11257a0 commit 2b778f0
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion connect/eaas/core/validation/validators/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def validate_docker_compose_yml(context):

for service in data['services']:
image = data['services'][service].get('image')
if image != runner_image:
if image.startswith('cloudblueconnect/connect-extension-runner') and image != runner_image:
messages.append(
ValidationItem(
level='ERROR',
Expand Down
2 changes: 1 addition & 1 deletion connect/eaas/core/validation/validators/webapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def _check_ui_component_url(extension_class, page_name, value, code_pattern):
page_path = value[8:]
full_path = os.path.join(
os.path.dirname(inspect.getsourcefile(extension_class)),
'static_root',
'static',
page_path,
)
if not os.path.exists(full_path):
Expand Down
2 changes: 1 addition & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ fastapi = "^0.78.0"
fastapi-utils = "^0.2.1"
logzio-python-handler = "^3.1.1"
anvil-uplink = "^0.4.0"
toml = "^0.10.2"
PyYAML = "^6.0"

[tool.poetry.dev-dependencies]
ipython = "^7.21.0"
Expand Down
5 changes: 3 additions & 2 deletions tests/connect/eaas/core/validation/validators/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ def test_validate_docker_compose_yml_invalid_image(mocker):
return_value={
'services': {
'dev': {
'image': 'invalid:image',
'image': 'cloudblueconnect/connect-extension-runner:0.3',
},
},
},
Expand All @@ -478,7 +478,8 @@ def test_validate_docker_compose_yml_invalid_image(mocker):
assert item.level == 'ERROR'
assert (
'Invalid image for service *dev*: expected '
'*cloudblueconnect/connect-extension-runner:1.0* got *invalid:image*.'
'*cloudblueconnect/connect-extension-runner:1.0* '
'got *cloudblueconnect/connect-extension-runner:0.3*.'
) in item.message
assert item.file == 'fake_dir/docker-compose.yml'

Expand Down

0 comments on commit 2b778f0

Please sign in to comment.