(t *testing.T)
| 103 | } |
| 104 | |
| 105 | func TestRemoveRunner(t *testing.T) { |
| 106 | tests := []struct { |
| 107 | enterprise string |
| 108 | org string |
| 109 | repo string |
| 110 | err bool |
| 111 | }{ |
| 112 | {enterprise: "", org: "", repo: "test/valid", err: false}, |
| 113 | {enterprise: "", org: "", repo: "test/invalid", err: true}, |
| 114 | {enterprise: "", org: "", repo: "test/error", err: true}, |
| 115 | {enterprise: "", org: "test", repo: "", err: false}, |
| 116 | {enterprise: "", org: "invalid", repo: "", err: true}, |
| 117 | {enterprise: "", org: "error", repo: "", err: true}, |
| 118 | {enterprise: "test", org: "", repo: "", err: false}, |
| 119 | {enterprise: "invalid", org: "", repo: "", err: true}, |
| 120 | {enterprise: "error", org: "", repo: "", err: true}, |
| 121 | } |
| 122 | |
| 123 | client := newTestClient() |
| 124 | for i, tt := range tests { |
| 125 | err := client.RemoveRunner(context.Background(), tt.enterprise, tt.org, tt.repo, int64(1)) |
| 126 | if !tt.err && err != nil { |
| 127 | t.Errorf("[%d] unexpected error: %v", i, err) |
| 128 | } |
| 129 | } |
| 130 | } |
| 131 | |
| 132 | func TestCleanup(t *testing.T) { |
| 133 | token := "token" |
nothing calls this directly
no test coverage detected