Skip to content

Commit bb91db8

Browse files
authored
Merge branch 'main' into fix_make_all_goimports
2 parents 47d1f86 + e1a0b55 commit bb91db8

14 files changed

+20
-19
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,4 @@ demo/state/common/client
6161
etc/script/mdx
6262
etcd
6363
layotto_wasmer
64-
nohup.out
64+
nohup.out

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -284,4 +284,4 @@ help: Makefile
284284
@echo -e "Commands below are used in Development 💻 and GitHub workflow 🌊.\n"
285285
@echo -e "Usage: make <COMMANDS> <ARGS> ...\n\nCOMMANDS:"
286286
@sed -n 's/^##//p' $< | column -t -s ':' | sed -e 's/^/ /'
287-
@echo "$$USAGE_OPTIONS"
287+
@echo "$$USAGE_OPTIONS"

configs/integrate_config.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"listeners": [
77
{
88
"name": "grpc",
9-
"address": "0.0.0.0:34904",
9+
"address": "0.0.0.0:11104",
1010
"bind_port": true,
1111
"filter_chains": [
1212
{

etc/script/report.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ cd ..
1717
cd sdk/go-sdk
1818
echo "" > cover.out
1919
echo "test go-sdk"
20-
go test -count=1 -failfast -timeout 120s ./... -coverprofile cover.out -covermode=atomic
20+
go test -count=1 -failfast -timeout 120s $(go list ./... | grep -v runtime) -coverprofile cover.out -covermode=atomic
2121
cat cover.out >> ../../cover.out
2222
cd ../..

go.mod

-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ require (
3434
google.golang.org/protobuf v1.27.1
3535
mosn.io/api v1.0.0
3636
mosn.io/layotto/components v0.0.0-20220413092851-55c58dbb1a23
37-
mosn.io/layotto/sdk/go-sdk v0.0.0-20220422112241-cd96c75e590f
3837
mosn.io/layotto/spec v0.0.0-20220413092851-55c58dbb1a23
3938
mosn.io/mosn v1.0.1
4039
mosn.io/pkg v1.0.0

go.sum

-2
Original file line numberDiff line numberDiff line change
@@ -2121,8 +2121,6 @@ mosn.io/api v0.0.0-20211217011300-b851d129be01/go.mod h1:TBv4bz2f2RbpgdohbVAFRFV
21212121
mosn.io/api v1.0.0 h1:EK5jHRaqeszV3tKzgNKX1NZf1JdPU9QTF6E276xQHPk=
21222122
mosn.io/api v1.0.0/go.mod h1:TBv4bz2f2RbpgdohbVAFRFVOoN8YyEUiLH3jAh752Qc=
21232123
mosn.io/holmes v1.0.1/go.mod h1:pZjPamcZk4Z16xlZySG1rU9psLUCOx6MVNuj/3bfkEk=
2124-
mosn.io/layotto/sdk/go-sdk v0.0.0-20220422112241-cd96c75e590f h1:YlTX+AVcE1IoRhHrl56rJnO0zhwyNwPqsHexYWJgSW8=
2125-
mosn.io/layotto/sdk/go-sdk v0.0.0-20220422112241-cd96c75e590f/go.mod h1:mMrIBDCM2kTSCFC5a7rog00FPxCVCSh5Qtq81X4f9f8=
21262124
mosn.io/mosn v0.25.1-0.20211217125944-69b50c40af81/go.mod h1:JwLkls6oMaap0+P1uZ1d1ccdLPigdK8xH8gDSm3SEq4=
21272125
mosn.io/mosn v1.0.1 h1:3X2Sh7B6K2PD/4cKZ72GtXohG+jeubojJBbArXQ/ZqI=
21282126
mosn.io/mosn v1.0.1/go.mod h1:NtUWYhOSHgC+yRlLLFGSD1zUbEXKm4XhvLwAbCh1F8U=

make/ci.mk

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ integration.wasm: app.image.linux_amd64.faas
5858
$(eval ARCH := $(word 2,$(subst _, ,$(PLATFORM))))
5959
$(eval BUILD_IMAGE := $(REGISTRY_PREFIX)/faas-$(ARCH):$(VERSION))
6060
$(eval WORKDIR := -w /go/src/${PROJECT_NAME} )
61-
$(eval INTEGRATE_SUFFIX := -v $(ROOT_DIR):/go/src/${PROJECT_NAME} -v ${TEST_DIR}/wasm/wasm_test.sh:/go/src/${PROJECT_NAME}/wasm_test.sh $(WORKDIR))
61+
$(eval INTEGRATE_SUFFIX := -v $(ROOT_DIR):/go/src/${PROJECT_NAME} -v ${TEST_WASM_DIR}/wasm/wasm_test.sh:/go/src/${PROJECT_NAME}/wasm_test.sh $(WORKDIR))
6262
$(DOCKER) run --rm $(INTEGRATE_SUFFIX) $(BUILD_IMAGE) $(ACTION)
6363

6464
.PHONY: integration.runtime
@@ -68,5 +68,5 @@ integration.runtime: app.image.linux_amd64.integrate
6868
$(eval ARCH := $(word 2,$(subst _, ,$(PLATFORM))))
6969
$(eval BUILD_IMAGE := $(REGISTRY_PREFIX)/integrate-$(ARCH):$(VERSION))
7070
$(eval WORKDIR := -w /go/src/${PROJECT_NAME} )
71-
$(eval INTEGRATE_SUFFIX := -v $(ROOT_DIR):/go/src/${PROJECT_NAME} -v ${TEST_DIR}/runtime/integrate_test.sh:/go/src/${PROJECT_NAME}/integrate_test.sh $(WORKDIR))
71+
$(eval INTEGRATE_SUFFIX := -v $(ROOT_DIR):/go/src/${PROJECT_NAME} -v ${TEST_RUNTIME_DIR}/runtime/integrate_test.sh:/go/src/${PROJECT_NAME}/integrate_test.sh $(WORKDIR))
7272
$(DOCKER) run --rm $(INTEGRATE_SUFFIX) ${BUILD_IMAGE} $(ACTION)

make/common.mk

+5-2
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,11 @@ endif
3232
ifeq ($(origin DOCS_DIR),undefined)
3333
DOCS_DIR := $(ROOT_DIR)/docs
3434
endif
35-
ifeq ($(origin TEST_DIR),undefined)
36-
TEST_DIR := $(ROOT_DIR)/test
35+
ifeq ($(origin TEST_WASM_DIR),undefined)
36+
TEST_WASM_DIR := $(ROOT_DIR)/test
37+
endif
38+
ifeq ($(origin TEST_RUNTIME_DIR),undefined)
39+
TEST_RUNTIME_DIR := $(ROOT_DIR)/sdk/go-sdk/test
3740
endif
3841
ifeq ($(origin DEMO_DIR),undefined)
3942
DEMO_DIR := $(ROOT_DIR)/demo

make/golang.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ go.test: go.test.verify
105105
@echo "===========> Run unit test in diagnostics"
106106
$(GO) test -count=1 -timeout=10m -short -v `go list ./diagnostics/...`
107107
@echo "===========> Run unit test in sdk/go-sdk"
108-
@cd sdk/go-sdk && $(GO) test -count=1 -timeout=10m -short -v `go list ./...`
108+
@cd sdk/go-sdk && $(GO) test -count=1 -timeout=10m -short -v `go list ./... | grep -v runtime`
109109
@echo "===========> Run unit test in components"
110110
@cd components/ && $(GO) test -count=1 -timeout=10m -short -v `go list ./...`
111111
@echo "===========> Run unit test in pkg"

sdk/go-sdk/go.mod

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ go 1.14
44

55
require (
66
github.com/golang/protobuf v1.5.0
7+
github.com/google/uuid v1.1.2
78
github.com/pkg/errors v0.9.1
89
github.com/stretchr/testify v1.7.0
910
google.golang.org/grpc v1.37.0

sdk/go-sdk/go.sum

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
2929
github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
3030
github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
3131
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
32+
github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y=
3233
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
3334
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
3435
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=

test/runtime/integrate_test.sh renamed to sdk/go-sdk/test/runtime/integrate_test.sh

+2-3
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,5 @@
1717
go build ./cmd/layotto
1818
nohup redis-server &
1919
nohup ./layotto start -c ./configs/integrate_config.json &
20-
go get mosn.io/layotto/sdk/go-sdk/client
21-
go test -p 1 -v ./test/runtime/...
22-
20+
cd sdk/go-sdk/test/runtime
21+
go test -p 1 -v ./...

test/runtime/redis_integrate_test.go renamed to sdk/go-sdk/test/runtime/redis_integrate_test.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import (
3131
var componentName = "redis"
3232

3333
func TestHelloApi(t *testing.T) {
34-
cli, err := client.NewClientWithAddress("127.0.0.1:34904")
34+
cli, err := client.NewClientWithAddress("127.0.0.1:11104")
3535
if err != nil {
3636
t.Fatal(err)
3737
}
@@ -48,7 +48,7 @@ func TestHelloApi(t *testing.T) {
4848
}
4949

5050
func TestStateApi(t *testing.T) {
51-
cli, err := client.NewClientWithAddress("127.0.0.1:34904")
51+
cli, err := client.NewClientWithAddress("127.0.0.1:11104")
5252
if err != nil {
5353
t.Fatal(err)
5454
}
@@ -67,7 +67,7 @@ func TestStateApi(t *testing.T) {
6767
}
6868

6969
func TestLockApi(t *testing.T) {
70-
cli, err := client.NewClientWithAddress("127.0.0.1:34904")
70+
cli, err := client.NewClientWithAddress("127.0.0.1:11104")
7171
if err != nil {
7272
t.Fatal(err)
7373
}
@@ -138,7 +138,7 @@ func TestLockApi(t *testing.T) {
138138
}
139139

140140
func TestSequencerApi(t *testing.T) {
141-
cli, err := client.NewClientWithAddress("127.0.0.1:34904")
141+
cli, err := client.NewClientWithAddress("127.0.0.1:11104")
142142
if err != nil {
143143
t.Fatal(err)
144144
}

0 commit comments

Comments
 (0)