Class: Torpedo::Compute::Keypairs
- Inherits:
-
Test::Unit::TestCase
- Object
- Test::Unit::TestCase
- Torpedo::Compute::Keypairs
- Defined in:
- lib/torpedo/compute/keypairs.rb
Constant Summary collapse
- @@key_pairs =
[]
- @@key_pair =
ref to last created key_pair
nil- @@key_pair_name =
ref to last created key_pair
'torpedo'
Class Method Summary collapse
-
.key_pair ⇒ Object
public access to the key_pair ref.
Instance Method Summary collapse
Class Method Details
.key_pair ⇒ Object
public access to the key_pair ref
12 13 14 |
# File 'lib/torpedo/compute/keypairs.rb', line 12 def self.key_pair @@key_pair end |
Instance Method Details
#create_key_pair(options) ⇒ Object
20 21 22 23 24 |
# File 'lib/torpedo/compute/keypairs.rb', line 20 def create_key_pair() @@key_pair = @conn.key_pairs.create() @@key_pairs << @@key_pair @@key_pair end |
#setup ⇒ Object
16 17 18 |
# File 'lib/torpedo/compute/keypairs.rb', line 16 def setup @conn=Helper::get_connection end |
#test_001_create_key_pair ⇒ Object
26 27 28 29 30 31 32 |
# File 'lib/torpedo/compute/keypairs.rb', line 26 def test_001_create_key_pair public_key = IO.read(SSH_PUBLIC_KEY) = {:public_key => public_key, :name => @@key_pair_name} key_pair = create_key_pair() assert_equal(@@key_pair_name, key_pair.name) assert_equal(public_key, key_pair.public_key) end |