[MM-61074] Fix errcheck issues in oauth_test.go and web_test.go (#30707)
Co-authored-by: Claude <noreply@anthropic.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
b8b3efda48
Коммит
bfb15ab179
@@ -37,13 +37,13 @@ type testHelper struct {
|
||||
}
|
||||
|
||||
// Setup creates an instance of testHelper.
|
||||
func Setup(t testing.TB) *testHelper {
|
||||
func Setup(tb testing.TB) *testHelper {
|
||||
dir, err := testlib.SetupTestResources()
|
||||
if err != nil {
|
||||
panic("failed to create temporary directory: " + err.Error())
|
||||
}
|
||||
|
||||
api4TestHelper := api4.Setup(t)
|
||||
api4TestHelper := api4.Setup(tb)
|
||||
|
||||
testHelper := &testHelper{
|
||||
TestHelper: api4TestHelper,
|
||||
@@ -59,13 +59,13 @@ func Setup(t testing.TB) *testHelper {
|
||||
}
|
||||
|
||||
// Setup creates an instance of testHelper.
|
||||
func SetupWithStoreMock(t testing.TB) *testHelper {
|
||||
func SetupWithStoreMock(tb testing.TB) *testHelper {
|
||||
dir, err := testlib.SetupTestResources()
|
||||
if err != nil {
|
||||
panic("failed to create temporary directory: " + err.Error())
|
||||
}
|
||||
|
||||
api4TestHelper := api4.SetupWithStoreMock(t)
|
||||
api4TestHelper := api4.SetupWithStoreMock(tb)
|
||||
systemStore := mocks.SystemStore{}
|
||||
systemStore.On("Get").Return(make(model.StringMap), nil)
|
||||
licenseStore := mocks.LicenseStore{}
|
||||
|
||||
@@ -27,9 +27,9 @@ type ServerTestHelper struct {
|
||||
}
|
||||
|
||||
//nolint:golint,unused
|
||||
func SetupServerTest(t testing.TB) *ServerTestHelper {
|
||||
func SetupServerTest(tb testing.TB) *ServerTestHelper {
|
||||
if testing.Short() {
|
||||
t.SkipNow()
|
||||
tb.SkipNow()
|
||||
}
|
||||
// Build a channel that will be used by the server to receive system signals...
|
||||
interruptChan := make(chan os.Signal, 1)
|
||||
|
||||
Ссылка в новой задаче
Block a user