MCPcopy Create free account
hub / github.com/Thunder-Compute/thunder-cli / TestRunStatus

Function TestRunStatus

cmd/status_test.go:71–79  ·  view source on GitHub ↗

func TestStatusCommandValidation(t *testing.T) { t.Skip("Skipping status command validation test - Args function issues") } TestRunStatus verifies that the RunStatus function handles non-interactive mode correctly: it either succeeds (if authenticated) or returns an auth error (if not). No TTY erro

(t *testing.T)

Source from the content-addressed store, hash-verified

69// non-interactive mode correctly: it either succeeds (if authenticated)
70// or returns an auth error (if not). No TTY error should occur.
71func TestRunStatus(t *testing.T) {
72 err := RunStatus()
73 if err != nil {
74 errStr := err.Error()
75 isAuthError := strings.Contains(errStr, "not authenticated") || strings.Contains(errStr, "authentication")
76 assert.True(t, isAuthError, "Expected auth error or nil, got: %v", err)
77 }
78 // nil is acceptable — means the status was fetched and printed in non-interactive mode
79}

Callers

nothing calls this directly

Calls 2

RunStatusFunction · 0.70
ErrorMethod · 0.45

Tested by

no test coverage detected