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

Function newCache

core/integration/suite_test.go:75–92  ·  view source on GitHub ↗
(t *testctx.T)

Source from the content-addressed store, hash-verified

73}
74
75func newCache(t *testctx.T) core.CacheVolumeID {
76 res, err := testutil.Query[struct {
77 CacheVolume struct {
78 ID core.CacheVolumeID
79 }
80 }](t, `
81 query CreateCache($key: String!) {
82 cacheVolume(key: $key) {
83 id
84 }
85 }
86 `, &testutil.QueryOptions{Variables: map[string]any{
87 "key": identity.NewID(),
88 }})
89 require.NoError(t, err)
90
91 return res.CacheVolume.ID
92}
93
94func newDirWithFile(t *testctx.T, path, contents string) core.DirectoryID {
95 res, err := testutil.Query[struct {

Callers 3

TestDirectoryErrorsMethod · 0.70
TestFileErrorsMethod · 0.70
TestRelativePathsMethod · 0.70

Calls 2

QueryFunction · 0.92
NewIDFunction · 0.92

Tested by

no test coverage detected