experimental: enable experimental packaging test permanently (#881)

This commit is contained in:
Jesus E. Larios Murillo
2017-02-03 14:50:10 -08:00
committed by tamarrow
parent c80499ee9c
commit ef568580bf
2 changed files with 12 additions and 30 deletions

View File

@@ -1,5 +1,5 @@
DC/OS Command Line Interface
===========================
============================
The DC/OS Command Line Interface (CLI) is a cross-platform command line utility
that provides a user-friendly yet powerful way to manage DC/OS clusters.
@@ -28,7 +28,7 @@ The example below installs every package available in the DC/OS repository::
dcos package search --json | jq '.[0].packages[].name' | xargs -L 1 dcos package install --yes
Development Dependencies
-------------------------
------------------------
#. git_ must be installed to download the source code for the DC/OS CLI.
@@ -80,19 +80,19 @@ Configure Environment and Run
dcos help
Running Tests
--------------
-------------
Setup
#####
Tox, our test runner, tests against Python 3.4. We have a set of tests in
the :code:`dcos` package (root directory) and in the :code:`dcoscli` package
(:code:`cli` directory). When running the tests describe below change
(:code:`cli` directory). When running the tests described below, change
directory to one of those two and follow the instructions.
Initialization
#######
##############
The `config` integration tests use static config files. To run these tests
make sure you set owner only permissions on these files:
@@ -121,6 +121,12 @@ You can set :code:`DCOS_CONFIG` to a config file that points to a DC/OS
cluster you want to use for integration tests. This defaults to
:code:`~/.dcos/dcos.toml`
Note that in order for all the integration tests to pass, your DC/OS cluster
must have the experimental packaging features enabled. In order to enable
these features the :code:`staged_package_storage_uri` and :code:`package_storage_uri`
confiuguration paramenters must be set at cluster setup.
See `dcos configuration parameters`_ for more information.
There are two ways to run tests, you can either use the virtualenv created by
:code:`make env` above::
@@ -172,6 +178,7 @@ These packages are available to be installed by the DC/OS CLI installation scrip
.. _automated TeamCity build: https://teamcity.mesosphere.io/viewType.html?buildTypeId=DcosIo_DcosCli_Release
.. _dcos: https://pypi.python.org/pypi/dcos
.. _dcos configuration parameters: https://dcos.io/docs/1.9/administration/installing/custom/configuration-parameters/
.. _dcoscli: https://pypi.python.org/pypi/dcoscli
.. _jq: http://stedolan.github.io/jq/
.. _git: http://git-scm.com

View File

@@ -6,16 +6,12 @@ import shutil
import tempfile
import time
import pytest
import dcoscli
from dcos import util
from .common import (assert_command, exec_command,
file_json_ast, watch_all_deployments,
zip_contents_as_json)
_COSMOS_PACKAGE_ADD_ENABLED = 'COSMOS_ADD_ENABLED' in os.environ
command_base = ['dcos', 'experimental']
data_dir = os.path.join(
os.getcwd(), 'tests', 'data'
@@ -194,9 +190,6 @@ def test_package_build_where_build_definition_has_badly_formed_reference():
stderr=stderr)
@pytest.mark.skipif(
not _COSMOS_PACKAGE_ADD_ENABLED,
reason="https://mesosphere.atlassian.net/browse/DCOS-11989")
def test_package_add_argument_exclussion():
command = command_base + ['package', 'add',
'--dcos-package', runnable_package_path(1),
@@ -210,9 +203,6 @@ def test_package_add_argument_exclussion():
assert not_recognized in stdout
@pytest.mark.skipif(
not _COSMOS_PACKAGE_ADD_ENABLED,
reason="https://mesosphere.atlassian.net/browse/DCOS-11989")
def test_service_start_happy_path():
with _temporary_directory() as output_directory:
runnable_package = _package_build(
@@ -225,9 +215,6 @@ def test_service_start_happy_path():
_service_stop(name)
@pytest.mark.skipif(
not _COSMOS_PACKAGE_ADD_ENABLED,
reason="https://mesosphere.atlassian.net/browse/DCOS-11989")
def test_service_start_happy_path_json():
with _temporary_directory() as output_directory:
runnable_package = _package_build(
@@ -240,9 +227,6 @@ def test_service_start_happy_path_json():
_service_stop(name)
@pytest.mark.skipif(
not _COSMOS_PACKAGE_ADD_ENABLED,
reason="https://mesosphere.atlassian.net/browse/DCOS-11989")
def test_service_start_happy_path_from_universe():
package_name = 'linkerd'
name, version = _package_add_universe(package_name)
@@ -253,9 +237,6 @@ def test_service_start_happy_path_from_universe():
_service_stop(name)
@pytest.mark.skipif(
not _COSMOS_PACKAGE_ADD_ENABLED,
reason="https://mesosphere.atlassian.net/browse/DCOS-11989")
def test_service_start_happy_path_from_universe_json():
package_name = 'cassandra'
name, version = _package_add_universe(package_name, expects_json=True)
@@ -266,9 +247,6 @@ def test_service_start_happy_path_from_universe_json():
_service_stop(name)
@pytest.mark.skipif(
not _COSMOS_PACKAGE_ADD_ENABLED,
reason="https://mesosphere.atlassian.net/browse/DCOS-11989")
def test_service_start_by_starting_same_service_twice():
name, version = _package_add_universe('kafka')
_wait_for_package_add_remote(name, version)
@@ -280,9 +258,6 @@ def test_service_start_by_starting_same_service_twice():
_service_stop(name)
@pytest.mark.skipif(
not _COSMOS_PACKAGE_ADD_ENABLED,
reason="https://mesosphere.atlassian.net/browse/DCOS-11989")
def test_service_start_by_starting_service_not_added():
stderr = b'Package [foo] not found\n'
_service_start_failure('foo', stderr=stderr)