mirror of
https://github.com/ocaml-tracing/ocaml-opentelemetry.git
synced 2026-03-10 04:35:46 -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
|
Lwt_stream.iter_s
|
||||||
(fun s ->
|
(fun s ->
|
||||||
let open Lwt.Syntax in
|
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)
|
Lwt_io.flush Lwt_io.stdout)
|
||||||
stream;
|
stream;
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
[{ scope =
|
[{ scope =
|
||||||
Some(
|
Some(
|
||||||
{ name = "ocaml-otel";
|
{ name = "ocaml-otel";
|
||||||
version = "<fixed>";
|
version = "%%VERSION_NUM%%";
|
||||||
attributes = [];
|
attributes = [];
|
||||||
dropped_attributes_count = 0 (* absent *);
|
dropped_attributes_count = 0 (* absent *);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue