Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only parse global args once #1802

Merged
merged 5 commits into from
Apr 3, 2019
Merged

Commits on Apr 3, 2019

  1. e2e: Use icmd.None in a couple more places

    This checks for actual emptiness, while `""` means "don't care".
    
    Signed-off-by: Ian Campbell <[email protected]>
    Ian Campbell committed Apr 3, 2019
    Configuration menu
    Copy the full SHA
    add2da6 View commit details
    Browse the repository at this point in the history
  2. e2e: Add a TestMain for cli plugins tests

    This was omitted when these tests were added.
    
    Adding this means that the tests now see the `$DOCKER_HOST` configured (via
    `$TEST_DOCKER_HOST`) where they didn't before. In some cases (specifically the
    `test-e2e-connhelper-ssh` case) this results in additional output on stderr
    when `-D` (debug) is used:
    
        time="2019-04-03T11:10:27Z" level=debug msg="commandconn: starting ssh with [-l penguin 172.20.0.2 -- docker system dial-stdio]"
    
    Address this by switching the affected test cases to use `-l info` instead of
    `-D`, they all just require some option not specifically `-D`. Note that `info`
    is the default log level so this is effectively a nop (which is good).
    
    Signed-off-by: Ian Campbell <[email protected]>
    Ian Campbell committed Apr 3, 2019
    Configuration menu
    Copy the full SHA
    ef40743 View commit details
    Browse the repository at this point in the history
  3. e2e: Add tests for docker#1801 (global args parsed multiple times)

    These currently fail.
    
    Signed-off-by: Ian Campbell <[email protected]>
    Ian Campbell committed Apr 3, 2019
    Configuration menu
    Copy the full SHA
    d32f364 View commit details
    Browse the repository at this point in the history
  4. cmd/docker: only parse global arguments once.

    Before calling `cmd.Execute` we need to reset the arguments to be used to not
    include the global arguments which we have already parsed. This is precisely
    the `args` which we have in our hand at this point.
    
    This fixes `TestGlobalArgsOnlyParsedOnce/builtin` in the cli-plugins e2e tests.
    
    `TestGlobalArgsOnlyParsedOnce/plugin` is still broken will be fixed next.
    
    Signed-off-by: Ian Campbell <[email protected]>
    Ian Campbell committed Apr 3, 2019
    Configuration menu
    Copy the full SHA
    8c087b6 View commit details
    Browse the repository at this point in the history
  5. cli-plugins: only parse global arguments once.

    This fixes `TestGlobalArgsOnlyParsedOnce/plugin` in the cli-plugins e2e tests.
    
    Signed-off-by: Ian Campbell <[email protected]>
    Ian Campbell committed Apr 3, 2019
    Configuration menu
    Copy the full SHA
    1425aeb View commit details
    Browse the repository at this point in the history