Skip to content

Files

Latest commit

 

History

History
 
 

serverspec

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Run Serverspec tests in a Windows container

This image on DockerHub

Dockerfile

This is a Windows Docker image with Serverspec installed.

You can run isolated Serverspec tests in Windows containers, eg. to test all scenarios of an own built MSI package.

Each container starts without your MSI package installed, so you don't need a snapshot of your VM.

Example

To run the Serverspec tests create a folder spec with some *_spec.rb files. See the spec folder to selftest this Docker image for an example.

Run the container like this:

PS C:\> docker run -v "$(pwd)/spec:C:/spec" stefanscherer/serverspec-windows

Chocolatey
  File "C:\ProgramData/chocolatey/bin"
    should exist
  Command "choco version"
    exit_status
      should eq 0
    stdout
      should match /Chocolatey v0.10.8/

Ruby
  Command "ruby --version"
    exit_status
      should eq 0
    stdout
      should match /ruby 2.3.1p112/
  Command "bundle version"
    exit_status
      should eq 0
    stdout
      should match /Bundler version 1.16.0/

Finished in 10.25 seconds (files took 1.77 seconds to load)
7 examples, 0 failures