source stringclasses 1
value | repo stringlengths 5 63 | repo_url stringlengths 24 82 | path stringlengths 5 167 | language stringclasses 1
value | license stringclasses 5
values | stars int64 10 51.4k | ref stringclasses 23
values | size_bytes int64 200 258k | text stringlengths 137 258k |
|---|---|---|---|---|---|---|---|---|---|
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/lib/puppet/acceptance/rpm_util.rb | Ruby | apache-2.0 | 7,843 | main | 4,171 | module Puppet
module Acceptance
module RpmUtils
# Utilities for creating a basic rpm package and using it in tests
@@defaults = {:repo => '/tmp/rpmrepo', :pkg => 'mypkg', :publisher => 'tstpub.lan', :version => '1.0'}
@@setup_packages = {}
def rpm_provider(agent)
has_dnf = on(agen... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/lib/puppet/acceptance/classifier_utils_spec.rb | Ruby | apache-2.0 | 7,843 | main | 2,216 | require File.join(File.dirname(__FILE__),'../../acceptance_spec_helper.rb')
require 'puppet/acceptance/classifier_utils'
require 'stringio'
require 'beaker'
module ClassifierUtilsSpec
describe 'ClassifierUtils' do
class ATestCase < Beaker::TestCase
include Puppet::Acceptance::ClassifierUtils
attr_accessor :... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/lib/puppet/acceptance/environment_utils_spec.rb | Ruby | apache-2.0 | 7,843 | main | 5,914 | require File.join(File.dirname(__FILE__),'../../acceptance_spec_helper.rb')
require 'puppet/acceptance/environment_utils'
module EnvironmentUtilsSpec
describe 'EnvironmentUtils' do
class ATestCase
include Puppet::Acceptance::EnvironmentUtils
def step(str)
yield
end
def on(host, command, optio... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/lib/puppet/acceptance/temp_file_utils.rb | Ruby | apache-2.0 | 7,843 | main | 6,745 | module Puppet
module Acceptance
module TempFileUtils
RWXR_XR_X = '0755'
PUPPET_CODEDIR_PERMISSIONS = RWXR_XR_X
# Return the name of the root user, as appropriate for the platform.
def root_user(host)
case host['platform']
when /windows/
'Administrator'
el... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/lib/puppet/acceptance/puppet_type_test_tools_spec.rb | Ruby | apache-2.0 | 7,843 | main | 6,623 | require File.join(File.dirname(__FILE__),'../../acceptance_spec_helper.rb')
require 'puppet/acceptance/puppet_type_test_tools.rb'
require 'beaker/dsl/assertions'
require 'beaker/result'
module Puppet
module Acceptance
describe 'PuppetTypeTestTools' do
include PuppetTypeTestTools
include Beaker::DSL:... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/lib/puppet/acceptance/windows_utils.rb | Ruby | apache-2.0 | 7,843 | main | 1,849 | require 'puppet/acceptance/common_utils'
module Puppet
module Acceptance
module WindowsUtils
require 'puppet/acceptance/windows_utils/service.rb'
require 'puppet/acceptance/windows_utils/package_installer.rb'
def profile_base(agent)
ruby = Puppet::Acceptance::CommandUtils.ruby_command(... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/lib/puppet/acceptance/solaris_util.rb | Ruby | apache-2.0 | 7,843 | main | 5,866 | module Puppet
module Acceptance
module IPSUtils
def clean(agent, o={})
o = {:repo => '/var/tstrepo', :pkg => 'mypkg', :publisher => 'tstpub.lan'}.merge(o)
on agent, "rm -rf %s||:" % o[:repo]
on agent, "rm -rf /tst||:"
on agent, "pkg uninstall %s||:" % o[:pkg]
on agent... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/lib/puppet/acceptance/classifier_utils.rb | Ruby | apache-2.0 | 7,843 | main | 7,407 | require 'httparty'
require 'tempfile'
require 'stringio'
require 'uuidtools'
require 'json'
require 'pp'
module Puppet
module Acceptance
module ClassifierUtils
DEFAULT_GROUP_ID = "00000000-0000-4000-8000-000000000000"
SSL_PORT = 4433
PREFIX = "/classifier-api"
# Keep track of our local t... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/lib/puppet/acceptance/aix_util.rb | Ruby | apache-2.0 | 7,843 | main | 6,715 | module Puppet
module Acceptance
module AixUtil
def to_kv_array(attributes)
attributes.map { |attribute, value| "#{attribute}=#{value}" }
end
def assert_object_attributes_on(host, object_get, object, expected_attributes)
host.send(object_get, object) do |result|
actual_... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/lib/puppet/acceptance/service_utils.rb | Ruby | apache-2.0 | 7,843 | main | 7,268 | require 'puppet/acceptance/common_utils'
module Puppet
module Acceptance
module ServiceUtils
# Return whether a host supports the systemd provider.
# @param host [String] hostname
# @return [Boolean] whether the systemd provider is supported.
def supports_systemd?(host)
# The Win... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/lib/puppet/acceptance/agent_fqdn_utils.rb | Ruby | apache-2.0 | 7,843 | main | 449 | module Puppet
module Acceptance
module AgentFqdnUtils
@@hostname_to_fqdn = {}
# convert from an Beaker::Host (agent) to the systems fqdn as returned by facter
def agent_to_fqdn(agent)
unless @@hostname_to_fqdn.has_key?(agent.hostname)
@@hostname_to_fqdn[agent.hostname] = on(a... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/lib/puppet/acceptance/i18ndemo_utils.rb | Ruby | apache-2.0 | 7,843 | main | 1,551 | module Puppet
module Acceptance
module I18nDemoUtils
require 'puppet/acceptance/i18n_utils'
extend Puppet::Acceptance::I18nUtils
I18NDEMO_NAME = "i18ndemo"
I18NDEMO_MODULE_NAME = "eputnam-#{I18NDEMO_NAME}"
def configure_master_system_locale(language)
language = enable_locale_language(mast... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/lib/puppet/acceptance/environment_utils.rb | Ruby | apache-2.0 | 7,843 | main | 15,606 | require 'puppet/acceptance/module_utils'
module Puppet
module Acceptance
module EnvironmentUtils
include Puppet::Acceptance::ModuleUtils
# Generate puppet manifest for the creation of an environment with
# the given modulepath and manifest and env_name. The created environment
# will ha... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/lib/puppet/acceptance/windows_utils/package_installer.rb | Ruby | apache-2.0 | 7,843 | main | 2,983 | module Puppet
module Acceptance
module WindowsUtils
# Sets up a mock installer on the host.
def create_mock_package(host, tmpdir, config = {}, installer_file = 'MockInstaller.cs', uninstaller_file = 'MockUninstaller.cs')
installer_exe_path = "#{tmpdir}/#{config[:name].gsub(/\s+/, '')}Installe... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/lib/puppet/acceptance/windows_utils/service.rb | Ruby | apache-2.0 | 7,843 | main | 4,775 | module Puppet
module Acceptance
module WindowsUtils
# Sets up a mock service on the host. The methodology here is a simplified
# version of what's described in https://msdn.microsoft.com/en-us/magazine/mt703436.aspx
def setup_service(host, config = {}, service_file = 'MockService.cs')
co... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/ticket_5592_hiera_lookup_when_param_undef.rb | Ruby | apache-2.0 | 7,843 | main | 1,695 | test_name 'Ensure hiera lookup occurs if class param is undef' do
tag 'audit:high',
'audit:unit' # basic auto lookup functionality
agents.each do |agent|
testdir = agent.tmpdir('undef')
step 'Setup - create hiera data file and test module' do
##{{{
manifest =<<-PP
File {
ensure => dire... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/ticket_6541_invalid_filebucket_files.rb | Ruby | apache-2.0 | 7,843 | main | 1,873 | test_name "#6541: file type truncates target when filebucket cannot retrieve hash"
tag 'audit:high',
'audit:integration', # file type and file bucket interop
'audit:refactor' # look into combining with ticket_4622_filebucket_diff_test.rb
# Use block style `test_run`
agents.each do... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/ticket_6907_use_provider_in_same_run_it_becomes_suitable.rb | Ruby | apache-2.0 | 7,843 | main | 1,509 | test_name "providers should be useable in the same run they become suitable"
tag 'audit:high', # autoloader, core puppet agent run functionality
'audit:refactor', # Use block style `test_name`
'audit:integration' # does not require packages, probably implicitly assumed in many other places
agents.eac... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/ticket_15560_managehome.rb | Ruby | apache-2.0 | 7,843 | main | 1,104 | test_name "#15560: Manage home directories"
tag 'audit:high',
'audit:refactor', # Use block style `test_namme`
# refactor to be OS agnostic and added to the resource/user
# tests. managehome is currently not covered there.
'audit:acceptance'
confine :to, :platfor... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/ticket_2455_on_solaris_init_provider_should_start_service_in_own_smf_contract.rb | Ruby | apache-2.0 | 7,843 | main | 4,584 | test_name "(PUP-2455) Service provider should start Solaris init service in its own SMF contract"
tag 'audit:high',
'audit:refactor', # Use block style `test_name`
# Use mk_tmp_environment_with_teardown
# Combine with Service resource tests
'audit:acceptance' # Se... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/ticket_6857_password-disclosure-when-changing-a-users-password.rb | Ruby | apache-2.0 | 7,843 | main | 1,533 | test_name "#6857: redact password hashes when applying in noop mode"
tag 'audit:high',
'audit:refactor', # Use block style `test_name`
'audit:integration'
require 'puppet/acceptance/common_utils'
extend Puppet::Acceptance::CommandUtils
hosts_to_test = agents.reject do |agent|
if agent['platform'].match(... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/ticket_9862_puppet_runs_without_service_user_or_group_present.rb | Ruby | apache-2.0 | 7,843 | main | 2,595 | test_name "#9862: puppet runs without service user or group present"
tag 'audit:high', # startup/configuration, high impact, low risk
'audit:refactor', # Use block style `test_name`
'audit:integration' # could easily be acceptance, not package dependant,
# but changing a person r... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/modulepath.rb | Ruby | apache-2.0 | 7,843 | main | 4,453 | test_name 'Supports vendored modules' do
tag 'risk:high'
# beacon custom type emits a message so we can tell where the
# type was loaded from, e.g. vendored, global, and whether the
# type was loaded locally or pluginsynced from the master.
def beacon_type(message)
return <<END
Puppet::Type.newtype(:... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/allow_arbitrary_node_name_fact_for_agent.rb | Ruby | apache-2.0 | 7,843 | main | 4,136 | test_name "node_name_fact should be used to determine the node name for puppet agent"
tag 'audit:high',
'audit:integration', # Tests that the server properly overrides certname with node_name fact.
# Testing of passenger master is no longer needed.
'server'
success_message = "node_n... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/ticket_5477_master_not_dectect_sitepp.rb | Ruby | apache-2.0 | 7,843 | main | 1,640 | # In 2.6, compile does not fail when site.pp does not exist.
#
# However, if a catalog is compiled when site.pp does not exist,
# puppetmaster does not detect when site.pp is created. This requires a restart
#
test_name "Ticket 5477, Puppet Master does not detect newly created site.pp file"
tag 'audit:high',
'audi... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/ticket_13948_lib_dir_hook_should_be_called_on_initialization.rb | Ruby | apache-2.0 | 7,843 | main | 6,156 | test_name "the $libdir setting hook is called on startup"
require 'puppet/acceptance/temp_file_utils'
extend Puppet::Acceptance::TempFileUtils
tag 'audit:high', # tests basic custom module/pluginsync handling?
'audit:refactor', # Use block style `test_namme`
'audit:integration',
'server'
initial... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/allow_arbitrary_node_name_for_agent.rb | Ruby | apache-2.0 | 7,843 | main | 3,764 | test_name "node_name_value should be used as the node name for puppet agent"
tag 'audit:high',
'audit:integration', # Tests that the server properly overrides certname with node_name fact.
# Testing of passenger master is no longer needed.
'server'
success_message = "node_name_value... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/ticket_2280_refresh_fail_should_fail_run.rb | Ruby | apache-2.0 | 7,843 | main | 1,124 | test_name 'C100297 - A resource triggered by a refresh that fails should be reported as a failure when using --detailed-exitcodes' do
tag 'audit:high',
'audit:integration' # Service type interaction with --detailed-exitcodes
manifest =<<EOS
exec{'true':
command => 'true',
path => ['/bin', '/... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/ticket_1334_clientbucket_corrupted.rb | Ruby | apache-2.0 | 7,843 | main | 1,822 | test_name 'C99977 corrupted clientbucket' do
tag 'audit:high',
'audit:integration'
agents.each do |agent|
tmpfile = agent.tmpfile('c99977file')
unmanaged_content = "unmanaged\n"
unmanaged_sha = Digest::SHA256.hexdigest(unmanaged_content)
managed_content = "managed\n"
manifest = "fi... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/catalog_with_binary_data.rb | Ruby | apache-2.0 | 7,843 | main | 3,052 | test_name "C100300: Catalog containing binary data is applied correctly" do
require 'puppet/acceptance/common_utils'
require 'puppet/acceptance/environment_utils'
extend Puppet::Acceptance::EnvironmentUtils
require 'puppet/acceptance/agent_fqdn_utils'
extend Puppet::Acceptance::AgentFqdnUtils
tag 'risk:hi... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/lookup/v3_config_and_data.rb | Ruby | apache-2.0 | 7,843 | main | 5,270 | test_name 'C99629: hiera v5 can use v3 config and data' do
require 'puppet/acceptance/environment_utils.rb'
extend Puppet::Acceptance::EnvironmentUtils
tag 'audit:high',
'audit:acceptance',
'audit:refactor', # Master is not needed for this test. Refactor
# to use puppet apply with a... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/lookup/merge_strategies.rb | Ruby | apache-2.0 | 7,843 | main | 8,764 | test_name 'C99903: merge strategies' do
require 'puppet/acceptance/environment_utils.rb'
extend Puppet::Acceptance::EnvironmentUtils
tag 'audit:high',
'audit:acceptance',
'audit:refactor', # Master is not needed for this test. Refactor
# to use puppet apply with a local module tree.... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/lookup/lookup.rb | Ruby | apache-2.0 | 7,843 | main | 13,441 | test_name "Lookup data using the agnostic lookup function" do
# pre-docs:
# https://puppet-on-the-edge.blogspot.com/2015/01/puppet-40-data-in-modules-and.html
tag 'audit:high',
'audit:acceptance',
'audit:refactor', # Master is not needed for this test. Refactor
# to use puppet apply... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/lookup/config5_interpolation.rb | Ruby | apache-2.0 | 7,843 | main | 4,692 | test_name 'C99578: hiera5 lookup config with interpolated scoped nested variables' do
require 'puppet/acceptance/environment_utils.rb'
extend Puppet::Acceptance::EnvironmentUtils
tag 'audit:high',
'audit:integration',
'audit:refactor', # This test specifically tests interpolation on the master.
... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/lookup/v4_hieradata_with_v5_configs.rb | Ruby | apache-2.0 | 7,843 | main | 5,021 | test_name 'C99572: v4 hieradata with v5 configs' do
require 'puppet/acceptance/puppet_type_test_tools.rb'
extend Puppet::Acceptance::PuppetTypeTestTools
tag 'audit:high',
'audit:acceptance',
'audit:refactor', # Master is not needed for this test. Refactor
# to use puppet apply with ... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/lookup/config3_interpolation.rb | Ruby | apache-2.0 | 7,843 | main | 2,695 | test_name 'C99578: lookup should allow interpolation in hiera3 configs' do
require 'puppet/acceptance/environment_utils.rb'
extend Puppet::Acceptance::EnvironmentUtils
tag 'audit:high',
'audit:integration',
'audit:refactor', # This test specifically tests interpolation on the master.
... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/lookup/lookup_rich_values.rb | Ruby | apache-2.0 | 7,843 | main | 5,255 | test_name 'C99044: lookup should allow rich data as values' do
require 'puppet/acceptance/environment_utils.rb'
extend Puppet::Acceptance::EnvironmentUtils
tag 'audit:high',
'audit:acceptance',
'audit:refactor', # Master is not needed for this test. Refactor
# to use puppet apply wi... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/lookup/hiera3_custom_backend.rb | Ruby | apache-2.0 | 7,843 | main | 4,171 | test_name 'C99630: hiera v3 custom backend' do
require 'puppet/acceptance/environment_utils.rb'
extend Puppet::Acceptance::EnvironmentUtils
require 'puppet/acceptance/temp_file_utils.rb'
extend Puppet::Acceptance::TempFileUtils
tag 'audit:high',
'audit:acceptance',
'audit:refactor', # Master is not ne... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/face/parser_validate.rb | Ruby | apache-2.0 | 7,843 | main | 2,764 | test_name 'parser validate' do
tag 'audit:high',
'audit:unit' # Parser validation should be core to ruby
# and platform agnostic.
require 'puppet/acceptance/environment_utils'
extend Puppet::Acceptance::EnvironmentUtils
require 'puppet/acceptance/temp_file_utils'
extend Puppet::Accept... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/face/4654_facts_face.rb | Ruby | apache-2.0 | 7,843 | main | 1,888 | test_name "Puppet facts face should resolve custom and external facts"
tag 'audit:high',
'audit:integration' # The facter acceptance tests should be acceptance.
# However, the puppet face merely needs to interact with libfacter.
# So, this should be an integrat... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/face/loadable_from_modules.rb | Ruby | apache-2.0 | 7,843 | main | 4,042 | test_name "Exercise loading a face from a module"
# Because the module tool does not work on windows, we can't run this test there
confine :except, :platform => 'windows'
tag 'audit:high',
'audit:acceptance', # This has been OS sensitive.
'audit:refactor' # Remove the confine against windows and refa... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/direct_puppet/static_catalog_env_control.rb | Ruby | apache-2.0 | 7,843 | main | 9,225 | test_name "Environment control of static catalogs"
tag 'audit:high',
'audit:acceptance',
'audit:refactor', # use mk_tmp_environment_with_teardown helper for environment construction
'server'
skip_test 'requires puppetserver to test static catalogs' if @options[:type] != 'aio'
require 'json'
@testroot =... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/direct_puppet/supports_utf8.rb | Ruby | apache-2.0 | 7,843 | main | 2,847 | test_name "C97172: static catalogs support utf8" do
require 'puppet/acceptance/environment_utils'
extend Puppet::Acceptance::EnvironmentUtils
require 'puppet/acceptance/agent_fqdn_utils'
extend Puppet::Acceptance::AgentFqdnUtils
tag 'audit:high',
'audit:acceptance',
'audit:refactor' # Review f... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/direct_puppet/catalog_uuid_correlates_catalogs_with_reports.rb | Ruby | apache-2.0 | 7,843 | main | 2,645 | test_name "PUP-5872: catalog_uuid correlates catalogs with reports" do
tag 'audit:high',
'audit:acceptance',
'audit:refactor' # remove dependence on server by adding a
# catalog and report fixture to validate against.
master_reportdir = create_tmpdir_for_user(master, 'repo... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/direct_puppet/cached_catalog_remediate_local_drift.rb | Ruby | apache-2.0 | 7,843 | main | 4,506 | require 'puppet/acceptance/static_catalog_utils'
extend Puppet::Acceptance::StaticCatalogUtils
test_name "PUP-5122: Puppet remediates local drift using code_id and content_uri" do
tag 'audit:high',
'audit:acceptance',
'audit:refactor', # use mk_tmp_environment_with_teardown helper for environment const... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/provider/package/puppetserver_gem.rb | Ruby | apache-2.0 | 7,843 | main | 1,364 | test_name "puppetserver_gem provider should install and uninstall" do
tag 'audit:high',
'server'
require 'puppet/acceptance/common_utils'
extend Puppet::Acceptance::PackageUtils
extend Puppet::Acceptance::ManifestUtils
skip_test 'puppetserver_gem is only suitable on server nodes' unless master
pack... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/provider/package/dnfmodule_manages_flavors.rb | Ruby | apache-2.0 | 7,843 | main | 1,325 | test_name "dnfmodule can change flavors" do
confine :to, :platform => /el-8-x86_64/ # only el/centos 8 have the appstream repo
tag 'audit:high'
require 'puppet/acceptance/common_utils'
extend Puppet::Acceptance::PackageUtils
extend Puppet::Acceptance::ManifestUtils
package = "postgresql"
agents.each d... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/provider/package/zypper_install_package_with_range.rb | Ruby | apache-2.0 | 7,843 | main | 1,804 | test_name "zypper can install range if package is not installed" do
confine :to, :platform => /sles/
tag 'audit:high'
require 'puppet/acceptance/common_utils'
extend Puppet::Acceptance::PackageUtils
extend Puppet::Acceptance::ManifestUtils
package = "helloworld"
available_package_versions = ['1.0-2', '1... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/provider/package/apt_install_package_with_range.rb | Ruby | apache-2.0 | 7,843 | main | 1,897 | test_name "apt can install range if package is not installed" do
confine :to, :platform => /debian|ubuntu/
tag 'audit:high'
require 'puppet/acceptance/common_utils'
extend Puppet::Acceptance::PackageUtils
extend Puppet::Acceptance::ManifestUtils
package = "helloworld"
available_package_versions = ['1.0-... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/provider/package/gem.rb | Ruby | apache-2.0 | 7,843 | main | 5,310 | test_name "gem provider should install and uninstall" do
confine :to, :template => /centos-7-x86_64|redhat-7-x86_64/
tag 'audit:high'
require 'puppet/acceptance/common_utils'
extend Puppet::Acceptance::PackageUtils
extend Puppet::Acceptance::ManifestUtils
package = 'colorize'
agents.each do |agent|
... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/provider/package/rpm_ensure_install_multiversion_package.rb | Ruby | apache-2.0 | 7,843 | main | 3,936 | test_name "rpm should install packages with multiple versions" do
confine :to, :platform => /redhat|centos|el|fedora/
tag 'audit:high'
require 'puppet/acceptance/common_utils'
extend Puppet::Acceptance::PackageUtils
extend Puppet::Acceptance::ManifestUtils
package = "kernel-devel-puppet"
repo_fixture_pa... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/provider/package/dpkg_hold_true_package_is_latest.rb | Ruby | apache-2.0 | 7,843 | main | 907 | test_name "dpkg ensure hold package is latest installed" do
confine :to, :platform => /debian-9-amd64/
tag 'audit:high'
require 'puppet/acceptance/common_utils'
extend Puppet::Acceptance::PackageUtils
extend Puppet::Acceptance::ManifestUtils
package = "nginx"
agents.each do |agent|
teardown do
... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/provider/package/dpkg_ensure_latest_virtual_packages.rb | Ruby | apache-2.0 | 7,843 | main | 2,107 | test_name "dpkg ensure latest with allow_virtual set to true, the virtual package should detect and install a real package" do
confine :to, :platform => /debian/
tag 'audit:high'
require 'puppet/acceptance/common_utils'
extend Puppet::Acceptance::PackageUtils
extend Puppet::Acceptance::ManifestUtils
pkg =... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/provider/package/dnfmodule_enable_only.rb | Ruby | apache-2.0 | 7,843 | main | 2,001 | test_name "dnfmodule can change flavors" do
confine :to, :platform => /el-8-x86_64/ # only el/centos 8 have the appstream repo
tag 'audit:high'
require 'puppet/acceptance/common_utils'
extend Puppet::Acceptance::PackageUtils
extend Puppet::Acceptance::ManifestUtils
without_profile = '389-ds'
with_profi... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/provider/package/yum_semantic_versioning.rb | Ruby | apache-2.0 | 7,843 | main | 3,108 | test_name "yum provider should use semantic versioning for ensuring desired version" do
confine :to, :platform => /el-7/
tag 'audit:high'
require 'puppet/acceptance/common_utils'
extend Puppet::Acceptance::PackageUtils
extend Puppet::Acceptance::ManifestUtils
package = 'yum-utils'
lower_package_version... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/provider/package/dpkg_hold_true_should_preserve_version.rb | Ruby | apache-2.0 | 7,843 | main | 896 | test_name "dpkg ensure hold package should preserve version if package is already installed" do
confine :to, :platform => /debian-9-amd64/
tag 'audit:high'
require 'puppet/acceptance/common_utils'
extend Puppet::Acceptance::PackageUtils
extend Puppet::Acceptance::ManifestUtils
package = "openssl"
step ... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/provider/package/pip.rb | Ruby | apache-2.0 | 7,843 | main | 3,681 | test_name "pip provider should install, use install_options with latest, and uninstall" do
confine :to, :template => /centos/
tag 'audit:high'
require 'puppet/acceptance/common_utils'
extend Puppet::Acceptance::PackageUtils
extend Puppet::Acceptance::ManifestUtils
package = 'colorize'
pip_command = 'pip... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/provider/package/dnfmodule_ensure_versionable.rb | Ruby | apache-2.0 | 7,843 | main | 1,567 | test_name "dnfmodule is versionable" do
confine :to, :platform => /el-8-x86_64/ # only el/centos 8 have the appstream repo
tag 'audit:high'
require 'puppet/acceptance/common_utils'
extend Puppet::Acceptance::PackageUtils
extend Puppet::Acceptance::ManifestUtils
package = "postgresql"
agents.each do |... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/apply/classes/should_allow_param_undef_override.rb | Ruby | apache-2.0 | 7,843 | main | 1,043 | test_name "should allow overriding a parameter to undef in inheritence"
tag 'audit:high',
'audit:unit' # This should be covered at the unit layer.
agents.each do |agent|
dir = agent.tmpdir('class_undef_override')
out = File.join(dir, 'class_undef_override_out')
source = File.join(dir, 'class_undef_overrid... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/apply/classes/should_include_resources_from_class.rb | Ruby | apache-2.0 | 7,843 | main | 360 | test_name "resources declared in a class can be applied with include"
tag 'audit:high',
'audit:unit' # This should be covered at the unit layer.
manifest = %q{
class x {
notify{'a':}
}
include x
}
apply_manifest_on(agents, manifest) do |result|
fail_test "the resource did not apply" unless result.stdout.i... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/apply/classes/should_allow_param_override.rb | Ruby | apache-2.0 | 7,843 | main | 470 | test_name "should allow param override"
tag 'audit:high',
'audit:unit' # This should be covered at the unit layer.
manifest = %q{
class parent {
notify { 'msg':
message => parent,
}
}
class child inherits parent {
Notify['msg'] {message => 'child'}
}
include parent
include child
}
apply_manifest_on(a... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/apply/classes/should_not_auto_include_resources_from_class.rb | Ruby | apache-2.0 | 7,843 | main | 392 | test_name "resources declared in classes are not applied without include"
tag 'audit:high',
'audit:unit' # This should be covered at the unit layer.
manifest = %q{ class x { notify { 'test': message => 'never invoked' } } }
apply_manifest_on(agents, manifest) do |result|
fail_test "found the notify despite ... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/apply/classes/parameterized_classes.rb | Ruby | apache-2.0 | 7,843 | main | 1,674 | test_name "parametrized classes"
tag 'audit:high',
'audit:unit' # This should be covered at the unit layer.
########################################################################
step "should allow param classes"
manifest = %q{
class x($y, $z) {
notice("${y}-${z}")
}
class {x: y => '1', z => '2'}
}
apply_m... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/ordering/master_agent_application.rb | Ruby | apache-2.0 | 7,843 | main | 1,370 | test_name "Puppet applies resources without dependencies in file order over the network"
tag 'audit:high',
'audit:integration',
'server'
testdir = master.tmpdir('application_order')
apply_manifest_on(master, <<-MANIFEST, :catch_failures => true)
File {
ensure => directory,
mode => "0750",
owner... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/resource/tidy/resources_should_be_non_isomorphic.rb | Ruby | apache-2.0 | 7,843 | main | 1,391 | # This test is to verify multi tidy resources with same path but
# different matches should not cause error as found in the bug PUP-6508
test_name "PUP-6655 - C98145 tidy resources should be non-isomorphic" do
tag 'audit:high',
'audit:integration'
agents. each do |agent|
dir = agent.tmpdir('tidy-test-dir... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/resource/tidy/should_remove_old_files.rb | Ruby | apache-2.0 | 7,843 | main | 989 | test_name "Tidying files by date"
tag 'audit:high',
'audit:refactor', # Use block style `test_run`
'audit:integration'
agents.each do |agent|
step "Create a directory of old and new files"
dir = agent.tmpdir('tidy-test')
on agent, "mkdir -p #{dir}"
# YYMMddhhmm, so 03:04 Jan 2 1970
old = %w[one tw... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/resource/group/should_destroy.rb | Ruby | apache-2.0 | 7,843 | main | 624 | test_name "should destroy a group"
tag 'audit:high',
'audit:refactor', # Use block style `test_name`
'audit:acceptance' # Could be done at the integration (or unit) layer though
# actual changing of resources could irreparably damage a
# host running this, or requ... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/resource/group/should_manage_attributes_aix.rb | Ruby | apache-2.0 | 7,843 | main | 709 | test_name "should correctly manage the attributes property for the Group (AIX only)" do
confine :to, :platform => /aix/
tag 'audit:high',
'audit:acceptance' # Could be done as integration tests, but would
# require changing the system running the test
# in ... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/resource/group/should_not_create_existing.rb | Ruby | apache-2.0 | 7,843 | main | 837 | test_name "group should not create existing group"
tag 'audit:high',
'audit:refactor', # Use block style `test_name`
'audit:acceptance' # Could be done at the integration (or unit) layer though
# actual changing of resources could irreparably damage a
# host runni... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/resource/group/should_create.rb | Ruby | apache-2.0 | 7,843 | main | 673 | test_name "should create a group"
tag 'audit:high',
'audit:refactor', # Use block style `test_name`
'audit:acceptance' # Could be done at the integration (or unit) layer though
# actual changing of resources could irreparably damage a
# host running this, or requi... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/resource/group/should_manage_members.rb | Ruby | apache-2.0 | 7,843 | main | 7,881 | test_name "should correctly manage the members property for the Group resource" do
# These are the only platforms whose group providers manage the members
# property
confine :to, :platform => /windows|osx|aix|^el-|fedora/
tag 'audit:high',
'audit:acceptance' # Could be done as integration tests, but woul... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/resource/group/should_query_all.rb | Ruby | apache-2.0 | 7,843 | main | 879 | test_name "should query all groups"
tag 'audit:high',
'audit:refactor', # Use block style `test_name`
'audit:integration' # Does not modify system running test
agents.each do |agent|
skip_test('this test fails on windows French due to Cygwin/UTF Issues - PUP-8319,IMAGES-492') if agent['platform'] =~ /wind... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/resource/group/should_query.rb | Ruby | apache-2.0 | 7,843 | main | 935 | test_name "test that we can query and find a group that exists."
tag 'audit:high',
'audit:refactor', # Use block style `test_name`
'audit:acceptance' # Could be done at the integration (or unit) layer though
# actual changing of resources could irreparably damage a
... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/resource/group/should_not_destroy_unexisting.rb | Ruby | apache-2.0 | 7,843 | main | 774 | test_name "should not destroy a group that doesn't exist"
tag 'audit:high',
'audit:refactor', # Use block style `test_name`
'audit:acceptance' # Could be done at the integration (or unit) layer though
# actual changing of resources could irreparably damage a
# hos... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/resource/group/should_modify_gid.rb | Ruby | apache-2.0 | 7,843 | main | 1,341 | test_name "should modify gid of existing group"
confine :except, :platform => 'windows'
tag 'audit:high',
'audit:refactor', # Use block style `test_name`
'audit:acceptance' # Could be done at the integration (or unit) layer though
# actual changing of resources could irreparably damage ... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/resource/user/utf8_user_comments.rb | Ruby | apache-2.0 | 7,843 | main | 8,825 | # Ensure a user can be managed with UTF-8 comment value. The comment value is
# normally used for "Full Name" so this is important in a UTF-8 context.
# We should be able to:
# - create a new user with a UTF-8 comment
# - modify an existing UTF-8 comment to a new UTF-8 comment
# - modify an existing UTF-8 comment to an... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/resource/user/should_manage_groups.rb | Ruby | apache-2.0 | 7,843 | main | 4,804 | test_name "should correctly manage the groups property for the User resource" do
# NOTE: These tests run for only some of our supported platforms.
# We should eventually update them to work with all of our
# supported platforms where managing the groups property makes
# sense.
confine :except, :platform => /... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/resource/user/should_allow_managed_macos_users_to_login.rb | Ruby | apache-2.0 | 7,843 | main | 3,961 | test_name "should allow managed macOS users to login" do
confine :to, :platform => /osx/
tag 'audit:high',
'audit:acceptance' # Could be done as integration tests, but would
# require changing the system running the test
# in ways that might require special ... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/resource/user/should_manage_roles_on_windows.rb | Ruby | apache-2.0 | 7,843 | main | 4,777 | test_name "Manage roles for a Windows user" do
confine :to, :platform => 'windows'
tag 'audit:high',
'audit:acceptance'
require 'puppet/acceptance/windows_utils'
extend Puppet::Acceptance::WindowsUtils
def user_manifest(name, params)
params_str = params.map do |param, value|
value_str = val... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/resource/user/should_modify_while_managing_home.rb | Ruby | apache-2.0 | 7,843 | main | 1,857 | test_name "should modify a user without changing home directory (pending #19542)"
tag 'audit:high',
'audit:refactor', # Use block style `test_run`
'audit:acceptance' # Could be done as integration tests, but would
# require changing the system running the test
# i... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/resource/user/should_manage_purge_ssh_keys.rb | Ruby | apache-2.0 | 7,843 | main | 3,865 | test_name 'should manage purge_ssh_keys' do
tag 'audit:high',
'audit:acceptance'
# MODULES-11236
skip_test('This test does not work on Windows nor macOS') if agent['platform'] =~ /windows/ || agent['platform'] =~ /osx/
name = "usr#{rand(9999).to_i}"
agents.each do |agent|
home = agent.tmpdir(name... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/resource/user/osx_10.4_should_fail_when_modify_uid.rb | Ruby | apache-2.0 | 7,843 | main | 1,215 | test_name "should not modify the uid of an user on OS X >= 10.14" do
confine :to, :platform => /osx/
tag 'audit:high',
'audit:acceptance' # Could be done as integration tests, but would
# require changing the system running the test
# in ways that might require... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/resource/user/should_modify_when_not_managing_home.rb | Ruby | apache-2.0 | 7,843 | main | 2,310 | test_name "should modify a user when no longer managing home (#20726)"
tag 'audit:high',
'audit:refactor', # Use block style `test_run`
'audit:acceptance' # Could be done as integration tests, but would
# require changing the system running the test
# in ways that... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/resource/user/should_purge.rb | Ruby | apache-2.0 | 7,843 | main | 1,829 | test_name "should purge a user" do
# Until purging works on AIX, Solaris, and OSX. See PUP-9188
confine :except, :platform => /^aix/
confine :except, :platform => /^solaris/
confine :except, :platform => /^osx/
tag 'audit:high',
'audit:acceptance'
agents.each do |agent|
unmanaged = "unmanaged-#{r... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/resource/user/should_modify.rb | Ruby | apache-2.0 | 7,843 | main | 877 | test_name "should modify a user"
tag 'audit:high',
'audit:refactor', # Use block style `test_run`
'audit:acceptance' # Could be done as integration tests, but would
# require changing the system running the test
# in ways that might require special permissions
... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/resource/user/should_manage_shell.rb | Ruby | apache-2.0 | 7,843 | main | 1,504 | test_name "should manage user shell"
tag 'audit:high',
'audit:refactor', # Use block style `test_run`
'audit:acceptance' # Could be done as integration tests, but would
# require changing the system running the test
# in ways that might require special permissions... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/resource/user/should_modify_gid_forcelocal.rb | Ruby | apache-2.0 | 7,843 | main | 1,989 | test_name "verify that we can modify the gid with forcelocal" do
confine :to, :platform => /el|fedora/ # PUP-5358
require 'puppet/acceptance/common_utils'
extend Puppet::Acceptance::PackageUtils
extend Puppet::Acceptance::ManifestUtils
tag 'audit:high'
user = "u#{rand(99999).to_i}"
group1 = "#{user}o"
... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/resource/user/should_query_all.rb | Ruby | apache-2.0 | 7,843 | main | 852 | test_name "should query all users"
tag 'audit:high',
'audit:refactor', # Use block style `test_run`
'audit:integration'
agents.each do |agent|
next if agent == master
skip_test('this test fails on windows French due to Cygwin/UTF Issues - PUP-8319,IMAGES-492') if agent['platform'] =~ /windows/ && agent['... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/resource/user/should_create_with_expiry_absent.rb | Ruby | apache-2.0 | 7,843 | main | 1,203 | test_name "verifies that puppet resource creates a user and assigns the correct expiry date when absent" do
confine :except, :platform => 'windows'
tag 'audit:high',
'audit:acceptance' # Could be done as integration tests, but would
# require changing the system running the test
... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/resource/user/should_create_modify_with_password.rb | Ruby | apache-2.0 | 7,843 | main | 2,634 | # frozen_string_literal: true
test_name 'should create a user with password and modify the password' do
tag 'audit:high',
'audit:acceptance' # Could be done as integration tests, but would
# require changing the system running the test
# in ways that might require special permissions
# or be harmful to ... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/resource/user/should_query.rb | Ruby | apache-2.0 | 7,843 | main | 851 | test_name "test that we can query and find a user that exists."
tag 'audit:high',
'audit:refactor', # Use block style `test_run`
'audit:acceptance' # Could be done as integration tests, but would
# require changing the system running the test
# in ways that might ... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/resource/user/should_not_modify_disabled.rb | Ruby | apache-2.0 | 7,843 | main | 1,209 | test_name 'PUP-6586 Ensure puppet does not continually reset password for disabled user' do
confine :to, :platform => 'windows'
tag 'audit:high',
'audit:acceptance' # Could be done as integration tests, but would
# require changing the system running the test
... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/resource/user/should_modify_gid.rb | Ruby | apache-2.0 | 7,843 | main | 1,818 | test_name "verify that we can modify the gid"
confine :except, :platform => 'windows'
confine :except, :platform => /aix/ # PUP-5358
tag 'audit:high',
'audit:refactor', # Use block style `test_run`
'audit:acceptance' # Could be done as integration tests, but would
# require changing the... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/resource/user/should_not_destroy_unexisting.rb | Ruby | apache-2.0 | 7,843 | main | 783 | test_name "ensure that puppet does not report removing a user that does not exist"
tag 'audit:high',
'audit:refactor', # Use block style `test_run`
'audit:acceptance' # Could be done as integration tests, but would
# require changing the system running the test
# ... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/resource/user/should_manage_attributes_aix.rb | Ruby | apache-2.0 | 7,843 | main | 807 | test_name "should correctly manage the attributes property for the User resource (AIX only)" do
confine :to, :platform => /aix/
tag 'audit:high',
'audit:acceptance' # Could be done as integration tests, but would
# require changing the system running the test
... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/resource/user/should_destroy_with_managehome.rb | Ruby | apache-2.0 | 7,843 | main | 1,368 | test_name "should delete a user with managehome=true" do
confine :except, :platform => /osx/
tag 'audit:high',
'audit:acceptance' # Could be done as integration tests, but would
# require changing the system running the test
# in ways that might require speci... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/resource/user/osx_10.4_should_fail_when_modify_home.rb | Ruby | apache-2.0 | 7,843 | main | 1,241 | test_name "should not modify the home directory of an user on OS X >= 10.14" do
confine :to, :platform => /osx/
tag 'audit:high',
'audit:acceptance' # Could be done as integration tests, but would
# require changing the system running the test
# in ways that mi... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/resource/user/should_destroy.rb | Ruby | apache-2.0 | 7,843 | main | 770 | test_name "should delete a user"
tag 'audit:high',
'audit:refactor', # Use block style `test_run`
'audit:acceptance' # Could be done as integration tests, but would
# require changing the system running the test
# in ways that might require special permissions
... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/resource/user/should_create.rb | Ruby | apache-2.0 | 7,843 | main | 944 | test_name "should create a user"
tag 'audit:high',
'audit:refactor', # Use block style `test_run`
'audit:acceptance' # Could be done as integration tests, but would
# require changing the system running the test
# in ways that might require special permissions
... |
github | puppetlabs/puppet | https://github.com/puppetlabs/puppet | acceptance/tests/resource/user/should_create_with_gid.rb | Ruby | apache-2.0 | 7,843 | main | 1,441 | test_name "verifies that puppet resource creates a user and assigns the correct group"
confine :except, :platform => 'windows'
tag 'audit:high',
'audit:refactor', # Use block style `test_run`
'audit:acceptance' # Could be done as integration tests, but would
# require changing the syste... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.