Feature: Documented Help for Segmented Upload In order to work out what segment_upload does As a command line user I want to get detailed usage information Background: Given the default aruba timeout is 15 seconds Scenario: Basic UI When I get help for "segment_upload" Then the exit status should be 0 And the banner should include the version And the banner should document that this app takes options And the following options should be documented: |--version| |--auth-token| |--auth-user| |--auth-key| |--from| |--segment-size| And the option "dry-run" should be documented which is negatable And the banner should document that this app's arguments are: |to_uri|which is required| Scenario: auth token and auth-user are mutually exclusive When I run `segment_upload --auth-token abcdef --auth-user xyz --auth-key abc http://source` Then the exit status should not be 0 And the stderr should contain "needless argument" Scenario: auth user needs auth key When I run `segment_upload --auth-user xyz http://source` Then the exit status should not be 0 And the stderr should contain "missing argument" Scenario: auth key needs auth user When I run `segment_upload --auth-user xyz http://source` Then the exit status should not be 0 And the stderr should contain "missing argument" Scenario: needs some sort of authentication When I run `segment_upload http://source` Then the exit status should not be 0 And the stderr should contain "missing argument" Scenario: no http should fail When I run `segment_upload ftp://source` Then the exit status should not be 0 And the stderr should contain "unsupported url" Scenario: authentication with normal http should fail When I run `segment_upload --from /dev/null --auth-user cli-xxxxx --auth-key fred http://orbit.brightbox.com/v1/acc-tqs4c/downloads` Then the exit status should not be 0 And the stderr should contain "Cannot authenticate" Scenario: bad authentication should fail against orbit When I run `segment_upload --from /dev/null --auth-user cli-xxxxx --auth-key fred https://orbit.brightbox.com/v1/acc-xxxxx/test/test.img` Then the exit status should not be 0 And the stderr should contain "Cannot authenticate" Scenario: should not accept plain number for segment size When I run `segment_upload --segment-size 100 --auth-token abcdef https:///orbit.brightbox.com/v1/acc-xxxxx/test/test.img` Then the exit status should not be 0 And the stderr should contain "Unparseable filesize" Scenario: should trap attempts to open a command When I run `segment_upload --segment-size 100MB --auth-token abcdef --from ' |fred' https://orbit.brightbox.com/v1/acc-xxxxx/test/test.img` Then the exit status should not be 0 And the stderr should contain "invalid argument"