From 8ced467dae7f618f9a88e9892534a62bdf6c0fa7 Mon Sep 17 00:00:00 2001 From: Dejan Golja Date: Fri, 17 Oct 2014 23:03:49 +1100 Subject: [PATCH] Updated rspec-system tests and version bump for the next forge release 0.0.5 --- CHANGELOG | 3 +++ metadata.json | 4 ++-- spec/system/gnupg_key_install_spec.rb | 26 +++++++++++++++++++++++++- 3 files changed, 30 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index b9f784a..7cfd02c 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +2014-10-07 - Dejan Golja - 0.0.5 +* bugfix for https keys + 2014-08-17 - Dejan Golja - 0.0.4 * Update metadata.json and removed Modulefile due to as of Puppet 3.6 the Modulefile has been deprecated diff --git a/metadata.json b/metadata.json index 823f24a..9eb8f53 100644 --- a/metadata.json +++ b/metadata.json @@ -47,10 +47,10 @@ ], "license": "ASL 2.0", "name": "golja-gnupg", - "project_page": "http://github.com/n1tr0g/golja-gnupg.git", + "project_page": "https://github.com/n1tr0g/golja-gnupg", "source": "git://github.com/n1tr0g/golja-gnupg.git", "summary": "Manage gnupg package and public keys", - "version": "0.0.4", + "version": "0.0.5", "tags": ["gnupg", "pgp", "ubuntu", "debian", "redhat", "centos"], "issues_url": "https://github.com/n1tr0g/golja-gnupg/issues" } diff --git a/spec/system/gnupg_key_install_spec.rb b/spec/system/gnupg_key_install_spec.rb index 875eb73..34df584 100644 --- a/spec/system/gnupg_key_install_spec.rb +++ b/spec/system/gnupg_key_install_spec.rb @@ -8,7 +8,7 @@ end end - it 'should install a key from a URL address' do + it 'should install a key from a HTTP URL address' do pp = <<-EOS.unindent gnupg_key { 'jenkins_key': ensure => present, @@ -32,6 +32,30 @@ end end + it 'should install a key from a HTTPS URL address' do + pp = <<-EOS.unindent + gnupg_key { 'newrelic_key': + ensure => present, + user => 'root', + key_source => 'https://download.newrelic.com/548C16BF.gpg', + key_id => '548C16BF', + } + EOS + + puppet_apply(pp) do |r| + r.exit_code.should == 2 + r.refresh + r.exit_code.should == 0 + end + + # check that gnupg installed the key + gpg("--list-keys 548C16BF") do |r| + r.stdout.should =~ /548C16BF/ + r.stderr.should == '' + r.exit_code == 0 + end + end + it 'should install a key from a key server' do pp = <<-EOS.unindent gnupg_key { 'root_key_foo':