MCPcopy Create free account
hub / github.com/dagger/dagger / withModInitAt

Function withModInitAt

core/integration/module_test.go:8306–8321  ·  view source on GitHub ↗
(dir, sdk, contents string, extra ...string)

Source from the content-addressed store, hash-verified

8304}
8305
8306func 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
8323func currentSchema(ctx context.Context, t *testctx.T, ctr *dagger.Container) *introspection.Schema {
8324 t.Helper()

Callers 9

TestCustomEnumTypeMethod · 0.85
TestIfaceCallMethod · 0.85
TestModuleLookupMethod · 0.85
TestCodegenOptionalsMethod · 0.85
TestTypedefSourceMapsMethod · 0.85
withModInitFunction · 0.85

Calls 4

daggerExecFunction · 0.85
sdkSourceAtFunction · 0.85
BaseMethod · 0.45
WithMethod · 0.45

Tested by

no test coverage detected