spec/metadata_spec.rb in engineyard-metadata-0.0.2 vs spec/metadata_spec.rb in engineyard-metadata-0.0.3

- old
+ new

@@ -1,18 +1,22 @@ require 'spec_helper' describe EY do - it 'has a dna.json' do + it 'has a FakeFS dna.json' do File.exist?('/etc/chef/dna.json').should == true end end describe EY::Metadata do it 'gets the present instance ID' do EY::Metadata.present_instance_id.should == PRESENT_INSTANCE_ID end + it 'gets the present instance role (as a string)' do + EY::Metadata.present_instance_role.should == 'app_master' + end + it 'gets the present public hostname' do EY::Metadata.present_public_hostname.should == PRESENT_PUBLIC_HOSTNAME end it 'gets the present security group' do @@ -59,7 +63,15 @@ EY::Metadata.app_master.should == 'app_master.compute-1.amazonaws.com' end it 'gets the db master hostname' do EY::Metadata.db_master.should == 'db_master.compute-1.amazonaws.com' + end + + it 'gets the mysql command' do + EY::Metadata.mysql_command.should == '/usr/bin/mysql -h external_db_master.compute-1.amazonaws.com -u USERS-0-USERNAME -pUSERS-0-PASSWORD APPS-0-DATABASE_NAME' + end + + it 'gets the mysqldump command' do + EY::Metadata.mysqldump_command.should == '/usr/bin/mysqldump -h external_db_master.compute-1.amazonaws.com -u USERS-0-USERNAME -pUSERS-0-PASSWORD APPS-0-DATABASE_NAME' end end