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

Use --global when installing enterprise CLI on 1.11/1.10 #70

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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:
Copy link
Member

@cprovencher cprovencher Dec 17, 2018

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