You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Helpful for debugging, dumps the jinja map to a text file
29
29
30
-
## Testing
31
30
32
-
Testing is done with `kitchen-salt<https://github.com/simonmcc/kitchen-salt>`_ which means you'll also need Ruby. Hopefully you're already using rbenv or whatever all of the cool kids are using these days, I'm a fuddy-duddy and use rbenv. This formula has been tested on both 1.9.3 and 2.2.2 versions of Ruby.
33
31
34
-
You should have `bundler` installed and have `bundle` on your $PATH, running this will set things up for Ruby. If you're not running ruby-2.2.2 an exception will be thrown because the `Gemfile` is pinned to 2.2.2, update your Ruby version and re-run bundle command(s)
32
+
Testing
33
+
=========
34
+
35
+
Requirements
36
+
------------
35
37
36
-
```
37
-
bundle
38
+
Testing is done with KitchenSalt_ which means you'll also need a working Ruby setup and preferably 2.2.2, but you can use whatever version as long as you update the `Gemfile`. You will also need `bundler` installed and can be done so with `gem install bundler`.
38
39
39
-
\\ or
40
+
If all that works, you should be able to run `kitchen test` which is an alias for `kitchen converge` + `kitchen verify` but it deletes the box on completion so it isn't very useful during development.
Once you have successfully bundled things up, you should have the `kitchen` command on your $PATH. The first part is to run `kitchen converge` which will setup the environment by
45
-
- creating a vagrant box
46
-
- install salt
47
-
- run the states defined in **golang-formula/.kitchen.yml**
48
-
44
+
Cheat Sheet
45
+
------------
46
+
47
+
.. code-block::
49
48
50
-
Once you've successfully `converged` the environment, the tests can be executed. If you were to run `kitchen verify` the tests found in `golang-formula/test/integration/default`. Currently there are only tests which use the `bats<https://blog.engineyard.com/2014/bats-test-command-line-tools>`_ ` `Busser<https://github.com/test-kitchen/busser>`_.
49
+
# Initial setup
50
+
which bundle || gem install bundler
51
+
bundle install
52
+
53
+
# build vagrant box and run states
54
+
kitchen converge
55
+
56
+
# run tests in `test/integration/default`
57
+
kitchen verify
51
58
52
-
You can also run the `kitchen test` command, but that will destroy the existing vagrant before converging, roughly:
0 commit comments