(dir, sdk, contents string, extra ...string)
| 8304 | } |
| 8305 | |
| 8306 | func withModInitAt(dir, sdk, contents string, extra ...string) dagger.WithContainerFunc { |
| 8307 | return func(ctr *dagger.Container) *dagger.Container { |
| 8308 | name := filepath.Base(dir) |
| 8309 | if name == "." { |
| 8310 | name = "test" |
| 8311 | } |
| 8312 | args := []string{"init", "--sdk=" + sdk, "--name=" + name, "--source=" + dir} |
| 8313 | args = append(args, extra...) |
| 8314 | args = append(args, dir) |
| 8315 | ctr = ctr.With(daggerExec(args...)) |
| 8316 | if contents != "" { |
| 8317 | return ctr.With(sdkSourceAt(dir, sdk, contents)) |
| 8318 | } |
| 8319 | return ctr |
| 8320 | } |
| 8321 | } |
| 8322 | |
| 8323 | func currentSchema(ctx context.Context, t *testctx.T, ctr *dagger.Container) *introspection.Schema { |
| 8324 | t.Helper() |
no test coverage detected