2011-06-16 16:28:54 -07:00
|
|
|
Shindo.tests("Fog::Compute[:aws] | key_pair", ['aws']) do
|
2011-03-21 16:45:52 -07:00
|
|
|
|
2011-06-16 16:28:54 -07:00
|
|
|
model_tests(Fog::Compute[:aws].key_pairs, {:name => 'fogkeyname'}, true)
|
2011-03-21 16:45:52 -07:00
|
|
|
|
2011-03-31 01:48:34 -06:00
|
|
|
after do
|
|
|
|
@keypair.destroy
|
|
|
|
end
|
|
|
|
|
|
|
|
tests("new keypair") do
|
2011-06-16 16:28:54 -07:00
|
|
|
@keypair = Fog::Compute[:aws].key_pairs.create(:name => 'testkey')
|
2011-03-31 01:48:34 -06:00
|
|
|
|
|
|
|
test ("writable?") do
|
|
|
|
@keypair.writable? == true
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
tests("existing keypair") do
|
2011-06-16 16:28:54 -07:00
|
|
|
Fog::Compute[:aws].key_pairs.create(:name => 'testkey')
|
|
|
|
@keypair = Fog::Compute[:aws].key_pairs.get('testkey')
|
2011-03-31 01:48:34 -06:00
|
|
|
|
|
|
|
test("writable?") do
|
|
|
|
@keypair.writable? == false
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
2011-03-21 16:45:52 -07:00
|
|
|
end
|