Skip to content

Commit

Permalink
fix(ISV-5130): adjust indentation to fit codestyle
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Jediny <jedinym@proton.me>
  • Loading branch information
jedinym committed Nov 18, 2024
1 parent 92f3855 commit 6b5dfc8
Showing 1 changed file with 13 additions and 19 deletions.
32 changes: 13 additions & 19 deletions tests/release/releaseLib.go
Original file line number Diff line number Diff line change
@@ -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),
Expand Down Expand Up @@ -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,
},
},
},
Expand All @@ -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,
},
},
},
Expand All @@ -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))
Expand Down Expand Up @@ -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{
Expand All @@ -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())
}
}

0 comments on commit 6b5dfc8

Please sign in to comment.