Sha256: cce766a8b2ccbb0f59539a6dce8eb49d58e5b21d9cf45314884f0b7bf99f3c36

Contents?: true

Size: 1.17 KB

Versions: 43

Compression:

Stored size: 1.17 KB

Contents

Shindo.tests("Fog::Compute[:openvz] | server model", ['openvz', 'compute']) do

  server  = openvz_fog_test_server

  tests('The server model should') do

    tests('have the action') do
      test('reload') { server.respond_to? 'reload' }
      %w{
        destroy
        mount
        umount
        restart
        stop
        start
        quotaon
        quotaoff
        quotainit
        suspend
        resume
      }.each do |action|
        test(action) { server.respond_to? action }
      end
    end
    tests('have attributes') do
      model_attribute_hash = server.attributes
      attributes = [
        :ctid,
        :description
      ]
      tests("The server model should respond to") do
        attributes.each do |attribute|
          test("#{attribute}") { server.respond_to? attribute }
        end
      end
    end
    test('#stop') do
      pending if Fog.mocking?
      server.stop
      server.wait_for { server.status == 'stopped' }
      server.status == 'stopped'
    end
    test('#start') do
      pending if Fog.mocking?
      server.start
      server.wait_for { ready? }
      server.ready?
    end

  end

  # restore server status
  server.start

end

Version data entries

43 entries across 41 versions & 6 rubygems

Version Path
fog-2.3.0 tests/openvz/models/compute/server_tests.rb
fog-ifeel-2.2.0 tests/openvz/models/compute/server_tests.rb
fog-2.2.0 tests/openvz/models/compute/server_tests.rb
fog-2.1.0 tests/openvz/models/compute/server_tests.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/fog-1.42.1/tests/openvz/models/compute/server_tests.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-1.42.1/tests/openvz/models/compute/server_tests.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/fog-1.42.1/tests/openvz/models/compute/server_tests.rb
fog-1.42.1 tests/openvz/models/compute/server_tests.rb
fog-2.0.0 tests/openvz/models/compute/server_tests.rb
fog-1.42.0 tests/openvz/models/compute/server_tests.rb
fog-1.41.0 tests/openvz/models/compute/server_tests.rb
fog-1.40.0 tests/openvz/models/compute/server_tests.rb
fog-1.39.0 tests/openvz/models/compute/server_tests.rb
fog-1.38.0 tests/openvz/models/compute/server_tests.rb
fog-1.37.0 tests/openvz/models/compute/server_tests.rb
fog-1.36.0 tests/openvz/models/compute/server_tests.rb
fog-1.35.0 tests/openvz/models/compute/server_tests.rb
fog-2.0.0.pre.0 tests/openvz/models/compute/server_tests.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-1.32.0/tests/openvz/models/compute/server_tests.rb
fog-1.34.0 tests/openvz/models/compute/server_tests.rb