MCPcopy Create free account
hub / github.com/celer-pkg/celer / TestDevStore_InvalidNameVersion

Function TestDevStore_InvalidNameVersion

pkgcache/cache_dev_artifact_test.go:157–168  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

155}
156
157func TestDevStore_InvalidNameVersion(t *testing.T) {
158 cache := newTestDevArtifactCache(t)
159
160 // A package dir whose last path segment is not name@version.
161 pkgDir := filepath.Join(t.TempDir(), "packages", "no-at-sign")
162 if err := os.MkdirAll(pkgDir, os.ModePerm); err != nil {
163 t.Fatal(err)
164 }
165 if err := cache.Store(pkgDir, "meta"); err == nil {
166 t.Fatal("expected error for package dir without @ in name")
167 }
168}
169
170// ---- Restore tests ----
171

Callers

nothing calls this directly

Calls 3

newTestDevArtifactCacheFunction · 0.85
MkdirAllMethod · 0.80
StoreMethod · 0.65

Tested by

no test coverage detected