mirror of
https://github.com/project-zot/zot.git
synced 2026-06-16 20:38:08 +08:00
test(refactor): refactor tests that use zot-test to use smaller images (#1690)
Signed-off-by: Laurentiu Niculae <niculae.laurentiu1@gmail.com>
This commit is contained in:
@@ -5,7 +5,6 @@ package monitoring_test
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"path"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
@@ -55,7 +54,10 @@ func TestExtensionMetrics(t *testing.T) {
|
||||
monitoring.IncDownloadCounter(ctlr.Metrics, "alpine")
|
||||
monitoring.IncUploadCounter(ctlr.Metrics, "alpine")
|
||||
|
||||
test.CopyTestFiles("../../../test/data/zot-test", path.Join(rootDir, "alpine"))
|
||||
srcStorageCtlr := test.GetDefaultStoreController(rootDir, ctlr.Log)
|
||||
err := test.WriteImageToFileSystem(test.CreateDefaultImage(), "alpine", "0.0.1", srcStorageCtlr)
|
||||
So(err, ShouldBeNil)
|
||||
|
||||
monitoring.SetStorageUsage(ctlr.Metrics, rootDir, "alpine")
|
||||
|
||||
monitoring.ObserveStorageLockLatency(ctlr.Metrics, time.Millisecond, rootDir, "RWLock")
|
||||
|
||||
Reference in New Issue
Block a user