mirror of
https://github.com/ocaml-tracing/ocaml-opentelemetry.git
synced 2026-03-08 03:47:59 -04:00
test: redact current ocaml version from signal-gatherer output
this should make expect tests more robust.
This commit is contained in:
parent
5622d81ae7
commit
979a3ab3c8
2 changed files with 9 additions and 2 deletions
|
|
@ -134,7 +134,14 @@ let run ?(port = default_port) () : _ Lwt.t =
|
|||
Lwt_stream.iter_s
|
||||
(fun s ->
|
||||
let open Lwt.Syntax in
|
||||
let* () = Lwt_io.printl (Format.asprintf "%a" Signal.Pp.pp s) in
|
||||
let printed = Format.asprintf "%a" Signal.Pp.pp s in
|
||||
|
||||
(* redact current ocaml version, for expect tests *)
|
||||
let printed =
|
||||
CCString.replace ~which:`All ~sub:Sys.ocaml_version
|
||||
~by:"ocaml_version" printed
|
||||
in
|
||||
let* () = Lwt_io.printl printed in
|
||||
Lwt_io.flush Lwt_io.stdout)
|
||||
stream;
|
||||
]
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
[{ scope =
|
||||
Some(
|
||||
{ name = "ocaml-otel";
|
||||
version = "<fixed>";
|
||||
version = "%%VERSION_NUM%%";
|
||||
attributes = [];
|
||||
dropped_attributes_count = 0 (* absent *);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue