(t *testing.T)
| 15 | ) |
| 16 | |
| 17 | func 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 | |
| 30 | func TestGenerateAutomaticSSHKeys(t *testing.T) { |
| 31 | tests := []struct { |
nothing calls this directly
no test coverage detected