diff --git a/.gitea/workflows/pre-commit.yaml b/.gitea/workflows/pre-commit.yaml index abd975b..180b874 100644 --- a/.gitea/workflows/pre-commit.yaml +++ b/.gitea/workflows/pre-commit.yaml @@ -44,7 +44,7 @@ jobs: python-version: '3.12' - name: Install deps - run: sudo apt-get update && sudo apt-get install -y gettext bc + run: apt-get update && apt-get install -y gettext bc - run: pip install pre-commit - run: pre-commit install diff --git a/pkg/dlcache/dlcache_test.go b/pkg/dlcache/dlcache_test.go index a7ccb8e..b10bbd1 100644 --- a/pkg/dlcache/dlcache_test.go +++ b/pkg/dlcache/dlcache_test.go @@ -26,6 +26,7 @@ import ( "io" "os" "path/filepath" + "strings" "testing" "gitea.plemya-x.ru/Plemya-x/ALR/internal/config" @@ -45,7 +46,7 @@ func (c *TestALRConfig) GetPaths() *config.Paths { func prepare(t *testing.T) *TestALRConfig { t.Helper() - dir, err := os.MkdirTemp("/tmp", "alr-dlcache-test.*") + dir, err := os.MkdirTemp("", "alr-dlcache-test.*") if err != nil { panic(err) } @@ -57,7 +58,7 @@ func prepare(t *testing.T) *TestALRConfig { func cleanup(t *testing.T, cfg *TestALRConfig) { t.Helper() - os.Remove(cfg.CacheDir) + os.RemoveAll(cfg.CacheDir) } func TestNew(t *testing.T) {