kubectl-gadget: add version test

This commit is contained in:
Morgan Helton 2024-09-02 12:09:16 -05:00
parent a4ffcf5664
commit 7a41a8c71d
No known key found for this signature in database

View File

@ -1,4 +1,4 @@
{ lib, buildGoModule, fetchFromGitHub }:
{ lib, buildGoModule, fetchFromGitHub, kubectl-gadget, testers }:
buildGoModule rec {
pname = "kubectl-gadget";
@ -28,6 +28,12 @@ buildGoModule rec {
subPackages = [ "cmd/kubectl-gadget" ];
passthru.tests.version = testers.testVersion {
package = kubectl-gadget;
command = "kubectl-gadget version || true"; # mask non-zero return code if no kubeconfig present
version = "v${version}";
};
meta = with lib; {
description = "Collection of gadgets for troubleshooting Kubernetes applications using eBPF";
mainProgram = "kubectl-gadget";