# Path: shpkpr/cli/options.py
# def _validate_chronos_version(ctx, param, value):
# def _validate_authentication(ctx, url, service_name):
# def _validate_marathon_client(ctx, _, __):
# def _validate_chronos_client(ctx, _, __):
# def _validate_vault_client(ctx, _, __):


import functools
import click
import pytest
from click.testing import CliRunner
from shpkpr.cli import options
def test_marathon_client_succeeds_with_marathon_url_and_basic_auth(runner):
    result = runner([
        "--marathon-url", "https://example.com",
        "--username", "someuser",
        "--password", "somepassword",
    ])

    assert result.exit_code == 0


def test_marathon_client_fails_with_marathon_url_and_basic_auth_without_ssl(runner):
    result = runner([
        "--marathon-url", "http://example.com",
        "--username", "someuser",
        "--password", "somepassword",
    ])

    assert result.exit_code == 2


def test_marathon_client_prompts_for_basic_auth_password(runner):
    result = runner([
        "--marathon-url", "https://example.com",
        "--username", "someuser",
    ], input="somepassword\n")

    assert result.exit_code == 0


def test_marathon_client_succeeds_fails_when_missing_basic_auth_username(runner):

# Path: shpkpr/cli/options.py
# def _validate_chronos_version(ctx, param, value):
# def _validate_authentication(ctx, url, service_name):
# def _validate_marathon_client(ctx, _, __):
# def _validate_chronos_client(ctx, _, __):
# def _validate_vault_client(ctx, _, __):


# Path: tests/cli/test_options.py
import functools
import click
import pytest
from click.testing import CliRunner
from shpkpr.cli import options

def test_marathon_client_succeeds_with_marathon_url_and_basic_auth(runner):
    result = runner([
        "--marathon-url", "https://example.com",
        "--username", "someuser",
        "--password", "somepassword",
    ])

    assert result.exit_code == 0


def test_marathon_client_fails_with_marathon_url_and_basic_auth_without_ssl(runner):
    result = runner([
        "--marathon-url", "http://example.com",
        "--username", "someuser",
        "--password", "somepassword",
    ])

    assert result.exit_code == 2


def test_marathon_client_prompts_for_basic_auth_password(runner):
    result = runner([
        "--marathon-url", "https://example.com",
        "--username", "someuser",
    ], input="somepassword\n")

    assert result.exit_code == 0


def test_marathon_client_succeeds_fails_when_missing_basic_auth_username(runner):

    result = runner([