diff --git a/atomic_reactor/inner.py b/atomic_reactor/inner.py
index <HASH>..<HASH> 100644
--- a/atomic_reactor/inner.py
+++ b/atomic_reactor/inner.py
@@ -326,8 +326,11 @@ class DockerBuildWorkflow(object):
 
             self.build_failed = build_result.is_failed()
 
-            if not build_result.is_failed():
-                self.built_image_inspect = self.builder.inspect_built_image()
+            if build_result.is_failed():
+                # The docker build failed
+                return build_result
+
+            self.built_image_inspect = self.builder.inspect_built_image()
 
             # run prepublish plugins
             prepublish_runner = PrePublishPluginsRunner(self.builder.tasker, self, self.prepublish_plugins_conf,
diff --git a/tests/test_inner.py b/tests/test_inner.py
index <HASH>..<HASH> 100644
--- a/tests/test_inner.py
+++ b/tests/test_inner.py
@@ -591,7 +591,6 @@ def test_workflow_plugin_error(fail_at):
     assert watch_exit.was_called()
 
 
-@pytest.mark.xfail(reason='#320')
 def test_workflow_docker_build_error():
     """
     This is a test for what happens when the docker build fails.
Abort build after docker build failure (fixes #<I>)