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
Copy file name to clipboardExpand all lines: README.md
+10-20Lines changed: 10 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -158,36 +158,26 @@ If you need to generate a postgres encrypted password, use `postgresql_password`
158
158
159
159
### Tests
160
160
161
-
There are two types of tests distributed with the module. The first set is the
162
-
“traditional” Puppet manifest-style smoke tests. You can use these to experiment with the module on a virtual machine or other test environment, via `puppet apply`. You should see the following files in the tests directory:
163
-
164
-
* init.pp: just installs the postgres client packages
165
-
166
-
* server.pp: installs the postgres server packages and starts the service; configures the service to accept connections from remote machines, and sets the password for the postgres database user account to ‘postgres’.
167
-
168
-
* postgresql_database.pp: creates a few sample databases with different character sets. Does not create any users for the databases.
169
-
170
-
* postgresql_database\_user.pp: creates a few sample users.
171
-
172
-
* postgresql_database\_grant.pp: shows an example of granting a privilege on a database to a certain user/role.
173
-
174
-
* postgresql_db.pp: creates several test databases, and creates database user accounts with full privileges for each of them.
161
+
There are two types of tests distributed with the module. The first set is the “traditional” Puppet manifest-style smoke tests. You can use these to experiment with the module on a virtual machine or other test environment, via `puppet apply`. You should see the following files in the `tests` directory.
175
162
176
163
In addition to these manifest-based smoke tests, there are some ruby rspec tests in the spec directory. These tests run against a VirtualBox VM, so they are actually testing the live application of the module on a real, running system. To do this, you must install and setup an [RVM](http://beginrescueend.com/) with [vagrant](http://vagrantup.com/), [sahara](https://github.com/jedi4ever/sahara), and [rspec](http://rspec.info/):
177
164
178
165
$ curl -L get.rvm.io | bash -s stable
179
166
$ rvm install 1.9.3
180
167
$ rvm use --create 1.9.3@puppet-postgresql
181
-
$ gem install vagrant sahara rspec
168
+
$ bundle install
169
+
170
+
Run the system tests:
171
+
172
+
$ rake spec:system
182
173
183
-
Run the tests:
174
+
The system test suite will snapshot the VM and rollback between each test.
184
175
185
-
$ (cd spec; vagrant up)
186
-
$ rspec -f -d -c
176
+
We also have some unit tests that utilize rspec-puppet for faster iteration if required:
187
177
188
-
The test suite will snapshot the VM and rollback between each test. Next, take a look at the manifests used for the automated tests.
178
+
$ rake spec
189
179
190
-
$ cat spec/manifests/test_*.pp
180
+
The unit tests are ran in Travis-CI as well, if you want to see the results of your own tests regsiter the service hook through Travis-CI via the accounts section for your Github clone of this project.
0 commit comments