MCPcopy Create free account
hub / github.com/github/gh-aw / TestIsSchemaVersionSupported

Function TestIsSchemaVersionSupported

pkg/workflow/lock_schema_test.go:231–280  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

229}
230
231func TestIsSchemaVersionSupported(t *testing.T) {
232 tests := []struct {
233 name string
234 version LockSchemaVersion
235 supported bool
236 }{
237 {
238 name: "v1 is supported",
239 version: LockSchemaV1,
240 supported: true,
241 },
242 {
243 name: "v2 is supported",
244 version: LockSchemaV2,
245 supported: true,
246 },
247 {
248 name: "v3 is supported",
249 version: LockSchemaV3,
250 supported: true,
251 },
252 {
253 name: "v4 is supported",
254 version: LockSchemaV4,
255 supported: true,
256 },
257 {
258 name: "v5 is not supported",
259 version: "v5",
260 supported: false,
261 },
262 {
263 name: "v0 is not supported",
264 version: "v0",
265 supported: false,
266 },
267 {
268 name: "empty version is not supported",
269 version: "",
270 supported: false,
271 },
272 }
273
274 for _, tt := range tests {
275 t.Run(tt.name, func(t *testing.T) {
276 result := IsSchemaVersionSupported(tt.version)
277 assert.Equal(t, tt.supported, result, "Schema version support mismatch")
278 })
279 }
280}
281
282func TestGenerateLockMetadata(t *testing.T) {
283 // Save and restore original values

Callers

nothing calls this directly

Calls 2

IsSchemaVersionSupportedFunction · 0.85
RunMethod · 0.45

Tested by

no test coverage detected