Skip to content

Commit 851c634

Browse files
authored
Rename host tests to functional tests (#3782)
* Rename host tests to functional tests
1 parent 1a9695e commit 851c634

File tree

93 files changed

+507
-468
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+507
-468
lines changed

Makefile

+46-53
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,6 @@ endef
5959

6060
TEST_TIMEOUT := 20m
6161

62-
# TODO: INTEG_TEST should be functional tests
63-
INTEG_TEST_ROOT := ./host
64-
INTEG_TEST_XDC_ROOT := ./host/xdc
65-
INTEG_TEST_NDC_ROOT := ./host/ndc
66-
67-
PERSISTENCE_INTEGRATION_TEST_ROOT := ./common/persistence/tests
68-
DB_TOOL_INTEGRATION_TEST_ROOT := ./tools/tests
6962

7063
PROTO_ROOT := proto
7164
PROTO_FILES = $(shell find ./$(PROTO_ROOT)/internal -name "*.proto")
@@ -76,10 +69,15 @@ PROTO_OUT := api
7669
ALL_SRC := $(shell find . -name "*.go")
7770
ALL_SRC += go.mod
7871
ALL_SCRIPTS := $(shell find . -name "*.sh")
79-
# TODO (jeremy): Replace below with build tags and `go test ./...` for targets
72+
8073
TEST_DIRS := $(sort $(dir $(filter %_test.go,$(ALL_SRC))))
81-
INTEG_TEST_DIRS := $(filter $(INTEG_TEST_ROOT)/ $(INTEG_TEST_NDC_ROOT)/,$(TEST_DIRS))
82-
UNIT_TEST_DIRS := $(filter-out $(INTEG_TEST_ROOT)% $(INTEG_TEST_XDC_ROOT)% $(INTEG_TEST_NDC_ROOT)% $(PERSISTENCE_INTEGRATION_TEST_ROOT)% $(DB_TOOL_INTEGRATION_TEST_ROOT)%,$(TEST_DIRS))
74+
FUNCTIONAL_TEST_ROOT := ./tests
75+
FUNCTIONAL_TEST_XDC_ROOT := ./tests/xdc
76+
FUNCTIONAL_TEST_NDC_ROOT := ./tests/ndc
77+
DB_INTEGRATION_TEST_ROOT := ./common/persistence/tests
78+
DB_TOOL_INTEGRATION_TEST_ROOT := ./tools/tests
79+
INTEGRATION_TEST_DIRS := $(DB_INTEGRATION_TEST_ROOT) $(DB_TOOL_INTEGRATION_TEST_ROOT)
80+
UNIT_TEST_DIRS := $(filter-out $(FUNCTIONAL_TEST_ROOT)% $(FUNCTIONAL_TEST_XDC_ROOT)% $(FUNCTIONAL_TEST_NDC_ROOT)% $(DB_INTEGRATION_TEST_ROOT)% $(DB_TOOL_INTEGRATION_TEST_ROOT)%,$(TEST_DIRS))
8381

8482
# go.opentelemetry.io/otel/sdk/metric@v0.31.0 - there are breaking changes in v0.32.0.
8583
# github.com/urfave/cli/v2@v2.4.0 - needs to accept comma in values before unlocking https://github.com/urfave/cli/pull/1241.
@@ -89,26 +87,26 @@ PINNED_DEPENDENCIES := \
8987
github.com/urfave/cli/v2@v2.4.0
9088

9189
# Code coverage output files.
92-
COVER_ROOT := ./.coverage
93-
UNIT_COVER_PROFILE := $(COVER_ROOT)/unit_coverprofile.out
94-
INTEGRATION_COVER_PROFILE := $(COVER_ROOT)/integration_coverprofile.out
95-
DB_TOOL_COVER_PROFILE := $(COVER_ROOT)/db_tool_coverprofile.out
96-
INTEG_COVER_PROFILE := $(COVER_ROOT)/integ_$(PERSISTENCE_DRIVER)_coverprofile.out
97-
INTEG_XDC_COVER_PROFILE := $(COVER_ROOT)/integ_xdc_$(PERSISTENCE_DRIVER)_coverprofile.out
98-
INTEG_NDC_COVER_PROFILE := $(COVER_ROOT)/integ_ndc_$(PERSISTENCE_DRIVER)_coverprofile.out
99-
SUMMARY_COVER_PROFILE := $(COVER_ROOT)/summary.out
90+
COVER_ROOT := ./.coverage
91+
UNIT_COVER_PROFILE := $(COVER_ROOT)/unit_coverprofile.out
92+
INTEGRATION_COVER_PROFILE := $(COVER_ROOT)/integration_coverprofile.out
93+
DB_TOOL_COVER_PROFILE := $(COVER_ROOT)/db_tool_coverprofile.out
94+
FUNCTIONAL_COVER_PROFILE := $(COVER_ROOT)/functional_$(PERSISTENCE_DRIVER)_coverprofile.out
95+
FUNCTIONAL_XDC_COVER_PROFILE := $(COVER_ROOT)/functional_xdc_$(PERSISTENCE_DRIVER)_coverprofile.out
96+
FUNCTIONAL_NDC_COVER_PROFILE := $(COVER_ROOT)/functional_ndc_$(PERSISTENCE_DRIVER)_coverprofile.out
97+
SUMMARY_COVER_PROFILE := $(COVER_ROOT)/summary.out
10098

10199
# DB
102100
SQL_USER ?= temporal
103101
SQL_PASSWORD ?= temporal
104102

105-
# Need the following option to have integration tests count towards coverage. godoc below:
103+
# Need the following option to have integration and functional tests count towards coverage. godoc below:
106104
# -coverpkg pkg1,pkg2,pkg3
107105
# Apply coverage analysis in each test to the given list of packages.
108106
# The default is for each test to analyze only the package being tested.
109107
# Packages are specified as import paths.
110-
INTEG_TEST_COVERPKG := -coverpkg="$(MODULE_ROOT)/client/...,$(MODULE_ROOT)/common/...,$(MODULE_ROOT)/service/..."
111-
108+
INTEGRATION_TEST_COVERPKG := -coverpkg="$(MODULE_ROOT)/common/persistence/...,$(MODULE_ROOT)/tools/..."
109+
FUNCTIONAL_TEST_COVERPKG := -coverpkg="$(MODULE_ROOT)/client/...,$(MODULE_ROOT)/common/...,$(MODULE_ROOT)/service/...,$(MODULE_ROOT)/temporal/...,$(MODULE_ROOT)/tools/..."
112110
##### Tools #####
113111
update-checkers:
114112
@printf $(COLOR) "Install/update check tools..."
@@ -262,32 +260,31 @@ build-tests:
262260

263261
unit-test: clean-test-results
264262
@printf $(COLOR) "Run unit tests..."
265-
@go test $(UNIT_TEST_DIRS) -timeout=$(TEST_TIMEOUT) $(TEST_TAG) -race | tee -a test.log
263+
@go test $(UNIT_TEST_DIRS) -timeout=$(TEST_TIMEOUT) $(TEST_DIRS) -race | tee -a test.log
266264
@! grep -q "^--- FAIL" test.log
267265

268-
db-integration-test: clean-test-results
266+
integration-test: clean-test-results
269267
@printf $(COLOR) "Run integration tests..."
270-
@go test $(PERSISTENCE_INTEGRATION_TEST_ROOT) -timeout=$(TEST_TIMEOUT) $(TEST_TAG) | tee -a test.log
271-
@go test $(DB_TOOL_INTEGRATION_TEST_ROOT) -timeout=$(TEST_TIMEOUT) $(TEST_TAG) | tee -a test.log
268+
@go test $(INTEGRATION_TEST_DIRS) -timeout=$(TEST_TIMEOUT) $(TEST_TAG) -race | tee -a test.log
272269
@! grep -q "^--- FAIL" test.log
273270

274-
# TODO: rename it to functional-test
275-
integration-test: clean-test-results
276-
@printf $(COLOR) "Run integration tests..."
277-
@go test $(INTEG_TEST_DIRS) -timeout=$(TEST_TIMEOUT) $(TEST_TAG) -race | tee -a test.log
271+
functional-test: clean-test-results
272+
@printf $(COLOR) "Run functional tests..."
273+
@go test $(FUNCTIONAL_TEST_ROOT) -timeout=$(TEST_TIMEOUT) $(TEST_TAG) -race | tee -a test.log
274+
@go test $(FUNCTIONAL_TEST_NDC_ROOT) -timeout=$(TEST_TIMEOUT) $(TEST_TAG) -race | tee -a test.log
278275
# Need to run xdc tests with race detector off because of ringpop bug causing data race issue.
279-
@go test $(INTEG_TEST_XDC_ROOT) -timeout=$(TEST_TIMEOUT) $(TEST_TAG) | tee -a test.log
276+
@go test $(FUNCTIONAL_TEST_XDC_ROOT) -timeout=$(TEST_TIMEOUT) $(TEST_TAG) | tee -a test.log
280277
@! grep -q "^--- FAIL" test.log
281278

282-
# TODO: rename it to functional-test
283-
integration-with-fault-injection-test: clean-test-results
279+
functional-with-fault-injection-test: clean-test-results
284280
@printf $(COLOR) "Run integration tests with fault injection..."
285-
@go test $(INTEG_TEST_DIRS) -timeout=$(TEST_TIMEOUT) $(TEST_TAG) -race -PersistenceFaultInjectionRate=0.005 | tee -a test.log
281+
@go test $(FUNCTIONAL_TEST_ROOT) -timeout=$(TEST_TIMEOUT) $(TEST_TAG) -race -PersistenceFaultInjectionRate=0.005 | tee -a test.log
282+
@go test $(FUNCTIONAL_TEST_NDC_ROOT) -timeout=$(TEST_TIMEOUT) $(TEST_TAG) -race -PersistenceFaultInjectionRate=0.005 | tee -a test.log
286283
# Need to run xdc tests with race detector off because of ringpop bug causing data race issue.
287-
@go test $(INTEG_TEST_XDC_ROOT) -timeout=$(TEST_TIMEOUT) $(TEST_TAG) -PersistenceFaultInjectionRate=0.005 | tee -a test.log
284+
@go test $(FUNCTIONAL_TEST_XDC_ROOT) -timeout=$(TEST_TIMEOUT) $(TEST_TAG) -PersistenceFaultInjectionRate=0.005 | tee -a test.log
288285
@! grep -q "^--- FAIL" test.log
289286

290-
test: unit-test db-integration-test integration-test integration-with-fault-injection-test
287+
test: unit-test integration-test functional-test functional-with-fault-injection-test
291288

292289
##### Coverage #####
293290
$(COVER_ROOT):
@@ -296,27 +293,23 @@ $(COVER_ROOT):
296293
unit-test-coverage: $(COVER_ROOT)
297294
@printf $(COLOR) "Run unit tests with coverage..."
298295
@echo "mode: atomic" > $(UNIT_COVER_PROFILE)
299-
@go test ./$(UNIT_TEST_DIRS) -timeout=$(TEST_TIMEOUT) -race -coverprofile=$(UNIT_COVER_PROFILE) || exit 1;
296+
@go test ./$(UNIT_TEST_DIRS) -timeout=$(TEST_TIMEOUT) -race -tags=unittest -coverprofile=$(UNIT_COVER_PROFILE) || exit 1;
300297

301-
db-integration-test-coverage: $(COVER_ROOT)
298+
integration-test-coverage: $(COVER_ROOT)
302299
@printf $(COLOR) "Run integration tests with coverage..."
303-
@go test $(PERSISTENCE_INTEGRATION_TEST_ROOT) -timeout=$(TEST_TIMEOUT) $(TEST_TAG) -coverpkg="./common/..." -coverprofile=$(INTEGRATION_COVER_PROFILE)
304-
@go test $(DB_TOOL_INTEGRATION_TEST_ROOT) -timeout=$(TEST_TIMEOUT) $(TEST_TAG) -coverpkg="./tools/..." -coverprofile=$(DB_TOOL_COVER_PROFILE)
300+
@go test $(INTEGRATION_TEST_DIRS) -timeout=$(TEST_TIMEOUT) $(TEST_TAG) $(INTEGRATION_TEST_COVERPKG) -coverprofile=$(INTEGRATION_COVER_PROFILE)
305301

306-
# TODO: rename it to functional-test
307-
integration-test-coverage: $(COVER_ROOT)
308-
@printf $(COLOR) "Run integration tests with coverage with $(PERSISTENCE_DRIVER) driver..."
309-
@go test $(INTEG_TEST_ROOT) -timeout=$(TEST_TIMEOUT) -race $(TEST_TAG) -persistenceType=$(PERSISTENCE_TYPE) -persistenceDriver=$(PERSISTENCE_DRIVER) $(INTEG_TEST_COVERPKG) -coverprofile=$(INTEG_COVER_PROFILE)
310-
311-
# TODO: rename it to functional-test
312-
integration-test-xdc-coverage: $(COVER_ROOT)
313-
@printf $(COLOR) "Run integration test for cross DC with coverage with $(PERSISTENCE_DRIVER) driver..."
314-
@go test $(INTEG_TEST_XDC_ROOT) -timeout=$(TEST_TIMEOUT) $(TEST_TAG) -persistenceType=$(PERSISTENCE_TYPE) -persistenceDriver=$(PERSISTENCE_DRIVER) $(INTEG_TEST_COVERPKG) -coverprofile=$(INTEG_XDC_COVER_PROFILE)
315-
316-
# TODO: rename it to functional-test
317-
integration-test-ndc-coverage: $(COVER_ROOT)
318-
@printf $(COLOR) "Run integration test for NDC with coverage with $(PERSISTENCE_DRIVER) driver..."
319-
@go test $(INTEG_TEST_NDC_ROOT) -timeout=$(TEST_TIMEOUT) -race $(TEST_TAG) -persistenceType=$(PERSISTENCE_TYPE) -persistenceDriver=$(PERSISTENCE_DRIVER) $(INTEG_TEST_COVERPKG) -coverprofile=$(INTEG_NDC_COVER_PROFILE)
302+
functional-test-coverage: $(COVER_ROOT)
303+
@printf $(COLOR) "Run functional tests with coverage with $(PERSISTENCE_DRIVER) driver..."
304+
@go test $(FUNCTIONAL_TEST_ROOT) -timeout=$(TEST_TIMEOUT) -race $(TEST_TAG) -persistenceType=$(PERSISTENCE_TYPE) -persistenceDriver=$(PERSISTENCE_DRIVER) $(FUNCTIONAL_TEST_COVERPKG) -coverprofile=$(FUNCTIONAL_COVER_PROFILE)
305+
306+
functional-test-xdc-coverage: $(COVER_ROOT)
307+
@printf $(COLOR) "Run functional test for cross DC with coverage with $(PERSISTENCE_DRIVER) driver..."
308+
@go test $(FUNCTIONAL_TEST_XDC_ROOT) -timeout=$(TEST_TIMEOUT) $(TEST_TAG) -persistenceType=$(PERSISTENCE_TYPE) -persistenceDriver=$(PERSISTENCE_DRIVER) $(FUNCTIONAL_TEST_COVERPKG) -coverprofile=$(FUNCTIONAL_XDC_COVER_PROFILE)
309+
310+
functional-test-ndc-coverage: $(COVER_ROOT)
311+
@printf $(COLOR) "Run functional test for NDC with coverage with $(PERSISTENCE_DRIVER) driver..."
312+
@go test $(FUNCTIONAL_TEST_NDC_ROOT) -timeout=$(TEST_TIMEOUT) -race $(TEST_TAG) -persistenceType=$(PERSISTENCE_TYPE) -persistenceDriver=$(PERSISTENCE_DRIVER) $(FUNCTIONAL_TEST_COVERPKG) -coverprofile=$(FUNCTIONAL_NDC_COVER_PROFILE)
320313

321314
.PHONY: $(SUMMARY_COVER_PROFILE)
322315
$(SUMMARY_COVER_PROFILE): $(COVER_ROOT)

common/archiver/filestore/historyArchiver_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import (
3434

3535
enumspb "go.temporal.io/api/enums/v1"
3636

37-
"go.temporal.io/server/tests/testhelper"
37+
"go.temporal.io/server/tests/testutils"
3838

3939
"github.com/golang/mock/gomock"
4040
"github.com/stretchr/testify/require"
@@ -355,7 +355,7 @@ func (s *historyArchiverSuite) TestArchive_Success() {
355355
historyIterator.EXPECT().HasNext().Return(false),
356356
)
357357

358-
dir := testhelper.MkdirTemp(s.T(), "", "TestArchiveSingleRead")
358+
dir := testutils.MkdirTemp(s.T(), "", "TestArchiveSingleRead")
359359

360360
historyArchiver := s.newTestHistoryArchiver(historyIterator)
361361
request := &archiver.ArchiveHistoryRequest{
@@ -538,7 +538,7 @@ func (s *historyArchiverSuite) TestArchiveAndGet() {
538538
historyIterator.EXPECT().HasNext().Return(false),
539539
)
540540

541-
dir := testhelper.MkdirTemp(s.T(), "", "TestArchiveAndGet")
541+
dir := testutils.MkdirTemp(s.T(), "", "TestArchiveAndGet")
542542

543543
historyArchiver := s.newTestHistoryArchiver(historyIterator)
544544
archiveRequest := &archiver.ArchiveHistoryRequest{

common/archiver/filestore/util_test.go

+8-9
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ import (
3030
"testing"
3131
"time"
3232

33-
"go.temporal.io/server/tests/testhelper"
34-
3533
"github.com/stretchr/testify/require"
3634
"github.com/stretchr/testify/suite"
3735
enumspb "go.temporal.io/api/enums/v1"
@@ -40,6 +38,7 @@ import (
4038
"go.temporal.io/server/common"
4139
"go.temporal.io/server/common/archiver"
4240
"go.temporal.io/server/common/codec"
41+
"go.temporal.io/server/tests/testutils"
4342
)
4443

4544
const (
@@ -61,7 +60,7 @@ func (s *UtilSuite) SetupTest() {
6160
}
6261

6362
func (s *UtilSuite) TestFileExists() {
64-
dir := testhelper.MkdirTemp(s.T(), "", "TestFileExists")
63+
dir := testutils.MkdirTemp(s.T(), "", "TestFileExists")
6564
s.assertDirectoryExists(dir)
6665

6766
exists, err := fileExists(dir)
@@ -80,7 +79,7 @@ func (s *UtilSuite) TestFileExists() {
8079
}
8180

8281
func (s *UtilSuite) TestDirectoryExists() {
83-
dir := testhelper.MkdirTemp(s.T(), "", "TestDirectoryExists")
82+
dir := testutils.MkdirTemp(s.T(), "", "TestDirectoryExists")
8483
s.assertDirectoryExists(dir)
8584

8685
subdir := "subdir"
@@ -97,7 +96,7 @@ func (s *UtilSuite) TestDirectoryExists() {
9796
}
9897

9998
func (s *UtilSuite) TestMkdirAll() {
100-
dir := testhelper.MkdirTemp(s.T(), "", "TestMkdirAll")
99+
dir := testutils.MkdirTemp(s.T(), "", "TestMkdirAll")
101100
s.assertDirectoryExists(dir)
102101

103102
s.NoError(mkdirAll(dir, testDirMode))
@@ -116,7 +115,7 @@ func (s *UtilSuite) TestMkdirAll() {
116115
}
117116

118117
func (s *UtilSuite) TestWriteFile() {
119-
dir := testhelper.MkdirTemp(s.T(), "", "TestWriteFile")
118+
dir := testutils.MkdirTemp(s.T(), "", "TestWriteFile")
120119
s.assertDirectoryExists(dir)
121120

122121
filename := "test-file-name"
@@ -134,7 +133,7 @@ func (s *UtilSuite) TestWriteFile() {
134133
}
135134

136135
func (s *UtilSuite) TestReadFile() {
137-
dir := testhelper.MkdirTemp(s.T(), "", "TestReadFile")
136+
dir := testutils.MkdirTemp(s.T(), "", "TestReadFile")
138137
s.assertDirectoryExists(dir)
139138

140139
filename := "test-file-name"
@@ -151,7 +150,7 @@ func (s *UtilSuite) TestReadFile() {
151150
}
152151

153152
func (s *UtilSuite) TestListFilesByPrefix() {
154-
dir := testhelper.MkdirTemp(s.T(), "", "TestListFiles")
153+
dir := testutils.MkdirTemp(s.T(), "", "TestListFiles")
155154
s.assertDirectoryExists(dir)
156155

157156
filename := "test-file-name"
@@ -214,7 +213,7 @@ func (s *UtilSuite) TestEncodeDecodeHistoryBatches() {
214213
}
215214

216215
func (s *UtilSuite) TestValidateDirPath() {
217-
dir := testhelper.MkdirTemp(s.T(), "", "TestValidateDirPath")
216+
dir := testutils.MkdirTemp(s.T(), "", "TestValidateDirPath")
218217
s.assertDirectoryExists(dir)
219218
filename := "test-file-name"
220219
s.createFile(dir, filename)

common/archiver/filestore/visibilityArchiver_test.go

+3-4
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ import (
3232
"testing"
3333
"time"
3434

35-
"go.temporal.io/server/tests/testhelper"
36-
3735
"github.com/golang/mock/gomock"
3836
"github.com/stretchr/testify/require"
3937
"github.com/stretchr/testify/suite"
@@ -51,6 +49,7 @@ import (
5149
"go.temporal.io/server/common/log"
5250
"go.temporal.io/server/common/payload"
5351
"go.temporal.io/server/common/primitives/timestamp"
52+
"go.temporal.io/server/tests/testutils"
5453
)
5554

5655
const (
@@ -166,7 +165,7 @@ func (s *visibilityArchiverSuite) TestArchive_Fail_NonRetryableErrorOption() {
166165
}
167166

168167
func (s *visibilityArchiverSuite) TestArchive_Success() {
169-
dir := testhelper.MkdirTemp(s.T(), "", "TestVisibilityArchive")
168+
dir := testutils.MkdirTemp(s.T(), "", "TestVisibilityArchive")
170169

171170
visibilityArchiver := s.newTestVisibilityArchiver()
172171
closeTimestamp := timestamp.TimeNowPtrUtc()
@@ -472,7 +471,7 @@ func (s *visibilityArchiverSuite) TestQuery_Success_SmallPageSize() {
472471
}
473472

474473
func (s *visibilityArchiverSuite) TestArchiveAndQuery() {
475-
dir := testhelper.MkdirTemp(s.T(), "", "TestArchiveAndQuery")
474+
dir := testutils.MkdirTemp(s.T(), "", "TestArchiveAndQuery")
476475

477476
visibilityArchiver := s.newTestVisibilityArchiver()
478477
mockParser := NewMockQueryParser(s.controller)

common/config/loader_test.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ import (
2828
"os"
2929
"testing"
3030

31-
"go.temporal.io/server/tests/testhelper"
32-
3331
"github.com/stretchr/testify/require"
3432
"github.com/stretchr/testify/suite"
33+
34+
"go.temporal.io/server/tests/testutils"
3535
)
3636

3737
const fileMode = os.FileMode(0644)
@@ -61,7 +61,7 @@ func (s *LoaderSuite) SetupTest() {
6161
}
6262

6363
func (s *LoaderSuite) TestBaseYaml() {
64-
dir := testhelper.MkdirTemp(s.T(), "", "loader.testBaseYaml")
64+
dir := testutils.MkdirTemp(s.T(), "", "loader.testBaseYaml")
6565

6666
data := buildConfig("", "")
6767
err := os.WriteFile(path(dir, "base.yaml"), []byte(data), fileMode)
@@ -82,7 +82,7 @@ func (s *LoaderSuite) TestBaseYaml() {
8282
}
8383

8484
func (s *LoaderSuite) TestHierarchy() {
85-
dir := testhelper.MkdirTemp(s.T(), "", "loader.testHierarchy")
85+
dir := testutils.MkdirTemp(s.T(), "", "loader.testHierarchy")
8686

8787
s.createFile(dir, "base.yaml", "", "")
8888
s.createFile(dir, "development.yaml", "development", "")

common/log/zap_logger_test.go

+2-3
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,13 @@ import (
3333
"strings"
3434
"testing"
3535

36-
"go.temporal.io/server/tests/testhelper"
37-
3836
"github.com/stretchr/testify/assert"
3937
"github.com/stretchr/testify/require"
4038
"github.com/stretchr/testify/suite"
4139
"go.uber.org/zap"
4240

4341
"go.temporal.io/server/common/log/tag"
42+
"go.temporal.io/server/tests/testutils"
4443
)
4544

4645
type LogSuite struct {
@@ -68,7 +67,7 @@ func (s *LogSuite) TestParseLogLevel() {
6867
}
6968

7069
func (s *LogSuite) TestNewLogger() {
71-
dir := testhelper.MkdirTemp(s.T(), "", "config.testNewLogger")
70+
dir := testutils.MkdirTemp(s.T(), "", "config.testNewLogger")
7271

7372
cfg := Config{
7473
Level: "info",

common/persistence/cassandra/test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ import (
3838
"go.temporal.io/server/common/persistence/nosql/nosqlplugin/cassandra/gocql"
3939
"go.temporal.io/server/common/resolver"
4040
"go.temporal.io/server/environment"
41-
"go.temporal.io/server/tests/testhelper"
41+
"go.temporal.io/server/tests/testutils"
4242
)
4343

4444
const (
@@ -109,7 +109,7 @@ func (s *TestCluster) SetupTestDatabase() {
109109
schemaDir := s.schemaDir + "/"
110110

111111
if !strings.HasPrefix(schemaDir, "/") && !strings.HasPrefix(schemaDir, "../") {
112-
temporalPackageDir := testhelper.GetRepoRootDirectory()
112+
temporalPackageDir := testutils.GetRepoRootDirectory()
113113
schemaDir = path.Join(temporalPackageDir, schemaDir)
114114
}
115115

common/persistence/persistence-tests/historyV2PersistenceTest.go

+1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ import (
3737
enumspb "go.temporal.io/api/enums/v1"
3838
historypb "go.temporal.io/api/history/v1"
3939
"go.temporal.io/api/serviceerror"
40+
4041
"go.temporal.io/server/common/persistence/serialization"
4142

4243
persistencespb "go.temporal.io/server/api/persistence/v1"

0 commit comments

Comments
 (0)