Commit a8e0afec authored by Samuel GAIST's avatar Samuel GAIST

[test][experiments] Fix setup of experiment dependencies for push tests

The database generated for the online system is not exactly the same
as the one used for the tests although they share the same name.

This patch pulls the necessary database to ensure that everything is
in place properly to do the push tests.
parent a715baeb
......@@ -48,7 +48,6 @@ 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 .utils import index_experiment_dbs, MockLoggingHandler
......@@ -107,7 +106,6 @@ class TestOnline(core.OnlineAssetTestCase):
def _prepare_fork_dependencies(self, asset_name):
super()._prepare_fork_dependencies(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"]),
......@@ -121,6 +119,21 @@ class TestOnline(core.OnlineAssetTestCase):
dst_storage = storage_cls(tmp_prefix, asset)
dst_storage.save(*src_storage.load())
# The remote database dataformats is not the same as the local version
# hence download it to ensure we can push experiments using it properly
self.call("pull", "simple/1", asset_type="databases", prefix=tmp_prefix)
@slow
@core.skip_disconnected
def test_push_and_delete(self):
asset_name = self.object_map["push"]
self._prepare_fork_dependencies(asset_name)
exit_code, output = self.call("push", asset_name, prefix=tmp_prefix)
nose.tools.eq_(exit_code, 0, output)
exit_code, output = self.call("rm", "--remote", asset_name)
nose.tools.eq_(exit_code, 0, output)
@core.skip_disconnected
def test_draw(self):
obj = "user/user/double_triangle/1/double_triangle"
......
Markdown is supported
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