Skip to content

Commit 1a82827

Browse files
authored
Run JSONTas on step definition (#15)
1 parent fdceee8 commit 1a82827

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@ requests==2.24.0
2020
eiffellib==1.1.0
2121
packageurl-python==0.9.1
2222
etos_lib==1.0.0
23+
jsontas==1.3.0

setup.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ install_requires =
2929
requests==2.24.0
3030
etos_lib==1.0.0
3131
packageurl-python==0.9.1
32+
jsontas==1.3.0
3233

3334
[options.package_data]
3435
* = *.sh

src/etos_test_runner/lib/iut.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
import os
1818
import logging
1919
from packageurl import PackageURL
20+
from collections import OrderedDict
21+
from jsontas.jsontas import JsonTas
2022

2123

2224
class Iut: # pylint: disable=too-few-public-methods
@@ -37,6 +39,8 @@ def __init__(self, product):
3739
for key, value in product.items():
3840
setattr(self, key, value)
3941
self._product_dict = product
42+
self.jsontas = JsonTas()
43+
self.jsontas.dataset.add("iut", self._product_dict)
4044
self.prepare()
4145

4246
def prepare(self):
@@ -48,7 +52,9 @@ def prepare(self):
4852
self.logger.error("Step %r does not exist. Available %r", step, self.steps)
4953
continue
5054
self.logger.info("Executing step %r", step)
51-
step_method(definition)
55+
definition = OrderedDict(**definition)
56+
step_result = self.jsontas.run(json_data=definition)
57+
step_method(step_result)
5258

5359
@staticmethod
5460
def load_environment(environment):

0 commit comments

Comments
 (0)