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/tests/resource/user/should_not_create_existing.rb
Ruby
apache-2.0
7,843
main
1,033
test_name "tests that user resource will not add users that already exist." 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 ...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/resource/service/launchd_provider.rb
Ruby
apache-2.0
7,843
main
3,423
test_name 'Mac OS X launchd Provider Testing' 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 th...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/resource/service/ticket_5024_systemd_enabling_masked_service.rb
Ruby
apache-2.0
7,843
main
3,928
require 'puppet/acceptance/service_utils' extend Puppet::Acceptance::ServiceUtils test_name 'Systemd masked services are unmasked before attempting to start' tag 'audit:high', 'audit:refactor', # Use block style `test_run` 'audit:acceptance' # Could be done at the integration (or unit) layer though ...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/resource/service/windows_mixed_utf8.rb
Ruby
apache-2.0
7,843
main
3,003
# coding: utf-8 test_name "Windows Service Provider With Mixed UTF-8 Service Names" do confine :to, :platform => 'windows' tag 'audit:high', 'audit:acceptance' require 'puppet/acceptance/windows_utils' extend Puppet::Acceptance::WindowsUtils def service_manifest(name, params) params_str = params....
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/resource/service/should_query_all.rb
Ruby
apache-2.0
7,843
main
601
test_name "should query all services" tag 'audit:high', 'audit:refactor', # Investigate combining with should_not_change_the_system.rb # Use block style `test_name` 'audit:integration' # Doesn't change the system it runs on agents.each do |agent| step "query with puppet" on(agent...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/resource/service/puppet_service_management.rb
Ruby
apache-2.0
7,843
main
2,745
test_name "The Puppet service should be manageable with Puppet" tag 'audit:high', 'audit:refactor', # Use block style `test_name` 'audit:acceptance' # uses services from a running puppet-agent install # # This test is intended to ensure that the Puppet service can # be directly managed by Puppet. See PUP-5053...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/resource/service/init_on_systemd.rb
Ruby
apache-2.0
7,843
main
5,880
test_name 'SysV on default Systemd Service Provider Validation' do confine :to, :platform => /el-[6-8]|centos|fedora-(2[0-9])/ do |h| result = on(h, 'which systemctl', :acceptable_exit_codes => [0, 1]) result.stdout =~ /systemctl/ end tag 'audit:high', 'audit:acceptance' # Could be done at the int...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/resource/service/smf_basic_tests.rb
Ruby
apache-2.0
7,843
main
5,349
test_name "SMF: basic tests" do confine :to, :platform => 'solaris' tag 'audit:high', 'audit:acceptance' # Could be done at the integration (or unit) layer though # actual changing of resources could irreparably damage a # host running this, or require specia...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/resource/service/systemd_resource_shows_correct_output.rb
Ruby
apache-2.0
7,843
main
1,225
require 'puppet/acceptance/service_utils' extend Puppet::Acceptance::ServiceUtils test_name 'systemd service shows correct output when queried with "puppet resource"' do tag 'audit:high' skip_test 'requires puppet service script from AIO agent package' if @options[:type] != 'aio' package_name = 'puppet' # ...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/resource/service/puppet_service_runs_puppet.rb
Ruby
apache-2.0
7,843
main
1,296
require 'puppet/acceptance/service_utils' extend Puppet::Acceptance::ServiceUtils test_name 'Starting the puppet service should successfully run puppet' do tag 'audit:high', 'audit:acceptance' skip_test 'requires a server node to run puppet agent -t' unless master agents.each do |agent| statedir = o...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/resource/service/windows.rb
Ruby
apache-2.0
7,843
main
20,399
test_name "Windows Service Provider" do confine :to, :platform => 'windows' tag 'audit:high', 'audit:acceptance' require 'puppet/acceptance/windows_utils' extend Puppet::Acceptance::WindowsUtils require 'puppet/acceptance/service_utils' extend Puppet::Acceptance::ServiceUtils def service_manifes...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/resource/service/AIX_service_provider.rb
Ruby
apache-2.0
7,843
main
3,341
test_name 'AIX Service Provider Testing' 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, o...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/resource/service/should_not_change_the_system.rb
Ruby
apache-2.0
7,843
main
1,459
test_name "`puppet resource service` should list running services without calling dangerous init scripts" tag 'audit:high', 'audit:refactor', # Use block style `test_name` 'audit:integration' # Doesn't change the system it runs on confine :except, :platform => 'windows' confine :except, :platform => 'solari...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/resource/service/service_enable_linux.rb
Ruby
apache-2.0
7,843
main
5,142
test_name 'SysV and Systemd Service Provider Validation' tag 'audit:high', 'audit:refactor', # Investigate merging with init_on_systemd.rb # Use block style `test_name` 'audit:acceptance' # Could be done at the integration (or unit) layer though # actual changing ...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/resource/file/handle_fifo_files.rb
Ruby
apache-2.0
7,843
main
1,889
test_name "should be able to handle fifo files" tag 'audit:high', 'audit:acceptance' confine :except, :platform => /windows/ def ensure_content_to_file_manifest(file_path, ensure_value) return <<-MANIFEST file { "#{file_path}": ensure => #{ensure_value}, content => "Hello World" } MANIFEST end age...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/resource/file/should_create_empty.rb
Ruby
apache-2.0
7,843
main
560
test_name "should create empty file for 'present'" tag 'audit:high', 'audit:refactor', # Use block style `test_name` 'audit:acceptance' agents.each do |agent| target = agent.tmpfile("empty") step "clean up the system before we begin" on(agent, "rm -rf #{target}") step "verify we can create an empty...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/resource/file/bin_diff_output_content_attribute.rb
Ruby
apache-2.0
7,843
main
3,643
test_name "Binary Diff Output of Content Attribute" do tag 'audit:high', 'audit:acceptance' # cannot test binary diff on windows2012r2_ja-64-1 # Error: Could not write report for afire-lien.delivery.puppetlabs.net at C:/ProgramData/PuppetLabs/puppet/cache/reports/afire-lien.delivery.puppetlabs.net/20191204...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/resource/file/ticket_6448_file_with_utf8_source.rb
Ruby
apache-2.0
7,843
main
3,483
test_name 'Ensure a file resource can have a UTF-8 source attribute, content, and path when served via a module' do tag 'audit:high', 'broken:images', 'audit:acceptance', 'server' require 'puppet/acceptance/environment_utils' extend Puppet::Acceptance::EnvironmentUtils require 'puppet/accept...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/resource/file/source_attribute.rb
Ruby
apache-2.0
7,843
main
12,169
test_name "The source attribute" do require 'puppet/acceptance/module_utils' extend Puppet::Acceptance::ModuleUtils tag 'audit:high', 'audit:acceptance', 'server' @target_file_on_windows = 'C:/windows/temp/source_attr_test' @target_file_on_nix = '/tmp/source_attr_test' @target_dir_on_windo...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/resource/file/content_attribute.rb
Ruby
apache-2.0
7,843
main
2,942
test_name "Content Attribute" tag 'audit:high', 'audit:refactor', # Use block stype test_name 'audit:acceptance' agents.each do |agent| target = agent.tmpfile('content_file_test') step "Ensure the test environment is clean" on agent, "rm -f #{target}" step "Content Attribute: using raw content" ...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/resource/file/handle_fifo_files_when_recursing.rb
Ruby
apache-2.0
7,843
main
1,968
test_name "should be able to handle fifo files when recursing" tag 'audit:high', 'audit:acceptance' confine :except, :platform => /windows/ def ensure_owner_recursively_manifest(path, owner_value) return <<-MANIFEST file { "#{path}": ensure => present, recurse => true, owner => #{owner_value} ...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/resource/file/should_create_directory.rb
Ruby
apache-2.0
7,843
main
1,155
test_name "should create directory" tag 'audit:high', 'audit:refactor', # Use block style `test_name` 'audit:acceptance' agents.each do |agent| target = agent.tmpfile("create-dir") teardown do step "clean up after the test run" do on(agent, "rm -rf #{target}") end end step "verify we c...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/resource/file/should_create_symlink.rb
Ruby
apache-2.0
7,843
main
2,539
test_name "should create symlink" tag 'audit:high', 'audit:refactor', # Use block style `test_name` 'audit:acceptance' def message 'hello world' end def reset_link_and_target(agent, link, target) step "clean up the system before we begin" on agent, "rm -rf #{target} #{link}" on agent, "echo '#{messa...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/resource/file/should_remove_dir.rb
Ruby
apache-2.0
7,843
main
946
test_name "should remove directory, but force required" tag 'audit:high', 'audit:refactor', # Use block style `test_name` 'audit:acceptance' agents.each do |agent| target = agent.tmpdir("delete-dir") step "clean up the system before we begin" on(agent, "rm -rf #{target} ; mkdir -p #{target}") step ...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/resource/file/ticket_7680-follow-symlinks.rb
Ruby
apache-2.0
7,843
main
1,252
test_name "#7680: 'links => follow' should use the file source content" tag 'audit:high', 'audit:refactor', # Use block style `test_name` 'audit:acceptance' agents.each do |agent| step "Create file content" real_source = agent.tmpfile('follow_links_source') dest = agent.tmpfile('follow_links_d...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/resource/file/symbolic_modes.rb
Ruby
apache-2.0
7,843
main
13,466
test_name 'file resource: symbolic modes' do confine :except, :platform => /^windows/ confine :to, {}, hosts.select {|host| !host[:roles].include?('master')} tag 'audit:high', 'audit:acceptance' require 'puppet/acceptance/temp_file_utils' extend Puppet::Acceptance::TempFileUtils class FileSymlink ...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/resource/file/ascii_diff_output_content_attribute.rb
Ruby
apache-2.0
7,843
main
1,789
test_name "ASCII Diff Output of Content Attribute" do tag 'audit:high', 'audit:acceptance' sha256 = Digest::SHA256.new agents.each do |agent| step 'When handling ASCII files' do target = agent.tmpfile('content_ASCII_file_test') initial_text = 'Initial Text' initial_text_sha_checksum =...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/resource/file/should_default_mode.rb
Ruby
apache-2.0
7,843
main
1,458
test_name "file resource: set default modes" tag 'audit:high', 'audit:refactor', # Use block style `test_name` 'audit:acceptance' def regexp_mode(mode) Regexp.new("mode\s*=>\s*'0?#{mode}'") end agents.each do |agent| step "setup" parent = agent.tmpdir('default-mode-parent') on(agent, "rm -rf #{paren...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/resource/file/should_remove_file.rb
Ruby
apache-2.0
7,843
main
492
test_name "should remove file" tag 'audit:high', 'audit:refactor', # Use block style `test_name` 'audit:acceptance' agents.each do |agent| target = agent.tmpfile('delete-file') step "clean up the system before we begin" on agent, "rm -rf #{target} && touch #{target}" step "verify we can remove a fi...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/resource/file/ticket_8740_should_not_enumerate_root_directory.rb
Ruby
apache-2.0
7,843
main
1,550
test_name "#8740: should not enumerate root directory" confine :except, :platform => 'windows' confine :except, :platform => 'osx' tag 'audit:high', 'audit:refactor', # Use block style `test_name` 'audit:acceptance' target = "/test-socket-#{$$}" require 'puppet/acceptance/common_utils' extend Puppet::Acce...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/resource/exec/should_accept_large_output.rb
Ruby
apache-2.0
7,843
main
1,580
test_name "tests that puppet correctly captures large and empty output." tag 'audit:high', 'audit:refactor', # Use block style `test_name` 'audit:acceptance' agents.each do |agent| testfile = agent.tmpfile('should_accept_large_output') # Generate >64KB file to exceed pipe buffer. lorem_ipsum = <<EOF L...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/resource/exec/accept_array_commands.rb
Ruby
apache-2.0
7,843
main
565
test_name "Be able to execute array commands" do tag 'audit:high', 'audit:acceptance' agents.each do |agent| if agent.platform =~ /windows/ cmd = ['C:\Windows\System32\cmd.exe', '/c', 'echo', '*'] else cmd = ['/bin/echo', '*'] end exec_manifest = <<~MANIFEST exec { "test ex...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/resource/exec/should_set_path.rb
Ruby
apache-2.0
7,843
main
633
test_name "the path statement should work to locate commands" tag 'audit:high', 'audit:refactor', # Use block style `test_name` 'audit:acceptance' agents.each do |agent| file = agent.tmpfile('touched-should-set-path') step "clean up the system for the test" on agent, "rm -f #{file}" step "invoke th...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/resource/exec/should_run_command.rb
Ruby
apache-2.0
7,843
main
1,068
test_name "tests that puppet correctly runs an exec." # original author: Dan Bode --daniel 2010-12-23 tag 'audit:high', 'audit:refactor', # Use block style `test_name` 'audit:acceptance' def before(agent) step "file to be touched should not exist." agent.tmpfile('test-exec') end def after(agent, touch...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/resource/exec/should_run_bad_command.rb
Ruby
apache-2.0
7,843
main
2,365
test_name "tests that puppet can run badly written scripts that fork and inherit descriptors" tag 'audit:high', 'audit:refactor', # Use block style `test_name` 'audit:acceptance' def sleepy_daemon_script(agent) if agent['platform'] =~ /win/ # Windows uses a shorter sleep, because it's expected to wait ...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/resource/exec/should_run_command_as_user.rb
Ruby
apache-2.0
7,843
main
1,794
test_name "The exec resource should be able to run commands as a different user" do confine :except, :platform => 'windows' tag 'audit:high', 'audit:acceptance' require 'puppet/acceptance/common_utils' extend Puppet::Acceptance::BeakerUtils def random_username "pl#{rand(999999).to_i}" end de...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/resource/exec/accept_multi-line_commands.rb
Ruby
apache-2.0
7,843
main
764
test_name "Be able to execute multi-line commands (#9996)" confine :except, :platform => 'windows' tag 'audit:high', 'audit:refactor', # Use block style `test_name` 'audit:acceptance' agents.each do |agent| temp_file_name = agent.tmpfile('9996-multi-line-commands') test_manifest = <<HERE exec { "test exe...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/resource/exec/should_set_environment_variables.rb
Ruby
apache-2.0
7,843
main
3,684
test_name "The Exec resource should set user-specified environment variables" do tag 'audit:high', 'audit:acceptance' # Would be nice to parse the actual values from puppet_output, # but that would require some complicated matching since # puppet_output contains other stuff. def assert_env_var_values(p...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/resource/exec/should_not_run_command_creates.rb
Ruby
apache-2.0
7,843
main
1,360
test_name "should not run command creates" tag 'audit:high', 'audit:refactor', # Use block style `test_name` 'audit:acceptance' agents.each do |agent| touch = agent.tmpfile('touched') donottouch = agent.tmpfile('not-touched') manifest = %Q{ exec { "test#{Time.new.to_i}": command => '#{agent.touch...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/resource/exec/should_run_command_in_cwd.rb
Ruby
apache-2.0
7,843
main
9,216
test_name "The Exec resource should run commands in the specified cwd" do tag 'audit:high', 'audit:acceptance' confine :except, :platform => /debian-12-amd64/ # PUP-12020 require 'puppet/acceptance/windows_utils' extend Puppet::Acceptance::WindowsUtils # Useful utility that converts a string literal ...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/resource/package/yum.rb
Ruby
apache-2.0
7,843
main
8,314
test_name "test the yum package provider" do confine :to, {:platform => /(?:centos|el-|fedora)/}, agents # Skipping tests if facter finds this is an ec2 host, PUP-7774 agents.each do |agent| skip_test('Skipping EC2 Hosts') if fact_on(agent, 'ec2_metadata') end # Upgrade the AlmaLinux release package for...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/resource/package/does_not_exist.rb
Ruby
apache-2.0
7,843
main
1,193
# Redmine (#22529) test_name "Puppet returns only resource package declaration when querying an uninstalled package" do tag 'audit:high', '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/package/common_package_name_in_different_providers.rb
Ruby
apache-2.0
7,843
main
4,533
test_name "ticket 1073: common package name in two different providers should be allowed" do confine :to, {:platform => /(?:centos|el-|fedora)/}, agents # Skipping tests if facter finds this is an ec2 host, PUP-7774 agents.each do |agent| skip_test('Skipping EC2 Hosts') if fact_on(agent, 'ec2_metadata') en...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/resource/package/windows.rb
Ruby
apache-2.0
7,843
main
2,759
test_name "Windows Package Provider" do confine :to, :platform => 'windows' tag 'audit:high', 'audit:acceptance' require 'puppet/acceptance/windows_utils' extend Puppet::Acceptance::WindowsUtils def package_manifest(name, params, installer_source) params_str = params.map do |param, value| v...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/resource/package/ips/basic_tests.rb
Ruby
apache-2.0
7,843
main
2,595
test_name "Package:IPS basic tests" confine :to, :platform => 'solaris-11' tag 'audit:medium', '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/package/ips/should_query.rb
Ruby
apache-2.0
7,843
main
1,095
test_name "Package:IPS query" confine :to, :platform => 'solaris-11' tag 'audit:medium', '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/package/ips/should_be_holdable.rb
Ruby
apache-2.0
7,843
main
3,131
test_name "Package:IPS versionable" confine :to, :platform => 'solaris-11' tag 'audit:medium', '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/package/ips/should_be_idempotent.rb
Ruby
apache-2.0
7,843
main
2,171
test_name "Package:IPS idempotency" confine :to, :platform => 'solaris-11' tag 'audit:medium', '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/package/ips/should_be_updatable.rb
Ruby
apache-2.0
7,843
main
1,493
test_name "Package:IPS test for updatable (update, latest)" confine :to, :platform => 'solaris-11' tag 'audit:medium', 'audit:refactor', # Use block style `test_name` 'audit:acceptance' # Could be done at the integration (or unit) layer though # actual changing of resources could irrepa...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/resource/package/ips/should_create.rb
Ruby
apache-2.0
7,843
main
1,193
test_name "Package:IPS basic tests" confine :to, :platform => 'solaris-11' tag 'audit:medium', '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/package/ips/should_be_updateable_and_unholdable_at_same_time.rb
Ruby
apache-2.0
7,843
main
1,054
test_name "Package:IPS test for updatable holded package" do confine :to, :platform => 'solaris-11' tag 'audit:high' require 'puppet/acceptance/solaris_util' extend Puppet::Acceptance::IPSUtils agents.each do |agent| teardown do clean agent end step "IPS: setup" do setup agent ...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/resource/package/ips/should_be_versionable.rb
Ruby
apache-2.0
7,843
main
1,749
test_name "Package:IPS versionable" confine :to, :platform => 'solaris-11' tag 'audit:medium', '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/package/ips/should_remove.rb
Ruby
apache-2.0
7,843
main
1,066
test_name "Package:IPS basic tests" confine :to, :platform => 'solaris-11' tag 'audit:medium', '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/parser_functions/no_exception_in_reduce_with_bignum.rb
Ruby
apache-2.0
7,843
main
1,802
test_name 'C97760: Integer in reduce() should not cause exception' do require 'puppet/acceptance/environment_utils' extend Puppet::Acceptance::EnvironmentUtils tag 'audit:high', 'audit:unit' # Remove all traces of the last used environment teardown do agents.each do |agent| on(agent, puppet(...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/parser_functions/calling_all_functions.rb
Ruby
apache-2.0
7,843
main
15,624
test_name 'Calling all functions.. test in progress!' tag 'audit:high', 'audit:acceptance' # create single manifest calling all functions step 'Apply manifest containing all function calls' def manifest_call_each_function_from_array(functions) manifest = '' # use index to work around puppet's immutable variab...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/parser_functions/hiera_in_templates.rb
Ruby
apache-2.0
7,843
main
12,593
test_name "Calling Hiera function from inside templates" tag 'audit:high', 'audit:integration', 'audit:refactor' # Master is not required for this test. Replace with agents.each @module_name = "hieratest" @coderoot = master.tmpdir("#{@module_name}") @msg_default = 'message from default.yaml' @msg_producti...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/parser_functions/puppet_lookup_cmd.rb
Ruby
apache-2.0
7,843
main
74,293
test_name "Puppet Lookup Command" tag 'audit:high', 'audit:acceptance', 'audit:refactor' # Master is not required for this test. Replace with agents.each # Wrap steps in blocks in accordance with Beaker style guide # doc: # https://puppet.com/docs/puppet/latest/hiera_automatic.html @...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/parser_functions/hiera_array/lookup_data.rb
Ruby
apache-2.0
7,843
main
2,357
test_name "Lookup data using the hiera_array parser function" tag 'audit:high', 'audit:acceptance', 'audit:refactor' # Master is not required for this test. Replace with agents.each testdir = master.tmpdir('hiera') step 'Setup' apply_manifest_on(master, <<-PP, :catch_failures => true) File { ensure => ...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/parser_functions/hiera/lookup_data.rb
Ruby
apache-2.0
7,843
main
2,014
test_name "Lookup data using the hiera parser function" tag 'audit:high', 'audit:acceptance', 'audit:refactor' # Master is not required for this test. Replace with agents.each testdir = master.tmpdir('hiera') step 'Setup' apply_manifest_on(master, <<-PP, :catch_failures => true) File { ensure => direct...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/parser_functions/hiera_hash/lookup_data.rb
Ruby
apache-2.0
7,843
main
2,264
test_name "Lookup data using the hiera_hash parser function" tag 'audit:high', 'audit:acceptance', 'audit:refactor' # Master is not required for this test. Replace with agents.each testdir = master.tmpdir('hiera') step 'Setup' apply_manifest_on(master, <<-PP, :catch_failures => true) File { ensure => d...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/reports/corrective_change_new_resource.rb
Ruby
apache-2.0
7,843
main
3,357
test_name "C98092 - a new resource should not be reported as a corrective change" do require 'yaml' require 'puppet/acceptance/environment_utils' extend Puppet::Acceptance::EnvironmentUtils require 'puppet/acceptance/agent_fqdn_utils' extend Puppet::Acceptance::AgentFqdnUtils tag 'audit:high', 'aud...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/reports/submission.rb
Ruby
apache-2.0
7,843
main
2,166
test_name "Report submission" tag 'audit:high', 'audit:integration' if master.is_pe? require "time" def puppetdb hosts.detect { |h| h['roles'].include?('database') } end def sleep_until_queue_empty(timeout=60) metric = "org.apache.activemq:BrokerName=localhost,Type=Queue,Destination=com.puppetla...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/reports/corrective_change_via_puppet.rb
Ruby
apache-2.0
7,843
main
4,360
test_name "C98094 - a resource changed via Puppet manifest will not be reported as a corrective change" do require 'yaml' require 'puppet/acceptance/environment_utils' extend Puppet::Acceptance::EnvironmentUtils require 'puppet/acceptance/agent_fqdn_utils' extend Puppet::Acceptance::AgentFqdnUtils tag 'a...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/reports/corrective_change_outside_puppet.rb
Ruby
apache-2.0
7,843
main
4,089
test_name "C98093 - a resource changed outside of Puppet will be reported as a corrective change" do require 'yaml' require 'puppet/acceptance/environment_utils' extend Puppet::Acceptance::EnvironmentUtils require 'puppet/acceptance/agent_fqdn_utils' extend Puppet::Acceptance::AgentFqdnUtils tag 'audit:h...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/reports/agent_sends_json_report_for_cached_catalog.rb
Ruby
apache-2.0
7,843
main
1,022
test_name "C100533: Agent sends json report for cached catalog" do tag 'risk:high', 'audit:high', 'audit:integration', 'server' with_puppet_running_on(master, :main => {}) do expected_format = 'json' step "Perform agent run to ensure that catalog is cached" do agents.each do |agen...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/reports/cached_catalog_status_in_report.rb
Ruby
apache-2.0
7,843
main
2,441
test_name "PUP-5867: The report specifies whether a cached catalog was used, and if so, why" do tag 'audit:high', 'audit:integration', 'server' master_reportdir = create_tmpdir_for_user(master, 'report_dir') teardown do on(master, "rm -rf #{master_reportdir}") end def remove_reports_on_mast...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/environment/can_enumerate_environments.rb
Ruby
apache-2.0
7,843
main
2,096
test_name "Can enumerate environments via an HTTP endpoint" tag 'audit:high', 'audit:integration', 'server' confine :except, :platform => /osx/ # see PUP-4820 def server_port(agent) setting_on(agent, "agent", "serverport") end def setting_on(host, section, name) on(host, puppet("config", "print", name, ...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/environment/environment_scenario-bad.rb
Ruby
apache-2.0
7,843
main
2,436
test_name 'Test behavior of directory environments when environmentpath is set to a non-existent directory' do require 'puppet/acceptance/environment_utils' extend Puppet::Acceptance::EnvironmentUtils require 'puppet/acceptance/classifier_utils' extend Puppet::Acceptance::ClassifierUtils tag 'audit:high', ...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/environment/custom_type_provider_from_same_environment.rb
Ruby
apache-2.0
7,843
main
4,859
test_name 'C59122: ensure provider from same env as custom type' do require 'puppet/acceptance/environment_utils' extend Puppet::Acceptance::EnvironmentUtils tag 'audit:high', 'audit:integration', # This behavior is specific to the master to 'do the right thing' 'server' app_type = File.basename(__F...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/environment/feature_branch_configured_environment.rb
Ruby
apache-2.0
7,843
main
850
test_name "Agent should use set environment after running with specified environment" do require 'puppet/acceptance/environment_utils' extend Puppet::Acceptance::EnvironmentUtils tag 'audit:high', 'server' # Remove all traces of the last used environment teardown do agents.each do |agent| on...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/environment/use_enc_environment.rb
Ruby
apache-2.0
7,843
main
2,605
test_name 'Agent should use environment given by ENC and only compile a catalog once' do require 'puppet/acceptance/classifier_utils.rb' extend Puppet::Acceptance::ClassifierUtils tag 'audit:high', 'audit:integration', 'server' # Remove all traces of the last used environment teardown do age...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/environment/use_agent_environment_when_no_enc.rb
Ruby
apache-2.0
7,843
main
1,883
test_name "Agent should use agent environment if there is no enc-specified environment" do tag 'audit:high', 'audit:integration', 'audit:refactor', # This can be combined with use_agent_environment_when_enc_doesnt_specify test 'server' # Remove all traces of the last used environment teardown ...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/environment/use_enc_environment_for_files.rb
Ruby
apache-2.0
7,843
main
2,532
test_name "Agent should use environment given by ENC for fetching remote files" do tag 'audit:high', 'audit:integration', 'audit:refactor', # This test should be rolled into use_enc_environment 'server' # Remove all traces of the last used environment teardown do agents.each do |agent| ...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/environment/use_enc_environment_for_pluginsync.rb
Ruby
apache-2.0
7,843
main
2,124
test_name "Agent should use environment given by ENC for pluginsync" do tag 'audit:high', 'audit:integration', 'audit:refactor', # This test should be rolled into use_enc_environment 'server' # Remove all traces of the last used environment teardown do agents.each do |agent| on(agent...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/environment/use_last_server_specified_environment.rb
Ruby
apache-2.0
7,843
main
2,885
test_name "Agent should use the last server-specified environment if server is authoritative" do require 'puppet/acceptance/environment_utils' extend Puppet::Acceptance::EnvironmentUtils tag 'audit:high', 'server' # Remove all traces of the last used environment teardown do agents.each do |agent| ...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/environment/enc_nonexistent_directory_environment.rb
Ruby
apache-2.0
7,843
main
2,387
test_name "Master should produce error if enc specifies a nonexistent environment" do require 'puppet/acceptance/classifier_utils.rb' extend Puppet::Acceptance::ClassifierUtils tag 'audit:high', 'audit:unit', 'server' teardown do agents.each do |agent| on(agent, puppet('config print last...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/environment/broken_unassigned_environment_handled_gracefully.rb
Ruby
apache-2.0
7,843
main
1,865
test_name 'PUP-3755 Test an un-assigned broken environment' tag 'audit:high', 'audit:integration', 'audit:refactor', # Use mk_tmp_environment_with_teardown helper 'server' teardown do agents.each do |agent| on(agent, puppet('config print lastrunfile')) do |command_result| agent.rm_rf(comma...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/environment/variables_refreshed_each_compilation.rb
Ruby
apache-2.0
7,843
main
4,312
test_name 'C98115 compilation should get new values in variables on each compilation' do require 'puppet/acceptance/environment_utils' extend Puppet::Acceptance::EnvironmentUtils confine :except, :platform => /^(aix|osx|solaris)/ tag 'audit:high', 'audit:integration', 'server' teardown do a...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/environment/directory_environment_production_created_master.rb
Ruby
apache-2.0
7,843
main
1,101
test_name 'ensure production environment created by master if missing' tag 'audit:high', 'audit:integration', 'server' testdir = create_tmpdir_for_user master, 'prod-env-created' step 'make environmentpath' master_user = puppet_config(master, 'user', section: 'master') apply_manifest_on(master, <<-MANIFEST, ...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/environment/should_find_existing_production_environment.rb
Ruby
apache-2.0
7,843
main
5,486
test_name "should find existing production environment" tag 'audit:medium' require 'puppet/acceptance/i18ndemo_utils' extend Puppet::Acceptance::I18nDemoUtils agents.each do |agent| path_separator = agent.platform_defaults[:pathseparator] initial_environment = on(agent, puppet("config print environment")).stdout....
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/environment/use_agent_environment_when_enc_doesnt_specify.rb
Ruby
apache-2.0
7,843
main
2,141
test_name "Agent should use agent environment if there is an enc that does not specify the environment" do require 'puppet/acceptance/classifier_utils' extend Puppet::Acceptance::ClassifierUtils tag 'audit:high', 'audit:integration', 'server' # Remove all traces of the last used environment tear...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/environment/use_environment_from_environmentpath.rb
Ruby
apache-2.0
7,843
main
6,781
test_name "Use environments from the environmentpath" do require 'puppet/acceptance/classifier_utils' extend Puppet::Acceptance::ClassifierUtils tag 'audit:high', 'audit:integration', 'server' classify_nodes_as_agent_specified_if_classifer_present testdir = create_tmpdir_for_user(master, 'use_e...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/ssl/trusted_external_facts.rb
Ruby
apache-2.0
7,843
main
6,221
test_name "trusted external fact test" do require 'puppet/acceptance/environment_utils' extend Puppet::Acceptance::EnvironmentUtils ### HELPERS ### SEPARATOR="<TRUSTED_JSON>" def parse_trusted_json(puppet_output) trusted_json = puppet_output.split(SEPARATOR)[1] if trusted_json.nil? raise "Pupp...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/ssl/certificate_extensions.rb
Ruby
apache-2.0
7,843
main
3,875
require 'puppet/acceptance/temp_file_utils' extend Puppet::Acceptance::TempFileUtils test_name "certificate extensions available as trusted data" do skip_test "Test requires at least one non-master agent" if hosts.length == 1 tag 'audit:high', # ca/cert core functionality 'audit:integration', '...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/ssl/autosign_command.rb
Ruby
apache-2.0
7,843
main
6,125
test_name "autosign command and csr attributes behavior (#7243,#7244)" do skip_test "Test requires at least one non-master agent" if hosts.length == 1 tag 'audit:high', # cert/ca core behavior 'audit:integration', 'server' # Ruby implementation is deprecated def assert_key_generat...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/language/binary_data_type.rb
Ruby
apache-2.0
7,843
main
4,842
test_name 'C98346: Binary data type' do require 'puppet/acceptance/puppet_type_test_tools.rb' extend Puppet::Acceptance::PuppetTypeTestTools tag 'audit:high', 'audit:integration', # Tests that binary data is retains integrity # between server and agent transport/application. ...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/language/exported_resources.rb
Ruby
apache-2.0
7,843
main
7,385
test_name "C94788: exported resources using a yaml terminus for storeconfigs" do require 'puppet/acceptance/environment_utils' extend Puppet::Acceptance::EnvironmentUtils tag 'audit:high', 'audit:integration', 'audit:refactor', # This could be a component of a larger workflow scenario. 'server' skip...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/language/server_set_facts.rb
Ruby
apache-2.0
7,843
main
1,726
test_name 'C64667: ensure server_facts is set and error if any value is overwritten by an agent' do require 'puppet/acceptance/environment_utils.rb' extend Puppet::Acceptance::EnvironmentUtils tag 'audit:high', 'audit:acceptance', # Validating server/client interaction 'server' teardown do agents.ea...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/language/sensitive_data_type.rb
Ruby
apache-2.0
7,843
main
7,465
test_name 'C98120, C98077: Sensitive Data is redacted on CLI, logs, reports' do require 'puppet/acceptance/puppet_type_test_tools.rb' extend Puppet::Acceptance::PuppetTypeTestTools tag 'audit:high', 'audit:acceptance', # Tests that sensitive data is retains integrity # between serve...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/language/objects_in_catalog.rb
Ruby
apache-2.0
7,843
main
1,241
test_name 'C99627: can use Object types in the catalog and apply/agent' do require 'puppet/acceptance/environment_utils.rb' extend Puppet::Acceptance::EnvironmentUtils tag 'audit:high', 'audit:integration', 'audit:refactor' # The use of apply on a reference system should # be a...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/language/pcore_generate_env_isolation.rb
Ruby
apache-2.0
7,843
main
3,139
test_name 'C98345: ensure puppet generate assures env. isolation' do require 'puppet/acceptance/environment_utils.rb' extend Puppet::Acceptance::EnvironmentUtils tag 'audit:high', 'audit:integration', 'server' teardown do agents.each do |agent| on(agent, puppet('config print lastrunfile')) do ...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/language/functions_in_puppet_language.rb
Ruby
apache-2.0
7,843
main
5,898
test_name 'Puppet executes functions written in the Puppet language' tag 'audit:high', 'audit:integration', 'audit:refactor', # use mk_tmp_environment_with_teardown helper for environment construction 'server' teardown do on master, 'rm -rf /etc/puppetlabs/code/modules/jenny' on master, 'rm -rf /e...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/language/pcore_resource_types_should_have_precedence_over_ruby.rb
Ruby
apache-2.0
7,843
main
3,625
test_name 'C98097 - generated pcore resource types should be loaded instead of ruby for custom types' do tag 'audit:high', 'audit:integration', 'audit:refactor', # use `mk_tmp_environment_with_teardown` helper to build environment 'server' environment = 'production' step 'setup - install module wit...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/language/resource_refs_with_nested_arrays.rb
Ruby
apache-2.0
7,843
main
720
test_name "#7681: Allow using array variables in resource references" tag 'audit:high', 'audit:unit' agents.each do |agent| test_manifest = <<MANIFEST $exec_names = ["first", "second"] exec { "first": command => "#{agent.echo('the first command')}", path => "#{agent.path}", logoutput => true, } exec { "se...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/loader/func4x_loadable_from_modules.rb
Ruby
apache-2.0
7,843
main
3,301
test_name "Exercise a module with 4x function and 4x system function" # Purpose: # Test that a packed puppet can call a 4x system function, and that a 4x function in # a module can be called. # # Method: # * Manually construct a very simple module with a manifest that creates a file. # * The file has content that depe...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/loader/resource_triggers_autoload.rb
Ruby
apache-2.0
7,843
main
2,072
test_name 'C100296: can auto-load defined types using a Resource statement' do tag 'risk:high' require 'puppet/acceptance/environment_utils.rb' extend Puppet::Acceptance::EnvironmentUtils app_type = File.basename(__FILE__, '.*') tmp_environment = mk_tmp_environment_with_teardown(master,...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/loader/autoload_from_resource_type_decl.rb
Ruby
apache-2.0
7,843
main
6,486
test_name 'C100303: Resource type statement triggered auto-loading works both with and without generated types' do tag 'risk:high' require 'puppet/acceptance/environment_utils.rb' extend Puppet::Acceptance::EnvironmentUtils require 'puppet/acceptance/agent_fqdn_utils' extend Puppet::Acceptance::AgentFqdnUti...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/aix/nim_package_provider.rb
Ruby
apache-2.0
7,843
main
3,981
test_name "NIM package provider should work correctly" tag 'audit:high', 'audit:acceptance' # OS specific by definition # nim test is slow, confine to only aix 7.2 and recent puppet versions confine :to, :platform => "aix" do |aix| version = on(aix, 'puppet --version').stdout version && Gem::Version.new(...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/aix/aix_package_provider.rb
Ruby
apache-2.0
7,843
main
3,589
test_name "aix package provider should work correctly" do tag 'audit:high', 'audit:acceptance' # OS specific by definition. confine :to, :platform => /aix/ dir = "/tmp/aix-packages-#{$$}" def assert_package_version(package, expected_version) # The output of lslpp is a colon-delimited list like: ...
github
puppetlabs/puppet
https://github.com/puppetlabs/puppet
acceptance/tests/i18n/translation_fallback.rb
Ruby
apache-2.0
7,843
main
856
test_name 'C100560: puppet agent run output falls back to english when language not available' do # No confines because even on non-translation supported OS' we should still fall back to english tag 'audit:medium', 'audit:acceptance' agents.each do |agent| step 'Run Puppet apply with language Hungaria...