Skip to content

Commit

Permalink
Add compose file test for Bobcat PX30 (#812)
Browse files Browse the repository at this point in the history
* Add hardware definition for Bobcat PX30

* Update requirements.txt

---------

Co-authored-by: Aaron Shaw <shawaj@gmail.com>
  • Loading branch information
ccrisan and shawaj authored Jun 26, 2023
1 parent dd05532 commit 3b1be00
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
jinja2==3.1.2
grpcio==1.53.0
hm-pyhelper==0.14.13
hm-pyhelper==0.14.16
14 changes: 13 additions & 1 deletion tests/test_output_by_variant.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
pycom_output_file = join(here, 'pycom.yml')
controllino_output_file = join(here, 'controllino.yml')
rak_output_file = join(here, 'rak.yml')
bobcat_px30_output_file = join(here, 'bobcat-px30.yml')

sys.path.insert(1, parent)

Expand All @@ -40,7 +41,8 @@ def _remove_output_files(self):
syncrobit_output_file,
pycom_output_file,
controllino_output_file,
rak_output_file):
rak_output_file,
bobcat_px30_output_file):
if exists(filename):
unlink(filename)

Expand Down Expand Up @@ -126,6 +128,16 @@ def test_rak_compose_output_is_valid(self):
check_call(
f'docker-compose -f {rak_output_file} config -q', shell=True)

def test_bobcat_px30_compose_output_is_valid(self):
dc = DockerComposer()
dc.generate_compose_file('bobcat-px30', template_file, bobcat_px30_output_file)

# On failure or non-zero return code this returns CalledProcessError
# so if this runs without that, it's considered successful as
# `docker-compose config -q` returns 1 on invalid config
check_call(
f'docker-compose -f {bobcat_px30_output_file} config -q', shell=True)

def test_variant_is_invalid(self):
dc = DockerComposer()

Expand Down

0 comments on commit 3b1be00

Please sign in to comment.