From a4fdb4042c8a229cfb8a12e50af56ff9911236ac Mon Sep 17 00:00:00 2001 From: Prasad Ghangal Date: Fri, 11 Dec 2020 20:21:59 +0530 Subject: [PATCH] Update registry name in unit tests (#834) Signed-off-by: Prasad Ghangal --- pkg/function/data_test.go | 6 +++--- pkg/function/export_rds_snapshot_location.go | 2 +- pkg/function/kube_task_test.go | 2 +- pkg/function/utils.go | 2 +- pkg/kube/exec_test.go | 2 +- pkg/kube/pod_test.go | 22 ++++++++++---------- pkg/testing/e2e_test.go | 2 +- pkg/testutil/testutil.go | 2 +- 8 files changed, 20 insertions(+), 20 deletions(-) diff --git a/pkg/function/data_test.go b/pkg/function/data_test.go index 37de11ad27..c0349dc0e3 100644 --- a/pkg/function/data_test.go +++ b/pkg/function/data_test.go @@ -134,7 +134,7 @@ func newRestoreDataBlueprint(pvc, identifierArg, identifierVal string) *crv1alph Func: RestoreDataFuncName, Args: map[string]interface{}{ RestoreDataNamespaceArg: "{{ .StatefulSet.Namespace }}", - RestoreDataImageArg: "kanisterio/kanister-tools:0.44.0", + RestoreDataImageArg: "ghcr.io/kanisterio/kanister-tools:0.44.0", RestoreDataBackupArtifactPrefixArg: "{{ .Profile.Location.Bucket }}/{{ .Profile.Location.Prefix }}", RestoreDataRestorePathArg: "/mnt/data", RestoreDataEncryptionKeyArg: "{{ .Secrets.backupKey.Data.password | toString }}", @@ -266,7 +266,7 @@ func newRestoreDataAllBlueprint() *crv1alpha1.Blueprint { Func: RestoreDataAllFuncName, Args: map[string]interface{}{ RestoreDataAllNamespaceArg: "{{ .StatefulSet.Namespace }}", - RestoreDataAllImageArg: "kanisterio/kanister-tools:0.44.0", + RestoreDataAllImageArg: "ghcr.io/kanisterio/kanister-tools:0.44.0", RestoreDataAllBackupArtifactPrefixArg: "{{ .Profile.Location.Bucket }}/{{ .Profile.Location.Prefix }}", RestoreDataAllBackupInfo: fmt.Sprintf("{{ .Options.%s }}", BackupDataAllOutput), RestoreDataAllRestorePathArg: "/mnt/data", @@ -477,7 +477,7 @@ func newCopyDataTestBlueprint() crv1alpha1.Blueprint { Func: RestoreDataFuncName, Args: map[string]interface{}{ RestoreDataNamespaceArg: "{{ .PVC.Namespace }}", - RestoreDataImageArg: "kanisterio/kanister-tools:0.44.0", + RestoreDataImageArg: "ghcr.io/kanisterio/kanister-tools:0.44.0", RestoreDataBackupArtifactPrefixArg: fmt.Sprintf("{{ .Options.%s }}", CopyVolumeDataOutputBackupArtifactLocation), RestoreDataBackupTagArg: fmt.Sprintf("{{ .Options.%s }}", CopyVolumeDataOutputBackupTag), RestoreDataVolsArg: map[string]string{ diff --git a/pkg/function/export_rds_snapshot_location.go b/pkg/function/export_rds_snapshot_location.go index fde1eea3de..915f36f4cf 100644 --- a/pkg/function/export_rds_snapshot_location.go +++ b/pkg/function/export_rds_snapshot_location.go @@ -60,7 +60,7 @@ const ( BackupAction RDSAction = "backup" RestoreAction RDSAction = "restore" - postgresToolsImage = "kanisterio/postgres-kanister-tools:0.44.0" + postgresToolsImage = "ghcr.io/kanisterio/postgres-kanister-tools:0.44.0" ) type exportRDSSnapshotToLocationFunc struct{} diff --git a/pkg/function/kube_task_test.go b/pkg/function/kube_task_test.go index bed6ad50b7..78b8094c01 100644 --- a/pkg/function/kube_task_test.go +++ b/pkg/function/kube_task_test.go @@ -66,7 +66,7 @@ func outputPhase(namespace string) crv1alpha1.BlueprintPhase { Func: KubeTaskFuncName, Args: map[string]interface{}{ KubeTaskNamespaceArg: namespace, - KubeTaskImageArg: "kanisterio/kanister-tools:0.20.0", + KubeTaskImageArg: "ghcr.io/kanisterio/kanister-tools:0.20.0", KubeTaskCommandArg: []string{ "sh", "-c", diff --git a/pkg/function/utils.go b/pkg/function/utils.go index cf25e9a99f..32860e8742 100644 --- a/pkg/function/utils.go +++ b/pkg/function/utils.go @@ -26,7 +26,7 @@ import ( const ( // FunctionOutputVersion returns version FunctionOutputVersion = "version" - kanisterToolsImage = "kanisterio/kanister-tools:0.44.0" + kanisterToolsImage = "ghcr.io/kanisterio/kanister-tools:0.44.0" kanisterToolsImageEnvName = "KANISTER_TOOLS" ) diff --git a/pkg/kube/exec_test.go b/pkg/kube/exec_test.go index e2962cd121..18e114bb14 100644 --- a/pkg/kube/exec_test.go +++ b/pkg/kube/exec_test.go @@ -120,7 +120,7 @@ func (s *ExecSuite) TestKopiaCommand(c *C) { Containers: []v1.Container{ v1.Container{ Name: "kanister-sidecar", - Image: "kanisterio/kanister-tools:0.37.0", + Image: "ghcr.io/kanisterio/kanister-tools:0.37.0", }, }, }, diff --git a/pkg/kube/pod_test.go b/pkg/kube/pod_test.go index fa4eb53ef5..9ef3db59ba 100644 --- a/pkg/kube/pod_test.go +++ b/pkg/kube/pod_test.go @@ -43,7 +43,7 @@ type PodSuite struct { const ( testSAName = "test-sa" controllerSA = "controller-sa" - kanisterToolsImage = "kanisterio/kanister-tools:0.44.0" + kanisterToolsImage = "ghcr.io/kanisterio/kanister-tools:0.44.0" ) var _ = Suite(&PodSuite{}) @@ -214,7 +214,7 @@ func (s *PodSuite) TestPodWithVolumes(c *C) { pod, err := CreatePod(ctx, cli, &PodOptions{ Namespace: s.namespace, GenerateName: "test-", - Image: "kanisterio/kanister-tools:0.44.0", + Image: "ghcr.io/kanisterio/kanister-tools:0.44.0", Command: []string{"sh", "-c", "tail -f /dev/null"}, Volumes: vols, }) @@ -231,7 +231,7 @@ func (s *PodSuite) TestGetPodLogs(c *C) { pod, err := CreatePod(context.Background(), s.cli, &PodOptions{ Namespace: s.namespace, GenerateName: "test-", - Image: "kanisterio/kanister-tools:0.44.0", + Image: "ghcr.io/kanisterio/kanister-tools:0.44.0", Command: []string{"sh", "-c", "echo hello"}, }) c.Assert(err, IsNil) @@ -247,7 +247,7 @@ func (s *PodSuite) TestPatchDefaultPodSpecs(c *C) { Containers: []v1.Container{ { Name: "container", - Image: "kanisterio/kanister-tools:0.44.0", + Image: "ghcr.io/kanisterio/kanister-tools:0.44.0", Command: []string{"sh", "-c", "echo in default specs"}, ImagePullPolicy: v1.PullPolicy(v1.PullIfNotPresent), VolumeMounts: []v1.VolumeMount{ @@ -293,7 +293,7 @@ func (s *PodSuite) TestPatchDefaultPodSpecs(c *C) { Containers: []v1.Container{ { Name: "container", - Image: "kanisterio/kanister-tools:0.44.0", + Image: "ghcr.io/kanisterio/kanister-tools:0.44.0", Command: []string{"sh", "-c", "echo in default specs"}, ImagePullPolicy: v1.PullPolicy(v1.PullIfNotPresent), VolumeMounts: []v1.VolumeMount{ @@ -333,7 +333,7 @@ func (s *PodSuite) TestPatchDefaultPodSpecs(c *C) { Containers: []v1.Container{ { Name: "container", - Image: "kanisterio/kanister-tools:0.44.0", + Image: "ghcr.io/kanisterio/kanister-tools:0.44.0", Command: []string{"sh", "-c", "echo in default specs"}, ImagePullPolicy: v1.PullPolicy(v1.PullIfNotPresent), VolumeMounts: []v1.VolumeMount{ @@ -387,7 +387,7 @@ func (s *PodSuite) TestPatchDefaultPodSpecs(c *C) { Containers: []v1.Container{ { Name: "container", - Image: "kanisterio/kanister-tools:0.44.0", + Image: "ghcr.io/kanisterio/kanister-tools:0.44.0", Command: []string{"sh", "-c", "echo in default specs"}, ImagePullPolicy: v1.PullPolicy(v1.PullIfNotPresent), VolumeMounts: []v1.VolumeMount{ @@ -448,7 +448,7 @@ func (s *PodSuite) TestPatchDefaultPodSpecs(c *C) { Containers: []v1.Container{ { Name: "container", - Image: "kanisterio/kanister-tools:0.44.0", + Image: "ghcr.io/kanisterio/kanister-tools:0.44.0", Command: []string{"sh", "-c", "echo in default specs"}, ImagePullPolicy: v1.PullPolicy(v1.PullIfNotPresent), VolumeMounts: []v1.VolumeMount{ @@ -511,7 +511,7 @@ func (s *PodSuite) TestPatchDefaultPodSpecs(c *C) { Containers: []v1.Container{ { Name: "container", - Image: "kanisterio/kanister-tools:0.44.0", + Image: "ghcr.io/kanisterio/kanister-tools:0.44.0", Command: []string{"echo", "override command"}, ImagePullPolicy: v1.PullPolicy(v1.PullIfNotPresent), VolumeMounts: []v1.VolumeMount{ @@ -551,7 +551,7 @@ func (s *PodSuite) TestPatchDefaultPodSpecs(c *C) { Containers: []v1.Container{ { Name: "container", - Image: "kanisterio/kanister-tools:0.44.0", + Image: "ghcr.io/kanisterio/kanister-tools:0.44.0", Command: []string{"echo", "override command"}, ImagePullPolicy: v1.PullPolicy(v1.PullIfNotPresent), VolumeMounts: []v1.VolumeMount{ @@ -594,7 +594,7 @@ func (s *PodSuite) TestPatchDefaultPodSpecs(c *C) { Containers: []v1.Container{ { Name: "container", - Image: "kanisterio/kanister-tools:0.44.0", + Image: "ghcr.io/kanisterio/kanister-tools:0.44.0", Command: []string{"sh", "-c", "echo in default specs"}, ImagePullPolicy: v1.PullPolicy(v1.PullIfNotPresent), VolumeMounts: []v1.VolumeMount{ diff --git a/pkg/testing/e2e_test.go b/pkg/testing/e2e_test.go index cb4eff1879..3aa6b9e695 100644 --- a/pkg/testing/e2e_test.go +++ b/pkg/testing/e2e_test.go @@ -226,7 +226,7 @@ func (s *E2ESuite) TestKubeTask(c *C) { Func: function.KubeTaskFuncName, Name: "test-kube-task", Args: map[string]interface{}{ - "image": "kanisterio/kanister-tools:0.44.0", + "image": "ghcr.io/kanisterio/kanister-tools:0.44.0", "namespace": "{{ .Deployment.Namespace }}", "command": []string{"echo", "default specs"}, "podOverride": map[string]interface{}{ diff --git a/pkg/testutil/testutil.go b/pkg/testutil/testutil.go index 45689a6475..e2b9516d49 100644 --- a/pkg/testutil/testutil.go +++ b/pkg/testutil/testutil.go @@ -97,7 +97,7 @@ func newTestPodTemplateSpec() v1.PodTemplateSpec { Containers: []v1.Container{ v1.Container{ Name: "test-container", - Image: "kanisterio/kanister-tools:0.44.0", + Image: "ghcr.io/kanisterio/kanister-tools:0.44.0", Command: []string{"tail"}, Args: []string{"-f", "/dev/null"}, },