From 7ab44372d81e86df99b3aefa114a5003df98bc61 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Thu, 31 Oct 2019 20:38:27 -0500 Subject: hscript: Implement SigningKey, add tests --- tests/spec/validator_spec.rb | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'tests/spec') diff --git a/tests/spec/validator_spec.rb b/tests/spec/validator_spec.rb index 96a2caf..5c78f36 100644 --- a/tests/spec/validator_spec.rb +++ b/tests/spec/validator_spec.rb @@ -562,6 +562,25 @@ RSpec.describe 'HorizonScript validation', :type => :aruba do expect(last_command_started).to have_output(/error: .*repository/) end end + context "for 'signingkey' key" do + it "succeeds with secure key URL" do + use_fixture '0186-signingkey-basic.installfile' + run_validate + expect(last_command_started).to have_output(PARSER_SUCCESS) + expect(last_command_started).to have_output(VALIDATOR_SUCCESS) + end + it "succeeds with local key URL" do + use_fixture '0187-signingkey-local.installfile' + run_validate + expect(last_command_started).to have_output(PARSER_SUCCESS) + expect(last_command_started).to have_output(VALIDATOR_SUCCESS) + end + it "fails with insecure key URL" do + use_fixture '0188-signingkey-insec.installfile' + run_validate + expect(last_command_started).to have_output(/error: .*signingkey/) + end + end context "for 'diskid' key" do it "succeeds with basic disk identification" do use_fixture '0076-diskid-basic.installfile' -- cgit v1.2.3-70-g09d2