This repository was archived by the owner on Mar 16, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 15 files changed +35
-28
lines changed Expand file tree Collapse file tree 15 files changed +35
-28
lines changed Original file line number Diff line number Diff line change @@ -19,4 +19,6 @@ linters:
1919 - typecheck
2020 - thelper
2121 - unused
22+ - goimports
2223 fast : false
24+ max-same-issues : 50
Original file line number Diff line number Diff line change 11package info_test
22
33import (
4+ "testing"
5+ "time"
6+
47 "github.com/acorn-io/acorn/integration/helper"
58 v1 "github.com/acorn-io/acorn/pkg/apis/api.acorn.io/v1"
69 "github.com/acorn-io/acorn/pkg/client"
710 "github.com/acorn-io/acorn/pkg/config"
811 kclient "github.com/acorn-io/acorn/pkg/k8sclient"
912 "github.com/acorn-io/acorn/pkg/project"
1013 "github.com/stretchr/testify/assert"
11- "testing"
12- "time"
1314)
1415
1516func TestDefaultClientInfoOneNamespace (t * testing.T ) {
Original file line number Diff line number Diff line change @@ -2,15 +2,16 @@ package log
22
33import (
44 "context"
5+ "sort"
6+ "strings"
7+ "testing"
8+
59 "github.com/acorn-io/acorn/integration/helper"
610 apiv1 "github.com/acorn-io/acorn/pkg/apis/api.acorn.io/v1"
711 v1 "github.com/acorn-io/acorn/pkg/apis/internal.acorn.io/v1"
812 "github.com/acorn-io/acorn/pkg/client"
913 "github.com/sirupsen/logrus"
1014 "github.com/stretchr/testify/assert"
11- "sort"
12- "strings"
13- "testing"
1415)
1516
1617const sampleLog = `line 1-1
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package cli
22
33import (
44 "context"
5+
56 cli "github.com/acorn-io/acorn/pkg/cli/builder"
67 "github.com/acorn-io/acorn/pkg/cli/builder/table"
78 "github.com/acorn-io/acorn/pkg/client"
Original file line number Diff line number Diff line change @@ -2,21 +2,21 @@ package cli
22
33import (
44 "fmt"
5- apiv1 "github.com/acorn-io/acorn/pkg/apis/api.acorn.io/v1"
6- v1 "github.com/acorn-io/acorn/pkg/apis/internal.acorn.io/v1"
7- "github.com/acorn-io/acorn/pkg/client"
8- "github.com/acorn-io/acorn/pkg/mocks"
9- "github.com/golang/mock/gomock"
105 "io"
11- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
126 "os"
137 "strings"
148 "testing"
159 "time"
1610
11+ apiv1 "github.com/acorn-io/acorn/pkg/apis/api.acorn.io/v1"
12+ v1 "github.com/acorn-io/acorn/pkg/apis/internal.acorn.io/v1"
1713 "github.com/acorn-io/acorn/pkg/cli/testdata"
14+ "github.com/acorn-io/acorn/pkg/client"
15+ "github.com/acorn-io/acorn/pkg/mocks"
16+ "github.com/golang/mock/gomock"
1817 "github.com/spf13/cobra"
1918 "github.com/stretchr/testify/assert"
19+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2020)
2121
2222var (
Original file line number Diff line number Diff line change 11package cli
22
33import (
4- apiv1 "github.com/acorn-io/acorn/pkg/apis/api.acorn.io/v1"
5- "github.com/acorn-io/acorn/pkg/mocks"
64 "io"
7- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
85 "os"
96 "strings"
107 "testing"
118
9+ apiv1 "github.com/acorn-io/acorn/pkg/apis/api.acorn.io/v1"
1210 "github.com/acorn-io/acorn/pkg/cli/testdata"
11+ "github.com/acorn-io/acorn/pkg/mocks"
1312 "github.com/golang/mock/gomock"
1413 "github.com/spf13/cobra"
1514 "github.com/stretchr/testify/assert"
15+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1616)
1717
1818func TestInfo (t * testing.T ) {
Original file line number Diff line number Diff line change @@ -2,13 +2,13 @@ package appdefinition
22
33import (
44 "encoding/base64"
5- "github.com/acorn-io/acorn/pkg/digest"
6- "github.com/acorn-io/acorn/pkg/secrets"
75 "testing"
86
97 v1 "github.com/acorn-io/acorn/pkg/apis/internal.acorn.io/v1"
108 "github.com/acorn-io/acorn/pkg/controller/namespace"
9+ "github.com/acorn-io/acorn/pkg/digest"
1110 "github.com/acorn-io/acorn/pkg/scheme"
11+ "github.com/acorn-io/acorn/pkg/secrets"
1212 "github.com/acorn-io/baaah/pkg/router"
1313 "github.com/acorn-io/baaah/pkg/router/tester"
1414 "github.com/google/go-containerregistry/pkg/name"
Original file line number Diff line number Diff line change @@ -2,13 +2,13 @@ package appdefinition
22
33import (
44 "fmt"
5- "github.com/acorn-io/acorn/pkg/secrets"
65 "sort"
76 "strconv"
87 "strings"
98
109 v1 "github.com/acorn-io/acorn/pkg/apis/internal.acorn.io/v1"
1110 "github.com/acorn-io/acorn/pkg/labels"
11+ "github.com/acorn-io/acorn/pkg/secrets"
1212 "github.com/acorn-io/acorn/pkg/volume"
1313 "github.com/acorn-io/baaah/pkg/router"
1414 "github.com/acorn-io/baaah/pkg/typed"
Original file line number Diff line number Diff line change 11package controller
22
33import (
4- policyv1 "k8s.io/api/policy/v1"
54 "net/http"
65
76 v1 "github.com/acorn-io/acorn/pkg/apis/internal.acorn.io/v1"
@@ -26,6 +25,7 @@ import (
2625 appsv1 "k8s.io/api/apps/v1"
2726 corev1 "k8s.io/api/core/v1"
2827 netv1 "k8s.io/api/networking/v1"
28+ policyv1 "k8s.io/api/policy/v1"
2929 rbacv1 "k8s.io/api/rbac/v1"
3030 storagev1 "k8s.io/api/storage/v1"
3131 klabels "k8s.io/apimachinery/pkg/labels"
Original file line number Diff line number Diff line change 11package secrets
22
33import (
4+ "regexp"
5+ "strings"
46 "testing"
57
68 v1 "github.com/acorn-io/acorn/pkg/apis/internal.acorn.io/v1"
@@ -10,8 +12,6 @@ import (
1012 "github.com/stretchr/testify/assert"
1113 corev1 "k8s.io/api/core/v1"
1214 metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
13- "regexp"
14- "strings"
1515)
1616
1717func TestSecretImageReference (t * testing.T ) {
You can’t perform that action at this time.
0 commit comments