MCPcopy Create free account
hub / github.com/cli/cli / TestPendingOperationDisallowsSSH

Function TestPendingOperationDisallowsSSH

pkg/cmd/codespace/ssh_test.go:18–29  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

16)
17
18func TestPendingOperationDisallowsSSH(t *testing.T) {
19 app := testingSSHApp()
20 selector := &CodespaceSelector{api: app.apiClient, codespaceName: "disabledCodespace"}
21
22 if err := app.SSH(context.Background(), []string{}, sshOptions{selector: selector}); err != nil {
23 if err.Error() != "codespace is disabled while it has a pending operation: Some pending operation" {
24 t.Errorf("expected pending operation error, but got: %v", err)
25 }
26 } else {
27 t.Error("expected pending operation error, but got nothing")
28 }
29}
30
31func TestGenerateAutomaticSSHKeys(t *testing.T) {
32 tests := []struct {

Callers

nothing calls this directly

Calls 4

testingSSHAppFunction · 0.85
SSHMethod · 0.80
ErrorfMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected