sous-chefs / confluence

Development repository for the confluence cookbook
https://supermarket.chef.io/cookbooks/confluence
Other
43 stars 46 forks source link

Would be nice to create Cucumber test to check VM converged #10

Closed esciara closed 8 years ago

esciara commented 10 years ago

Could use https://github.com/esciara/wonderstuff/tree/6bbbd847fc71258e09e92070df67497b109a5a51/features/step_definitions as an example but without using leibniz (for more info about why, see https://github.com/esciara/wonderstuff#tests). Could use faraday to check that the title of the home page is "Confluence Setup Wizard - Confluence". Without leibniz, cucumber tests would have to be run from inside the VM, meaning that ip to use might be that of localhost. But if I remember correctly, Confluence will automatically redirect to the full name of the machine... So might need to add an entry to /etc/hosts/ to make it work.

esciara commented 10 years ago

@bflad I have had it to work using busser-cucumber but I am still having some ugly code I do not know how to change.

Here is the gist with all relevant files: https://gist.github.com/esciara/ba18b442164f16942a79

I managed to have the cucumber test to check the home page but I need to know the IP address of the VM... and it has two. The current code is guessing that the good IP is the second one.... Not pretty, I know.

 @local_ip = Socket.ip_address_list[2].ip_address

Don't really know where else I could get the IP, either on the system of in somewhere in the configurations. I need a second opinion.

bflad commented 10 years ago

This looks really interesting. I apologize I haven't had time the last few days to look at these yet, but I'll start digging in shortly.

esciara commented 10 years ago

Doing this exercise makes me realise that it would be good to have an equivalent of leibniz but that would rather work like a plugin to test-kitchen, so that it runs cucumber tests from outside the box whenever kitchen verify or kitchen test are called... will look around on how this is possible.

esciara commented 10 years ago

I have advanced on the subject if you might be interested...

legal90 commented 8 years ago

It was implemented via ServerSpec: #69

lock[bot] commented 5 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.