Skip to content

Commit

Permalink
Add acceptance test
Browse files Browse the repository at this point in the history
  • Loading branch information
mcanevet committed May 31, 2014
1 parent 2f1668b commit a262d97
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions spec/acceptance/btsync_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,48 @@ class { 'btsync': }

end

describe 'with sample configuration' 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',
},
shared_folders => {
'MY_SECRET_1' => {
dir => '/home/vagrant/bittorrent/sync_test',
use_relay_server => true,
use_tracker => true,
use_dht => true,
search_lan => true,
use_sync_trash => true,
known_hosts => [ '192.168.1.2:44444', ],
},
},
}
}
}
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

end

0 comments on commit a262d97

Please sign in to comment.