How do I pass parameter to Beaker test please? According to docs and role syntax looks like it is not possible.
@jhutar hi! Could you please give example how you pass parameters to the tests while you run them from command line ? What kind of parameters? Maybe some URL to the supported mechanism ? Thank you.
@astepano Hi! Our team is also interested in this functionality. The beakerlib test parameters are just plain environment variables, so if we could do something like:
- hosts: localhost roles: - role: standard-test-beakerlib tags: - classic environment: - PARAM1: "value1" - PARAM2: "value2" repositories: - repo: "https://src.fedoraproject.org/tests/selinux.git" dest: "selinux" fmf_filter: "tier:1 | component:selinux-policy"
...and it would run all the tests with PARAM1=value1 and PARAM2=value2 set in the environment, that should do the trick.
Cc @vmojzis
Oh. Sorry for missing your question 16 months back @astepano :-( I do not need to know noe so feel free to close it although looks like @omos have related question so also feel free to use that report for that question as well.
OK, so it turns out the "environment" key under "role" already works :D So the only thing needed here should be updating the documentation.
Already works as follows:
- hosts: localhost roles: - role: standard-test-beakerlib tags: - classic repositories: - repo: "https://src.fedoraproject.org/tests/selinux.git" dest: "selinux" fmf_filter: "tier:1 | component:selinux-policy" tests: - test environment: PARAM1: "value1" PARAM2: "value2"