-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #37 from rightscale-cookbooks/ST-375_azure_shares_ips
St 375 azure shares ips
- Loading branch information
Showing
6 changed files
with
37 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
require_relative 'spec_helper' | ||
|
||
describe 'rs-mysql::default' do | ||
|
||
before do | ||
stub_command("/usr/bin/mysql -u root -e 'show databases;'").and_return(true) | ||
end | ||
|
||
let(:chef_run) do | ||
ChefSpec::Runner.new do |node| | ||
node.set['cloud']['public_ips'] = ['', '10.1.1.1'] | ||
node.set['cloud']['private_ips'] = ['10.0.2.15', '10.0.2.16'] | ||
node.set['memory']['total'] = '1011228kB' | ||
node.set['rs-mysql']['application_database_name'] = 'apptest' | ||
node.set['rs-mysql']['backup']['lineage'] = 'testing' | ||
node.set['rs-mysql']['server_repl_password'] = 'replpass' | ||
node.set['rs-mysql']['server_root_password'] = 'rootpass' | ||
end.converge(described_recipe) | ||
|
||
# Chefspec by default sets node['macaddress'] to '11:11:11:11:11:11' | ||
# In generating the server_id, we remove the first 2 octets - we do the same here to verify | ||
it 'sets server_id based on macaddress' do | ||
expect(chef_run.node['mysql']['tunable']['server_id']).to eq(0x11111111) | ||
end | ||
end | ||
end |