refactor(test): remove unnecessary usage of images copied from under test/data (#1217)

Signed-off-by: Nicol Draghici <idraghic@cisco.com>
This commit is contained in:
Nicol
2023-02-25 00:22:47 +02:00
committed by GitHub
parent 792f3f55b3
commit a561d0bad5
2 changed files with 150 additions and 49 deletions
+18
View File
@@ -750,6 +750,24 @@ func UploadBlob(baseURL, repo string, blob []byte, artifactBlobMediaType string)
return nil
}
func PushTestImage(repoName string, tag string, //nolint:unparam
baseURL string, manifest ispec.Manifest,
config ispec.Image, layers [][]byte,
) error {
err := UploadImage(
Image{
Manifest: manifest,
Config: config,
Layers: layers,
Tag: tag,
},
baseURL,
repoName,
)
return err
}
func ReadLogFileAndSearchString(logPath string, stringToMatch string, timeout time.Duration) (bool, error) {
ctx, cancelFunc := context.WithTimeout(context.Background(), timeout)
defer cancelFunc()