From efd3ad59d94ce3177d4275f6e5afdd8137c2759a Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Fri, 17 Apr 2020 13:30:23 -0500 Subject: [PATCH] Remove unused rspec tests We got rid of the job, let's get rid of the tests. Change-Id: I8fed8d2d381020594de63bf1069f68122d018c47 --- .../spec/acceptance/basic_spec.rb | 82 ------------------- .../spec/acceptance/fixtures/default.pp | 8 -- .../acceptance/fixtures/postconditions.pp | 6 -- .../spec/acceptance/nodesets/default.yml | 11 --- .../acceptance/nodesets/nodepool-centos7.yml | 10 --- .../acceptance/nodesets/nodepool-trusty.yml | 10 --- .../acceptance/nodesets/nodepool-xenial.yml | 10 --- 7 files changed, 137 deletions(-) delete mode 100755 modules/openstack_project/spec/acceptance/basic_spec.rb delete mode 100644 modules/openstack_project/spec/acceptance/fixtures/default.pp delete mode 100644 modules/openstack_project/spec/acceptance/fixtures/postconditions.pp delete mode 100644 modules/openstack_project/spec/acceptance/nodesets/default.yml delete mode 100644 modules/openstack_project/spec/acceptance/nodesets/nodepool-centos7.yml delete mode 100644 modules/openstack_project/spec/acceptance/nodesets/nodepool-trusty.yml delete mode 100644 modules/openstack_project/spec/acceptance/nodesets/nodepool-xenial.yml diff --git a/modules/openstack_project/spec/acceptance/basic_spec.rb b/modules/openstack_project/spec/acceptance/basic_spec.rb deleted file mode 100755 index f0db648b6f..0000000000 --- a/modules/openstack_project/spec/acceptance/basic_spec.rb +++ /dev/null @@ -1,82 +0,0 @@ -require 'puppet-openstack_infra_spec_helper/spec_helper_acceptance' - -describe 'openstack_project::server' do - - def pp_path - base_path = File.dirname(__FILE__) - File.join(base_path, 'fixtures') - end - - def puppet_manifest - manifest_path = File.join(pp_path, 'default.pp') - File.read(manifest_path) - end - - def postconditions_puppet_manifest - manifest_path = File.join(pp_path, 'postconditions.pp') - File.read(manifest_path) - end - - before(:all) do - # The ssh_authorized_key resource uses the key comment as a universal - # identifier, so if a user's key is already in root's authorized keys, it - # conflicts with adding the key for the user itself. Move root's key list - # aside temporarily. - shell('mv /root/.ssh/authorized_keys /root/.ssh/authorized_keys.bak') - # epel is needed to install exim - if os[:family] == 'redhat' - shell('yum-config-manager --enable epel') - end - end - - it 'should work with no errors' do - apply_manifest(puppet_manifest, catch_failures: true) - end - - it 'should be idempotent' do - apply_manifest(puppet_manifest, catch_changes: true) - end - - it 'should turn root ssh back on' do - apply_manifest(postconditions_puppet_manifest, catch_failures: true) - shell('mv /root/.ssh/authorized_keys.bak /root/.ssh/authorized_keys') - end - - ['mordred', - 'corvus', - 'clarkb', - 'fungi', - 'pabelanger', - 'ianw', - 'dmsimard', - 'frickler'].each do |user| - describe user(user) do - it { should exist } - end - end - - ['slukjanov', - 'elizabeth', - 'jhesketh', - 'shrews', - 'yolanda', - 'rcarrillocruz', - 'nibz'].each do |user| - describe user(user) do - it { should_not exist } - end - end - - exim = os[:family] == 'ubuntu' ? 'exim4' : 'exim' - ntp = os[:family] == 'ubuntu' ? 'ntp' : 'ntpd' - services = ['rsyslog', 'unbound', exim, 'snmpd', ntp] - if os[:family] == 'ubuntu' - services.push('openafs-client') - end - services.each do |service| - describe service(service) do - it { should be_running } - end - end - -end diff --git a/modules/openstack_project/spec/acceptance/fixtures/default.pp b/modules/openstack_project/spec/acceptance/fixtures/default.pp deleted file mode 100644 index 7eec7a7104..0000000000 --- a/modules/openstack_project/spec/acceptance/fixtures/default.pp +++ /dev/null @@ -1,8 +0,0 @@ -$manage_afs = $::operatingsystem ? { - 'CentOS' => false, - default => true -} - -class { 'openstack_project::server': - afs => $manage_afs, -} diff --git a/modules/openstack_project/spec/acceptance/fixtures/postconditions.pp b/modules/openstack_project/spec/acceptance/fixtures/postconditions.pp deleted file mode 100644 index ba75282e9f..0000000000 --- a/modules/openstack_project/spec/acceptance/fixtures/postconditions.pp +++ /dev/null @@ -1,6 +0,0 @@ -# Turn root ssh back on, otherwise we can't post logs -class { 'ssh': - trusted_ssh_type => 'address', - trusted_ssh_source => '23.253.245.198,2001:4800:7818:101:3c21:a454:23ed:4072', - permit_root_login => 'yes', -} diff --git a/modules/openstack_project/spec/acceptance/nodesets/default.yml b/modules/openstack_project/spec/acceptance/nodesets/default.yml deleted file mode 100644 index 3bb3e62648..0000000000 --- a/modules/openstack_project/spec/acceptance/nodesets/default.yml +++ /dev/null @@ -1,11 +0,0 @@ -HOSTS: - ubuntu-server-1404-x64: - roles: - - master - platform: ubuntu-14.04-amd64 - box: puppetlabs/ubuntu-14.04-64-nocm - box_url: https://vagrantcloud.com/puppetlabs/ubuntu-14.04-64-nocm - hypervisor: vagrant -CONFIG: - log_level: debug - type: git diff --git a/modules/openstack_project/spec/acceptance/nodesets/nodepool-centos7.yml b/modules/openstack_project/spec/acceptance/nodesets/nodepool-centos7.yml deleted file mode 100644 index c55287420c..0000000000 --- a/modules/openstack_project/spec/acceptance/nodesets/nodepool-centos7.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - centos-70-x64: - roles: - - master - platform: el-7-x86_64 - hypervisor: none - ip: 127.0.0.1 -CONFIG: - type: foss - set_env: false diff --git a/modules/openstack_project/spec/acceptance/nodesets/nodepool-trusty.yml b/modules/openstack_project/spec/acceptance/nodesets/nodepool-trusty.yml deleted file mode 100644 index 9fc624e24a..0000000000 --- a/modules/openstack_project/spec/acceptance/nodesets/nodepool-trusty.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - ubuntu-14.04-amd64: - roles: - - master - platform: ubuntu-14.04-amd64 - hypervisor: none - ip: 127.0.0.1 -CONFIG: - type: foss - set_env: false diff --git a/modules/openstack_project/spec/acceptance/nodesets/nodepool-xenial.yml b/modules/openstack_project/spec/acceptance/nodesets/nodepool-xenial.yml deleted file mode 100644 index 99dd318778..0000000000 --- a/modules/openstack_project/spec/acceptance/nodesets/nodepool-xenial.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - ubuntu-16.04-amd64: - roles: - - master - platform: ubuntu-16.04-amd64 - hypervisor: none - ip: 127.0.0.1 -CONFIG: - type: foss - set_env: false