tests: cleanup redundant test files (#899)

This commit is contained in:
tamarrow
2017-02-08 11:24:07 -08:00
committed by GitHub
parent c66eb9dfb0
commit c5dd8c3098
19 changed files with 18 additions and 643 deletions

View File

@@ -1,40 +0,0 @@
Description:
Authenticate to DC/OS cluster
Usage:
dcos auth --help
dcos auth --info
dcos auth list-providers [--json]
dcos auth login
[--provider=<provider_id>] [--username=<username>]
[--password=<password> | --password-file=<password_file>
| --password-env=<password_env> | --private-key=<key_path>]
dcos auth logout
Commands:
list-providers
List configured authentication providers for your DC/OS cluster.
login
Login to your DC/OS cluster.
logout
Logout of your DC/OS cluster.
Options:
-h, --help
Print usage.
--info
Print a short description of this subcommand.
--password=<password>
Specify password on the command line (insecure).
--password-env=<password_env>
Specify an environment variable name that contains the password.
--password-file=<password_file>
Specify the path to a file that contains the password.
--provider=<provider_id>
Specify the authentication provider to use for login.
--private-key=<key_path>
Specify the path to a file that contains the private key.
--username=<username>
Specify the username for login.
--version
Print version information.

View File

@@ -1,43 +0,0 @@
Description:
Manage the DC/OS configuration file.
Usage:
dcos config --help
dcos config --info
dcos config set <name> <value>
dcos config show [<name>]
dcos config unset <name>
dcos config validate
Commands:
set
Add or set a DC/OS configuration property.
show
Print the DC/OS configuration file contents.
unset
Remove a property from the configuration file.
validate
Validate changes to the configuration file.
Options:
-h, --help
Print usage.
--info
Print a short description of this subcommand.
--version
Print version information.
Positional Arguments:
<name>
The name of the property.
<value>
The value of the property.
Environment Variables:
Configuration properties all have corresponding environment variables. If a
property is in the "core" section (ex. "core.foo"), it corresponds to
environment variable DCOS_FOO. All other properties (ex "foo.bar")
correspond to enviroment variable DCOS_FOO_BAR.
Environment variables take precendence over corresponding configuration
property.

View File

@@ -1,34 +0,0 @@
Description:
The Mesosphere Datacenter Operating System (DC/OS) spans all of the machines in
your datacenter or cloud and treats them as a single, shared set of resources.
Usage:
dcos [options] [<command>] [<args>...]
Options:
--debug
Enable debug mode.
--help
Print usage.
--log-level=<log-level>
Set the logging level. This setting does not affect the output sent to
stdout. The severity levels are:
The severity level:
* debug Prints all messages.
* info Prints informational, warning, error, and critical messages.
* warning Prints warning, error, and critical messages.
* error Prints error and critical messages.
* critical Prints only critical messages to stderr.
--version
Print version information
Environment Variables:
DCOS_CONFIG
Set the path to the DC/OS configuration file. By default, this variable
is set to ~/.dcos/dcos.toml.
DCOS_DEBUG
Indicates whether to print additional debug messages to stdout. By
default this is set to false.
DCOS_LOG_LEVEL
Prints log messages to stderr at or above the level indicated. This is
equivalent to the --log-level command-line option.

View File

@@ -1,24 +0,0 @@
Description:
Display help information about DC/OS.
Usage:
dcos help
dcos help --help
dcos help --info
dcos help <subcommand>
Commands:
help
Print help information about a subcommand.
Options:
--help
Print usage.
--info
Print a short description of this subcommand.
--version
Print version information.
Positional Arguments:
<subcommand>
The subcommand name.

View File

@@ -1,81 +0,0 @@
Description:
Deploy and manage jobs in DC/OS.
Usage:
dcos job --help
dcos job --version
dcos job --config-schema
dcos job --info
dcos job add <job-file>
dcos job remove <job-id> [--stop-current-job-runs]
dcos job show <job-id>
dcos job update <job-file>
dcos job kill <job-id> [run-id][--all]
dcos job run <job-id>
dcos job list [--json]
dcos job schedule add <job-id> <schedule-file>
dcos job schedule show <job-id> [--json]
dcos job schedule remove <job-id> <schedule-id>
dcos job schedule update <job-id> <schedule-file>
dcos job show runs <job-id> [--run-id <run-id>][--json][--q]
dcos job history <job-id> [--json][--show-failures]
Commands:
job add
Add a job.
job remove
Remove a job.
job show
Show the job.
job update
Update the job.
job kill
Kill the job.
job run
Run a job now.
job list
Show all job definitions.
job schedule add
Adds a schedule to a job.
job schedule show
Shows the schedules of a job.
job schedule remove
Removes a schedule from a job.
job schedule update
Updates a schedule on a job.
job show runs
Shows the successful and failure runs of a job.
job history
Provides a job run history.
Options:
-h, --help
Print usage.
--version
Print version information.
--config-schema
Show the configuration schema for the Metronome subcommand.
--info
Print a short description of this subcommand.
--stop-current-job-runs
Indicates on a job removal that all current running jobs should be killed.
--all
Instead of specifying a run_id to kill, indicates all runs should be killed.
--json
Print JSON-formatted list instead of a table.
--q
Indicates a quiet mode which results in just an array of run ids.
--show-failures
Indicates to show the failure table and statistics for history.
Positional Arguments:
<job-id>
The job ID.
<job-file>
A JSON formatted file of a job.
<run-id>
The run ID of a job run.
<schedule-file>
A JSON formatted file of a job schedule.
<schedule-id>
The schedule ID.

View File

@@ -1,179 +0,0 @@
Description:
Deploy and manage applications to DC/OS.
Usage:
dcos marathon --config-schema
dcos marathon --help
dcos marathon --info
dcos marathon about
dcos marathon app add [<app-resource>]
dcos marathon app list [--json]
dcos marathon app remove [--force] <app-id>
dcos marathon app restart [--force] <app-id>
dcos marathon app show [--app-version=<app-version>] <app-id>
dcos marathon app start [--force] <app-id> [<instances>]
dcos marathon app stop [--force] <app-id>
dcos marathon app kill [--scale] [--host=<host>] <app-id>
dcos marathon app update [--force] <app-id> [<properties>...]
dcos marathon app version list [--max-count=<max-count>] <app-id>
dcos marathon deployment list [--json <app-id>]
dcos marathon deployment rollback <deployment-id>
dcos marathon deployment stop <deployment-id>
dcos marathon deployment watch [--max-count=<max-count>]
[--interval=<interval>] <deployment-id>
dcos marathon group add [<group-resource>]
dcos marathon group list [--json]
dcos marathon group scale [--force] <group-id> <scale-factor>
dcos marathon group show [--group-version=<group-version>] <group-id>
dcos marathon group remove [--force] <group-id>
dcos marathon group update [--force] <group-id> [<properties>...]
dcos marathon pod add [<pod-resource>]
dcos marathon pod kill <pod-id> [<instance-ids>...]
dcos marathon pod list [--json]
dcos marathon pod remove [--force] <pod-id>
dcos marathon pod show <pod-id>
dcos marathon pod update [--force] <pod-id>
dcos marathon debug list [--json]
dcos marathon debug summary <app-id> [--json]
dcos marathon debug details <app-id> [--json]
dcos marathon task list [--json <app-id>]
dcos marathon task stop [--wipe] <task-id>
dcos marathon task show <task-id>
Commands:
about
Print info.json for DC/OS Marathon.
app add
Add an application.
app list
List the installed applications.
app remove
Remove an application.
app restart
Restart an application.
app show
Show the `marathon.json` for an application.
app start
Start an application.
app stop
Stop an application.
app kill
Kill a running application instance.
app update
Update an application.
app version list
List the version history of an application.
deployment list
Print a list of currently deployed applications.
deployment rollback
Remove a deployed application.
deployment stop
Cancel the in-progress deployment of an application.
deployment watch
Monitor deployments.
group add
Create a new group.
group list
Print the list of groups.
group scale
Scale a group.
group show
Print a detailed list of groups.
group remove
Remove a group.
group update
Update a group.
pod add
Create a new pod.
pod kill
Kill one or more running pod instances.
pod list
List the deployed pods.
pod remove
Remove a pod.
pod show
Display detailed information for a specific pod.
pod update
Update a pod.
debug list
Print a list of currently queued instance launches for
debugging purpose.
debug summary
Display summarized information for a queued instance launch
for debugging purpose.
debug details
Display detailed information for a queued instance launch
for debugging purpose.
task list
List all tasks.
task stop
Stop a task. Wipe persistent data if `--wipe` is set.
task show
List a specific task.
Options:
--app-version=<app-version>
The version of the application to use. It can be specified as an
absolute or relative value. Absolute values must be in ISO8601 date
format. Relative values must be specified as a negative integer and they
represent the version from the currently deployed application definition.
--config-schema
Show the configuration schema for the Marathon subcommand.
--force
Disable checks in Marathon during updates.
--group-version=<group-version>
The group version to use for the command. It can be specified as an
absolute or relative value. Absolute values must be in ISO8601 date
format. Relative values must be specified as a negative integer and they
represent the version from the currently deployed group definition.
-h, --help
Print usage.
--host=<host>
The hostname that is running app.
--info
Print a short description of this subcommand.
--interval=<interval>
Number of seconds to wait between actions.
--json
Print JSON-formatted data.
--max-count=<max-count>
Maximum number of entries to fetch and return.
--scale
Scale the app down after performing the the operation.
--version
Print version information.
Positional Arguments:
<app-id>
The application ID.
<app-resource>
Path to a file or HTTP(S) URL that contains the app's JSON definition.
If omitted, the definition is read from stdin. For a detailed
description see
https://mesosphere.github.io/marathon/docs/rest-api.html#post-v2-apps.
<deployment-id>
The deployment ID.
<group-id>
The group ID.
<group-resource>
Path to a file or HTTP(S) URL that contains the group's JSON definition.
If omitted, the definition is read from stdin. For a detailed
description see
https://mesosphere.github.io/marathon/docs/rest-api.html#post-v2-groups.
<instance-ids>
List of one or more space-separated pod instance IDs.
<instances>
The number of instances.
<pod-id>
The pod ID.
<pod-resource>
Path to a file or HTTP(S) URL that contains the pod's JSON definition.
If omitted, the definition is read from stdin.
<properties>
List of space-separated JSON object properties to update. The list
must be formatted as <key>=<value>. For example, `cpus=2.0 mem=308`.
If omitted, properties are read from a JSON object provided on stdin.
<task-id>
The task ID.
<scale-factor>
The factor to scale an application group by.

View File

@@ -1,87 +0,0 @@
Description:
Administer and manage DC/OS cluster nodes.
Usage:
dcos node --help
dcos node --info
dcos node [--json]
dcos node log [--follow --lines=N --leader --master --mesos-id=<mesos-id> --slave=<slave-id>]
[--component=<component-name> --filter=<filter>...]
dcos node list-components [--leader --mesos-id=<mesos-id> --json]
dcos node ssh [--option SSHOPT=VAL ...]
[--config-file=<path>]
[--user=<user>]
[--master-proxy]
(--leader | --master | --mesos-id=<mesos-id> | --slave=<slave-id>)
[<command>]
dcos node diagnostics create (<nodes>)...
dcos node diagnostics delete <bundle>
dcos node diagnostics download <bundle> [--location=<location>]
dcos node diagnostics (--list | --status | --cancel) [--json]
Commands:
log
Prints the Mesos logs for the leading master node, agent nodes, or both.
ssh
Establish an SSH connection to the master or agent nodes of your DC/OS
cluster.
diagnostics create
Create a diagnostics bundle. Nodes can be: ip address, hostname, mesos ID
or keywords "all", "masters", "agents" (notice the quotes around the keywords).
diagnostics download
Download a diagnostics bundle.
diagnostics delete
Delete a diagnostics bundle.
Options:
--config-file=<path>
Path to SSH configuration file.
--follow
Dynamically update the log.
-h, --help
Show this screen.
--info
Show a short description of this subcommand.
--json
Print JSON-formatted list of nodes.
--leader
The leading master.
--lines=N
Print the last N lines, where 10 is the default.
--master
Deprecated. Please use --leader.
--master-proxy
Proxy the SSH connection through a master node. This can be useful when
accessing DC/OS from a separate network. For example, in the default AWS
configuration, the private slaves are unreachable from the public
internet. You can access them using this option, which will first hop
from the publicly available master.
--option SSHOPT=VAL
The SSH options. For information, enter `man ssh_config` in your
terminal.
--slave=<agent-id>
Agent node with the provided ID.
--user=<user>
The SSH user, where the default user [default: core].
--list
List available diagnostics bundles.
--status
Print diagnostics job status.
--cancel
Cancel a running diagnostics job.
--location=<location>
Download a diagnostics bundle to a particular location.
If not set, default to present working directory.
--version
Print version information.
--list-components
Print a list of available DC/OS components on specified node.
--component=<component-name>
Show DC/OS component logs.
--filter=<filter>
Filter logs by field and value. Filter must be a string separated by colon.
For example: --filter _PID:0 --filter _UID:1
Positional Arguments:
<command>
Command to execute on the DCOS cluster node.

View File

@@ -1,49 +0,0 @@
Description:
Manage DC/OS services.
Usage:
dcos service --help
dcos service --info
dcos service [--completed --inactive --json]
dcos service log [--follow --lines=N --ssh-config-file=<path>]
<service> [<file>]
dcos service shutdown <service-id>
Commands:
log
Print the service logs.
shutdown
Shutdown a service.
Options:
--completed
Show the completed and active services. Completed services have either
been disconnected from master and reached their failover timeout, or
have been explicitly shutdown via the /shutdown endpoint.
-h, --help
Print usage.
--follow
Print data as the log file grows.
--inactive
Show the inactive and active services. Inactive services have been
disconnected from master, but haven't yet reached their failover timeout.
--info
Print a short description of this subcommand.
--json
Print JSON-formatted list of DC/OS services.
--lines=N
Print the last N lines, where 10 is the default.
--ssh-config-file=<path>
The path to the SSH config file. This is used to access the Marathon
logs.
--version
Print version information.
Positional Arguments:
<file>
The service log filename for the Mesos sandbox. The default is stdout.
<service>
The DC/OS Service name.
<service-id>
The DC/OS Service ID.

View File

@@ -1,55 +0,0 @@
Description:
Manage DC/OS tasks.
Usage:
dcos task --help
dcos task --info
dcos task exec [--interactive --tty] <task> <cmd> [<args>...]
dcos task log [--completed --follow --lines=N] [<task>] [<file>]
dcos task ls [--long --completed] [<task>] [<path>]
dcos task [--completed --json <task>]
Command:
exec
Launch a process (<cmd>) inside of a container for a task (<task>).
log
Print the task log. By default, the 10 most recent task logs from stdout
are printed.
ls
Print the list of files in the Mesos task sandbox.
Options:
--completed
Print completed and in-progress tasks.
-h, --help
Print usage.
--info
Print a short description of this subcommand.
-i, --interactive
Attach a STDIN stream to the remote command for an interactive session.
-t, --tty
Attach a tty to the remote stream.
--follow
Dynamically update the log.
--json
Print JSON-formatted list of tasks.
--lines=N
Print the last N lines. The default is 10 lines.
--long
Print full Mesos sandbox file attributes.
--version
Print version information.
Positional Arguments:
<cmd>
The command to run inside the remote task's container.
For example: `/bin/bash`.
<args>
Additional arguments to pass to the command (<cmd>).
<file>
Specify the sandbox file to print. The default is stdout.
<path>
The Mesos sandbox directory path. The default is '.'.
<task>
A full task ID, a partial task ID, or a regular expression.

View File

@@ -1,22 +0,0 @@
Description:
Launch an arbitrary command inside a running DC/OS task.
Usage:
dcos-task-exec [--interactive --tty] <task> <cmd> [<args>...]
Command:
exec
Launch a process (<cmd>) inside of a container for a task (<task>).
Options:
-i, --interactive
Attach a STDIN stream to the remote command for an interactive session.
-t, --tty
Attach a tty to the remote stream.
Positional Arguments:
<cmd>
The command to run inside the remote task's container.
For example: `/bin/bash`.
<args>
Additional arguments to pass to the command (<cmd>).

View File

@@ -21,12 +21,6 @@ def env():
return r
def test_help():
with open('tests/data/help/config.txt') as content:
assert_command(['dcos', 'config', '--help'],
stdout=content.read().encode('utf-8'))
def test_info():
stdout = b'Manage the DC/OS configuration file\n'
assert_command(['dcos', 'config', '--info'],

View File

@@ -8,13 +8,13 @@ def test_default():
def test_help():
with open('tests/data/help/dcos.txt') as content:
with open('dcoscli/data/help/dcos.txt') as content:
assert_command(['dcos', '--help'],
stdout=content.read().encode('utf-8'))
def test_dcos_help():
with open('tests/data/help/dcos.txt') as content:
with open('dcoscli/data/help/dcos.txt') as content:
assert_command(['dcos', 'help'],
stdout=content.read().encode('utf-8'))

View File

@@ -13,18 +13,13 @@ from .common import (assert_command, exec_command,
zip_contents_as_json)
command_base = ['dcos', 'experimental']
data_dir = os.path.join(
os.getcwd(), 'tests', 'data'
)
build_data_dir = os.path.join(
data_dir, 'package_build'
)
data_dir = os.path.join(os.getcwd(), 'tests', 'data')
build_data_dir = os.path.join(data_dir, 'package_build')
def runnable_package_path(index):
return os.path.join(
build_data_dir, 'helloworld', 'helloworld{}.json'.format(index)
)
build_data_dir, 'helloworld', 'helloworld{}.json'.format(index))
def test_experimental():

View File

@@ -2,7 +2,7 @@ from .common import assert_command
def test_help():
with open('tests/data/help/help.txt') as content:
with open('dcoscli/data/help/help.txt') as content:
assert_command(['dcos', 'help', '--help'],
stdout=content.read().encode('utf-8'))
@@ -18,25 +18,25 @@ def test_version():
def test_help_config():
with open('tests/data/help/config.txt') as content:
with open('dcoscli/data/help/config.txt') as content:
assert_command(['dcos', 'help', 'config'],
stdout=content.read().encode('utf-8'))
def test_help_job():
with open('tests/data/help/job.txt') as content:
with open('dcoscli/data/help/job.txt') as content:
assert_command(['dcos', 'help', 'job'],
stdout=content.read().encode('utf-8'))
def test_help_marathon():
with open('tests/data/help/marathon.txt') as content:
with open('dcoscli/data/help/marathon.txt') as content:
assert_command(['dcos', 'help', 'marathon'],
stdout=content.read().encode('utf-8'))
def test_help_node():
with open('tests/data/help/node.txt') as content:
with open('dcoscli/data/help/node.txt') as content:
assert_command(['dcos', 'help', 'node'],
stdout=content.read().encode('utf-8'))
@@ -48,18 +48,18 @@ def test_help_package():
def test_help_service():
with open('tests/data/help/service.txt') as content:
with open('dcoscli/data/help/service.txt') as content:
assert_command(['dcos', 'help', 'service'],
stdout=content.read().encode('utf-8'))
def test_help_task():
with open('tests/data/help/task.txt') as content:
with open('dcoscli/data/help/task.txt') as content:
assert_command(['dcos', 'help', 'task'],
stdout=content.read().encode('utf-8'))
def test_help_auth():
with open('tests/data/help/auth.txt') as content:
with open('dcoscli/data/help/auth.txt') as content:
assert_command(['dcos', 'help', 'auth'],
stdout=content.read().encode('utf-8'))

View File

@@ -11,7 +11,7 @@ from .common import (assert_command, exec_command, job, show_job,
def test_help():
with open('tests/data/help/job.txt') as content:
with open('dcoscli/data/help/job.txt') as content:
assert_command(['dcos', 'job', '--help'],
stdout=content.read().encode('utf-8'))

View File

@@ -20,7 +20,7 @@ _ZERO_INSTANCE_APP_INSTANCES = 100
def test_help():
with open('tests/data/help/marathon.txt') as content:
with open('dcoscli/data/help/marathon.txt') as content:
assert_command(['dcos', 'marathon', '--help'],
stdout=content.read().encode('utf-8'))

View File

@@ -14,7 +14,7 @@ from ..fixtures.node import slave_fixture
def test_help():
with open('tests/data/help/node.txt') as content:
with open('dcoscli/data/help/node.txt') as content:
stdout = six.b(content.read())
assert_command(['dcos', 'node', '--help'], stdout=stdout)

View File

@@ -27,7 +27,7 @@ def teardown_module(module):
def test_help():
with open('tests/data/help/service.txt') as content:
with open('dcoscli/data/help/service.txt') as content:
assert_command(['dcos', 'service', '--help'],
stdout=content.read().encode('utf-8'))

View File

@@ -45,7 +45,7 @@ def teardown_module():
def test_help():
with open('tests/data/help/task.txt') as content:
with open('dcoscli/data/help/task.txt') as content:
assert_command(['dcos', 'task', '--help'],
stdout=content.read().encode('utf-8'))