From 0342fd6de6d571ee21652e8595791fca5b4e5937 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Thir=C3=A9?= Date: Tue, 7 Jan 2025 11:56:30 +0100 Subject: [PATCH] Tezt/Cloud: Move the configuration into its own datatype --- tezt/lib_cloud/agent.ml | 97 +++++++++++++++++++++----------- tezt/lib_cloud/agent.mli | 35 ++++++++++++ tezt/lib_cloud/cli.ml | 4 +- tezt/lib_cloud/cloud.ml | 6 +- tezt/lib_cloud/cloud.mli | 4 +- tezt/lib_cloud/configuration.ml | 36 ------------ tezt/lib_cloud/configuration.mli | 23 -------- tezt/lib_cloud/deployement.ml | 12 ++-- tezt/lib_cloud/deployement.mli | 2 +- tezt/lib_cloud/env.ml | 18 ------ tezt/lib_cloud/env.mli | 9 --- tezt/lib_cloud/jobs.ml | 4 +- tezt/lib_cloud/jobs.mli | 5 +- tezt/lib_cloud/proxy.ml | 4 +- tezt/lib_cloud/tezt_cloud.ml | 5 -- tezt/lib_cloud/tezt_cloud.mli | 35 +----------- tezt/lib_cloud/types.ml | 31 ++++++++++ tezt/lib_cloud/types.mli | 31 ++++++++++ tezt/lib_cloud/web.ml | 4 +- tezt/tests/cloud/basic.ml | 4 +- tezt/tests/cloud/dal.ml | 12 ++-- 21 files changed, 196 insertions(+), 185 deletions(-) delete mode 100644 tezt/lib_cloud/configuration.ml delete mode 100644 tezt/lib_cloud/configuration.mli diff --git a/tezt/lib_cloud/agent.ml b/tezt/lib_cloud/agent.ml index cbd88ccf79db..72d63f1d4392 100644 --- a/tezt/lib_cloud/agent.ml +++ b/tezt/lib_cloud/agent.ml @@ -7,6 +7,69 @@ open Types +module Configuration = struct + include Types.Agent_configuration + + let docker_image_encoding = + let open Data_encoding in + union + [ + case + ~title:"gcp" + Json_only + string + (function Gcp {alias} -> Some alias | _ -> None) + (fun alias -> Gcp {alias}); + case + ~title:"octez_release" + Json_only + string + (function Octez_release {tag} -> Some tag | _ -> None) + (fun tag -> Octez_release {tag}); + ] + + let encoding = + let open Data_encoding in + let open Agent_configuration in + conv + (fun {machine_type; binaries_path; docker_image; max_run_duration; os} -> + (machine_type, binaries_path, docker_image, max_run_duration, os)) + (fun (machine_type, binaries_path, docker_image, max_run_duration, os) -> + make ~os ~binaries_path ~max_run_duration ~machine_type ~docker_image ()) + (obj5 + (req "machine_type" string) + (req "binaries_path" string) + (req "docker_image" docker_image_encoding) + (req "max_run_duration" (option int31)) + (req "os" Os.encoding)) + + let uri_of_docker_image docker_image = + match (docker_image, Env.mode) with + | Types.Agent_configuration.Gcp {alias}, (`Cloud | `Host | `Orchestrator) -> + let* registry_uri = Env.registry_uri () in + Lwt.return (Format.asprintf "%s/%s" registry_uri alias) + | Gcp {alias}, `Localhost -> Lwt.return alias + | Octez_release _, (`Cloud | `Host | `Orchestrator) -> + let* registry_uri = Env.registry_uri () in + Lwt.return (Format.asprintf "%s/octez" registry_uri) + | Octez_release _, `Localhost -> Lwt.return "octez" + + let make ?os ?binaries_path ?max_run_duration ?machine_type ?docker_image () = + let os = Option.value ~default:Cli.os os in + let binaries_path = Option.value ~default:Cli.binaries_path binaries_path in + let max_run_duration = + let default = + if Cli.no_max_run_duration then None else Some Cli.max_run_duration + in + Option.value ~default max_run_duration + in + let machine_type = Option.value ~default:Cli.machine_type machine_type in + let docker_image = + Option.value ~default:(Gcp {alias = Env.dockerfile_alias}) docker_image + in + make ~os ~binaries_path ~max_run_duration ~machine_type ~docker_image () +end + type t = { (* The name initially is the same as [vm_name] and can be changed dynamically by the scenario. *) mutable name : string; @@ -22,38 +85,6 @@ let ssh_id () = Env.ssh_private_key_filename () (* Encodings *) -let docker_image_encoding = - let open Data_encoding in - union - [ - case - ~title:"gcp" - Json_only - string - (function Env.Gcp {alias} -> Some alias | _ -> None) - (fun alias -> Gcp {alias}); - case - ~title:"octez_release" - Json_only - string - (function Env.Octez_release {tag} -> Some tag | _ -> None) - (fun tag -> Octez_release {tag}); - ] - -let configuration_encoding = - let open Data_encoding in - let open Configuration in - conv - (fun {machine_type; binaries_path; docker_image; max_run_duration = _; os} -> - (machine_type, binaries_path, docker_image, os)) - (fun (machine_type, binaries_path, docker_image, os) -> - make ~os ~machine_type ~binaries_path ~docker_image ()) - (obj4 - (req "machine_type" string) - (req "binaries_path" string) - (req "docker_image" docker_image_encoding) - (req "os" Os.encoding)) - let encoding = let open Data_encoding in conv @@ -89,7 +120,7 @@ let encoding = (req "zone" (option string)) (req "point" (option (tup2 string int31))) (req "next_available_port" int31) - (req "configuration" configuration_encoding)) + (req "configuration" Configuration.encoding)) (* Getters *) diff --git a/tezt/lib_cloud/agent.mli b/tezt/lib_cloud/agent.mli index a5debf3a986c..bec72414cf15 100644 --- a/tezt/lib_cloud/agent.mli +++ b/tezt/lib_cloud/agent.mli @@ -10,6 +10,41 @@ (** Datatype for an agent *) type t +module Configuration : sig + type docker_image = + | Gcp of {alias : string} + | Octez_release of {tag : string} + + type t = private { + machine_type : string; + docker_image : docker_image; + max_run_duration : int option; + binaries_path : string; + os : Types.Os.t; + } + + val uri_of_docker_image : docker_image -> string Lwt.t + + (** [make ?machine_type ()] is a smart-constructor to make a VM + configuration. + + Default value for [max_run_duration] is [7200]. + + Default value for [machine_type] is [n1-standard-2]. + + Default value for [docker_image] is [Custom {tezt_cloud}] where [tezt_cloud] + is the value provided by the environement variable [$TEZT_CLOUD]. + *) + val make : + ?os:Types.Os.t -> + ?binaries_path:string -> + ?max_run_duration:int option -> + ?machine_type:string -> + ?docker_image:docker_image -> + unit -> + t +end + (** [make ?zone ?ssh_id ?point ~configuration ~next_available_port ~name ()] creates an [agent] from the given parameters. [~next_available_port] should always provide an available port or raise [Not_found] otherwise. diff --git a/tezt/lib_cloud/cli.ml b/tezt/lib_cloud/cli.ml index 019a0b45b8fd..52e8d1ee53e9 100644 --- a/tezt/lib_cloud/cli.ml +++ b/tezt/lib_cloud/cli.ml @@ -168,7 +168,7 @@ let machine_type = ~description: "Can specify a GCP machine type (see \ https://cloud.google.com/compute/docs/general-purpose-machines#c3d_series)" - "n1-standard-2" + Types.Agent_configuration.default_gcp_machine_type let dockerfile_alias = Clap.optional_string @@ -307,4 +307,4 @@ let binaries_path = ~description: "Where to find binaries in the docker image by default (default is: \ '/tmp/tezt-runners')" - (Filename.get_temp_dir_name () // "tezt-runners") + Types.Agent_configuration.default_gcp_binaries_path diff --git a/tezt/lib_cloud/cloud.ml b/tezt/lib_cloud/cloud.ml index 2d877580497c..6b43f89228e4 100644 --- a/tezt/lib_cloud/cloud.ml +++ b/tezt/lib_cloud/cloud.ml @@ -515,7 +515,7 @@ let register ?proxy_files ?proxy_args ?vms ~__FILE__ ~title ~tags ?seed ?alerts | None -> let default_agent = Agent.make - ~configuration:(Configuration.make ()) + ~configuration:(Agent.Configuration.make ()) ~next_available_port: (let cpt = ref 30_000 in fun () -> @@ -597,7 +597,7 @@ let agents t = | [] -> let default_agent = Agent.make - ~configuration:(Configuration.make ()) + ~configuration:(Agent.Configuration.make ()) ~next_available_port: (let cpt = ref 30_000 in fun () -> @@ -610,8 +610,6 @@ let agents t = | agents -> agents) | `Host | `Cloud | `Localhost -> t.agents -let get_configuration = Agent.configuration - let write_website t = match t.website with | None -> Lwt.return_unit diff --git a/tezt/lib_cloud/cloud.mli b/tezt/lib_cloud/cloud.mli index c71cdcba94cb..234cadb9236f 100644 --- a/tezt/lib_cloud/cloud.mli +++ b/tezt/lib_cloud/cloud.mli @@ -13,7 +13,7 @@ type t val register : ?proxy_files:string list -> ?proxy_args:string list -> - ?vms:Configuration.t list -> + ?vms:Agent.Configuration.t list -> __FILE__:string -> title:string -> tags:string list -> @@ -24,8 +24,6 @@ val register : val agents : t -> Agent.t list -val get_configuration : Agent.t -> Configuration.t - val push_metric : t -> ?help:string -> diff --git a/tezt/lib_cloud/configuration.ml b/tezt/lib_cloud/configuration.ml deleted file mode 100644 index 962482edf70a..000000000000 --- a/tezt/lib_cloud/configuration.ml +++ /dev/null @@ -1,36 +0,0 @@ -(*****************************************************************************) -(* *) -(* SPDX-License-Identifier: MIT *) -(* SPDX-FileCopyrightText: 2024 Nomadic Labs *) -(* *) -(*****************************************************************************) - -include Types - -type t = { - machine_type : string; - docker_image : Env.docker_image; - max_run_duration : int option; - binaries_path : string; - os : Os.t; -} - -let make ?os ?binaries_path ?max_run_duration ?machine_type ?docker_image () = - let os = Option.value ~default:Os.default os in - let docker_image = Option.value ~default:Env.docker_image docker_image in - let machine_type = Option.value ~default:Env.machine_type machine_type in - let default_binaries_path = - match docker_image with - | Env.Gcp _ -> Env.binaries_path - | Octez_release _ -> "/usr/local/bin" - in - let binaries_path = - Option.value ~default:default_binaries_path binaries_path - in - let max_run_duration = - match max_run_duration with - | None -> - if Env.no_max_run_duration then None else Some Env.max_run_duration - | Some max_run_duration -> Some max_run_duration - in - {os; machine_type; docker_image; max_run_duration; binaries_path} diff --git a/tezt/lib_cloud/configuration.mli b/tezt/lib_cloud/configuration.mli deleted file mode 100644 index 2c1699c1be28..000000000000 --- a/tezt/lib_cloud/configuration.mli +++ /dev/null @@ -1,23 +0,0 @@ -(*****************************************************************************) -(* *) -(* SPDX-License-Identifier: MIT *) -(* SPDX-FileCopyrightText: 2024 Nomadic Labs *) -(* *) -(*****************************************************************************) - -type t = private { - machine_type : string; - docker_image : Env.docker_image; - max_run_duration : int option; - binaries_path : string; - os : Types.Os.t; -} - -val make : - ?os:Types.Os.t -> - ?binaries_path:string -> - ?max_run_duration:int -> - ?machine_type:string -> - ?docker_image:Env.docker_image -> - unit -> - t diff --git a/tezt/lib_cloud/deployement.ml b/tezt/lib_cloud/deployement.ml index a7803ef720da..6aca5a129fe5 100644 --- a/tezt/lib_cloud/deployement.ml +++ b/tezt/lib_cloud/deployement.ml @@ -49,7 +49,8 @@ module Remote = struct let workspace_deploy ~workspace_name ~number_of_vms ~configuration = let* () = Terraform.VM.Workspace.select workspace_name in let* docker_image = - Env.uri_of_docker_image configuration.Configuration.docker_image + Agent.Configuration.uri_of_docker_image + configuration.Agent.Configuration.docker_image in let machine_type = configuration.machine_type in let max_run_duration = configuration.max_run_duration in @@ -130,7 +131,7 @@ module Remote = struct let deploy_proxy () = let workspace_name = Format.asprintf "%s-proxy" Env.tezt_cloud in - let configuration = Configuration.make () in + let configuration = Agent.Configuration.make () in let tezt_cloud = Env.tezt_cloud in let* () = Terraform.VM.Workspace.init ~tezt_cloud [workspace_name] in let* agents = @@ -192,7 +193,7 @@ module Remote = struct |> Lwt_list.map_s (fun (workspace_name, (configuration, number_of_vms)) -> let* () = Jobs.docker_build - ~docker_image:configuration.Configuration.docker_image + ~docker_image:configuration.Agent.Configuration.docker_image ~push:Env.push_docker () in @@ -282,12 +283,13 @@ module Localhost = struct let publish_ports = (start, stop, start, stop) in let* () = Jobs.docker_build - ~docker_image:configuration.Configuration.docker_image + ~docker_image:configuration.Agent.Configuration.docker_image ~push:false () in let* docker_image = - Env.uri_of_docker_image configuration.docker_image + Agent.Configuration.uri_of_docker_image + configuration.docker_image in (* FIXME: The docker host networking feature is not supported on macOS. We want to remove it in the future for all distributions, but it diff --git a/tezt/lib_cloud/deployement.mli b/tezt/lib_cloud/deployement.mli index cdafe7532832..1222eff796aa 100644 --- a/tezt/lib_cloud/deployement.mli +++ b/tezt/lib_cloud/deployement.mli @@ -13,7 +13,7 @@ type t be opened and [ports_per_vm] specifies the number of opened ports from the [base_port]. The promise returned by this function is fulfilled when all the vms are deployed. Consequently, it can take some time. *) -val deploy : configurations:Configuration.t list -> t Lwt.t +val deploy : configurations:Agent.Configuration.t list -> t Lwt.t (** [get_agents t] returns the list of agents deployed. *) val agents : t -> Agent.t list diff --git a/tezt/lib_cloud/env.ml b/tezt/lib_cloud/env.ml index cdd4cd83e413..82a15779ca3c 100644 --- a/tezt/lib_cloud/env.ml +++ b/tezt/lib_cloud/env.ml @@ -5,8 +5,6 @@ (* *) (*****************************************************************************) -type docker_image = Gcp of {alias : string} | Octez_release of {tag : string} - let tezt_cloud = match Cli.tezt_cloud with | Some tezt_cloud -> tezt_cloud @@ -68,11 +66,6 @@ let alert_handlers = Cli.alert_handlers let dockerfile_alias = Option.value ~default:tezt_cloud Cli.dockerfile_alias -let docker_image = - (* In localhost mode, we don't want to interact with GCP. The image is taken - locally. *) - Gcp {alias = dockerfile_alias} - let dockerfile = Path.dockerfile ~alias:dockerfile_alias let docker_registry = Format.asprintf "%s-docker-registry" tezt_cloud @@ -135,17 +128,6 @@ let registry_uri () = let uri = Format.asprintf "%s/%s/%s" hostname project_id docker_registry in Lwt.return uri -let uri_of_docker_image docker_image = - match (docker_image, mode) with - | Gcp {alias}, (`Cloud | `Host | `Orchestrator) -> - let* registry_uri = registry_uri () in - Lwt.return (Format.asprintf "%s/%s" registry_uri alias) - | Gcp {alias}, `Localhost -> Lwt.return alias - | Octez_release _, (`Cloud | `Host | `Orchestrator) -> - let* registry_uri = registry_uri () in - Lwt.return (Format.asprintf "%s/octez" registry_uri) - | Octez_release _, `Localhost -> Lwt.return "octez" - let rec wait_process ?(sleep = 4) ~is_ready ~run () = let process = run () in let* status = Process.wait process in diff --git a/tezt/lib_cloud/env.mli b/tezt/lib_cloud/env.mli index da8cc4273723..9e4eb95ad410 100644 --- a/tezt/lib_cloud/env.mli +++ b/tezt/lib_cloud/env.mli @@ -8,8 +8,6 @@ (* This module aims to encapsulate static values from the CLI and several functions that are used by the library. *) -type docker_image = Gcp of {alias : string} | Octez_release of {tag : string} - (** Equivalent to [Cli.tezt_cloud], but if not present, checks if `TEZT_CLOUD` is provided. *) val tezt_cloud : string @@ -96,9 +94,6 @@ val alert_handlers : string list (** If [Cli.dockerfile_alias] is provided, use it, otherwise default to [tezt_cloud]. *) val dockerfile_alias : string -(** Use [tezt_cloud] image if [Cli.dockerfile_alias] is not provided, otherwise use it. *) -val docker_image : docker_image - (** Docker path associated to [dockerfile_alias]. *) val dockerfile : string @@ -137,10 +132,6 @@ val zone : unit -> string Lwt.t (** [registry_uri ()] constructs the URI for the Docker registry. *) val registry_uri : unit -> string Lwt.t -(** [uri_of_docker_image docker_image] generates the URI for the Docker image based on - [docker_image]'s type. *) -val uri_of_docker_image : docker_image -> string Lwt.t - (** [wait_process ?sleep ~is_ready ~run ()] recursively waits for [~run] process to be ready. When the process is successful, but no [~is_ready], it loops after [?sleep] seconds. If it is ready, it returns the read output. If it fails, this gets logged. *) diff --git a/tezt/lib_cloud/jobs.ml b/tezt/lib_cloud/jobs.ml index 6d4978bd4015..24878ee8f93e 100644 --- a/tezt/lib_cloud/jobs.ml +++ b/tezt/lib_cloud/jobs.ml @@ -12,7 +12,9 @@ module Cli = C let docker_build = let cache = Hashtbl.create 11 in - fun ?(docker_image = Env.Gcp {alias = Env.dockerfile_alias}) ~push () -> + fun ?(docker_image = Agent.Configuration.Gcp {alias = Env.dockerfile_alias}) + ~push + () -> if Hashtbl.mem cache docker_image then ( Log.info "Docker image is already built. Nothing to do" ; Lwt.return_unit) diff --git a/tezt/lib_cloud/jobs.mli b/tezt/lib_cloud/jobs.mli index 8592b4ef52d3..58934d7008b9 100644 --- a/tezt/lib_cloud/jobs.mli +++ b/tezt/lib_cloud/jobs.mli @@ -10,7 +10,10 @@ val deploy_docker_registry : unit -> unit Lwt.t (* A job for building and pushing docker images on the registry. *) val docker_build : - ?docker_image:Env.docker_image -> push:bool -> unit -> unit Lwt.t + ?docker_image:Agent.Configuration.docker_image -> + push:bool -> + unit -> + unit Lwt.t (* The docker containers are killed and restarted from scratch. *) val clean_up_vms : unit -> unit Lwt.t diff --git a/tezt/lib_cloud/proxy.ml b/tezt/lib_cloud/proxy.ml index d274675e034c..ecfe8ccd8844 100644 --- a/tezt/lib_cloud/proxy.ml +++ b/tezt/lib_cloud/proxy.ml @@ -99,7 +99,9 @@ let copy_files proxy_agent ~scenario_files ~proxy_deployement = This requires the docker image to contain all the binaries used by the proxy agent. *) - let Configuration.{binaries_path; _} = Agent.configuration proxy_agent in + let Agent.Configuration.{binaries_path; _} = + Agent.configuration proxy_agent + in let* output = Process.spawn ?runner:(Agent.runner proxy_agent) "ls" [binaries_path] |> Process.check_and_read_stdout diff --git a/tezt/lib_cloud/tezt_cloud.ml b/tezt/lib_cloud/tezt_cloud.ml index fb19265ab789..d6cb0d79d63c 100644 --- a/tezt/lib_cloud/tezt_cloud.ml +++ b/tezt/lib_cloud/tezt_cloud.ml @@ -33,11 +33,6 @@ module Alert = struct Alert_manager.alert ?route alert end -module Configuration = struct - include Env - include Configuration -end - module Cloud = Cloud let register_docker_push ~tags = diff --git a/tezt/lib_cloud/tezt_cloud.mli b/tezt/lib_cloud/tezt_cloud.mli index 5975aabef9ec..4de0dee97442 100644 --- a/tezt/lib_cloud/tezt_cloud.mli +++ b/tezt/lib_cloud/tezt_cloud.mli @@ -8,39 +8,6 @@ module Agent = Agent module Types = Types -module Configuration : sig - type docker_image = - | Gcp of {alias : string} - | Octez_release of {tag : string} - - type t = private { - machine_type : string; - docker_image : docker_image; - max_run_duration : int option; - binaries_path : string; - os : Types.Os.t; - } - - (** [make ?machine_type ()] is a smart-constructor to make a VM - configuration. - - Default value for [max_run_duration] is [7200]. - - Default value for [machine_type] is [n1-standard-2]. - - Default value for [docker_image] is [Custom {tezt_cloud}] where [tezt_cloud] - is the value provided by the environement variable [$TEZT_CLOUD]. - *) - val make : - ?os:Types.Os.t -> - ?binaries_path:string -> - ?max_run_duration:int -> - ?machine_type:string -> - ?docker_image:docker_image -> - unit -> - t -end - module Alert : sig (* A receiver of an alert. *) type receiver @@ -124,7 +91,7 @@ module Cloud : sig val register : ?proxy_files:string list -> ?proxy_args:string list -> - ?vms:Configuration.t list -> + ?vms:Agent.Configuration.t list -> __FILE__:string -> title:string -> tags:string list -> diff --git a/tezt/lib_cloud/types.ml b/tezt/lib_cloud/types.ml index f1f5a75fc0b4..3a8aa8156067 100644 --- a/tezt/lib_cloud/types.ml +++ b/tezt/lib_cloud/types.ml @@ -26,3 +26,34 @@ module Os = struct let open Data_encoding in conv to_string of_string_exn string end + +module Agent_configuration = struct + type docker_image = + | Gcp of {alias : string} + | Octez_release of {tag : string} + + type t = { + machine_type : string; + docker_image : docker_image; + max_run_duration : int option; + binaries_path : string; + os : Os.t; + } + + let default_gcp_machine_type = "n1-standard-2" + + let default_docker_image ~tezt_cloud = Gcp {alias = tezt_cloud} + + let default_max_run_duration = Some 7200 + + let default_gcp_binaries_path = + Filename.get_temp_dir_name () // "tezt-runners" + + let make ~os ~binaries_path ~max_run_duration ~machine_type ~docker_image () = + let binaries_path = + match docker_image with + | Gcp _ -> binaries_path + | Octez_release _ -> "/usr/local/bin" + in + {os; machine_type; docker_image; max_run_duration; binaries_path} +end diff --git a/tezt/lib_cloud/types.mli b/tezt/lib_cloud/types.mli index c38e10e5549f..e1bb5e0ecb6d 100644 --- a/tezt/lib_cloud/types.mli +++ b/tezt/lib_cloud/types.mli @@ -21,3 +21,34 @@ module Os : sig val encoding : t Data_encoding.encoding end + +module Agent_configuration : sig + type docker_image = + | Gcp of {alias : string} + | Octez_release of {tag : string} + + val default_docker_image : tezt_cloud:string -> docker_image + + type t = private { + machine_type : string; + docker_image : docker_image; + max_run_duration : int option; + binaries_path : string; + os : Os.t; + } + + val default_gcp_machine_type : string + + val default_gcp_binaries_path : string + + val default_max_run_duration : int option + + val make : + os:Os.t -> + binaries_path:string -> + max_run_duration:int option -> + machine_type:string -> + docker_image:docker_image -> + unit -> + t +end diff --git a/tezt/lib_cloud/web.ml b/tezt/lib_cloud/web.ml index 8ddfbcc89766..8dc65b2e837e 100644 --- a/tezt/lib_cloud/web.ml +++ b/tezt/lib_cloud/web.ml @@ -19,7 +19,7 @@ type t = { } let pp_docker_image fmt = function - | Env.Gcp {alias} -> Format.fprintf fmt "%s" alias + | Agent.Configuration.Gcp {alias} -> Format.fprintf fmt "%s" alias | Octez_release {tag} -> Format.fprintf fmt "Octez %s release" tag let domain agents = @@ -54,7 +54,7 @@ let string_vm_command agent = let agent_jingo_template agent = let open Jingoo.Jg_types in - let Configuration. + let Agent.Configuration. {machine_type; docker_image; max_run_duration; binaries_path; os} = Agent.configuration agent in diff --git a/tezt/tests/cloud/basic.ml b/tezt/tests/cloud/basic.ml index 9b8325df3eb4..b0832bbefabd 100644 --- a/tezt/tests/cloud/basic.ml +++ b/tezt/tests/cloud/basic.ml @@ -7,7 +7,7 @@ let simple () = Cloud.register - ~vms:[Configuration.make (); Configuration.make ()] + ~vms:[Agent.Configuration.make (); Agent.Configuration.make ()] ~__FILE__ ~tags:["simple"; "health"; Tag.cloud] ~title:"Simple health check to check local configuration" @@ -37,7 +37,7 @@ let simple () = let run_vm () = Cloud.register - ~vms:[Configuration.make ()] + ~vms:[Agent.Configuration.make ()] ~__FILE__ ~tags:["run"; "vm"; Tag.cloud] ~title:"Run a new VM" diff --git a/tezt/tests/cloud/dal.ml b/tezt/tests/cloud/dal.ml index 97e30fbd9253..bc685c56bee0 100644 --- a/tezt/tests/cloud/dal.ml +++ b/tezt/tests/cloud/dal.ml @@ -2584,9 +2584,11 @@ let benchmark () = |> List.concat in let docker_image = - Option.map (fun tag -> Configuration.Octez_release {tag}) Cli.octez_release + Option.map + (fun tag -> Agent.Configuration.Octez_release {tag}) + Cli.octez_release in - let default_vm_configuration = Configuration.make ?docker_image () in + let default_vm_configuration = Agent.Configuration.make ?docker_image () in let vms = vms |> List.map (function @@ -2597,13 +2599,13 @@ let benchmark () = | Some list -> ( try let machine_type = List.nth list i in - Configuration.make ?docker_image ~machine_type () + Agent.Configuration.make ?docker_image ~machine_type () with _ -> default_vm_configuration)) | `Producer | `Observer | `Observer_pkh | `Etherlink_dal_node -> ( match configuration.producer_machine_type with - | None -> Configuration.make ?docker_image () + | None -> Agent.Configuration.make ?docker_image () | Some machine_type -> - Configuration.make ?docker_image ~machine_type ()) + Agent.Configuration.make ?docker_image ~machine_type ()) | `Etherlink_operator -> default_vm_configuration | `Etherlink_producer _ -> default_vm_configuration | `Reverse_proxy -> default_vm_configuration) -- GitLab