From ad7db1c78f694973b7ab5434d8e32e16544de3aa Mon Sep 17 00:00:00 2001 From: Georg Pfuetzenreuter Date: Fri, 17 Feb 2023 21:53:30 +0100 Subject: [PATCH] style(syntax): resolve linting errors+warnings Resolve all rubocop, salt-lint and yamllint complaints. Signed-off-by: Georg Pfuetzenreuter --- kitchen.yml | 68 +++++++++---------- nsd/_test_dependencies.sls | 2 +- pillar.example | 3 +- test/integration/default/controls/services.rb | 18 ++--- .../default/files/_mapdata/amazonlinux-1.yaml | 1 - .../default/files/_mapdata/amazonlinux-2.yaml | 1 - .../files/_mapdata/arch-base-latest.yaml | 1 - .../default/files/_mapdata/centos-6.yaml | 1 - .../default/files/_mapdata/centos-7.yaml | 1 - .../default/files/_mapdata/centos-8.yaml | 1 - .../default/files/_mapdata/debian-10.yaml | 1 - .../default/files/_mapdata/debian-9.yaml | 1 - .../default/files/_mapdata/fedora-31.yaml | 1 - .../default/files/_mapdata/fedora-32.yaml | 1 - .../default/files/_mapdata/fedora-33.yaml | 1 - .../default/files/_mapdata/gentoo-2-sysd.yaml | 1 - .../default/files/_mapdata/gentoo-2-sysv.yaml | 1 - .../default/files/_mapdata/opensuse-15.yaml | 1 - .../files/_mapdata/opensuse-tumbleweed.yaml | 1 - .../default/files/_mapdata/oraclelinux-7.yaml | 1 - .../default/files/_mapdata/oraclelinux-8.yaml | 1 - .../default/files/_mapdata/ubuntu-16.yaml | 1 - .../default/files/_mapdata/ubuntu-18.yaml | 1 - .../default/files/_mapdata/ubuntu-20.yaml | 1 - 24 files changed, 45 insertions(+), 66 deletions(-) diff --git a/kitchen.yml b/kitchen.yml index 5512ef3..2e69355 100644 --- a/kitchen.yml +++ b/kitchen.yml @@ -283,10 +283,10 @@ platforms: - name: ubuntu-1604-3000-8-py2 driver: image: saltimages/salt-3000.8-py2:ubuntu-16.04 - # - name: arch-base-latest-3000-8-py2 - # driver: - # image: saltimages/salt-3000.8-py2:arch-base-latest - # run_command: /usr/lib/systemd/systemd +# - name: arch-base-latest-3000-8-py2 +# driver: +# image: saltimages/salt-3000.8-py2:arch-base-latest +# run_command: /usr/lib/systemd/systemd provisioner: name: salt_solo @@ -336,33 +336,33 @@ suites: verifier: inspec_tests: - path: test/integration/default - # - name: gentoo - # includes: - # - gentoo-stage3-latest-master-py3 - # - gentoo-stage3-systemd-master-py3 - # - gentoo-stage3-latest-3002-5-py3 - # - gentoo-stage3-systemd-3002-5-py3 - # - gentoo-stage3-latest-3001-6-py3 - # - gentoo-stage3-systemd-3001-6-py3 - # - gentoo-stage3-latest-3000-8-py3 - # - gentoo-stage3-systemd-3000-8-py3 - # provisioner: - # state_top: - # base: - # '*': - # - nsd._mapdata - # - nsd - # pillars: - # top.sls: - # base: - # '*': - # - nsd - # - gentoo - # - define_roles - # pillars_from_files: - # nsd.sls: pillar.example - # gentoo.sls: test/salt/pillar/gentoo.sls - # define_roles.sls: test/salt/pillar/define_roles.sls - # verifier: - # inspec_tests: - # - path: test/integration/default +# - name: gentoo +# includes: +# - gentoo-stage3-latest-master-py3 +# - gentoo-stage3-systemd-master-py3 +# - gentoo-stage3-latest-3002-5-py3 +# - gentoo-stage3-systemd-3002-5-py3 +# - gentoo-stage3-latest-3001-6-py3 +# - gentoo-stage3-systemd-3001-6-py3 +# - gentoo-stage3-latest-3000-8-py3 +# - gentoo-stage3-systemd-3000-8-py3 +# provisioner: +# state_top: +# base: +# '*': +# - nsd._mapdata +# - nsd +# pillars: +# top.sls: +# base: +# '*': +# - nsd +# - gentoo +# - define_roles +# pillars_from_files: +# nsd.sls: pillar.example +# gentoo.sls: test/salt/pillar/gentoo.sls +# define_roles.sls: test/salt/pillar/define_roles.sls +# verifier: +# inspec_tests: +# - path: test/integration/default diff --git a/nsd/_test_dependencies.sls b/nsd/_test_dependencies.sls index 500df4e..c9d8cf1 100644 --- a/nsd/_test_dependencies.sls +++ b/nsd/_test_dependencies.sls @@ -5,7 +5,7 @@ {%- else %} {% set package = 'dnsutils' %} {%- endif %} - + nsd-_test_dependencies--package--installed: pkg.installed: - name: {{ package }} diff --git a/pillar.example b/pillar.example index f7ea0d1..39e7c3e 100644 --- a/pillar.example +++ b/pillar.example @@ -25,8 +25,7 @@ nsd: # nsd.conf.d/90-generated-zones will be created and managed. zones: example.test: - # Just for testing purpuses - multi-master-check: no + multi-master-check: 'no' "168.192.in-addr.arpa": {} # NSD's include-pattern directive may be a better way to share configuration # across zones than using YAML anchors. diff --git a/test/integration/default/controls/services.rb b/test/integration/default/controls/services.rb index feb8c81..3d1e94e 100644 --- a/test/integration/default/controls/services.rb +++ b/test/integration/default/controls/services.rb @@ -22,38 +22,38 @@ control 'nsd.service.running' do end describe command('nslookup -port=53530 ns1.example.test 127.0.0.1') do - its('stdout') { should match "192.168.0.1" } + its('stdout') { should match '192.168.0.1' } end describe command('nslookup -port=53530 ns2.example.test 127.0.0.1') do - its('stdout') { should match "192.168.0.2" } + its('stdout') { should match '192.168.0.2' } end describe command('nslookup -port=53530 example.test 127.0.0.1') do - its('stdout') { should match "192.168.0.10" } + its('stdout') { should match '192.168.0.10' } end describe command('nslookup -port=53530 www.example.test 127.0.0.1') do - its('stdout') { should match "192.168.0.10" } + its('stdout') { should match '192.168.0.10' } end describe command('nslookup -port=53530 mail.example.test 127.0.0.1') do - its('stdout') { should match "192.168.0.11" } + its('stdout') { should match '192.168.0.11' } end describe command('nslookup -port=53530 192.168.0.1 127.0.0.1') do - its('stdout') { should match "ns1.example.test" } + its('stdout') { should match 'ns1.example.test' } end describe command('nslookup -port=53530 192.168.0.2 127.0.0.1') do - its('stdout') { should match "ns2.example.test" } + its('stdout') { should match 'ns2.example.test' } end describe command('nslookup -port=53530 192.168.0.10 127.0.0.1') do - its('stdout') { should match "example.test" } + its('stdout') { should match 'example.test' } end describe command('nslookup -port=53530 192.168.0.11 127.0.0.1') do - its('stdout') { should match "mail.example.test" } + its('stdout') { should match 'mail.example.test' } end end diff --git a/test/integration/default/files/_mapdata/amazonlinux-1.yaml b/test/integration/default/files/_mapdata/amazonlinux-1.yaml index 5a69913..0b659b0 100644 --- a/test/integration/default/files/_mapdata/amazonlinux-1.yaml +++ b/test/integration/default/files/_mapdata/amazonlinux-1.yaml @@ -47,4 +47,3 @@ values: example.test: multi-master-check: false zones_dir: "/etc/nsd/zones" - diff --git a/test/integration/default/files/_mapdata/amazonlinux-2.yaml b/test/integration/default/files/_mapdata/amazonlinux-2.yaml index a732a9c..49a4846 100644 --- a/test/integration/default/files/_mapdata/amazonlinux-2.yaml +++ b/test/integration/default/files/_mapdata/amazonlinux-2.yaml @@ -47,4 +47,3 @@ values: example.test: multi-master-check: false zones_dir: "/etc/nsd/zones" - diff --git a/test/integration/default/files/_mapdata/arch-base-latest.yaml b/test/integration/default/files/_mapdata/arch-base-latest.yaml index ab517e4..ed7f2df 100644 --- a/test/integration/default/files/_mapdata/arch-base-latest.yaml +++ b/test/integration/default/files/_mapdata/arch-base-latest.yaml @@ -47,4 +47,3 @@ values: example.test: multi-master-check: false zones_dir: "/etc/nsd/zones" - diff --git a/test/integration/default/files/_mapdata/centos-6.yaml b/test/integration/default/files/_mapdata/centos-6.yaml index 51a805a..4f918b8 100644 --- a/test/integration/default/files/_mapdata/centos-6.yaml +++ b/test/integration/default/files/_mapdata/centos-6.yaml @@ -47,4 +47,3 @@ values: example.test: multi-master-check: false zones_dir: "/etc/nsd/zones" - diff --git a/test/integration/default/files/_mapdata/centos-7.yaml b/test/integration/default/files/_mapdata/centos-7.yaml index a69b574..3bd9155 100644 --- a/test/integration/default/files/_mapdata/centos-7.yaml +++ b/test/integration/default/files/_mapdata/centos-7.yaml @@ -47,4 +47,3 @@ values: example.test: multi-master-check: false zones_dir: "/etc/nsd/zones" - diff --git a/test/integration/default/files/_mapdata/centos-8.yaml b/test/integration/default/files/_mapdata/centos-8.yaml index 919bd1d..0b2bb18 100644 --- a/test/integration/default/files/_mapdata/centos-8.yaml +++ b/test/integration/default/files/_mapdata/centos-8.yaml @@ -47,4 +47,3 @@ values: example.test: multi-master-check: false zones_dir: "/etc/nsd/zones" - diff --git a/test/integration/default/files/_mapdata/debian-10.yaml b/test/integration/default/files/_mapdata/debian-10.yaml index 638f05a..1d40f48 100644 --- a/test/integration/default/files/_mapdata/debian-10.yaml +++ b/test/integration/default/files/_mapdata/debian-10.yaml @@ -47,4 +47,3 @@ values: example.test: multi-master-check: false zones_dir: "/etc/nsd/zones" - diff --git a/test/integration/default/files/_mapdata/debian-9.yaml b/test/integration/default/files/_mapdata/debian-9.yaml index f914738..0765120 100644 --- a/test/integration/default/files/_mapdata/debian-9.yaml +++ b/test/integration/default/files/_mapdata/debian-9.yaml @@ -47,4 +47,3 @@ values: example.test: multi-master-check: false zones_dir: "/etc/nsd/zones" - diff --git a/test/integration/default/files/_mapdata/fedora-31.yaml b/test/integration/default/files/_mapdata/fedora-31.yaml index 8d25ff9..c9453dd 100644 --- a/test/integration/default/files/_mapdata/fedora-31.yaml +++ b/test/integration/default/files/_mapdata/fedora-31.yaml @@ -47,4 +47,3 @@ values: example.test: multi-master-check: false zones_dir: "/etc/nsd/zones" - diff --git a/test/integration/default/files/_mapdata/fedora-32.yaml b/test/integration/default/files/_mapdata/fedora-32.yaml index 199a40b..ce7bcf1 100644 --- a/test/integration/default/files/_mapdata/fedora-32.yaml +++ b/test/integration/default/files/_mapdata/fedora-32.yaml @@ -47,4 +47,3 @@ values: example.test: multi-master-check: false zones_dir: "/etc/nsd/zones" - diff --git a/test/integration/default/files/_mapdata/fedora-33.yaml b/test/integration/default/files/_mapdata/fedora-33.yaml index 6cb4a6d..ae873ce 100644 --- a/test/integration/default/files/_mapdata/fedora-33.yaml +++ b/test/integration/default/files/_mapdata/fedora-33.yaml @@ -47,4 +47,3 @@ values: example.test: multi-master-check: false zones_dir: "/etc/nsd/zones" - diff --git a/test/integration/default/files/_mapdata/gentoo-2-sysd.yaml b/test/integration/default/files/_mapdata/gentoo-2-sysd.yaml index c4295a2..0576207 100644 --- a/test/integration/default/files/_mapdata/gentoo-2-sysd.yaml +++ b/test/integration/default/files/_mapdata/gentoo-2-sysd.yaml @@ -47,4 +47,3 @@ values: example.test: multi-master-check: false zones_dir: "/etc/nsd/zones" - diff --git a/test/integration/default/files/_mapdata/gentoo-2-sysv.yaml b/test/integration/default/files/_mapdata/gentoo-2-sysv.yaml index c4295a2..0576207 100644 --- a/test/integration/default/files/_mapdata/gentoo-2-sysv.yaml +++ b/test/integration/default/files/_mapdata/gentoo-2-sysv.yaml @@ -47,4 +47,3 @@ values: example.test: multi-master-check: false zones_dir: "/etc/nsd/zones" - diff --git a/test/integration/default/files/_mapdata/opensuse-15.yaml b/test/integration/default/files/_mapdata/opensuse-15.yaml index 0a28fbd..3129f4d 100644 --- a/test/integration/default/files/_mapdata/opensuse-15.yaml +++ b/test/integration/default/files/_mapdata/opensuse-15.yaml @@ -47,4 +47,3 @@ values: example.test: multi-master-check: false zones_dir: "/etc/nsd/zones" - diff --git a/test/integration/default/files/_mapdata/opensuse-tumbleweed.yaml b/test/integration/default/files/_mapdata/opensuse-tumbleweed.yaml index 827e149..2b4ead5 100644 --- a/test/integration/default/files/_mapdata/opensuse-tumbleweed.yaml +++ b/test/integration/default/files/_mapdata/opensuse-tumbleweed.yaml @@ -47,4 +47,3 @@ values: example.test: multi-master-check: false zones_dir: "/etc/nsd/zones" - diff --git a/test/integration/default/files/_mapdata/oraclelinux-7.yaml b/test/integration/default/files/_mapdata/oraclelinux-7.yaml index b3cba23..4c5c127 100644 --- a/test/integration/default/files/_mapdata/oraclelinux-7.yaml +++ b/test/integration/default/files/_mapdata/oraclelinux-7.yaml @@ -47,4 +47,3 @@ values: example.test: multi-master-check: false zones_dir: "/etc/nsd/zones" - diff --git a/test/integration/default/files/_mapdata/oraclelinux-8.yaml b/test/integration/default/files/_mapdata/oraclelinux-8.yaml index e925080..fa64120 100644 --- a/test/integration/default/files/_mapdata/oraclelinux-8.yaml +++ b/test/integration/default/files/_mapdata/oraclelinux-8.yaml @@ -47,4 +47,3 @@ values: example.test: multi-master-check: false zones_dir: "/etc/nsd/zones" - diff --git a/test/integration/default/files/_mapdata/ubuntu-16.yaml b/test/integration/default/files/_mapdata/ubuntu-16.yaml index 004eeeb..f28d2b8 100644 --- a/test/integration/default/files/_mapdata/ubuntu-16.yaml +++ b/test/integration/default/files/_mapdata/ubuntu-16.yaml @@ -47,4 +47,3 @@ values: example.test: multi-master-check: false zones_dir: "/etc/nsd/zones" - diff --git a/test/integration/default/files/_mapdata/ubuntu-18.yaml b/test/integration/default/files/_mapdata/ubuntu-18.yaml index 8bf5de1..736e764 100644 --- a/test/integration/default/files/_mapdata/ubuntu-18.yaml +++ b/test/integration/default/files/_mapdata/ubuntu-18.yaml @@ -47,4 +47,3 @@ values: example.test: multi-master-check: false zones_dir: "/etc/nsd/zones" - diff --git a/test/integration/default/files/_mapdata/ubuntu-20.yaml b/test/integration/default/files/_mapdata/ubuntu-20.yaml index dd5cba9..141cc7c 100644 --- a/test/integration/default/files/_mapdata/ubuntu-20.yaml +++ b/test/integration/default/files/_mapdata/ubuntu-20.yaml @@ -47,4 +47,3 @@ values: example.test: multi-master-check: false zones_dir: "/etc/nsd/zones" -