(t *testing.T)
| 155 | } |
| 156 | |
| 157 | func 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 |
nothing calls this directly
no test coverage detected