diff options
author | Miklós Fazekas <mfazekas@szemafor.com> | 2021-08-03 21:58:57 +0200 |
---|---|---|
committer | Miklós Fazekas <mfazekas@szemafor.com> | 2021-08-03 21:58:57 +0200 |
commit | c082e1afad89f45b93f15341c18afd2cd2177cd0 (patch) | |
tree | bb39bc2fc3227b338367b96274784c471a15441c /test | |
parent | 53e38ba90f48d2e289df784c0eaab10c5e6fae5c (diff) | |
download | net-ssh-c082e1afad89f45b93f15341c18afd2cd2177cd0.tar.gz |
Rubocop fixes
Diffstat (limited to 'test')
-rw-r--r-- | test/integration/common.rb | 4 |
1 files changed, 2 insertions, 2 deletions
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 |