From ea4091d9362e0f7c111fd30f48b9153647d9533b Mon Sep 17 00:00:00 2001 From: rileynewton <95654936+rileynewton@users.noreply.github.com> Date: Wed, 16 Aug 2023 14:19:31 -0700 Subject: [PATCH 1/2] (maint) Disable Single Git Source test for el-9, replace 'operatingsystemmajrelease' legacy fact --- .../tests/basic_functionality/rugged_git_provider_with_ssh.rb | 4 ++-- .../basic_functionality/rugged_git_provider_without_ssh.rb | 4 ++-- integration/tests/git_source/git_source_git.rb | 2 +- .../user_scenario/basic_workflow/negative/neg_disk_full.rb | 2 +- .../user_scenario/basic_workflow/single_env_10000_files.rb | 2 +- .../user_scenario/basic_workflow/single_env_large_files.rb | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/integration/tests/basic_functionality/rugged_git_provider_with_ssh.rb b/integration/tests/basic_functionality/rugged_git_provider_with_ssh.rb index 41e177420..171ff219e 100755 --- a/integration/tests/basic_functionality/rugged_git_provider_with_ssh.rb +++ b/integration/tests/basic_functionality/rugged_git_provider_with_ssh.rb @@ -10,7 +10,7 @@ if ENV['GIT_PROVIDER'] == 'shellgit' skip_test('Skipping test because removing Git from the system affects other "shellgit" tests.') -elsif fact_on(master, 'osfamily') == 'RedHat' and fact_on(master, "operatingsystemmajrelease").to_i < 6 +elsif fact_on(master, 'osfamily') == 'RedHat' and fact_on(master, "os.release.major").to_i < 6 skip_test('This version of EL is not supported by this test case!') end @@ -87,7 +87,7 @@ if master_platform == 'RedHat' on(master, 'yum remove -y git') elsif master_platform == 'Debian' - if fact_on(master, "operatingsystemmajrelease") == '10.04' + if fact_on(master, "os.release.major") == '10.04' on(master, 'apt-get remove -y git-core') else on(master, 'apt-get remove -y git') diff --git a/integration/tests/basic_functionality/rugged_git_provider_without_ssh.rb b/integration/tests/basic_functionality/rugged_git_provider_without_ssh.rb index 23c1a0afe..481ac165b 100755 --- a/integration/tests/basic_functionality/rugged_git_provider_without_ssh.rb +++ b/integration/tests/basic_functionality/rugged_git_provider_without_ssh.rb @@ -8,7 +8,7 @@ if ENV['GIT_PROVIDER'] == 'shellgit' skip_test('Skipping test because removing Git from the system affects other "shellgit" tests.') -elsif fact_on(master, 'osfamily') == 'RedHat' and fact_on(master, "operatingsystemmajrelease").to_i < 6 +elsif fact_on(master, 'osfamily') == 'RedHat' and fact_on(master, "os.release.major").to_i < 6 skip_test('This version of EL is not supported by this test case!') end @@ -86,7 +86,7 @@ if master_platform == 'RedHat' on(master, 'yum remove -y git') elsif master_platform == 'Debian' - if fact_on(master, "operatingsystemmajrelease") == '10.04' + if fact_on(master, "os.release.major") == '10.04' on(master, 'apt-get remove -y git-core') else on(master, 'apt-get remove -y git') diff --git a/integration/tests/git_source/git_source_git.rb b/integration/tests/git_source/git_source_git.rb index 1f9b01a2a..d25b9d3b3 100755 --- a/integration/tests/git_source/git_source_git.rb +++ b/integration/tests/git_source/git_source_git.rb @@ -5,7 +5,7 @@ confine(:to, :platform => 'el') -if fact_on(master, "operatingsystemmajrelease").to_i < 6 +if fact_on(master, "os.release.major").to_i < 6 || fact_on(master, "os.release.major").to_i > 8 skip_test('This version of EL is not supported by this test case!') end diff --git a/integration/tests/user_scenario/basic_workflow/negative/neg_disk_full.rb b/integration/tests/user_scenario/basic_workflow/negative/neg_disk_full.rb index 36a0da5c0..fb1e2cfe1 100755 --- a/integration/tests/user_scenario/basic_workflow/negative/neg_disk_full.rb +++ b/integration/tests/user_scenario/basic_workflow/negative/neg_disk_full.rb @@ -2,7 +2,7 @@ require 'r10k_utils' test_name 'CODEMGMT-86 - C59265 - Attempt to Deploy Environment to Disk with Insufficient Free Space' -if fact_on(master, 'osfamily') == 'RedHat' and fact_on(master, "operatingsystemmajrelease").to_i < 6 +if fact_on(master, 'osfamily') == 'RedHat' and fact_on(master, "os.release.major").to_i < 6 skip_test('This version of EL is not supported by this test case!') end diff --git a/integration/tests/user_scenario/basic_workflow/single_env_10000_files.rb b/integration/tests/user_scenario/basic_workflow/single_env_10000_files.rb index fb999dce1..1f6c78a1c 100755 --- a/integration/tests/user_scenario/basic_workflow/single_env_10000_files.rb +++ b/integration/tests/user_scenario/basic_workflow/single_env_10000_files.rb @@ -3,7 +3,7 @@ require 'master_manipulator' test_name 'CODEMGMT-62 - C59239 - Single Environment with 10,000 Files' -if fact_on(master, 'osfamily') == 'RedHat' and fact_on(master, "operatingsystemmajrelease").to_i < 6 +if fact_on(master, 'osfamily') == 'RedHat' and fact_on(master, "os.release.major").to_i < 6 skip_test('This version of EL is not supported by this test case!') end diff --git a/integration/tests/user_scenario/basic_workflow/single_env_large_files.rb b/integration/tests/user_scenario/basic_workflow/single_env_large_files.rb index f63b5763a..2c1952c4a 100755 --- a/integration/tests/user_scenario/basic_workflow/single_env_large_files.rb +++ b/integration/tests/user_scenario/basic_workflow/single_env_large_files.rb @@ -3,7 +3,7 @@ require 'master_manipulator' test_name 'CODEMGMT-62 - C59242 - Single Environment with Large Binary Files' -if fact_on(master, 'osfamily') == 'RedHat' and fact_on(master, "operatingsystemmajrelease").to_i < 6 +if fact_on(master, 'osfamily') == 'RedHat' and fact_on(master, "os.release.major").to_i < 6 skip_test('This version of EL is not supported by this test case!') end From db4e31b803b78360c3dba8c6dc6558c23cdbdfd8 Mon Sep 17 00:00:00 2001 From: rileynewton <95654936+rileynewton@users.noreply.github.com> Date: Fri, 18 Aug 2023 10:55:38 -0700 Subject: [PATCH 2/2] (maint) Replace 'osfamily' legacy fact --- .../tests/basic_functionality/negative/negative_bad_proxy.rb | 2 +- .../basic_functionality/proxy_specified_in_configuration.rb | 2 +- .../tests/basic_functionality/proxy_with_puppetfile.rb | 2 +- .../tests/basic_functionality/rugged_git_provider_with_ssh.rb | 4 ++-- .../basic_functionality/rugged_git_provider_without_ssh.rb | 4 ++-- .../user_scenario/basic_workflow/negative/neg_disk_full.rb | 2 +- .../user_scenario/basic_workflow/single_env_10000_files.rb | 2 +- .../user_scenario/basic_workflow/single_env_large_files.rb | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/integration/tests/basic_functionality/negative/negative_bad_proxy.rb b/integration/tests/basic_functionality/negative/negative_bad_proxy.rb index c38cdbb78..2dc6b9c94 100644 --- a/integration/tests/basic_functionality/negative/negative_bad_proxy.rb +++ b/integration/tests/basic_functionality/negative/negative_bad_proxy.rb @@ -6,7 +6,7 @@ confine(:to, :platform => ['el', 'sles']) #Init -master_platform = fact_on(master, 'osfamily') +master_platform = fact_on(master, 'os.family') r10k_fqp = get_r10k_fqp(master) #Verification diff --git a/integration/tests/basic_functionality/proxy_specified_in_configuration.rb b/integration/tests/basic_functionality/proxy_specified_in_configuration.rb index 25ec5b9b4..487078916 100644 --- a/integration/tests/basic_functionality/proxy_specified_in_configuration.rb +++ b/integration/tests/basic_functionality/proxy_specified_in_configuration.rb @@ -6,7 +6,7 @@ confine(:to, :platform => ['el', 'sles']) #Init -master_platform = fact_on(master, 'osfamily') +master_platform = fact_on(master, 'os.family') env_path = on(master, puppet('config print environmentpath')).stdout.rstrip r10k_fqp = get_r10k_fqp(master) diff --git a/integration/tests/basic_functionality/proxy_with_puppetfile.rb b/integration/tests/basic_functionality/proxy_with_puppetfile.rb index 01386afe8..5de666b60 100644 --- a/integration/tests/basic_functionality/proxy_with_puppetfile.rb +++ b/integration/tests/basic_functionality/proxy_with_puppetfile.rb @@ -6,7 +6,7 @@ confine(:to, :platform => ['el', 'sles']) #Init -master_platform = fact_on(master, 'osfamily') +master_platform = fact_on(master, 'os.family') r10k_fqp = get_r10k_fqp(master) case master_platform diff --git a/integration/tests/basic_functionality/rugged_git_provider_with_ssh.rb b/integration/tests/basic_functionality/rugged_git_provider_with_ssh.rb index 171ff219e..24881fb20 100755 --- a/integration/tests/basic_functionality/rugged_git_provider_with_ssh.rb +++ b/integration/tests/basic_functionality/rugged_git_provider_with_ssh.rb @@ -10,12 +10,12 @@ if ENV['GIT_PROVIDER'] == 'shellgit' skip_test('Skipping test because removing Git from the system affects other "shellgit" tests.') -elsif fact_on(master, 'osfamily') == 'RedHat' and fact_on(master, "os.release.major").to_i < 6 +elsif fact_on(master, 'os.family') == 'RedHat' and fact_on(master, "os.release.major").to_i < 6 skip_test('This version of EL is not supported by this test case!') end #Init -master_platform = fact_on(master, 'osfamily') +master_platform = fact_on(master, 'os.family') master_certname = on(master, puppet('config', 'print', 'certname')).stdout.rstrip env_path = on(master, puppet('config print environmentpath')).stdout.rstrip r10k_fqp = get_r10k_fqp(master) diff --git a/integration/tests/basic_functionality/rugged_git_provider_without_ssh.rb b/integration/tests/basic_functionality/rugged_git_provider_without_ssh.rb index 481ac165b..9328e5d0e 100755 --- a/integration/tests/basic_functionality/rugged_git_provider_without_ssh.rb +++ b/integration/tests/basic_functionality/rugged_git_provider_without_ssh.rb @@ -8,12 +8,12 @@ if ENV['GIT_PROVIDER'] == 'shellgit' skip_test('Skipping test because removing Git from the system affects other "shellgit" tests.') -elsif fact_on(master, 'osfamily') == 'RedHat' and fact_on(master, "os.release.major").to_i < 6 +elsif fact_on(master, 'os.family') == 'RedHat' and fact_on(master, "os.release.major").to_i < 6 skip_test('This version of EL is not supported by this test case!') end #Init -master_platform = fact_on(master, 'osfamily') +master_platform = fact_on(master, 'os.family') master_certname = on(master, puppet('config', 'print', 'certname')).stdout.rstrip env_path = on(master, puppet('config print environmentpath')).stdout.rstrip r10k_fqp = get_r10k_fqp(master) diff --git a/integration/tests/user_scenario/basic_workflow/negative/neg_disk_full.rb b/integration/tests/user_scenario/basic_workflow/negative/neg_disk_full.rb index fb1e2cfe1..f2cc2a463 100755 --- a/integration/tests/user_scenario/basic_workflow/negative/neg_disk_full.rb +++ b/integration/tests/user_scenario/basic_workflow/negative/neg_disk_full.rb @@ -2,7 +2,7 @@ require 'r10k_utils' test_name 'CODEMGMT-86 - C59265 - Attempt to Deploy Environment to Disk with Insufficient Free Space' -if fact_on(master, 'osfamily') == 'RedHat' and fact_on(master, "os.release.major").to_i < 6 +if fact_on(master, 'os.family') == 'RedHat' and fact_on(master, "os.release.major").to_i < 6 skip_test('This version of EL is not supported by this test case!') end diff --git a/integration/tests/user_scenario/basic_workflow/single_env_10000_files.rb b/integration/tests/user_scenario/basic_workflow/single_env_10000_files.rb index 1f6c78a1c..6629ddbad 100755 --- a/integration/tests/user_scenario/basic_workflow/single_env_10000_files.rb +++ b/integration/tests/user_scenario/basic_workflow/single_env_10000_files.rb @@ -3,7 +3,7 @@ require 'master_manipulator' test_name 'CODEMGMT-62 - C59239 - Single Environment with 10,000 Files' -if fact_on(master, 'osfamily') == 'RedHat' and fact_on(master, "os.release.major").to_i < 6 +if fact_on(master, 'os.family') == 'RedHat' and fact_on(master, "os.release.major").to_i < 6 skip_test('This version of EL is not supported by this test case!') end diff --git a/integration/tests/user_scenario/basic_workflow/single_env_large_files.rb b/integration/tests/user_scenario/basic_workflow/single_env_large_files.rb index 2c1952c4a..2288c7514 100755 --- a/integration/tests/user_scenario/basic_workflow/single_env_large_files.rb +++ b/integration/tests/user_scenario/basic_workflow/single_env_large_files.rb @@ -3,7 +3,7 @@ require 'master_manipulator' test_name 'CODEMGMT-62 - C59242 - Single Environment with Large Binary Files' -if fact_on(master, 'osfamily') == 'RedHat' and fact_on(master, "os.release.major").to_i < 6 +if fact_on(master, 'os.family') == 'RedHat' and fact_on(master, "os.release.major").to_i < 6 skip_test('This version of EL is not supported by this test case!') end