mirror of
https://github.com/project-zot/zot.git
synced 2026-06-16 12:28:01 +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:
@@ -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")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user