From fedcb94f91830239d19768ea17cabad754dfe751 Mon Sep 17 00:00:00 2001 From: Sous Chefs Bot <33356041+kitchen-porter@users.noreply.github.com> Date: Fri, 7 Jan 2022 17:46:17 -0800 Subject: [PATCH] Automated PR: Cookstyle Changes (#174) * Cookstyle 7.26.1 Fixes Issues found and resolved with: test/integration/helpers/serverspec/spec_helper.rb - 9:21 convention: Style/FileRead - Use File.read. https://rubystyle.guidefile-read Signed-off-by: kitchen-porter * Update CHANGELOG.md * Use correct path for systemd on OpenSUSE Signed-off-by: Lance Albertson Co-authored-by: Jason Field Co-authored-by: Lance Albertson --- CHANGELOG.md | 2 ++ kitchen.dokken.yml | 12 +----------- test/integration/helpers/serverspec/spec_helper.rb | 2 +- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f8bcf2a..c6b777c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ This file is used to list changes made in each version of the postfix cookbook. ## Unreleased +- resolved cookstyle error: test/integration/helpers/serverspec/spec_helper.rb:9:21 convention: `Style/FileRead` + ## 6.0.4 - *2021-08-19* ## 6.0.3 - *2021-08-19* diff --git a/kitchen.dokken.yml b/kitchen.dokken.yml index 1d3b9e2..331c709 100644 --- a/kitchen.dokken.yml +++ b/kitchen.dokken.yml @@ -21,15 +21,11 @@ platforms: driver: image: dokken/debian-9 pid_one_command: /bin/systemd - intermediate_instructions: - - RUN /usr/bin/apt-get update - name: debian-10 driver: image: dokken/debian-10 pid_one_command: /bin/systemd - intermediate_instructions: - - RUN /usr/bin/apt-get update - name: centos-7 driver: @@ -50,24 +46,18 @@ platforms: driver: image: dokken/ubuntu-16.04 pid_one_command: /bin/systemd - intermediate_instructions: - - RUN /usr/bin/apt-get update - name: ubuntu-18.04 driver: image: dokken/ubuntu-18.04 pid_one_command: /bin/systemd - intermediate_instructions: - - RUN /usr/bin/apt-get update - name: ubuntu-20.04 driver: image: dokken/ubuntu-20.04 pid_one_command: /bin/systemd - intermediate_instructions: - - RUN /usr/bin/apt-get update - name: opensuse-leap-15 driver: image: dokken/opensuse-leap-15 - pid_one_command: /bin/systemd + pid_one_command: /usr/lib/systemd/systemd diff --git a/test/integration/helpers/serverspec/spec_helper.rb b/test/integration/helpers/serverspec/spec_helper.rb index cbd00f1..f5629e6 100644 --- a/test/integration/helpers/serverspec/spec_helper.rb +++ b/test/integration/helpers/serverspec/spec_helper.rb @@ -6,7 +6,7 @@ set :path, '/sbin:/usr/local/sbin:$PATH' def family fam = 'solaris2' return fam unless File.exist? '/etc/release' - fam = 'omnios' if File.open('/etc/release').read =~ /^\s*(OmniOS)/ + fam = 'omnios' if File.read('/etc/release') =~ /^\s*(OmniOS)/ fam end