Sha256: 7fff6ec1f708fc1ad19f67a1257a02617dd21783c26786a34b6dbcbde898a2ca

Contents?: true

Size: 1.17 KB

Versions: 53

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

53 entries across 53 versions & 3 rubygems

Version Path
fog-1.22.0 tests/openvz/models/compute/server_tests.rb
fog-1.21.0 tests/openvz/models/compute/server_tests.rb
fog-maestrodev-1.20.0.20140305101839 tests/openvz/models/compute/server_tests.rb
fog-maestrodev-1.20.0.20140305101305 tests/openvz/models/compute/server_tests.rb
fog-maestrodev-1.19.0.20140212012611 tests/openvz/models/compute/server_tests.rb
fog-1.20.0 tests/openvz/models/compute/server_tests.rb
fog-maestrodev-1.19.0.20140110004459 tests/openvz/models/compute/server_tests.rb
fog-maestrodev-1.19.0.20140110003812 tests/openvz/models/compute/server_tests.rb
fog-maestrodev-1.19.0.20140109202555 tests/openvz/models/compute/server_tests.rb
fog-maestrodev-1.19.0.20140107192102 tests/openvz/models/compute/server_tests.rb
fog-maestrodev-1.19.0.20140107142106 tests/openvz/models/compute/server_tests.rb
fog-maestrodev-1.19.0.20131219203941 tests/openvz/models/compute/server_tests.rb
fog-maestrodev-1.18.0.20131219193542 tests/openvz/models/compute/server_tests.rb
fog-1.19.0 tests/openvz/models/compute/server_tests.rb
fog-maestrodev-1.18.0.20131219033443 tests/openvz/models/compute/server_tests.rb
fog-maestrodev-1.18.0.20131219032002 tests/openvz/models/compute/server_tests.rb
fog-maestrodev-1.18.0.20131219030716 tests/openvz/models/compute/server_tests.rb
fog-maestrodev-1.18.0.20131219022322 tests/openvz/models/compute/server_tests.rb
fog-maestrodev-1.18.0.20131218202447 tests/openvz/models/compute/server_tests.rb
fog-maestrodev-1.18.0.20131209091424 tests/openvz/models/compute/server_tests.rb