Closed anujbiyani closed 11 years ago
Ya this shouldn't be happening; I should have something for you in the next day or so.
Sorry; holidays took most of my time so I wasn't able to work on this issue. Going to take a stab at it this weekend.
No problem, I'm quite happy so far with manually uploading roles since that's the same thing I have to do in production.
Been working on CC; I think I know why your having issues. You need at add something along the lines of this to your cucumber.yml
in the root of your chef-repo
:
---
default: -c -v --exclude support/cookbooks --exclude support/data_bags --exclude support/keys --exclude support/roles
Otherwise; cucumber tries to load all files under the features
directory and since cucumber doesn't rightfully understand the Chef DSL it will proceed to blow up.
Also; if you want to load roles directory from your repo; you should be able to. Instead of using ./features/support/roles/xyz
, you should be able to just say ./roles/xyz
.
The cucumber.yml
addition worked perfectly, thanks!
I thought I had tried uploading from ./roles/xyz
and found that it wasn't working, but I just tried it and it's working just fine. I must've screwed something up a while back or be misremembering.
I'll update the Wiki with the cucumber.yml
info; I'm fairly new to Cucumber and so didn't know about that file, and I think it'd help people like me if this info were stated (or maybe just this issue linked to) from the Wiki.
Thanks again.
Awesome; glad to hear that worked for you. I must admit the wiki needs some loving; thank you for adding the note to it, I appreciate it very much!
The Wiki says to put roles in
./support/roles/
so I created./support/roles/base.rb
with the contentsNow if I run any cucumber-chef test (regardless of whether or not the test tries to upload a role), I get the error
It seems to be because Cucumber automatically loads files in
./features/support
, then tries to executebase.rb
which then blows up.Without monkey-patching Cucumber, I'm not sure what to do about fixing this unless Cucumber-Chef is changed so it doesn't load roles from a subdirectory of
./features/support
.Another related concern I have is that any role that I create for my project is in
./roles
, but any roles that the feature tests use have to be in./features/support/roles
. This implies that any role that I use in production and want to use in a test would have to be duplicated in both directories.Is there any reason why Cucumber-Chef shouldn't load roles from
./roles
?(For now I'm simply uploading roles by hand with
cc-knife role from file FILE
.)