MCPcopy Index your code
hub / github.com/dagger/dagger / TestModuleVersionCompat

Method TestModuleVersionCompat

core/integration/engine_test.go:468–571  ·  view source on GitHub ↗
(ctx context.Context, t *testctx.T)

Source from the content-addressed store, hash-verified

466}
467
468func (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

Callers

nothing calls this directly

Calls 13

devEngineContainerFunction · 0.85
engineClientContainerFunction · 0.85
daggerExecFunction · 0.85
connectFunction · 0.70
RunMethod · 0.65
ContainsMethod · 0.65
WithEnvVariableMethod · 0.45
WithMethod · 0.45
WithWorkdirMethod · 0.45
WithNewFileMethod · 0.45
WithExecMethod · 0.45

Tested by

no test coverage detected