(ctx context.Context, t *testctx.T)
| 466 | } |
| 467 | |
| 468 | func (EngineSuite) TestModuleVersionCompat(ctx context.Context, t *testctx.T) { |
| 469 | c := connect(ctx, t) |
| 470 | |
| 471 | tcs := []struct { |
| 472 | name string |
| 473 | |
| 474 | engineVersion string |
| 475 | moduleVersion string |
| 476 | moduleMinVersion string |
| 477 | |
| 478 | errs []string |
| 479 | }{ |
| 480 | { |
| 481 | name: "compatible equal", |
| 482 | engineVersion: "v2.0.0", |
| 483 | moduleVersion: "v2.0.0", |
| 484 | moduleMinVersion: "v1.0.0", |
| 485 | }, |
| 486 | { |
| 487 | name: "compatible less", |
| 488 | engineVersion: "v2.0.0", |
| 489 | moduleVersion: "v1.0.0", |
| 490 | moduleMinVersion: "v1.0.0", |
| 491 | }, |
| 492 | { |
| 493 | name: "incompatible too old", |
| 494 | engineVersion: "v2.0.0", |
| 495 | moduleVersion: "v0.9.0", |
| 496 | moduleMinVersion: "v1.0.0", |
| 497 | errs: []string{ |
| 498 | "module requires dagger v0.9.0", |
| 499 | "support for that version has been removed", |
| 500 | }, |
| 501 | }, |
| 502 | { |
| 503 | name: "incompatible too new", |
| 504 | engineVersion: "v2.0.0", |
| 505 | moduleVersion: "v2.0.1", |
| 506 | moduleMinVersion: "v1.0.0", |
| 507 | errs: []string{ |
| 508 | "module requires dagger v2.0.1, but you have v2.0.0", |
| 509 | }, |
| 510 | }, |
| 511 | { |
| 512 | name: "old style dev version", |
| 513 | engineVersion: "v2.0.0", |
| 514 | moduleVersion: "badbadbad", |
| 515 | moduleMinVersion: "v1.0.0", |
| 516 | errs: []string{ |
| 517 | "module requires dagger v0.11.9", // old-style dev versions are equivalent to v0.11.9 |
| 518 | "support for that version has been removed", |
| 519 | }, |
| 520 | }, |
| 521 | } |
| 522 | |
| 523 | engines := map[string]*dagger.Service{} |
| 524 | enginesMu := sync.Mutex{} |
| 525 |
nothing calls this directly
no test coverage detected