Sha256: 90faf1d7be89481dc98bd833d5ad04a69a453268378303c60d8ddc4c22adaecf

Contents?: true

Size: 829 Bytes

Versions: 7

Compression:

Stored size: 829 Bytes

Contents

#
# Author:: Matt Eldridge (<matt.eldridge@us.ibm.com>)
# © Copyright IBM Corporation 2014.
#
# LICENSE: MIT (http://opensource.org/licenses/MIT)
#
def server_tests(connection, params = {}, mocks_implemented = true)

  model_tests(connection.servers, params, mocks_implemented) do

    tests('#reload').returns(true) do
      pending if Fog.mocking? && !mocks_implemented
      @instance.wait_for { ready? }
      identity = @instance.identity
      !identity.nil? && identity == @instance.reload.identity
    end

    responds_to([:ready?, :state])
    yield if block_given?

    tests('#reboot').succeeds do
      pending if Fog.mocking? && !mocks_implemented
      @instance.wait_for { ready? }
      @instance.reboot
    end

    if !Fog.mocking? || mocks_implemented
      @instance.wait_for { ready? }
    end

  end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
fog-softlayer-0.2.1 tests/compute/server_helper.rb
fog-softlayer-0.1.1 tests/compute/server_helper.rb
fog-softlayer-0.1.0 tests/compute/server_helper.rb
fog-softlayer-0.0.9 tests/compute/server_helper.rb
fog-softlayer-0.0.8 tests/compute/server_helper.rb
fog-softlayer-0.0.7 tests/compute/server_helper.rb
fog-softlayer-0.0.5 tests/compute/server_helper.rb