Closed rhass-r7 closed 9 years ago
Primarily, I just want to validate nexpose gets installed and starts properly for Linux and Windows. As for specific tests which need to be implemented; we need to test console and engine installs to ensure they correct installation type succeeded, engines being the more important one to validate. This test will have increasing importance as I start working on implementing new features to the cookbook which will require engines to be deployed.
OK. As for the first part, I can definitely write a simple test to see if nexpose is installed in the proper directory and another to see if it is started. I can create a PR just for these two things.
The engine functionality test will be a little tricky since I don't have a deep understanding of nexpose functionality. Is this similar to the chefspec tests that are here https://github.com/rapid7-cookbooks/nexpose/tree/master/spec/unit/recipes?
Also I believe that test-kitchen can only test the linux installation for now; unless anything has changed since this https://github.com/test-kitchen/kitchen-vagrant/issues/77.
Cool thanks!
With regards to engine support; that's fine, I can add it later.
As for Windows, TK can handle Windows systems. However, I am not sure there is a way for us to programmatically skip Windows if the required data for creating a Windows is missing, other than calling the specific targets when invoking kitchen. Initially, this probably wont be an issue -- but then end goal for me is to enable CI with travis or drone.io so people can get feedback on their PRs very quickly, which is likely where it may become an issue.
@jfitzpatrick taught a testing course at ChefConf last week, in which he indicated he had some of the basic files needed to spin up Windows instances with TK as long as the end user has the required ISOs, keys, etc. I have reached out to him this morning to see if he can send that over to me, and I will forward it along if he does.
Sounds good to me. So far I have TK set up with 12.04 and it runs 2 tests - verify service package is installed and that nexpose directory is created.
I am trying to create a test to make sure that the service is started, but I am confused as to the service name that you want to test. When I converge a box I do not find any services started according to https://github.com/rapid7-cookbooks/nexpose/commit/163d07702c950a4a612678ef725901e1ce0d5073. The only nexpose service that I can autocomplete is nexposeconsole.rc. Can you clarify what needs to be started?
Oops, clicked the wrong thing.
It looks like there are a few bugs in the recipe. One is with starting... we need this to be an optional thing internally, so I will submit a patch later. There also seems to be a bug with the not_if gaurd in the recipe which is causing the install to execute on subsequent chef runs.
@rhass-r7 do you have an IRC handle that you frequently use? I'd like to go over a couple of things with you. I'm @drag00n on freenode
Thanks @cmluciano !
Is there any specific tests that you want to run from test-kitchen or do you just want support for test-kitchen added? I ran through the initial setup of test-kitchen and was able to converge quite easily. Let me know and I can create a PR either way.