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 -4
View File
@@ -24,7 +24,7 @@ func TestHTTPClient(t *testing.T) {
So(err, ShouldNotBeNil)
tempDir := t.TempDir()
err = test.CopyFiles("../../test/data", tempDir)
err = test.CopyTestKeysAndCerts(tempDir)
So(err, ShouldBeNil)
err = os.Chmod(path.Join(tempDir, "ca.crt"), 0o000)
So(err, ShouldBeNil)
@@ -34,7 +34,7 @@ func TestHTTPClient(t *testing.T) {
Convey("test CreateHTTPClient() no permissions on certificate", t, func() {
tempDir := t.TempDir()
err := test.CopyFiles("../../test/data", tempDir)
err := test.CopyTestKeysAndCerts(tempDir)
So(err, ShouldBeNil)
err = os.Chmod(path.Join(tempDir, "ca.crt"), 0o000)
So(err, ShouldBeNil)
@@ -45,7 +45,7 @@ func TestHTTPClient(t *testing.T) {
Convey("test CreateHTTPClient() no permissions on key", t, func() {
tempDir := t.TempDir()
err := test.CopyFiles("../../test/data", tempDir)
err := test.CopyTestKeysAndCerts(tempDir)
So(err, ShouldBeNil)
err = os.Chmod(path.Join(tempDir, "client.key"), 0o000)
So(err, ShouldBeNil)
@@ -63,7 +63,7 @@ func TestHTTPClient(t *testing.T) {
ctlr := api.NewController(conf)
tempDir := t.TempDir()
err := test.CopyFiles("../../test/data", tempDir)
err := test.CopyTestKeysAndCerts(tempDir)
So(err, ShouldBeNil)
ctlr.Config.Storage.RootDirectory = tempDir