diff --git a/src/lib/integration_test_local_engine/docker_node_config.ml b/src/lib/integration_test_local_engine/docker_node_config.ml index 16bba170998..ae51352e7e6 100644 --- a/src/lib/integration_test_local_engine/docker_node_config.ml +++ b/src/lib/integration_test_local_engine/docker_node_config.ml @@ -81,10 +81,19 @@ module Base_node_config = struct let container_libp2p_key_path = container_keys_path ^ "/libp2p_key" - let entrypoint_script = + let magic_config_file commit_id = + Printf.sprintf "/var/lib/coda/config_%s.json" commit_id + + let entrypoint_script commit_id = ( "entrypoint.sh" , {|#!/bin/bash # This file is auto-generated by the local integration test framework. + # + # Removes magic config file which is loaded by default when daemon is starting. + # It can influence final config file, so we need to remove it before starting process + rm -f |} + ^ magic_config_file commit_id + ^ {| # Path to the libp2p_key file LIBP2P_KEY_PATH="|} ^ container_libp2p_key_path diff --git a/src/lib/integration_test_local_engine/mina_docker.ml b/src/lib/integration_test_local_engine/mina_docker.ml index 6b23207352e..dcb6123ce45 100644 --- a/src/lib/integration_test_local_engine/mina_docker.ml +++ b/src/lib/integration_test_local_engine/mina_docker.ml @@ -43,6 +43,7 @@ module Network_config = struct map )] ) ; constants : Test_config.constants ; docker : docker_config + ; commit_id : string } [@@deriving to_yojson] @@ -543,6 +544,7 @@ module Network_config = struct { debug_arg = debug ; genesis_keypairs ; constants + ; commit_id = git_commit ; docker = { docker_swarm_version ; stack_name @@ -730,6 +732,7 @@ module Network_manager = struct context)" ; let entrypoint_filename, entrypoint_script = Docker_node_config.Base_node_config.entrypoint_script + network_config.commit_id in Out_channel.with_file ~fail_if_exists:true (docker_dir ^/ entrypoint_filename) ~f:(fun ch ->