feat: Add malysis cache implementation with proxy flow integration (#346)

* feat: Add malysis cache implementation with proxy flow integration

* fix: Code review fixes
This commit is contained in:
Abhisek Datta
2026-06-22 10:12:02 +05:30
committed by GitHub
parent 327c9c7068
commit d360e75897
21 changed files with 820 additions and 21 deletions
+25
View File
@@ -0,0 +1,25 @@
package setup
import (
"bytes"
"context"
"testing"
"github.com/safedep/pmg/config"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestRunCache_NoFile(t *testing.T) {
t.Setenv("PMG_CACHE_DIR", t.TempDir())
config.Reload()
cfg := config.Get()
var out bytes.Buffer
require.NoError(t, runCacheStatus(context.Background(), cfg, &out))
assert.Contains(t, out.String(), "Entries: 0")
out.Reset()
require.NoError(t, runCacheClear(context.Background(), cfg, &out))
assert.Contains(t, out.String(), "already empty")
}