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:
LaurentiuNiculae
2023-08-18 11:46:11 +03:00
committed by GitHub
parent e510df7c22
commit 0731fd3828
24 changed files with 536 additions and 194 deletions
+4 -2
View File
@@ -85,7 +85,9 @@ func TestTLSWithAuth(t *testing.T) {
home := os.Getenv("HOME")
destCertsDir := filepath.Join(home, certsDir1)
test.CopyTestFiles(sourceCertsDir, destCertsDir)
err := test.CopyTestKeysAndCerts(destCertsDir)
So(err, ShouldBeNil)
defer os.RemoveAll(destCertsDir)
args := []string{"imagetest", "--name", "dummyImageName", "--url", HOST1}
@@ -94,7 +96,7 @@ func TestTLSWithAuth(t *testing.T) {
imageCmd.SetOut(imageBuff)
imageCmd.SetErr(imageBuff)
imageCmd.SetArgs(args)
err := imageCmd.Execute()
err = imageCmd.Execute()
So(err, ShouldNotBeNil)
So(imageBuff.String(), ShouldContainSubstring, "invalid URL format")