2011-12-02 13:27:44 -05:00
|
|
|
Shindo.tests('Fog::Compute[:ibm] | key', ['ibm']) do
|
|
|
|
|
|
|
|
tests('success') do
|
2012-02-13 10:51:03 -05:00
|
|
|
|
2012-02-20 13:14:02 -05:00
|
|
|
@key_name = 'fog-test-key-' + Time.now.to_i.to_s(32)
|
2011-12-02 13:27:44 -05:00
|
|
|
@key = nil
|
2012-02-13 10:51:03 -05:00
|
|
|
|
2012-02-28 16:41:21 -05:00
|
|
|
tests("Fog::Compute::IBM::Key.create(:name => '#{@key_name}')") do
|
|
|
|
@key = Fog::Compute[:ibm].keys.create(:name => @key_name)
|
|
|
|
returns(@key_name) { @key.name }
|
2011-12-02 13:27:44 -05:00
|
|
|
end
|
2012-02-13 10:51:03 -05:00
|
|
|
|
2011-12-02 13:27:44 -05:00
|
|
|
tests("Fog::Compute::IBM::Key#instances") do
|
|
|
|
returns([]) { @key.instances }
|
|
|
|
end
|
2012-02-13 10:51:03 -05:00
|
|
|
|
2011-12-02 13:27:44 -05:00
|
|
|
tests('Fog::Compute::IBM::Key#destroy') do
|
|
|
|
returns(true) { @key.destroy }
|
|
|
|
end
|
2012-02-13 10:51:03 -05:00
|
|
|
|
2011-12-02 13:27:44 -05:00
|
|
|
end
|
2012-02-13 10:51:03 -05:00
|
|
|
|
|
|
|
end
|