Skip to content
Permalink
Browse files

Fixed spec tests. Updated tp::dir for edge cases

  • Loading branch information
alvagante committed Mar 2, 2020
1 parent a5e23ed commit a2fe3949af1141e85c8066f77a4bc552e7a4cecd
@@ -131,7 +131,7 @@
String[1] $ensure = 'present',

Variant[Undef,String,Array] $source = undef,
Variant[Undef,String] $vcsrepo = undef,
Variant[Undef,Boolean,String] $vcsrepo = false,
Hash $vcsrepo_options = {},
String[1] $base_dir = 'config',

@@ -208,13 +208,11 @@
default => $config_dir_notify,
}

$manage_ensure = $ensure ? {
'present' => $vcsrepo ? {
undef => 'directory',
default => 'present',
},
default => $ensure,
$ensure_vcsrepo = $ensure ? {
'directory' => 'present',
default => $ensure,
}
$ensure_dir = tp::ensure2dir($ensure)

# Finally, the resources managed
if $path_parent_create {
@@ -232,7 +230,7 @@

if $vcsrepo {
$vcsrepo_defaults = {
ensure => $manage_ensure,
ensure => $ensure_vcsrepo,
source => $source,
provider => $vcsrepo,
owner => $manage_owner,
@@ -243,7 +241,7 @@
}
} else {
$file_params = {
ensure => $manage_ensure,
ensure => $ensure_dir,
source => $source,
path => $manage_path,
mode => $manage_mode,
@@ -1,4 +1,5 @@
---
upstream_repo: false
package_ensure: present
service_ensure: running
service_enable: true
@@ -1,4 +1,5 @@
---
upstream_repo: false
package_ensure: present
service_ensure: running
service_enable: true
@@ -1,4 +1,5 @@
---
upstream_repo: false
package_ensure: present
service_ensure: running
service_enable: true
@@ -1,4 +1,5 @@
---
upstream_repo: false
package_ensure: present
service_ensure: running
service_enable: true
@@ -1,4 +1,5 @@
---
upstream_repo: false
package_ensure: present
service_ensure: running
service_enable: true
@@ -1,4 +1,5 @@
---
upstream_repo: false
package_ensure: present
service_ensure: running
service_enable: true
@@ -1,4 +1,5 @@
---
upstream_repo: false
package_ensure: present
service_ensure: running
service_enable: true
@@ -1,4 +1,5 @@
---
upstream_repo: false
package_ensure: present
service_ensure: running
service_enable: true
@@ -1,4 +1,5 @@
---
upstream_repo: false
package_ensure: present
service_ensure: running
service_enable: true
@@ -1,4 +1,5 @@
---
upstream_repo: false
package_ensure: present
service_ensure: running
service_enable: true
@@ -1,4 +1,5 @@
---
upstream_repo: false
package_ensure: present
service_ensure: running
service_enable: true
@@ -1,4 +1,5 @@
---
upstream_repo: false
package_ensure: present
service_ensure: running
service_enable: true
@@ -1,4 +1,5 @@
---
upstream_repo: false
package_ensure: present
service_ensure: running
service_enable: true
@@ -1,4 +1,5 @@
---
upstream_repo: false
package_ensure: present
service_ensure: running
service_enable: true
@@ -1,4 +1,5 @@
---
upstream_repo: false
package_ensure: present
service_ensure: running
service_enable: true
@@ -1,4 +1,5 @@
---
upstream_repo: false
package_ensure: present
service_ensure: running
service_enable: true
@@ -10,12 +11,10 @@ config_dir_group: root
config_dir_mode: '0755'
config_dir_purge: false
config_dir_recurse: true
repo_package_provider: dpkg
package_name: sysdig
tp_prerequisites:
- dkms
repo_url: http://download.draios.com/stable/deb
key: F1C3BD80
key: 'D27A 72F3 2D86 7DF9 300A 2415 7449 0FD6 EC51 E8C4'
key_url: https://s3.amazonaws.com/download.draios.com/DRAIOS-GPG-KEY.public
apt_release: stable-$(ARCH)/
repo_package_provider: dpkg

0 comments on commit a2fe394

Please sign in to comment.
You can’t perform that action at this time.