Sha256: ff912e173975b25f420e7c66b73405da3af4a058a305da7ba077688af7f791ad

Contents?: true

Size: 818 Bytes

Versions: 45

Compression:

Stored size: 818 Bytes

Contents

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

  compute = Fog::Compute[:fogdocker]
  name_base = Time.now.to_i

  tests("Create Container") do
    response = compute.container_create(:name => 'fog-'+name_base.to_s, 'image' => 'mattdm/fedora:f19','Cmd' => ['date'] )
    test("should be a kind of Hash") { response.kind_of?  Hash}
  end

  tests("Fail Creating Container") do
    begin
      response = compute.container_create(:name => 'fog-'+name_base.to_s, 'image' => 'mattdm/fedora:f19')
      test("should be a kind of Hash") { response.kind_of?  Hash} #mock never raise exceptions
    rescue => e
      #should raise missing command in the create attributes.
      test("error should be a kind of Docker::Error") { e.kind_of?  Docker::Error::ServerError}
    end
  end

end

Version data entries

45 entries across 43 versions & 6 rubygems

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