Esempio n. 1
0
    try:
        value = zk.retry(zk.get, znode)
    except NoNodeError:
        return False
    return bool(value[0] == FLAG)


@pytest.mark.skipif(
    only_changed(E2E_SAFE_DEFAULT + [
        # All packages safe except named packages
        'packages/**',
        '!packages/*treeinfo.json',
        '!packages/{exhibitor,java}/**',
        # All e2e tests safe except this test
        'test-e2e/test_*',
        '!' + escape(trailing_path(__file__, 2)),
    ]),
    reason='Only safe files modified',
)
class TestZooKeeperBackup:
    """
    Within the context of DC/OS ZooKeeper can be backed up on a running
    cluster and a previous state can be restored.
    """
    def test_transaction_log_backup_and_restore(
        self,
        static_three_master_cluster: Cluster,
        zk_client: KazooClient,
        tmp_path: Path,
        request: SubRequest,
        log_dir: Path,
Esempio n. 2
0
from _pytest.fixtures import SubRequest
from cluster_helpers import wait_for_dcos_oss
from conditional import E2E_SAFE_DEFAULT, escape, only_changed, trailing_path
from dcos_e2e.backends import Docker
from dcos_e2e.cluster import Cluster
from dcos_e2e.node import Output


@pytest.mark.skipif(
    only_changed(E2E_SAFE_DEFAULT + [
        # All packages safe except named packages
        'packages/*/**',
        '!packages/{adminrouter,bootstrap,bouncer,bouncer-deps,etcd,openssl}/**',
        '!packages/python*/**',
        # All e2e tests safe except this test
        'test-e2e/test_*', '!' + escape(trailing_path(__file__, 2)),
    ]),
    reason='Only safe files modified',
)
def test_adminrouter_grpc_proxy_port(docker_backend: Docker,
                                     artifact_path: Path,
                                     request: SubRequest,
                                     log_dir: Path,
                                     rsa_keypair: Tuple[str, str],
                                     jwt_token: Callable[[str, str, int], str]
                                     ) -> None:
    random_port = random.randint(63000, 64000)

    with Cluster(
            cluster_backend=docker_backend,
            masters=1,