From f6c45bc408a9afc02d733b69877c17c5941e8019 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Wed, 6 Nov 2019 20:44:54 -0600 Subject: tests: Ensure execution failure when validation fails --- tests/spec/simulator_spec.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests') diff --git a/tests/spec/simulator_spec.rb b/tests/spec/simulator_spec.rb index f18119b..d223c0f 100644 --- a/tests/spec/simulator_spec.rb +++ b/tests/spec/simulator_spec.rb @@ -27,6 +27,11 @@ RSpec.describe 'HorizonScript Simulator', :type => :aruba do expect(last_command_started.stdout).to start_with("#!/bin/sh") end end + it "handles validation failures correctly" do + use_fixture '0024-numeric-hostname.installfile' + run_simulate + expect(last_command_started.stderr).to include("Script failed. Stop.") + end context "simulating 'disklabel' execution" do it "creates Apple Partition Maps correctly" do use_fixture '0122-disklabel-apm.installfile' -- cgit v1.2.3-60-g2f50