Skip to content

Commit

Permalink
Ran gofumpt and goimports for files mentioned in the CI
Browse files Browse the repository at this point in the history
Signed-off-by: Tarik Gürsoy <[email protected]>
  • Loading branch information
karat-1 authored and sdorra committed Aug 21, 2024
1 parent b91f080 commit 59bd2e6
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
3 changes: 2 additions & 1 deletion applicationset/services/pull_request/scm-manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ package pull_request

import (
"context"
"github.com/argoproj/argo-cd/v2/applicationset/utils"
"net/http"
"os"
"strconv"

"github.com/argoproj/argo-cd/v2/applicationset/utils"

scmm "github.com/scm-manager/goscm"
)

Expand Down
5 changes: 3 additions & 2 deletions applicationset/services/pull_request/scm-manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ package pull_request
import (
"context"
"fmt"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"io"
"net/http"
"net/http/httptest"
"testing"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)

func scmmMockHandler(t *testing.T) func(http.ResponseWriter, *http.Request) {
Expand Down
4 changes: 2 additions & 2 deletions applicationset/services/scm_provider/scm-manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ import (
"context"
"errors"
"fmt"
"github.com/argoproj/argo-cd/v2/applicationset/utils"
"net/http"
"os"

"github.com/argoproj/argo-cd/v2/applicationset/utils"

scmm "github.com/scm-manager/goscm"
)

Expand All @@ -28,7 +29,6 @@ func NewScmManagerProvider(ctx context.Context, token, url string, allBranches,
httpClient.Transport = tr

client, err := scmm.NewClient(url, token)

if err != nil {
return nil, fmt.Errorf("error creating a new SCM-Manager client: %w", err)
}
Expand Down
11 changes: 7 additions & 4 deletions applicationset/services/scm_provider/scm-manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@ package scm_provider

import (
"context"
"github.com/argoproj/argo-cd/v2/applicationset/services/scm_provider/testdata"
"github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"io"
"net/http"
"net/http/httptest"
"testing"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/argoproj/argo-cd/v2/applicationset/services/scm_provider/testdata"
"github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1"
)

func scmManagerMockHandler(t *testing.T) func(http.ResponseWriter, *http.Request) {
Expand Down Expand Up @@ -93,6 +95,7 @@ func scmManagerMockHandler(t *testing.T) func(http.ResponseWriter, *http.Request
}
}
}

func TestScmManagerListRepos(t *testing.T) {
cases := []struct {
name, proto, url string
Expand Down

0 comments on commit 59bd2e6

Please sign in to comment.