be_running } its(:instance_id) { should eq 'i-ec12345a' } its(:instance_type) { should eq ’t2.small' } its(:public_ip_address) { should eq '123.0.456.789' } it { should have_security_group('my-sg-name') } it { should belong_to_vpc('my-vpc') } it { should have_eip('123.0.456.789') } end
exist } its(:resource_record_set_count) { should eq 5 } it { should have_record_set('example.com.').a('123.456.7.890') } it { should have_record_set('example.com.').mx('10 mail.example.com') } it { should have_record_set('mail.example.com.') .a('123.456.7.890').ttl(3600) } it { should have_record_set('s3.example.com.') .alias('s3-website-us-east-1.amazonaws.com.', 'Z2ABCDEFGHIJKL') } end
be_enabled.with_level(3) } end describe iptables do it { should have_rule('-P INPUT ACCEPT') } end describe cgroup('group1') do its('cpuset.cpus') { should eq 1 } end
Groupの「このポートだけオープンしている こと」をテストするマッチャの追加 #121 PR by ceaess describe security_group('my-sg') do its(:outbound) do should be_opened_only(50_000) .protocol('tcp') .for(%w(100.456.789.012/32 200.567.890.123/32)) end end
#131 PR by k1LoW describe ec2('my-ec2') do it { should have_event('system-reboot') } end describe ec2(’other-ec2') do it { should_not have_events } end
#150 PR by matsuzj describe ec2('my-classic-ec2') do it { should have_classiclink_security_group('sg-2a3b4cd5') } it { should have_classiclink_security_group('my-vpc-security- group-name') } end