ftpd 2.0.1 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Changelog.md +6 -0
- data/Gemfile +2 -15
- data/Gemfile.lock +12 -51
- data/README.md +12 -0
- data/VERSION +1 -1
- data/bin/ftpdrb +17 -12
- data/examples/write_only.rb +61 -0
- data/ftpd.gemspec +59 -261
- data/lib/ftpd/session.rb +51 -51
- metadata +11 -153
- data/.travis.yml +0 -6
- data/features/example/eplf.feature +0 -14
- data/features/example/example.feature +0 -18
- data/features/example/read_only.feature +0 -63
- data/features/example/step_definitions/example_server.rb +0 -13
- data/features/ftp_server/abort.feature +0 -13
- data/features/ftp_server/allo.feature +0 -33
- data/features/ftp_server/append.feature +0 -94
- data/features/ftp_server/cdup.feature +0 -36
- data/features/ftp_server/command_errors.feature +0 -13
- data/features/ftp_server/concurrent_sessions.feature +0 -14
- data/features/ftp_server/delay_after_failed_login.feature +0 -23
- data/features/ftp_server/delete.feature +0 -60
- data/features/ftp_server/directory_navigation.feature +0 -59
- data/features/ftp_server/disconnect_after_failed_logins.feature +0 -25
- data/features/ftp_server/eprt.feature +0 -56
- data/features/ftp_server/epsv.feature +0 -37
- data/features/ftp_server/features.feature +0 -38
- data/features/ftp_server/file_structure.feature +0 -43
- data/features/ftp_server/get.feature +0 -80
- data/features/ftp_server/get_ipv6.feature +0 -46
- data/features/ftp_server/get_tls.feature +0 -23
- data/features/ftp_server/help.feature +0 -21
- data/features/ftp_server/implicit_tls.feature +0 -23
- data/features/ftp_server/invertability.feature +0 -15
- data/features/ftp_server/list.feature +0 -94
- data/features/ftp_server/list_tls.feature +0 -29
- data/features/ftp_server/logging.feature +0 -11
- data/features/ftp_server/login_auth_level_account.feature +0 -51
- data/features/ftp_server/login_auth_level_password.feature +0 -59
- data/features/ftp_server/login_auth_level_user.feature +0 -31
- data/features/ftp_server/max_connections.feature +0 -39
- data/features/ftp_server/mdtm.feature +0 -53
- data/features/ftp_server/mkdir.feature +0 -70
- data/features/ftp_server/mode.feature +0 -43
- data/features/ftp_server/name_list.feature +0 -77
- data/features/ftp_server/name_list_tls.feature +0 -30
- data/features/ftp_server/noop.feature +0 -17
- data/features/ftp_server/options.feature +0 -17
- data/features/ftp_server/pasv.feature +0 -30
- data/features/ftp_server/port.feature +0 -49
- data/features/ftp_server/put.feature +0 -79
- data/features/ftp_server/put_tls.feature +0 -23
- data/features/ftp_server/put_unique.feature +0 -56
- data/features/ftp_server/quit.feature +0 -23
- data/features/ftp_server/reinitialize.feature +0 -13
- data/features/ftp_server/rename.feature +0 -97
- data/features/ftp_server/rmdir.feature +0 -71
- data/features/ftp_server/site.feature +0 -13
- data/features/ftp_server/size.feature +0 -69
- data/features/ftp_server/status.feature +0 -18
- data/features/ftp_server/step_definitions/logging.rb +0 -10
- data/features/ftp_server/step_definitions/test_server.rb +0 -71
- data/features/ftp_server/structure_mount.feature +0 -13
- data/features/ftp_server/syntax_errors.feature +0 -18
- data/features/ftp_server/syst.feature +0 -18
- data/features/ftp_server/timeout.feature +0 -26
- data/features/ftp_server/type.feature +0 -59
- data/features/step_definitions/append.rb +0 -17
- data/features/step_definitions/client.rb +0 -27
- data/features/step_definitions/client_and_server_files.rb +0 -26
- data/features/step_definitions/client_files.rb +0 -16
- data/features/step_definitions/command.rb +0 -7
- data/features/step_definitions/connect.rb +0 -39
- data/features/step_definitions/delete.rb +0 -17
- data/features/step_definitions/directory_navigation.rb +0 -28
- data/features/step_definitions/error_replies.rb +0 -117
- data/features/step_definitions/features.rb +0 -23
- data/features/step_definitions/file_structure.rb +0 -18
- data/features/step_definitions/generic_send.rb +0 -11
- data/features/step_definitions/get.rb +0 -18
- data/features/step_definitions/help.rb +0 -20
- data/features/step_definitions/invalid_commands.rb +0 -13
- data/features/step_definitions/ipv6.rb +0 -11
- data/features/step_definitions/line_endings.rb +0 -9
- data/features/step_definitions/list.rb +0 -75
- data/features/step_definitions/login.rb +0 -84
- data/features/step_definitions/mkdir.rb +0 -11
- data/features/step_definitions/mode.rb +0 -17
- data/features/step_definitions/mtime.rb +0 -25
- data/features/step_definitions/noop.rb +0 -17
- data/features/step_definitions/options.rb +0 -11
- data/features/step_definitions/passive.rb +0 -10
- data/features/step_definitions/pending.rb +0 -5
- data/features/step_definitions/port.rb +0 -7
- data/features/step_definitions/put.rb +0 -31
- data/features/step_definitions/quit.rb +0 -17
- data/features/step_definitions/rename.rb +0 -13
- data/features/step_definitions/rmdir.rb +0 -11
- data/features/step_definitions/server_files.rb +0 -63
- data/features/step_definitions/server_title.rb +0 -14
- data/features/step_definitions/size.rb +0 -22
- data/features/step_definitions/status.rb +0 -11
- data/features/step_definitions/success_replies.rb +0 -9
- data/features/step_definitions/system.rb +0 -12
- data/features/step_definitions/timing.rb +0 -21
- data/features/step_definitions/type.rb +0 -17
- data/features/support/env.rb +0 -6
- data/features/support/example_server.rb +0 -69
- data/features/support/file_templates/ascii_unix +0 -4
- data/features/support/file_templates/ascii_windows +0 -4
- data/features/support/file_templates/binary +0 -0
- data/features/support/test_client.rb +0 -258
- data/features/support/test_file_templates.rb +0 -35
- data/features/support/test_server.rb +0 -304
- data/features/support/test_server_files.rb +0 -59
- data/rake_tasks/cucumber.rake +0 -9
- data/rake_tasks/default.rake +0 -1
- data/rake_tasks/jeweler.rake +0 -52
- data/rake_tasks/spec.rake +0 -3
- data/rake_tasks/test.rake +0 -2
- data/rake_tasks/yard.rake +0 -3
- data/spec/command_sequence_checker_spec.rb +0 -85
- data/spec/connection_throttle_spec.rb +0 -101
- data/spec/connection_tracker_spec.rb +0 -99
- data/spec/data_server_factory_spec.rb +0 -104
- data/spec/disk_file_system_spec.rb +0 -322
- data/spec/exception_translator_spec.rb +0 -38
- data/spec/file_info_spec.rb +0 -61
- data/spec/ftp_server_error_spec.rb +0 -15
- data/spec/list_format/eplf_spec.rb +0 -63
- data/spec/list_format/ls_spec.rb +0 -272
- data/spec/list_path_spec.rb +0 -23
- data/spec/null_logger_spec.rb +0 -26
- data/spec/protocols_spec.rb +0 -159
- data/spec/server_spec.rb +0 -83
- data/spec/spec_helper.rb +0 -17
- data/spec/telnet_spec.rb +0 -77
- data/spec/translate_exceptions_spec.rb +0 -42
- data/testlib/network.rb +0 -17
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
Feature: Name List TLS
|
|
2
|
-
|
|
3
|
-
As a client
|
|
4
|
-
I want to securely list file names
|
|
5
|
-
So that I can see what file to transfer
|
|
6
|
-
And nobody else can
|
|
7
|
-
|
|
8
|
-
Background:
|
|
9
|
-
Given the test server has TLS mode "explicit"
|
|
10
|
-
And the test server is started
|
|
11
|
-
|
|
12
|
-
Scenario: Active
|
|
13
|
-
Given a successful login with explicit TLS
|
|
14
|
-
And the server has file "foo"
|
|
15
|
-
And the server has file "bar"
|
|
16
|
-
And the client is in active mode
|
|
17
|
-
When the client successfully name-lists the directory
|
|
18
|
-
Then the file list should be in short form
|
|
19
|
-
And the file list should contain "foo"
|
|
20
|
-
And the file list should contain "bar"
|
|
21
|
-
|
|
22
|
-
Scenario: Passive
|
|
23
|
-
Given a successful login with explicit TLS
|
|
24
|
-
And the server has file "foo"
|
|
25
|
-
And the server has file "bar"
|
|
26
|
-
And the client is in passive mode
|
|
27
|
-
When the client successfully name-lists the directory
|
|
28
|
-
Then the file list should be in short form
|
|
29
|
-
And the file list should contain "foo"
|
|
30
|
-
And the file list should contain "bar"
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
Feature: No Operation
|
|
2
|
-
|
|
3
|
-
As a client
|
|
4
|
-
I want to keep the connection alive
|
|
5
|
-
So that I don't have to log in so often
|
|
6
|
-
|
|
7
|
-
Background:
|
|
8
|
-
Given the test server is started
|
|
9
|
-
|
|
10
|
-
Scenario: NOP
|
|
11
|
-
Given a successful connection
|
|
12
|
-
Then the client successfully does nothing
|
|
13
|
-
|
|
14
|
-
Scenario: With a parameter
|
|
15
|
-
Given a successful connection
|
|
16
|
-
When the client does nothing with a parameter
|
|
17
|
-
Then the server returns a syntax error
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
Feature: Options
|
|
2
|
-
|
|
3
|
-
As a client
|
|
4
|
-
I want to know set options
|
|
5
|
-
To tailor the server's behavior
|
|
6
|
-
|
|
7
|
-
Background:
|
|
8
|
-
Given the test server is started
|
|
9
|
-
And the client connects
|
|
10
|
-
|
|
11
|
-
Scenario: No argument
|
|
12
|
-
When the client sends "OPTS"
|
|
13
|
-
Then the server returns a syntax error
|
|
14
|
-
|
|
15
|
-
Scenario: Unknown option command
|
|
16
|
-
When the client sets option "ABC"
|
|
17
|
-
Then the server returns a bad option error
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
Feature: PASV
|
|
2
|
-
|
|
3
|
-
As a programmer
|
|
4
|
-
I want good error messages
|
|
5
|
-
So that I can correct problems
|
|
6
|
-
|
|
7
|
-
Scenario: No argument
|
|
8
|
-
Given the test server is started
|
|
9
|
-
Given a successful login
|
|
10
|
-
Then the client successfully sends "PASV"
|
|
11
|
-
|
|
12
|
-
Scenario: After "EPSV ALL"
|
|
13
|
-
Given the test server is started
|
|
14
|
-
Given a successful login
|
|
15
|
-
Given the client successfully sends "EPSV ALL"
|
|
16
|
-
When the client sends "PASV"
|
|
17
|
-
Then the server sends a not allowed after epsv all error
|
|
18
|
-
|
|
19
|
-
Scenario: Not logged in
|
|
20
|
-
Given the test server is started
|
|
21
|
-
Given a successful connection
|
|
22
|
-
When the client sends "EPSV"
|
|
23
|
-
Then the server returns a not logged in error
|
|
24
|
-
|
|
25
|
-
Scenario: Configured with NAT IP
|
|
26
|
-
Given the test server has a NAT IP of 10.1.2.3
|
|
27
|
-
Given the test server is started
|
|
28
|
-
And a successful login
|
|
29
|
-
When the client successfully sends "PASV"
|
|
30
|
-
Then the server advertises passive IP 10.1.2.3
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
Feature: PORT
|
|
2
|
-
|
|
3
|
-
As a programmer
|
|
4
|
-
I want good error messages
|
|
5
|
-
So that I can correct problems
|
|
6
|
-
|
|
7
|
-
Background:
|
|
8
|
-
Given the test server is started
|
|
9
|
-
|
|
10
|
-
Scenario: Port 1024
|
|
11
|
-
Given a successful login
|
|
12
|
-
Then the client successfully sends "PORT 1,2,3,4,4,0"
|
|
13
|
-
|
|
14
|
-
Scenario: Port 1023; low ports disallowed
|
|
15
|
-
Given the test server disallows low data ports
|
|
16
|
-
And a successful login
|
|
17
|
-
When the client sends "PORT 1,2,3,4,3,255"
|
|
18
|
-
Then the server returns an unimplemented parameter error
|
|
19
|
-
|
|
20
|
-
Scenario: Port 1023; low ports allowed
|
|
21
|
-
Given the test server allows low data ports
|
|
22
|
-
And a successful login
|
|
23
|
-
Then the client successfully sends "PORT 1,2,3,4,3,255"
|
|
24
|
-
|
|
25
|
-
Scenario: Not logged in
|
|
26
|
-
Given a successful connection
|
|
27
|
-
When the client sends PORT "1,2,3,4,5,6"
|
|
28
|
-
Then the server returns a not logged in error
|
|
29
|
-
|
|
30
|
-
Scenario: Incorrect number of bytes
|
|
31
|
-
Given a successful login
|
|
32
|
-
When the client sends PORT "1,2,3,4,5"
|
|
33
|
-
Then the server returns a syntax error
|
|
34
|
-
|
|
35
|
-
Scenario: Ill formatted byte
|
|
36
|
-
Given a successful login
|
|
37
|
-
When the client sends PORT "1,2,3,4,5,0006"
|
|
38
|
-
Then the server returns a syntax error
|
|
39
|
-
|
|
40
|
-
Scenario: Byte out of range
|
|
41
|
-
Given a successful login
|
|
42
|
-
When the client sends PORT "1,2,3,4,5,256"
|
|
43
|
-
Then the server returns a syntax error
|
|
44
|
-
|
|
45
|
-
Scenario: After "EPSV ALL"
|
|
46
|
-
Given a successful login
|
|
47
|
-
Given the client successfully sends "EPSV ALL"
|
|
48
|
-
When the client sends "PORT 1,2,3,4,4,0"
|
|
49
|
-
Then the server sends a not allowed after epsv all error
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
Feature: Put
|
|
2
|
-
|
|
3
|
-
As a client
|
|
4
|
-
I want to upload a file
|
|
5
|
-
So that someone else can have it
|
|
6
|
-
|
|
7
|
-
Background:
|
|
8
|
-
Given the test server is started
|
|
9
|
-
|
|
10
|
-
Scenario: ASCII file with *nix line endings
|
|
11
|
-
Given a successful login
|
|
12
|
-
And the client has file "ascii_unix"
|
|
13
|
-
When the client successfully puts text "ascii_unix"
|
|
14
|
-
Then the remote file "ascii_unix" should match the local file
|
|
15
|
-
And the remote file "ascii_unix" should have unix line endings
|
|
16
|
-
|
|
17
|
-
Scenario: ASCII file with windows line endings
|
|
18
|
-
Given a successful login
|
|
19
|
-
And the client has file "ascii_windows"
|
|
20
|
-
When the client successfully puts text "ascii_windows"
|
|
21
|
-
Then the remote file "ascii_windows" should match the local file
|
|
22
|
-
And the remote file "ascii_windows" should have unix line endings
|
|
23
|
-
|
|
24
|
-
Scenario: Binary file
|
|
25
|
-
Given a successful login
|
|
26
|
-
And the client has file "binary"
|
|
27
|
-
When the client successfully puts binary "binary"
|
|
28
|
-
Then the remote file "binary" should exactly match the local file
|
|
29
|
-
|
|
30
|
-
Scenario: Passive
|
|
31
|
-
Given a successful login
|
|
32
|
-
And the client has file "ascii_unix"
|
|
33
|
-
And the client is in passive mode
|
|
34
|
-
When the client successfully puts text "ascii_unix"
|
|
35
|
-
Then the remote file "ascii_unix" should match the local file
|
|
36
|
-
|
|
37
|
-
Scenario: Non-root working directory
|
|
38
|
-
Given a successful login
|
|
39
|
-
And the client has file "ascii_unix"
|
|
40
|
-
And the server has directory "foo"
|
|
41
|
-
And the client successfully cd's to "foo"
|
|
42
|
-
When the client successfully puts text "ascii_unix"
|
|
43
|
-
Then the remote file "foo/ascii_unix" should match the local file
|
|
44
|
-
|
|
45
|
-
Scenario: Access denied
|
|
46
|
-
Given a successful login
|
|
47
|
-
And the client has file "forbidden"
|
|
48
|
-
When the client puts text "forbidden"
|
|
49
|
-
Then the server returns an access denied error
|
|
50
|
-
|
|
51
|
-
Scenario: Missing directory
|
|
52
|
-
Given a successful login
|
|
53
|
-
And the client has file "bar"
|
|
54
|
-
When the client puts text "foo/bar"
|
|
55
|
-
Then the server returns a not found error
|
|
56
|
-
|
|
57
|
-
Scenario: Not logged in
|
|
58
|
-
Given a successful connection
|
|
59
|
-
And the client has file "foo"
|
|
60
|
-
When the client puts text "foo"
|
|
61
|
-
Then the server returns a not logged in error
|
|
62
|
-
|
|
63
|
-
Scenario: Missing path
|
|
64
|
-
Given a successful login
|
|
65
|
-
When the client puts with no path
|
|
66
|
-
Then the server returns a syntax error
|
|
67
|
-
|
|
68
|
-
Scenario: File system error
|
|
69
|
-
Given a successful login
|
|
70
|
-
And the client has file "unable"
|
|
71
|
-
When the client puts text "unable"
|
|
72
|
-
Then the server returns an action not taken error
|
|
73
|
-
|
|
74
|
-
Scenario: Write not enabled
|
|
75
|
-
Given the test server lacks write
|
|
76
|
-
And a successful login
|
|
77
|
-
And the client has file "foo"
|
|
78
|
-
When the client puts text "foo"
|
|
79
|
-
Then the server returns an unimplemented command error
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
Feature: Put TLS
|
|
2
|
-
|
|
3
|
-
As a client
|
|
4
|
-
I want to put a file securely
|
|
5
|
-
So that nobody can intercept it
|
|
6
|
-
|
|
7
|
-
Background:
|
|
8
|
-
Given the test server has TLS mode "explicit"
|
|
9
|
-
And the test server is started
|
|
10
|
-
|
|
11
|
-
Scenario: Active
|
|
12
|
-
Given a successful login with explicit TLS
|
|
13
|
-
And the client has file "ascii_unix"
|
|
14
|
-
And the client is in active mode
|
|
15
|
-
When the client successfully puts text "ascii_unix"
|
|
16
|
-
Then the remote file "ascii_unix" should match the local file
|
|
17
|
-
|
|
18
|
-
Scenario: Passive
|
|
19
|
-
Given a successful login with explicit TLS
|
|
20
|
-
And the client has file "ascii_unix"
|
|
21
|
-
And the client is in passive mode
|
|
22
|
-
When the client successfully puts text "ascii_unix"
|
|
23
|
-
Then the remote file "ascii_unix" should match the local file
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
Feature: Put Unique
|
|
2
|
-
|
|
3
|
-
As a client
|
|
4
|
-
I want to upload a file with a unique name
|
|
5
|
-
So that it will not overwrite an existing file
|
|
6
|
-
|
|
7
|
-
Background:
|
|
8
|
-
Given the test server is started
|
|
9
|
-
|
|
10
|
-
Scenario: File does not exist
|
|
11
|
-
Given a successful login
|
|
12
|
-
And the client has file "foo"
|
|
13
|
-
When the client successfully stores unique "foo"
|
|
14
|
-
Then the server should have a file with the contents of "foo"
|
|
15
|
-
|
|
16
|
-
Scenario: Suggest name
|
|
17
|
-
Given a successful login
|
|
18
|
-
And the client has file "foo"
|
|
19
|
-
When the client successfully stores unique "foo" to "bar"
|
|
20
|
-
Then the server should have a file with the contents of "foo"
|
|
21
|
-
And the server should have 1 file with "bar" in the name
|
|
22
|
-
|
|
23
|
-
Scenario: Suggested name exists
|
|
24
|
-
Given a successful login
|
|
25
|
-
And the client has file "foo"
|
|
26
|
-
And the server has file "bar"
|
|
27
|
-
When the client successfully stores unique "foo" to "bar"
|
|
28
|
-
Then the server should have a file with the contents of "foo"
|
|
29
|
-
Then the server should have a file with the contents of "bar"
|
|
30
|
-
And the server should have 2 files with "bar" in the name
|
|
31
|
-
|
|
32
|
-
Scenario: Non-root working directory
|
|
33
|
-
Given a successful login
|
|
34
|
-
And the client has file "bar"
|
|
35
|
-
And the server has directory "foo"
|
|
36
|
-
And the client successfully cd's to "foo"
|
|
37
|
-
When the client successfully stores unique "bar" to "bar"
|
|
38
|
-
Then the remote file "foo/bar" should match the local file
|
|
39
|
-
|
|
40
|
-
Scenario: Missing directory
|
|
41
|
-
Given a successful login
|
|
42
|
-
And the client has file "bar"
|
|
43
|
-
When the client stores unique "bar" to "foo/bar"
|
|
44
|
-
Then the server returns a not found error
|
|
45
|
-
|
|
46
|
-
Scenario: Not logged in
|
|
47
|
-
Given a successful connection
|
|
48
|
-
When the client sends "STOU"
|
|
49
|
-
Then the server returns a not logged in error
|
|
50
|
-
|
|
51
|
-
Scenario: Write not enabled
|
|
52
|
-
Given the test server lacks write
|
|
53
|
-
And a successful login
|
|
54
|
-
And the client has file "foo"
|
|
55
|
-
When the client stores unique "foo"
|
|
56
|
-
Then the server returns an unimplemented command error
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
Feature: Quit
|
|
2
|
-
|
|
3
|
-
As a client
|
|
4
|
-
In order to free up resources
|
|
5
|
-
I want to close the connection
|
|
6
|
-
|
|
7
|
-
Background:
|
|
8
|
-
Given the test server is started
|
|
9
|
-
|
|
10
|
-
Scenario: Logged in
|
|
11
|
-
Given a successful login
|
|
12
|
-
When the client successfully quits
|
|
13
|
-
Then the client should not be logged in
|
|
14
|
-
|
|
15
|
-
Scenario: With a parameter
|
|
16
|
-
Given a successful connection
|
|
17
|
-
When the client quits with a parameter
|
|
18
|
-
Then the server returns a syntax error
|
|
19
|
-
|
|
20
|
-
Scenario: Not logged in
|
|
21
|
-
Given a successful connection
|
|
22
|
-
When the client quits
|
|
23
|
-
Then the server returns a not logged in error
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
Feature: Reinitialize
|
|
2
|
-
|
|
3
|
-
As a client
|
|
4
|
-
I want to know this command is not supported
|
|
5
|
-
So that I can avoid using it
|
|
6
|
-
|
|
7
|
-
Background:
|
|
8
|
-
Given the test server is started
|
|
9
|
-
|
|
10
|
-
Scenario: Unimplemented
|
|
11
|
-
Given a successful connection
|
|
12
|
-
When the client sends command "REIN"
|
|
13
|
-
Then the server returns an unimplemented command error
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
Feature: Rename
|
|
2
|
-
|
|
3
|
-
As a client
|
|
4
|
-
I want to rename a file
|
|
5
|
-
To correct an improper name
|
|
6
|
-
|
|
7
|
-
Background:
|
|
8
|
-
Given the test server is started
|
|
9
|
-
|
|
10
|
-
Scenario: Rename
|
|
11
|
-
Given a successful login
|
|
12
|
-
And the server has file "foo"
|
|
13
|
-
When the client successfully renames "foo" to "bar"
|
|
14
|
-
Then the server should not have file "foo"
|
|
15
|
-
And the server should have file "bar"
|
|
16
|
-
|
|
17
|
-
Scenario: Move
|
|
18
|
-
Given a successful login
|
|
19
|
-
And the server has file "foo/bar"
|
|
20
|
-
And the server has directory "baz"
|
|
21
|
-
When the client successfully renames "foo/bar" to "baz/qux"
|
|
22
|
-
Then the server should not have file "foo/bar"
|
|
23
|
-
And the server should have file "baz/qux"
|
|
24
|
-
|
|
25
|
-
Scenario: Non-root working directory
|
|
26
|
-
Given a successful login
|
|
27
|
-
And the server has file "foo/bar"
|
|
28
|
-
And the client successfully cd's to "foo"
|
|
29
|
-
When the client successfully renames "bar" to "baz"
|
|
30
|
-
Then the server should not have file "foo/bar"
|
|
31
|
-
Then the server should have file "foo/baz"
|
|
32
|
-
|
|
33
|
-
Scenario: Access denied (source)
|
|
34
|
-
Given a successful login
|
|
35
|
-
When the client renames "forbidden" to "foo"
|
|
36
|
-
Then the server returns an access denied error
|
|
37
|
-
|
|
38
|
-
Scenario: Access denied (destination)
|
|
39
|
-
Given a successful login
|
|
40
|
-
And the server has file "foo"
|
|
41
|
-
When the client renames "foo" to "forbidden"
|
|
42
|
-
Then the server returns an access denied error
|
|
43
|
-
|
|
44
|
-
Scenario: Source missing
|
|
45
|
-
Given a successful login
|
|
46
|
-
When the client renames "foo" to "bar"
|
|
47
|
-
Then the server returns a not found error
|
|
48
|
-
|
|
49
|
-
Scenario: Destination exists
|
|
50
|
-
Given a successful login
|
|
51
|
-
And the server has file "foo"
|
|
52
|
-
And the server has file "bar"
|
|
53
|
-
When the client renames "foo" to "bar"
|
|
54
|
-
Then the server returns an already exists error
|
|
55
|
-
|
|
56
|
-
Scenario: Not logged in (RNFR)
|
|
57
|
-
Given a successful connection
|
|
58
|
-
When the client sends "RNFR foo"
|
|
59
|
-
Then the server returns a not logged in error
|
|
60
|
-
|
|
61
|
-
Scenario: Not logged in (RNTO)
|
|
62
|
-
Given a successful connection
|
|
63
|
-
When the client sends "RNTO foo"
|
|
64
|
-
# Although the RNTO command checks for logged in, sequence error
|
|
65
|
-
# gets triggered first.
|
|
66
|
-
Then the server returns a bad sequence error
|
|
67
|
-
|
|
68
|
-
Scenario: Missing path (RNFR)
|
|
69
|
-
Given a successful login
|
|
70
|
-
When the client sends "RNFR"
|
|
71
|
-
Then the server returns a syntax error
|
|
72
|
-
|
|
73
|
-
Scenario: Missing path (RNTO)
|
|
74
|
-
Given a successful login
|
|
75
|
-
And the server has file "foo"
|
|
76
|
-
And the client successfully sends "RNFR foo"
|
|
77
|
-
When the client sends "RNTO"
|
|
78
|
-
Then the server returns a syntax error
|
|
79
|
-
|
|
80
|
-
Scenario: Rename not enabled
|
|
81
|
-
Given the test server lacks rename
|
|
82
|
-
And a successful login
|
|
83
|
-
And the server has file "foo"
|
|
84
|
-
When the client renames "foo" to "bar"
|
|
85
|
-
Then the server returns an unimplemented command error
|
|
86
|
-
|
|
87
|
-
Scenario: RNTO without RNFR
|
|
88
|
-
Given a successful login
|
|
89
|
-
When the client sends "RNTO bar"
|
|
90
|
-
Then the server returns a bad sequence error
|
|
91
|
-
|
|
92
|
-
Scenario: RNFR not followed by RNTO
|
|
93
|
-
Given a successful login
|
|
94
|
-
And the server has file "foo"
|
|
95
|
-
And the client sends "RNFR foo"
|
|
96
|
-
When the client sends "NOOP"
|
|
97
|
-
Then the server returns a bad sequence error
|