Sha256: c5f5b73a9018751689da8e5a5105765e02c32a25142cb1423873c25c0a876f27

Contents?: true

Size: 867 Bytes

Versions: 13

Compression:

Stored size: 867 Bytes

Contents

Shindo.tests("Fog::Compute[:fogdocker] | container_action request", 'fogdocker') do

  compute = Fog::Compute[:fogdocker]
  name = "fog-#{Time.now.to_i}"
  response = compute.container_create(:name => name, 'image' => 'mattdm/fedora:f19','Cmd' => ['date'] )
  id = response['id']

  tests("Start Container") do
    response = compute.container_action(:id => id, :action => 'start' )
    test("should be a kind of Hash") { response.kind_of?  Hash}
  end

  tests("Stop Container") do
    response = compute.container_action(:id => id, :action => 'stop' )
    test("should be a kind of Hash") { response.kind_of? Hash}
  end

  tests("Kill Container") do
    response = compute.container_action(:id => id, :action => 'kill' )
    test("should be a kind of Hash") { response.kind_of?  Hash}
    test("should be stopped") { response['state_running'] == false}
  end

end

Version data entries

13 entries across 13 versions & 3 rubygems

Version Path
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/tests/fogdocker/requests/compute/container_action_tests.rb
fog-1.24.0 tests/fogdocker/requests/compute/container_action_tests.rb
ns-fog-1.22.11 tests/fogdocker/requests/compute/container_action_tests.rb
ns-fog-1.22.10 tests/fogdocker/requests/compute/container_action_tests.rb
ns-fog-1.22.9 tests/fogdocker/requests/compute/container_action_tests.rb
ns-fog-1.22.8 tests/fogdocker/requests/compute/container_action_tests.rb
ns-fog-1.22.7 tests/fogdocker/requests/compute/container_action_tests.rb
ns-fog-1.22.6 tests/fogdocker/requests/compute/container_action_tests.rb
fog-1.23.0 tests/fogdocker/requests/compute/container_action_tests.rb
ns-fog-1.22.4 tests/fogdocker/requests/compute/container_action_tests.rb
ns-fog-1.22.3 tests/fogdocker/requests/compute/container_action_tests.rb
ns-fog-1.22.2 tests/fogdocker/requests/compute/container_action_tests.rb
fog-1.22.1 tests/fogdocker/requests/compute/container_action_tests.rb