Skip to content

Commit d818d42

Browse files
committed
Update client_test.go
1 parent 4bf0492 commit d818d42

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

client_test.go

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -109,15 +109,10 @@ func isKnoxDaemonRunning() bool {
109109
}
110110

111111
cmd := exec.Command("systemctl", "is-active", "--quiet", "knox")
112-
113112
var out bytes.Buffer
114113
cmd.Stdout = &out
115114
err := cmd.Run()
116-
if err == nil {
117-
return true
118-
}
119-
120-
return false
115+
return err == nil
121116
}
122117

123118
func TestGetKey(t *testing.T) {
@@ -706,9 +701,6 @@ func TestGetInvalidKeys(t *testing.T) {
706701
}
707702

708703
func TestNewFileClient(t *testing.T) {
709-
// This is an integration test that executes the knox binary as a subprocess.
710-
// It requires proper knox daemon infrastructure (e.g., /var/lib/knox/.registered)
711-
// which is only available on Linux systems with knox properly installed.
712704
if runtime.GOOS != "linux" {
713705
t.Skip("Test requires Linux with knox daemon infrastructure")
714706
}

0 commit comments

Comments
 (0)