Project

General

Profile

Revision ef3feba4

Added by Daniel Lobato Garcia over 6 years ago

Fixes #9752 - Pass Docker errors to controller

View differences:

test/units/containers_service_test.rb
24 24
    Fog.unmock!
25 25
    assert_equal DockerContainerWizardState.where(:id => @state.id).count, 0
26 26
  end
27

  
28
  test 'passes errors from compute resource' do
29
    # Since the compute resource will be unreachable, this test will always
30
    # fail at the 'pull_image' step
31
    containers_service = Service::Containers.new
32
    assert_raises(ActiveRecord::Rollback) do
33
      containers_service.create_container_object(@state)
34
    end
35
    assert containers_service.errors.present?
36
  end
37

  
27 38
end

Also available in: Unified diff