File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed
spec/unit/puppet/provider/kubeconfig Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change 6161 if $ensure == ' present' {
6262 Package <| title == ' openssl' |>
6363 -> exec {
64- default:
65- path => $facts [' path' ];
66-
6764 " Create K8s ${title} key" :
6865 command => " openssl genrsa -out '${key} ' ${key_bits} ; echo > '${cert} '" ,
6966 unless => " openssl pkey -in '${key} ' -text | grep '${key_bits} bit'" ,
67+ path => $facts [' path' ],
7068 before => File [$key ],
7169 notify => Exec[" Create K8s ${title} CSR" ];
7270
7371 " Create K8s ${title} CSR" :
7472 command => " openssl req -new -key '${key} ' \
7573 -out '${csr} ' -config '${$config} '; echo > '${cert} '" ,
74+ path => $facts [' path' ],
7675 refreshonly => true ,
7776 notify => Exec[" Sign K8s ${title} cert" ],
7877 require => File [$key ],
8483 -out '${cert} ' -days '${valid_days} ' \
8584 -extensions v3_req -extfile '${config} '" ,
8685 unless => " openssl verify -CAfile '${ca_cert} ' '${cert} '" ,
86+ path => $facts [' path' ],
8787 require => [
8888 File [$csr ],
8989 File [$key ],
Original file line number Diff line number Diff line change @@ -67,7 +67,6 @@ def self.message(*_); end
6767 ] ,
6868 'current-context' => 'default' ,
6969 'kind' => 'Config' ,
70- 'preferences' => { } ,
7170 }
7271 end
7372
@@ -125,7 +124,7 @@ def self.message(*_); end
125124 catalog . apply
126125
127126 data = Psych . load ( File . read ( tmpfile ) )
128- expect ( data ) . to eq default_kubeconfig
127+ expect ( data . slice ( * default_kubeconfig . keys ) ) . to eq default_kubeconfig
129128 end
130129 end
131130 end
You can’t perform that action at this time.
0 commit comments