This repository has been archived by the owner on Oct 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 171
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[INFINITY - 2985] backport isolation to sdk 0.40 (#2478)
* isolation backport * using relative hostpath for isolation (#2476) * fixing compatibility with 1.9 * latest changes * setting executor info * fixing isolation compatibility with 1.9 * [INFINITY-2985] Isolation support for elastic search (#2481) [INFINITY-2985] Isolation support for elastic search * fixing style warnings
- Loading branch information
Showing
12 changed files
with
132 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: {{FRAMEWORK_NAME}} | ||
scheduler: | ||
principal: {{SERVICE_PRINCIPAL}} | ||
user: {{SERVICE_USER}} | ||
pods: | ||
hello: | ||
count: {{HELLO_COUNT}} | ||
isolate-tmp: {{HELLO_ISOLATION}} | ||
tasks: | ||
server: | ||
goal: FINISHED | ||
cmd: echo foo > tmp/foo && echo bar > /tmp/bar && cat tmp/bar | grep bar | ||
cpus: {{HELLO_CPUS}} | ||
memory: {{HELLO_MEM}} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import logging | ||
import re | ||
|
||
import dcos.marathon | ||
import pytest | ||
import sdk_cmd | ||
import sdk_install | ||
import sdk_marathon | ||
import sdk_plan | ||
import sdk_tasks | ||
import sdk_utils | ||
import shakedown | ||
from tests import config | ||
|
||
|
||
log = logging.getLogger(__name__) | ||
|
||
|
||
@pytest.fixture(scope='module', autouse=True) | ||
def configure_package(configure_security): | ||
try: | ||
sdk_install.uninstall(config.PACKAGE_NAME, config.SERVICE_NAME) | ||
yield | ||
finally: | ||
sdk_install.uninstall(config.PACKAGE_NAME, config.SERVICE_NAME) | ||
|
||
|
||
@pytest.mark.sanity | ||
def test_tmp_directory_created(): | ||
|
||
sdk_install.install( | ||
config.PACKAGE_NAME, | ||
config.SERVICE_NAME, | ||
0, | ||
additional_options={"service": {"name": config.SERVICE_NAME, "yaml": "isolation"}}, | ||
wait_for_deployment=False) | ||
|
||
pl = sdk_plan.get_deployment_plan(config.SERVICE_NAME) | ||
|
||
assert pl['status'] != 'COMPLETE' | ||
|
||
marathon_config = sdk_marathon.get_config(config.SERVICE_NAME) | ||
marathon_config['env']['HELLO_ISOLATION'] = 'true' | ||
sdk_marathon.update_app(config.SERVICE_NAME, marathon_config) | ||
|
||
sdk_plan.wait_for_completed_deployment(config.SERVICE_NAME) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters