This add-on integrates Serverspec into your DDEV project.
This add-on installs the required serverspec packages inside the web container.
ddev add-on get tyler36/ddev-serverspec
ddev restart
After installation, make sure to commit the .ddev
directory to version control.
Command | Description |
---|---|
ddev serverspec-init |
Scaffold tests |
ddev serverspec |
Run serverspec tests |
ddev serverspec-init
starts a wizard to generate required files and scaffold an example test.
The following is an example that generates that confirms a service is listening on port 80.
$ ddev serverspec-init
Select OS type:
1) UN*X
2) Windows
Select number: 1
Select a backend type:
1) SSH
2) Exec (local)
Select number: 2
+ spec/
+ spec/localhost/
+ spec/localhost/sample_spec.rb
+ spec/spec_helper.rb
+ Rakefile
+ .rspec
ddev serverspec
runs available serverspec tests.
The command accepts flags and arguments, as required.
For example: to stop at the first failing test.
ddev rspec --fail-fast
Contributed and maintained by @tyler36