Closed lukaszachy closed 1 year ago
Easier steps to reproduce:
test: true
adjust:
when: distro ~< rhel-8.4
enabled: False
import tmt
test = tmt.Tree('.').tests(names=['/before'])[0]
with test.node as data:
data["foo"] = "bar"
Interesting enough I was not able to reproduce it with pure 'fmf' e.g. in
import fmf
with fmf.Tree('.').find('/before') as data:
data["foo"] = "bar"
This seems to be caused by the adjust()
method. Pure fmf
reproducer:
import fmf
tree = fmf.Tree('.')
tree.adjust(fmf.context.Context())
test = tree.find('/before')
with test as data:
data["foo"] = "bar"
Should be fixed by psss/fmf/pull/124.
I'd say this is a blocker - User needs to revert adjust rule changes but keep added extra-nitrate and if user doesn't commit fmf files before tmt export (which is not yet enforced by tmt) then they loose original adjust data for good.
Yes, let's fix this soon. And release a new fmf
right away.
Fixed for some time, added correct milestone and closing
Before export:
After export when key is missing:
This makes fmf/tmt to raise
fmf.utils.FormatError: No condition defined in adjust rule.
, including intmt test lint
I used tmt-1.3.1-1.20210330165247205001.master.64.g02badb3.fc33.noarch fmf-0.15.2-1.20210326172917712489.master.3.ga401333.fc33.noarch