test(version): clarify test binary build info

Signed-off-by: Yugo Kobayashi <kobdotsh@gmail.com>
pull/32469/head
Yugo Kobayashi 2 months ago
parent 462c6a70e6
commit c6791474e1

@ -27,8 +27,9 @@ import (
) )
func TestK8sClientGoModVersion(t *testing.T) { func TestK8sClientGoModVersion(t *testing.T) {
// Unfortunately, test builds don't include debug info / module info // Generated test binaries omit dependency modules from embedded build info,
// So we expect "K8sIOClientGoModVersion" to return error // even when the package under test imports them. The built-binary test below
// covers the normal executable path where dependency modules are present.
_, err := K8sIOClientGoModVersion() _, err := K8sIOClientGoModVersion()
require.ErrorContains(t, err, "k8s.io/client-go not found in build info") require.ErrorContains(t, err, "k8s.io/client-go not found in build info")
} }

Loading…
Cancel
Save