Skip to content

Commit

Permalink
Merge pull request #191 from traylenator/tests
Browse files Browse the repository at this point in the history
Add parameter typing to all classes
  • Loading branch information
traylenator authored Feb 1, 2024
2 parents b216514 + acc88d8 commit 5125aa1
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 40 deletions.
2 changes: 0 additions & 2 deletions .puppet-lint.rc

This file was deleted.

3 changes: 0 additions & 3 deletions .sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,3 @@ spec/spec_helper.rb:
spec/spec_helper_acceptance.rb:
unmanaged: false

.puppet-lint.rc:
enabled_lint_checks:
- parameter_documentation
54 changes: 27 additions & 27 deletions manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,32 @@
# @api private
#
class cvmfs::config (
$mount_method = $cvmfs::mount_method,
$manage_autofs_service = $cvmfs::manage_autofs_service,
$cvmfs_http_proxy = $cvmfs::cvmfs_http_proxy,
$cvmfs_quota_limit = $cvmfs::cvmfs_quota_limit,
$cvmfs_quota_ratio = $cvmfs::cvmfs_quota_ratio,
$cvmfs_cache_base = $cvmfs::cvmfs_cache_base,
$cvmfs_tracefile = $cvmfs::cvmfs_tracefile,
$cvmfs_debuglog = $cvmfs::cvmfs_debuglog,
$cvmfs_max_ttl = $cvmfs::cvmfs_max_ttl,
$cvmfs_repo_list = $cvmfs::cvmfs_repo_list,
$cvmfs_memcache_size = $cvmfs::cvmfs_memcache_size,
$cvmfs_claim_ownership = $cvmfs::cvmfs_claim_ownership,
$cvmfs_syslog_level = $cvmfs::cvmfs_syslog_level,
$cvmfs_uid_map = $cvmfs::cvmfs_uid_map,
$cvmfs_gid_map = $cvmfs::cvmfs_gid_map,
$cvmfs_instrument_fuse = $cvmfs::cvmfs_instrument_fuse,
$cvmfs_mount_rw = $cvmfs::cvmfs_mount_rw,
$default_cvmfs_partsize = $cvmfs::default_cvmfs_partsize,
$cvmfs_timeout = $cvmfs::cvmfs_timeout,
$cvmfs_timeout_direct = $cvmfs::cvmfs_timeout_direct,
$cvmfs_nfiles = $cvmfs::cvmfs_nfiles,
$cvmfs_env_variables = $cvmfs::cvmfs_env_variables,
$cvmfs_use_geoapi = $cvmfs::cvmfs_use_geoapi,
$cvmfs_follow_redirects = $cvmfs::cvmfs_follow_redirects,
$cvmfs_alien_cache = $cvmfs::cvmfs_alien_cache,
$cvmfs_shared_cache = $cvmfs::cvmfs_shared_cache,
Enum['autofs','mount','none'] $mount_method = $cvmfs::mount_method,
Boolean $manage_autofs_service = $cvmfs::manage_autofs_service,
Variant[Undef, String] $cvmfs_http_proxy = $cvmfs::cvmfs_http_proxy,
Variant[Enum['auto'],Integer] $cvmfs_quota_limit = $cvmfs::cvmfs_quota_limit,
Float $cvmfs_quota_ratio = $cvmfs::cvmfs_quota_ratio,
Stdlib::Absolutepath $cvmfs_cache_base = $cvmfs::cvmfs_cache_base,
Optional[Stdlib::Absolutepath] $cvmfs_tracefile = $cvmfs::cvmfs_tracefile,
Optional[Stdlib::Absolutepath] $cvmfs_debuglog = $cvmfs::cvmfs_debuglog,
Optional[Integer] $cvmfs_max_ttl = $cvmfs::cvmfs_max_ttl,
Boolean $cvmfs_repo_list = $cvmfs::cvmfs_repo_list,
Optional[Integer] $cvmfs_memcache_size = $cvmfs::cvmfs_memcache_size,
Optional[Enum['yes','no']] $cvmfs_claim_ownership = $cvmfs::cvmfs_claim_ownership,
Optional[Integer[1,2]] $cvmfs_syslog_level = $cvmfs::cvmfs_syslog_level,
Optional[Hash[Variant[Integer,String], Integer, 1]] $cvmfs_uid_map = $cvmfs::cvmfs_uid_map,
Optional[Hash[Variant[Integer,String], Integer, 1]] $cvmfs_gid_map = $cvmfs::cvmfs_gid_map,
Boolean $cvmfs_instrument_fuse = $cvmfs::cvmfs_instrument_fuse,
Optional[Enum['yes','no']] $cvmfs_mount_rw = $cvmfs::cvmfs_mount_rw,
Integer $default_cvmfs_partsize = $cvmfs::default_cvmfs_partsize,
Optional[Integer] $cvmfs_timeout = $cvmfs::cvmfs_timeout,
Optional[Integer] $cvmfs_timeout_direct = $cvmfs::cvmfs_timeout_direct,
Optional[Integer] $cvmfs_nfiles = $cvmfs::cvmfs_nfiles,
Hash $cvmfs_env_variables = $cvmfs::cvmfs_env_variables,
Optional[Enum['yes','no']] $cvmfs_use_geoapi = $cvmfs::cvmfs_use_geoapi,
Optional[Enum['yes','no']] $cvmfs_follow_redirects = $cvmfs::cvmfs_follow_redirects,
Optional[String] $cvmfs_alien_cache = $cvmfs::cvmfs_alien_cache,
Optional[Enum['yes','no']] $cvmfs_shared_cache = $cvmfs::cvmfs_shared_cache,
Optional[Variant[Integer[4,4],Integer[6,6]]] $cvmfs_ipfamily_prefer = $cvmfs::cvmfs_ipfamily_prefer,
Optional[Integer] $cvmfs_dns_max_ttl = $cvmfs::cvmfs_dns_max_ttl,
Optional[Integer] $cvmfs_dns_min_ttl = $cvmfs::cvmfs_dns_min_ttl,
Expand All @@ -39,7 +39,7 @@
Optional[Array[Integer[0],1]] $cvmfs_cpu_affinity = $cvmfs::cvmfs_cpu_affinity,
Optional[Array[Integer[1],1]] $cvmfs_xattr_privileged_gids = $cvmfs::cvmfs_xattr_privileged_gids,
Optional[Array[String[1],1]] $cvmfs_xattr_protected_xattrs = $cvmfs::cvmfs_xattr_protected_xattrs,
$cvmfs_repositories = $cvmfs::cvmfs_repositories,
Optional[String[1]] $cvmfs_repositories = $cvmfs::cvmfs_repositories,
) inherits cvmfs {
# If cvmfspartsize fact exists use it, otherwise use a sensible default.
if $facts['cvmfspartsize'] {
Expand Down
6 changes: 3 additions & 3 deletions manifests/fsck.pp
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
# @param usesystemd Use a systemd timer
#
class cvmfs::fsck (
$cvmfs_cache_base = $cvmfs::cvmfs_cache_base,
$options = $cvmfs::cvmfs_fsck_options,
$onreboot = $cvmfs::cvmfs_fsck_onreboot,
Stdlib::Absolutepath $cvmfs_cache_base = $cvmfs::cvmfs_cache_base,
Optional[String] $options = $cvmfs::cvmfs_fsck_options,
Boolean $onreboot = $cvmfs::cvmfs_fsck_onreboot,
Optional[Boolean] $usesystemd = undef,
) inherits cvmfs {
if ($facts['os']['family'] == 'RedHat' and (versioncmp($facts['os']['release']['major'],'7') <= 0))
Expand Down
6 changes: 3 additions & 3 deletions manifests/install.pp
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
# @api private
#
class cvmfs::install (
$cvmfs_version = $cvmfs::cvmfs_version,
$cvmfs_cache_base = $cvmfs::cvmfs_cache_base,
$fuse3 = $cvmfs::fuse3,
String[1] $cvmfs_version = $cvmfs::cvmfs_version,
Stdlib::Absolutepath $cvmfs_cache_base = $cvmfs::cvmfs_cache_base,
Optional[Boolean] $fuse3 = $cvmfs::fuse3,
) inherits cvmfs {
# Create the cache dir if one is defined, otherwise assume default is in the package.
# Require the package so we know the user is in place.
Expand Down
4 changes: 2 additions & 2 deletions manifests/service.pp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# @api private
#
class cvmfs::service (
$mount_method = $cvmfs::mount_method,
$manage_autofs_service = $cvmfs::manage_autofs_service,
Enum['autofs','mount','none'] $mount_method = $cvmfs::mount_method,
Boolean $manage_autofs_service = $cvmfs::manage_autofs_service,
) inherits cvmfs {
# CVMFS 2.1 at least uses cvmfs_config.

Expand Down

0 comments on commit 5125aa1

Please sign in to comment.