Browse Source

Make rubocop happy

tags/0.1.17
Bernd Zeimetz 3 years ago
parent
commit
73be57a8a5

+ 2
- 1
lib/puppet/parser/functions/file_or_empty_string.rb View File

@@ -1,7 +1,8 @@
# Returns the contents of a file - or an empty string
# if the file does not exist. based on file.rb from puppet.

Puppet::Parser::Functions.newfunction(:file_or_empty_string, type: :rvalue, doc: <<-EOS
Puppet::Parser::Functions.newfunction
( :file_or_empty_string, type: :rvalue, doc: <<-EOS
Return the contents of a file. Multiple files
can be passed, and the first file that exists will be read in.
EOS

+ 5
- 6
spec/classes/letsencrypt_init_spec.rb View File

@@ -7,12 +7,11 @@ describe 'letsencrypt', type: :class do
fqdn: 'spectest',
puppetmaster: 'spectest',
letsencrypt_crts: 'spectest',
letsencrypt_csr_spectest: '-----BEGIN CERTIFICATE REQUEST-----\nMIICpzCCAY8CAQAwYjELMAkGA1UEBhMCQVQxETAPBgNVBAgMCFNhbHpidXJnMREw\nDwYDVQQHDAhTYWx6YnVyZzENMAsGA1UECgwEYnplZDEeMBwGA1UEAwwVc3BlYy10\nZXN0LmV4YW1wbGUuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA\nlc3jPhFUfrfPvvQOd7vtl1+eA4ak6MAEqGL0c6xjyIiaHffNMr1ujPhZIyDuX+a/\nvbB4en+FZrq3abSqGEF0+ca/aqluAxR3jQzM231g18UpAppceV/Xz8lOsk4u5vl2\nnBW/44GwpwV+rFTjgsNPZ3dDRWaTcyJ8FFxLstf5AWudecnLYEiWeXIpiCYiUZZH\neoO9SUhs77f2S3lU8sAeUGn8L4Xrx70cyhDym7gh2Vwf0LmvulsNvQQPPPEfh3Mp\nHQvhqPmRYVl/fAszEEhrElgwCT76LPbvJjs/bYdkDUbT1gv1Lv/4h7xbvc7YsIf9\naIGQGU+Tbc4Bpd1uMQjxwwIDAQABoAAwDQYJKoZIhvcNAQELBQADggEBAF8ytNzr\n2HLQaqjPH6ETOi3yiheJe8tNB1bV8YCtffxjP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Ty54/J7OfE6kAlGibSoX\nQOmUGLdsRDGgVmismofs2fam4XDjijVxXMgrdzj22KbcuWmdF3W+9Sn8GpEXW4Nh\nT+oIq/TPAl/wym6jo6EeflMlOLo0V4Bb5ylmkPCkLVGwm/ClouxgNSRP/uDDa/kT\nMhRrz3+JfoRSK2PgzT1Ai48eTt98YxsBr261KvovbMbnpqPtCfedta33d7EESg32\nssyZggp6vUJnypw=\n-----END CERTIFICATE REQUEST-----'
}
end
# it { should contain_file('/etc/letsencrypt').with_ensure('directory') }
# it { should contain_file('/etc/letsencrypt/csr').with_ensure('directory') }
# it { should contain_file('/etc/letsencrypt/private').with_ensure('directory') }
# it { should contain_file('/etc/letsencrypt/certs').with_ensure('directory') }

# it { should contain_file('/etc/letsencrypt').with_ensure('directory') }
# it { should contain_file('/etc/letsencrypt/csr').with_ensure('directory') }
# it { should contain_file('/etc/letsencrypt/private').with_ensure('directory') }
# it { should contain_file('/etc/letsencrypt/certs').with_ensure('directory') }
end

Loading…
Cancel
Save