Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions dcos_test_utils/dcos_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,16 @@ def setup_enterprise(
"--username={}".format(username), "--password={}".format(password)])
assert stdout == ''
assert stderr == ''
self.exec_command(
["dcos", "package", "install", "dcos-enterprise-cli", "--cli", "--yes"])

if '1.11' in DCOS_CLI_URL or '1.10' in DCOS_CLI_URL:

@cprovencher cprovencher Dec 17, 2018

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest:

cmd = ["dcos", "package", "install", "dcos-enterprise-cli", "--cli", "--yes"]
if '1.11' in DCOS_CLI_URL or '1.10' in DCOS_CLI_URL:
    # An attempt to work around
    # https://jira.mesosphere.com/browse/DCOS-45738
    cmd.append('--global')
self.exec_command(cmd)

# An attempt to work around
# https://jira.mesosphere.com/browse/DCOS-45738
cmd = ["dcos", "package", "install", "dcos-enterprise-cli", "--cli", "--global", "--yes"]
else:
cmd = ["dcos", "package", "install", "dcos-enterprise-cli", "--cli", "--yes"]

self.exec_command(cmd)


def login_enterprise(self, username=None, password=None, provider=None):
""" Authenticates the CLI with the setup Mesosphere Enterprise DC/OS cluster
Expand Down