Skip to content

Commit

Permalink
Add acceptance test
Browse files Browse the repository at this point in the history
  • Loading branch information
mcanevet committed Jun 1, 2014
1 parent a262d97 commit b7d42ce
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions spec/acceptance/btsync_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,47 @@ class { 'btsync':
}
EOS

# Run it twice and test for idempotency
apply_manifest(pp, :catch_failures => true)
expect(apply_manifest(pp, :catch_failures => true).exit_code).to be_zero

end

end

describe 'without shared_folders' do

it 'should install btsync' do
pp = <<-EOS
class { 'btsync::repo': } ->
class { 'btsync':
instances => {
vagrant => {
device_name => 'My Sync Device',
listening_port => 0,
storage_path => '/home/vagrant/.sync',
check_for_updates => false,
use_upnp => true,
download_limit => 0,
upload_limit => 0,
webui => {
listen => '0.0.0.0:8888',
login => 'admin',
password => 'password',
},
}
}
}
EOS

# Run it twice and test for idempotency
apply_manifest(pp, :catch_failures => true)
expect(apply_manifest(pp, :catch_failures => true).exit_code).to be_zero

end

describe port(8888) do
it { should be_listening }
end

end
Expand Down

0 comments on commit b7d42ce

Please sign in to comment.