MCPcopy Index your code
hub / github.com/cli/cli / TestPendingOperationDisallowsSSH

Function TestPendingOperationDisallowsSSH

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

Source from the content-addressed store, hash-verified

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