Skip to content

Commit

Permalink
Fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alvagante committed Sep 25, 2024
1 parent cee2146 commit 86ac0b1
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 14 deletions.
2 changes: 1 addition & 1 deletion manifests/info.pp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
require puppi
require puppi::params

if Array($run) {
if $run.type == Array {
$array_run = $run
} else {
$array_run = $run ? {
Expand Down
2 changes: 1 addition & 1 deletion manifests/install_packages.pp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
define puppi::install_packages (
String $packages,
String $template = 'puppi/install_packages.erb',
Srring $scripts_dir = '/root/puppi_install_packages',
String $scripts_dir = '/root/puppi_install_packages',
Boolean $autorun = true,
Boolean $refreshonly = true,
Variant[String,Integer] $timeout = '600',
Expand Down
2 changes: 1 addition & 1 deletion manifests/log.pp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
require puppi
require puppi::params

if Array($log) {
if $log.type == Array {
$array_log = $log
} else {
$array_log = split($log, ',')
Expand Down
2 changes: 1 addition & 1 deletion manifests/todo.pp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
require puppi
require puppi::params

if Array($run) {
if $run.type == Array {
$array_run = $run
} else {
$array_run = $run ? {
Expand Down
9 changes: 6 additions & 3 deletions spec/defines/configure_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@
let(:title) { 'namevar' }
let(:node) { 'rspec.example42.com' }
let(:pre_condition) { 'include puppi' }
let(:params) do
{}
end
let(:params) {
{
'command' => 'test',
'project' => 'zip',
}
}
it { is_expected.to compile }
end
end
Expand Down
9 changes: 6 additions & 3 deletions spec/defines/netinstall_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@
let(:title) { 'namevar' }
let(:node) { 'rspec.example42.com' }
let(:pre_condition) { 'include puppi' }
let(:params) do
{}
end
let(:params) {
{
'url' => 'test',
'destination_url' => '/tmp',
}
}
it { is_expected.to compile }
end
end
Expand Down
6 changes: 2 additions & 4 deletions spec/defines/project_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,9 @@
let(:node) { 'rspec.example42.com' }
let(:pre_condition) { 'include puppi' }
let(:params) {
{ 'enable' => 'true',
{
'enable' => 'true',
'name' => 'get',
'command' => 'echo',
'priority' => '50',
'project' => 'myapp',
}
}

Expand Down

0 comments on commit 86ac0b1

Please sign in to comment.