MCPcopy Create free account
hub / github.com/devnullvoid/pvetui / TestGetBuildInfo

Function TestGetBuildInfo

internal/version/version_test.go:10–33  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

8)
9
10func TestGetBuildInfo(t *testing.T) {
11 info := GetBuildInfo()
12
13 if info == nil {
14 t.Fatal("GetBuildInfo() returned nil")
15 }
16
17 // Check that required fields are present
18 if info.Version == "" {
19 t.Error("Version should not be empty")
20 }
21
22 if info.GoVersion == "" {
23 t.Error("GoVersion should not be empty")
24 }
25
26 if info.OS == "" {
27 t.Error("OS should not be empty")
28 }
29
30 if info.Arch == "" {
31 t.Error("Arch should not be empty")
32 }
33}
34
35func TestGetVersionString(t *testing.T) {
36 versionStr := GetVersionString()

Callers

nothing calls this directly

Calls 2

GetBuildInfoFunction · 0.85
ErrorMethod · 0.65

Tested by

no test coverage detected