(t *testing.T)
| 149 | } |
| 150 | |
| 151 | func TestMainFromManifestFail(t *testing.T) { |
| 152 | testCases := []struct { |
| 153 | name string |
| 154 | manifestContents string |
| 155 | }{ |
| 156 | { |
| 157 | name: "empty manifest", |
| 158 | manifestContents: ``, |
| 159 | }, |
| 160 | { |
| 161 | name: "no main-class entry found", |
| 162 | manifestContents: `key: value`, |
| 163 | }, |
| 164 | } |
| 165 | |
| 166 | for _, tc := range testCases { |
| 167 | t.Run(tc.name, func(t *testing.T) { |
| 168 | mfPath := setupTestManifest(t, []byte(tc.manifestContents)) |
| 169 | ctx := gcp.NewContext() |
| 170 | _, err := MainFromManifest(ctx, mfPath) |
| 171 | if err == nil { |
| 172 | t.Error("MainFromMainfest() did not error as expected") |
| 173 | } |
| 174 | }) |
| 175 | } |
| 176 | } |
| 177 | |
| 178 | func TestCheckCacheNewDateMiss(t *testing.T) { |
| 179 | testCases := []struct { |
nothing calls this directly
no test coverage detected