1 Commits

Author SHA1 Message Date
林玮 (Jade Lin)
9661a37003 Make the external url of cache server configurable if necessary
Some checks failed
checks / check and test (push) Failing after 21s
2024-09-06 13:12:58 +02:00

View File

@@ -20,7 +20,7 @@ import (
func TestHandler(t *testing.T) { func TestHandler(t *testing.T) {
dir := filepath.Join(t.TempDir(), "artifactcache") dir := filepath.Join(t.TempDir(), "artifactcache")
handler, err := StartHandler(dir, "", "", 0, nil) handler, err := StartHandler(dir, "", 0, nil)
require.NoError(t, err) require.NoError(t, err)
base := fmt.Sprintf("%s%s", handler.ExternalURL(), urlBase) 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) { func TestHandler_gcCache(t *testing.T) {
dir := filepath.Join(t.TempDir(), "artifactcache") dir := filepath.Join(t.TempDir(), "artifactcache")
handler, err := StartHandler(dir, "", "", 0, nil) handler, err := StartHandler(dir, "", 0, nil)
require.NoError(t, err) require.NoError(t, err)
defer func() { defer func() {