From 6b5dfc8db64675220a1cb7c204441631b8abbe65 Mon Sep 17 00:00:00 2001 From: Martin Jediny Date: Mon, 18 Nov 2024 11:59:38 +0100 Subject: [PATCH] fix(ISV-5130): adjust indentation to fit codestyle Signed-off-by: Martin Jediny --- tests/release/releaseLib.go | 32 +++++++++++++------------------- 1 file changed, 13 insertions(+), 19 deletions(-) diff --git a/tests/release/releaseLib.go b/tests/release/releaseLib.go index a9f1fc593..e2d480bac 100644 --- a/tests/release/releaseLib.go +++ b/tests/release/releaseLib.go @@ -1,28 +1,28 @@ package common import ( + "encoding/base64" "fmt" "os" "time" - "encoding/base64" - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "github.com/devfile/library/v2/pkg/util" appservice "github.com/konflux-ci/application-api/api/v1alpha1" appstudioApi "github.com/konflux-ci/application-api/api/v1alpha1" - "github.com/devfile/library/v2/pkg/util" "github.com/konflux-ci/e2e-tests/pkg/constants" "github.com/konflux-ci/e2e-tests/pkg/framework" "github.com/konflux-ci/e2e-tests/pkg/utils" - "k8s.io/apimachinery/pkg/api/errors" releaseApi "github.com/konflux-ci/release-service/api/v1alpha1" + corev1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" ) func NewFramework(workspace string) *framework.Framework { - var fw *framework.Framework + var fw *framework.Framework var err error stageOptions := utils.Options{ ToolchainApiUrl: os.Getenv(constants.TOOLCHAIN_API_URL_ENV), @@ -83,11 +83,11 @@ func CreateSnapshotWithImageSource(fw framework.Framework, componentName, applic { Name: componentName, ContainerImage: containerImage, - Source: appstudioApi.ComponentSource{ + Source: appstudioApi.ComponentSource{ appstudioApi.ComponentSourceUnion{ GitSource: &appstudioApi.GitSource{ Revision: gitSourceRevision, - URL: gitSourceURL, + URL: gitSourceURL, }, }, }, @@ -98,11 +98,11 @@ func CreateSnapshotWithImageSource(fw framework.Framework, componentName, applic newSnapshotComponent := appstudioApi.SnapshotComponent{ Name: componentName2, ContainerImage: containerImage2, - Source: appstudioApi.ComponentSource{ + Source: appstudioApi.ComponentSource{ appstudioApi.ComponentSourceUnion{ GitSource: &appstudioApi.GitSource{ Revision: gitSourceRevision2, - URL: gitSourceURL2, + URL: gitSourceURL2, }, }, }, @@ -115,7 +115,7 @@ func CreateSnapshotWithImageSource(fw framework.Framework, componentName, applic return fw.AsKubeAdmin.IntegrationController.CreateSnapshotWithComponents(snapshotName, componentName, applicationName, namespace, snapshotComponents) } -func CheckReleaseStatus(releaseCR *releaseApi.Release) (error) { +func CheckReleaseStatus(releaseCR *releaseApi.Release) error { GinkgoWriter.Println("releaseCR: %s", releaseCR.Name) conditions := releaseCR.Status.Conditions GinkgoWriter.Println("len of conditions: %d", len(conditions)) @@ -160,10 +160,7 @@ func CreateOpaqueSecret( secretData[field] = decodedValue } - secret, err := fw.AsKubeAdmin.CommonController.GetSecret( - namespace, - secretName, - ) + secret, err := fw.AsKubeAdmin.CommonController.GetSecret(namespace, secretName) if secret == nil || errors.IsNotFound(err) { secret := &corev1.Secret{ ObjectMeta: metav1.ObjectMeta{ @@ -174,10 +171,7 @@ func CreateOpaqueSecret( Data: secretData, } - _, err = fw.AsKubeAdmin.CommonController.CreateSecret( - namespace, - secret, - ) + _, err = fw.AsKubeAdmin.CommonController.CreateSecret(namespace, secret) Expect(err).ToNot(HaveOccurred()) } }