Feature: Documented Help In order to work out what uricp does As a command line user I want to get detailed usage information Scenario: Basic UI When I get help for "uricp" 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| |--target-format| |--cache| |--auth-token| |--auth-user| |--auth-key| |--segment| And the option "compress" should be documented which is negatable And the option "dry-run" should be documented which is negatable And the option "force" should be documented which is negatable And the banner should document that this app's arguments are: |from_uri|which is required| |to_uri|which is required| Scenario: target format requires cache When I run `uricp --target-format=qcow2 source target` Then the exit status should not be 0 And the stderr should contain "missing argument" Scenario: target format should be appropriate When I run `uricp --target-format=fred --cache=/tmp source target` Then the exit status should not be 0 And the stderr should contain "invalid argument" Scenario: target format should support qcow3 When I run `uricp --target-format=qcow3 --cache=/tmp source target` Then the exit status should not be 0 And the stderr should not contain "invalid argument" Scenario: auth token and auth-user are mutually exclusive When I run `uricp --auth-token abcdef --auth-user xyz --auth-key abc http://source file:///target` Then the exit status should not be 0 And the stderr should contain "needless argument" Scenario: auth user needs auth key When I run `uricp --auth-user xyz http://source file:///target` Then the exit status should not be 0 And the stderr should contain "missing argument" Scenario: auth key needs auth user When I run `uricp --auth-user xyz http://source file:///target` Then the exit status should not be 0 And the stderr should contain "missing argument" Scenario: authorisation with no http should fail When I run `uricp --auth-token abcdef ftp://source file:///target` Then the exit status should not be 0 And the stderr should contain "needless argument" Scenario: authentication with normal http should fail When I run `uricp --auth-user cli-xxxxx --auth-key fred http://orbit.brightbox.com/v1/acc-tqc4c/downloads/freedos.qcow2 file://tmp/temp` 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 `uricp --auth-user cli-xxxxx --auth-key fred https://orbit.brightbox.com/v1/acc-xxxxx/test/test.img file://tmp/temp` 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 `uricp --segment-size 100 --auth-token abcdef file:///tmp/temp 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"