Make the external url of cache server configurable if necessary
All checks were successful
checks / check and test (push) Successful in 26s
checks / check and test (pull_request) Successful in 14s

This commit is contained in:
林玮 (Jade Lin)
2024-06-17 23:26:04 +08:00
committed by Matthias Kesler
parent 9924aea786
commit 90d9a60e41
4 changed files with 17 additions and 9 deletions

View File

@@ -20,7 +20,7 @@ import (
func TestHandler(t *testing.T) {
dir := filepath.Join(t.TempDir(), "artifactcache")
handler, err := StartHandler(dir, "", 0, nil)
handler, err := StartHandler(dir, "", "", 0, nil)
require.NoError(t, err)
base := fmt.Sprintf("%s%s", handler.ExternalURL(), urlBase)
@@ -589,7 +589,7 @@ func uploadCacheNormally(t *testing.T, base, key, version string, content []byte
func TestHandler_gcCache(t *testing.T) {
dir := filepath.Join(t.TempDir(), "artifactcache")
handler, err := StartHandler(dir, "", 0, nil)
handler, err := StartHandler(dir, "", "", 0, nil)
require.NoError(t, err)
defer func() {