Commit 774858ae authored by Samuel GAIST's avatar Samuel GAIST
Browse files

[test][experiments] Add fork push test setup

parent 6f82e8cc
......@@ -45,13 +45,17 @@ from beat.core.test.test_execution import create_conda_environment
from beat.core.test.test_execution import clear_conda_environment
from beat.core.experiment import Storage, Experiment
from beat.core.toolchain import Storage as TCStorage
from beat.core.algorithm import Storage as AlgStorage
from beat.core.dataformat import Storage as DFStorage
from beat.core.database import Storage as DBStorage
from ..common import Selector
from .utils import index_experiment_dbs, MockLoggingHandler
from . import core
from . import tmp_prefix
from . import prefix, tmp_prefix
def setup_experiments():
......@@ -67,7 +71,8 @@ class TestOnlineExperiments(core.OnlineAssetTestCase):
"pull": "user/user/single/1/single",
"diff": "user/user/single/1/single",
"push": "user/user/unknown/1/unknown",
"push": "user/user/unknown/1/unknown",
"fork_from": "user/user/unknown/1/unknown",
"fork": "user/user/unknown/1/forked_obj",
"not_owner_push": "other_user/other_user/somechain/1/someexp",
......@@ -78,6 +83,23 @@ class TestOnlineExperiments(core.OnlineAssetTestCase):["globals"]["queue"] = "another_queue"
def _prepare_fork_dependencies(self, asset_name):
assets = [
(DBStorage, ["simple/1"]),
(DFStorage, ["user/single_integer/1"]),
(AlgStorage, ["user/unknown/1", "user/integers_echo_analyzer_v2/1"]),
(TCStorage, ["user/unknown/1"]),
(Storage, ["user/user/unknown/1/unknown"]),
for item in assets:
storage_cls, asset_list = item
for asset in asset_list:
src_storage = storage_cls(prefix, asset)
dst_storage = storage_cls(tmp_prefix, asset)*src_storage.load())
def test_fork(self, obj=None, obj2=None):
obj = obj or "user/user/single/1/single"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment