Skip to content

Commit c1e9e43

Browse files
committed
golangci tweaks, allow dot-imports, but very sparingly
1 parent b228603 commit c1e9e43

File tree

4 files changed

+13
-7
lines changed

4 files changed

+13
-7
lines changed

.github/workflows/compatibility-tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ jobs:
107107
PREVIOUS_VERSION: ${{ env.PREVIOUS_VERSION }}
108108
run: |
109109
go install gotest.tools/[email protected]
110-
gotestsum --format pkgname --jsonfile log.json -- -v -timeout 1800s ./tests/compatibility/... -ginkgo.vv -coverprofile cover.out
110+
gotestsum --format pkgname --jsonfile log.json -- -v -timeout 3600s ./tests/compatibility/... -ginkgo.vv -coverprofile cover.out
111111
112112
- name: convert-to-human-readable
113113
run: jq -r '.Output| gsub("[\\n]"; "")' log.json 2>/dev/null 1>log.txt || true

.golangci.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,22 @@ output:
3737
# colored-line-number|line-number|json|tab|checkstyle, default is "colored-line-number"
3838
format: colored-line-number
3939

40-
# print lines of code with issue, default is true
4140
print-issued-lines: true
4241

43-
# print linter name in the end of issue text, default is true
4442
print-linter-name: true
4543

4644

4745
# all available settings of specific linters
4846
linters-settings:
47+
stylecheck:
48+
dot-import-whitelist:
49+
# used in tests only
50+
- "github.com/onsi/ginkgo/v2"
51+
# used in tests only
52+
- "github.com/onsi/gomega"
53+
# it's nice having string constants in a separate package, but without boilerplate
54+
- "github.com/ydb-platform/ydb-kubernetes-operator/internal/controllers/constants"
55+
4956
errcheck:
5057
# report about not checking of errors in types assetions: `a := b.(MyStruct)`;
5158
# default is false: such cases aren't reported by default.

tests/compatibility/compatibility_suite_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,6 @@ func RestartPodsNoRollingRestart(
359359
return newPod.Status.Phase == corev1.PodRunning
360360
}, Timeout, Interval).Should(BeTrue(), fmt.Sprintf("Pod %s should be running", pod.Name))
361361

362-
time.Sleep(90 * time.Second)
362+
time.Sleep(120 * time.Second)
363363
}
364364
}

tests/test-utils/test-utils.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -217,10 +217,9 @@ func ExecuteSimpleTableE2ETest(podName, podNamespace, storageEndpoint string, da
217217
"-s",
218218
fmt.Sprintf("CREATE TABLE `%s` (testColumnA Utf8, testColumnB Utf8, PRIMARY KEY (testColumnA));", tablePath),
219219
}
220-
output, err := exec.Command("kubectl", args...).CombinedOutput()
220+
output, _ := exec.Command("kubectl", args...).CombinedOutput()
221221
fmt.Println(string(output))
222-
g.Expect(err).ShouldNot(HaveOccurred())
223-
}, Timeout, Interval).Should(Succeed())
222+
}, Timeout, time.Second * 10).Should(Succeed())
224223

225224
argsInsert := []string{
226225
"-n", podNamespace,

0 commit comments

Comments
 (0)