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

Function configFile

core/integration/module_test.go:8149–8156  ·  view source on GitHub ↗
(dirPath string, cfg *modules.ModuleConfig)

Source from the content-addressed store, hash-verified

8147}
8148
8149func configFile(dirPath string, cfg *modules.ModuleConfig) dagger.WithContainerFunc {
8150 cfgPath := filepath.Join(dirPath, "dagger.json")
8151 cfgBytes, err := json.Marshal(cfg)
8152 if err != nil {
8153 panic(err)
8154 }
8155 return fileContents(cfgPath, string(cfgBytes))
8156}
8157
8158// command for a dagger cli call direct on the host
8159func hostDaggerCommand(ctx context.Context, t testing.TB, workdir string, args ...string) *exec.Cmd {

Callers 3

BenchmarkLotsOfDepsMethod · 0.85
TestConfigsMethod · 0.85
TestIncludeExcludeMethod · 0.85

Calls 2

fileContentsFunction · 0.85
MarshalMethod · 0.65

Tested by

no test coverage detected