def setUp(self): try: self.network = run_4_nodes("exonum-cryptocurrency-advanced") wait_network_to_start(self.network) instances = {"crypto": {"artifact": "cryptocurrency"}} cryptocurrency_advanced_config_dict = generate_config( self.network, instances=instances) cryptocurrency_advanced_config = Configuration( cryptocurrency_advanced_config_dict) with Launcher(cryptocurrency_advanced_config) as launcher: explorer = launcher.explorer() launcher.deploy_all() launcher.wait_for_deploy() launcher.start_all() launcher.wait_for_start() for artifact in launcher.launch_state.completed_deployments(): deployed = explorer.check_deployed(artifact) self.assertEqual(deployed, True) # Launcher checks that config is applied, no need to check it again. except Exception as error: # If exception is raise in `setUp`, `tearDown` won't be called, # thus here we ensure that network is stopped and temporary data is removed. # Then we re-raise exception, since the test should fail. self.network.stop() self.network.deinitialize() raise error
def setUp(self): self.network = run_4_nodes("exonum-cryptocurrency-advanced") time.sleep(3) cryptocurrency_advanced_config_dict = { "networks": launcher_networks(self.network), "deadline_height": 10000, "artifacts": { "cryptocurrency": { "runtime": "rust", "name": "exonum-cryptocurrency-advanced:0.13.0-rc.2" } }, "instances": { "crypto": { "artifact": "cryptocurrency" } }, } cryptocurrency_advanced_config = Configuration( cryptocurrency_advanced_config_dict) with Launcher(cryptocurrency_advanced_config) as launcher: explorer = launcher.explorer() launcher.deploy_all() launcher.wait_for_deploy() launcher.start_all() launcher.wait_for_start() for artifact in launcher.launch_state.completed_deployments(): deployed = explorer.check_deployed(artifact) self.assertEqual(deployed, True) for instance in launcher.launch_state.completed_initializations(): explorer.wait_for_start(instance)
def setUp(self): self.network = run_4_nodes("exonum-cryptocurrency-advanced") self.addCleanup(self._tear_down, False) wait_network_to_start(self.network) instances = {"crypto": {"artifact": "cryptocurrency"}} cryptocurrency_advanced_config_dict = generate_config( self.network, instances=instances) cryptocurrency_advanced_config = Configuration( cryptocurrency_advanced_config_dict) with Launcher(cryptocurrency_advanced_config) as launcher: explorer = launcher.explorer() for artifact in launcher.launch_state.completed_deployments(): deployed = explorer.is_deployed(artifact) self.assertEqual(deployed, True)
def setUp(self): try: self.network = run_4_nodes("vega-cryptocurrency-advanced") wait_network_to_start(self.network) cryptocurrency_advanced_config_dict = { "networks": launcher_networks(self.network), "deadline_height": 10000, "artifacts": { "cryptocurrency": { "runtime": "rust", "name": "vega-cryptocurrency-advanced", "version": "0.1.0", } }, "instances": {"crypto": {"artifact": "cryptocurrency", "action": "start"}}, } cryptocurrency_advanced_config = Configuration( cryptocurrency_advanced_config_dict ) with Launcher(cryptocurrency_advanced_config) as launcher: explorer = launcher.explorer() launcher.deploy_all() launcher.wait_for_deploy() launcher.start_all() launcher.wait_for_start() for artifact in launcher.launch_state.completed_deployments(): deployed = explorer.check_deployed(artifact) self.assertEqual(deployed, True) # Launcher checks that config is applied, no need to check it again. except Exception as error: # If exception is raise in `setUp`, `tearDown` won't be called, # thus here we ensure that network is stopped and temporary data is removed. # Then we re-raise exception, since the test should fail. self.network.stop() self.network.deinitialize() raise error
def setUp(self): self.network = run_4_nodes("exonum-cryptocurrency-advanced") wait_network_to_start(self.network)
def setUp(self): self.network = run_4_nodes("exonum-cryptocurrency-advanced") time.sleep(3)
def setUp(self): self.network = run_4_nodes("cryptocurrency-migration") self.addCleanup(self._tear_down, False) wait_network_to_start(self.network)
def setUp(self): self.network = run_4_nodes("cryptocurrency-migration") wait_network_to_start(self.network)
def setUp(self): self.network = run_4_nodes("exonum-cryptocurrency-advanced") self.addCleanup(self._tear_down, False) wait_network_to_start(self.network)