From c082e1afad89f45b93f15341c18afd2cd2177cd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikl=C3=B3s=20Fazekas?= Date: Tue, 3 Aug 2021 21:58:57 +0200 Subject: Rubocop fixes --- test/integration/common.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/integration/common.rb b/test/integration/common.rb index 129e5a4..73eadf8 100644 --- a/test/integration/common.rb +++ b/test/integration/common.rb @@ -101,7 +101,7 @@ module IntegrationTestHelpers end end - def is_port_open?(path) + def port_open?(path) Socket.tcp("localhost", 10567, connect_timeout: 1) { true } rescue false # rubocop:disable Style/RescueModifier end @@ -112,7 +112,7 @@ module IntegrationTestHelpers if config with_lines_as_tempfile(config) do |path, pidpath| # puts "DEBUG - SSH LOG: #{path}-log.txt" - raise "A leftover sshd is already running" if is_port_open?(port) + raise "A leftover sshd is already running" if port_open?(port) pid = spawn('sudo', '/opt/net-ssh-openssh/sbin/sshd', '-D', '-f', path, '-p', port) # '-E', "#{path}-log.txt") sshpidfile = pidpath -- cgit v1.2.1