I’m working on a patch for Foreman Ansible, however, I’ve found it quite difficult to figure out how I can run the tests. rake -T displays “test:core” as a potential tasks, but it doesn’t really run any tests.
Did anyone manage to get this working? Wouldn’t want to have to push and wait for Jenkins to fail actually.
…Unless that would be the only way forward
It should be something like
rake test:foreman_ansible and you should run that from Foreman’s checkout.
In addition to what @aruzicka said you can also specify a single test file by passing the
 Fixed: Ability to efficiently run single test cases (not just a file)
I don’t think I fully understand how to use this. I’ll try to explain what I’ve done so far:
- Cloned GIT of foreman_ansible repo
- Added my unit test
- Execute: rake test:foreman_ansible
=> It states it doesn’t know how to run this tasks (also, -T does not provide this task).
Now, when I read your text, you state that i “should run that from Foreman’s checkout”, do you mean I also have to clone the foreman repo and from there I should run the command? How does that clone know where to look for my development repo? (sorry for this total n00b question )
Aah, will try this tonight; explains a lot actually! Feels like I’ll be able to make a quantum leap once I got that set-up. Thank you for these clear steps on how to get this to run.
Works like a charm! Thank you for your input!