You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Then the runnable-recipe and runnable-recipes resolvers are used with the Job API, and a configuration is supplied in the suite (or job), it's not passed on to the created runnables.
Steps to reproduce
Have suite config that has a config item such as runner.identifier_format set to NOT FOO
The suite config resolution should point to a file that will be resolved by the runnable-recipe resolver, such as examples/nrunner/recipes/runnable/noop.json (that lacks the runner.identifer_format config
Crate a suite, with suite = TestSuite.from_config(config)
With the resolver working correctly and one test being created in the suite, check for the configuration with suite.tests[0].config.get("runner.identifier_format")
Expected behavior suite.tests[0].config.get("runner.identifier_format") should contain the configuration set at the suite level, that is, it should be NOT FOO.
Current behavior suite.tests[0].config.get("runner.identifier_format") == None
System information (please complete the following information):
The setting of configuration into runnables is currently being done at
the time where a runnable will be run (at the "nrunner" suite runner
plugin).
But, there are situations, such as when using the Job API, that this
is too late or not effective.
This change moves the setting of the configuration to the suite, which
is based on the job configuration, and thus already has all the
information needed to set the final version of the configuration.
Fixes: avocado-framework#5963
Signed-off-by: Cleber Rosa <[email protected]>
Describe the bug
Then the runnable-recipe and runnable-recipes resolvers are used with the Job API, and a configuration is supplied in the suite (or job), it's not passed on to the created runnables.
Steps to reproduce
runner.identifier_format
set toNOT FOO
runnable-recipe
resolver, such asexamples/nrunner/recipes/runnable/noop.json
(that lacks therunner.identifer_format
configsuite
, withsuite = TestSuite.from_config(config)
suite.tests[0].config.get("runner.identifier_format")
The following test shows the bug in action:
Expected behavior
suite.tests[0].config.get("runner.identifier_format")
should contain the configuration set at the suite level, that is, it should beNOT FOO
.Current behavior
suite.tests[0].config.get("runner.identifier_format") == None
System information (please complete the following information):
LSB Version: :core-5.0-amd64:core-5.0-noarch:cxx-5.0-amd64:cxx-5.0-noarch:desktop-5.0-amd64:desktop-5.0-noarch:languages-5.0-amd64:languages-5.0-noarch:printing-5.0-amd64:printing-5.0-noarch Distributor ID: Fedora Description: Fedora release 40 (Forty) Release: 40 Codename: Forty
The text was updated successfully, but these errors were encountered: