Sha256: 3965b2a6abafefb827e320ed76d356f3de189992d15bb2f0e72732ad0717380e

Contents?: true

Size: 1.57 KB

Versions: 14

Compression:

Stored size: 1.57 KB

Contents

def server
  @server ||= TestServer.new
end

Given /^the test server is started$/ do
  server.start
end

Given /^the test server has TLS mode "(\w+)"$/ do |mode|
  server.tls = mode.to_sym
end

Given(/^the test server is bound to "(.*?)"$/) do |ip_address|
  server.interface = ip_address
end

Given /^the test server has logging (enabled|disabled)$/ do |state|
  server.logging = state == 'enabled'
end

Given /^the test server lacks (\w+)$/ do |feature|
  server.send "#{feature}=", false
end

Given /^the test server has auth level "(.*?)"$/ do |auth_level|
  auth_level = Ftpd.const_get(auth_level)
  server.auth_level = auth_level
end

Given /^the test server has session timeout set to (\S+) seconds$/ do
|timeout|
  server.session_timeout = timeout.to_f
end

Given /^the test server has session timeout disabled$/ do
  server.session_timeout = nil
end

Given /^the test server disallows low data ports$/ do
  server.allow_low_data_ports = false
end

Given /^the test server allows low data ports$/ do
  server.allow_low_data_ports = true
end

Given /^the test server has max_connections set to (\d+)$/ do |s|
  server.max_connections = s.to_i
end

Given /^the test server has max_connections_per_ip set to (\d+)$/ do |s|
  server.max_connections_per_ip = s.to_i
end

Given /^the test server has no max failed login attempts$/ do
  server.max_failed_logins = nil
end

Given /^the test server has a max of (\d+) failed login attempts$/ do |s|
  server.max_failed_logins = s.to_i
end

Given /^the test server has a failed login delay of (\S+) seconds$/ do |s|
  server.failed_login_delay = s.to_f
end

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
ftpd-1.1.1 features/ftp_server/step_definitions/test_server.rb
ftpd-1.1.0 features/ftp_server/step_definitions/test_server.rb
investtools-ftpd-1.0.1 features/ftp_server/step_definitions/test_server.rb
ftpd-1.0.1 features/ftp_server/step_definitions/test_server.rb
ftpd-1.0.0 features/ftp_server/step_definitions/test_server.rb
ftpd-0.17.0 features/ftp_server/step_definitions/test_server.rb
ftpd-0.16.0 features/ftp_server/step_definitions/test_server.rb
ftpd-0.15.0 features/ftp_server/step_definitions/test_server.rb
ftpd-0.14.0 features/ftp_server/step_definitions/test_server.rb
ftpd-0.13.0 features/ftp_server/step_definitions/test_server.rb
ftpd-0.12.0 features/ftp_server/step_definitions/test_server.rb
ftpd-0.11.0 features/ftp_server/step_definitions/test_server.rb
ftpd-0.10.0 features/ftp_server/step_definitions/test_server.rb
ftpd-0.9.0 features/ftp_server/step_definitions/test_server.rb