diff --git a/internal/plugin/config_test.go b/internal/plugin/config_test.go index aacd8092..d033206c 100644 --- a/internal/plugin/config_test.go +++ b/internal/plugin/config_test.go @@ -4,19 +4,11 @@ import ( "fmt" "os" "reflect" - "strings" "testing" - "time" - "github.com/meltwater/drone-cache/archive" "github.com/meltwater/drone-cache/test" ) -const ( - testRoot = "testdata" - defaultStorageOperationTimeout = 5 * time.Second -) - func TestHandleMount(t *testing.T) { test.Ok(t, os.Mkdir(testRoot, 0755)) t.Cleanup(func() { @@ -62,7 +54,7 @@ func TestHandleMount(t *testing.T) { } for _, tc := range cases { - c := defaultConfig() + c := Config{} c.Mount = tc.mounts tc.makeFiles() @@ -72,23 +64,3 @@ func TestHandleMount(t *testing.T) { "expected mount differs from handled mount result:\nexpected: %v\ngot:%v", tc.expectedMounts, c.Mount) } } - -// Config plugin configuration - -func defaultConfig() *Config { - return &Config{ - CompressionLevel: archive.DefaultCompressionLevel, - StorageOperationTimeout: defaultStorageOperationTimeout, - Override: true, - } -} - -func containsGlob(a []string) bool { - for _, v := range a { - if strings.Contains(v, "**") { - return true - } - } - - return false -}