otel-cli: 0.4.4 -> 0.4.5

see [otel-cli release notes](https://github.com/equinix-labs/otel-cli/releases/tag/v0.4.5)
This commit is contained in:
emattiza 2024-04-02 01:29:39 +00:00
parent ebde306504
commit 260cc94772
2 changed files with 27 additions and 4 deletions

View File

@ -2,24 +2,26 @@
buildGoModule rec {
pname = "otel-cli";
version = "0.4.4";
version = "0.4.5";
src = fetchFromGitHub {
owner = "equinix-labs";
repo = pname;
rev = "v${version}";
hash = "sha256-XVhnDtt2FhYgfGWDPFkneZTboeHGaIbiF5YdHoqB8N8=";
hash = "sha256-JYi9CbP4mUhX0zNjhi6QlBzLKcj2zdPwlyBSIYKp6vk=";
};
vendorHash = "sha256-HwbEqWtOqiTe5Z/MtMAs63Lzvll/vgmbCpMTREXgtXA=";
vendorHash = "sha256-fWQz7ZrU8gulhpOHSN8Prn4EMC0KXy942FZD/PMsLxc=";
preCheck = ''
ln -s $GOPATH/bin/otel-cli .
'' + lib.optionalString (!stdenv.isDarwin) ''
substituteInPlace main_test.go \
--replace 'const minimumPath = `/bin:/usr/bin`' 'const minimumPath = `${lib.makeBinPath [ getent coreutils ]}`'
--replace-fail 'const minimumPath = `/bin:/usr/bin`' 'const minimumPath = `${lib.makeBinPath [ getent coreutils ]}`'
'';
patches = [ ./patches/bin-echo-patch.patch ];
passthru.updateScript = nix-update-script {};
meta = with lib; {

View File

@ -0,0 +1,21 @@
diff --git a/data_for_test.go b/data_for_test.go
index c0b8980..691e270 100644
--- a/data_for_test.go
+++ b/data_for_test.go
@@ -555,14 +555,14 @@ var suites = []FixtureSuite{
"--endpoint", "{{endpoint}}",
"--verbose", "--fail",
"--attrs", "zy=ab", // ensure CLI args still propagate
- "--", "/bin/echo", "a", "z",
+ "--", "echo", "a", "z",
},
},
Expect: Results{
SpanCount: 1,
CliOutput: "a z\n",
SpanData: map[string]string{
- "attributes": "/^process.command=/bin/echo,process.command_args=/bin/echo,a,z,process.owner=\\w+,process.parent_pid=\\d+,process.pid=\\d+,zy=ab/",
+ "attributes": "/^process.command=echo,process.command_args=echo,a,z,process.owner=\\w+,process.parent_pid=\\d+,process.pid=\\d+,zy=ab/",
},
},
},