mirror of
https://github.com/redhat-developer/odo.git
synced 2025-10-19 03:06:19 +03:00
* Update the Devfile library * Add test for container-overrides and pod-overrides attributes Signed-off-by: Parthvi Vala <pvala@redhat.com> Attempt at fixing CI failures Signed-off-by: Parthvi Vala <pvala@redhat.com> * Fix CI failure * Attempt at fixing OC integration test failures Signed-off-by: Parthvi Vala <pvala@redhat.com> * Use random name in integration test Signed-off-by: Parthvi Vala <pvala@redhat.com> * Rebase and fix integration test failure Signed-off-by: Parthvi Vala <pvala@redhat.com> * Make integration test work for podman Signed-off-by: Parthvi Vala <pvala@redhat.com> * Temp attempt at fixing podman test for GH Signed-off-by: Parthvi Vala <pvala@redhat.com> * Another attempt at fixing CI test for podman Signed-off-by: Parthvi Vala <pvala@redhat.com> * One more attempt at fixing integration test for podman Signed-off-by: Parthvi Vala <pvala@redhat.com> Signed-off-by: Parthvi Vala <pvala@redhat.com>
30 lines
638 B
Go
30 lines
638 B
Go
package util
|
|
|
|
import (
|
|
"path/filepath"
|
|
|
|
"github.com/devfile/library/v2/pkg/testingutil/filesystem"
|
|
"k8s.io/klog"
|
|
)
|
|
|
|
// CleanDefaultHTTPCacheDir cleans the default directory used for HTTP caching
|
|
func CleanDefaultHTTPCacheDir() error {
|
|
return cleanDefaultHTTPCacheDir(filesystem.DefaultFs{})
|
|
}
|
|
|
|
func cleanDefaultHTTPCacheDir(fs filesystem.Filesystem) error {
|
|
cacheFiles, err := fs.ReadDir(httpCacheDir)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
for _, f := range cacheFiles {
|
|
klog.V(4).Infof("Removing cache file %s", f.Name())
|
|
err := fs.Remove(filepath.Join(httpCacheDir, f.Name()))
|
|
if err != nil {
|
|
return err
|
|
}
|
|
}
|
|
return nil
|
|
}
|