Skip to content

Commit

Permalink
Correct lint errors
Browse files Browse the repository at this point in the history
Signed-off-by: Annaraya Narasagond <[email protected]>
Signed-off-by: Annaraya Narasagond <[email protected]> Annaraya Narasagond <[email protected]>
Signed-off-by: Annaraya Narasagond <[email protected]>
  • Loading branch information
Annaraya-Narasagond committed Aug 21, 2024
1 parent 20225de commit 91f60d7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
6 changes: 4 additions & 2 deletions e2e/util/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ import (
placementrule "open-cluster-management.io/multicloud-operators-subscription/pkg/apis/apps/placementrule/v1"
)

var ConfigFile string
var CleanUp bool
var (
ConfigFile string
CleanUp bool
)

type Cluster struct {
K8sClientSet *kubernetes.Clientset
Expand Down
10 changes: 5 additions & 5 deletions e2e/util/crud.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@ func AddNamespaceAnnotationForVolSync(client client.Client, namespace string) er
func CleanUpWorkloads() error {
channel := GetChannelNamespace() + "/" + GetChannelName()
subList := &subscriptionv1.SubscriptionList{}
err := Ctx.Hub.CtrlClient.List(context.Background(), subList)
if err != nil {

if err := Ctx.Hub.CtrlClient.List(context.Background(), subList); err != nil {
return err
}

Expand All @@ -171,14 +171,14 @@ func CleanUpWorkloads() error {
// delete placement
pName := sub.Spec.Placement.PlacementRef.Name
pNamespace := sub.Namespace
err = DeletePlacement(pName, pNamespace)
if err != nil {

if err := DeletePlacement(pName, pNamespace); err != nil {
Ctx.Log.Error(err, "error deleting placement")

return err
}
// delete subscription
err = DeleteSubscription(sub.Name, sub.Name)
err := DeleteSubscription(sub.Name, sub.Name)
if err != nil {
Ctx.Log.Error(err, "error deleting subscription")

Expand Down

0 comments on commit 91f60d7

Please sign in to comment.