Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt to format changes of yadt-minion pull request #14 #23

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/integrationtest/python/yadt_status_answer.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@
- frontend-service:
needs_services: [backend-service]
state: $frontend_service_state
service_artefact: yit-frontend-service
service_artefact: [yit-frontend-service]
toplevel_artefacts: [yit-config-$host]
- backend-service:
state: $backend_service_state
service_artefact: yit-backend-service
service_artefact: [yit-backend-service]
toplevel_artefacts: [yit-config-$host]
artefact_names_handled_by_yadt:
- yit-frontend-service
Expand Down Expand Up @@ -108,7 +108,7 @@
services:
- backend-service:
state: $backend_service_state
service_artefact: yit-backend-service
service_artefact: [yit-backend-service]
needs_services: ['service://foo/bar']
artefact_names_handled_by_yadt:
- yit-frontend-service
Expand Down Expand Up @@ -150,11 +150,11 @@
- frontend-service:
needs_services: [backend-service]
state: $frontend_service_state
service_artefact: yit-frontend-service
service_artefact: [yit-frontend-service]
toplevel_artefacts: [yit-config-$host]
- backend-service:
state: $backend_service_state
service_artefact: yit-backend-service
service_artefact: [yit-backend-service]
toplevel_artefacts: [yit-config-$host]
needs_artefacts: [yit-config-$host]

Expand Down
4 changes: 2 additions & 2 deletions src/unittest/python/components_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,12 +237,12 @@ def test_set_attrs_with_obsolete_yaml_services_format(self):
services:
- backend-service:
state: $backend_service_state
service_artefact: yit-backend-service
service_artefact: [yit-backend-service]
needs_services: ['service://foo/bar']
"""
data = yaml.load(data_text, Loader=yaml.Loader)
host = yadtshell.components.Host("myhost")
host.set_attrs_from_data(data)
self.assertEqual(len(host.services), 1)
self.assertTrue("backend-service" in host.services)
self.assertTrue(host.services["backend-service"]["service_artefact"], "yit-backend-service")
self.assertEqual(host.services["backend-service"]["service_artefact"], ["yit-backend-service"])