Skip to content

Commit

Permalink
Merge branch 'main' into fix_make_all_goimports
Browse files Browse the repository at this point in the history
  • Loading branch information
seeflood committed May 20, 2022
2 parents 47d1f86 + e1a0b55 commit bb91db8
Show file tree
Hide file tree
Showing 14 changed files with 20 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@ demo/state/common/client
etc/script/mdx
etcd
layotto_wasmer
nohup.out
nohup.out
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -284,4 +284,4 @@ help: Makefile
@echo -e "Commands below are used in Development 💻 and GitHub workflow 🌊.\n"
@echo -e "Usage: make <COMMANDS> <ARGS> ...\n\nCOMMANDS:"
@sed -n 's/^##//p' $< | column -t -s ':' | sed -e 's/^/ /'
@echo "$$USAGE_OPTIONS"
@echo "$$USAGE_OPTIONS"
2 changes: 1 addition & 1 deletion configs/integrate_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"listeners": [
{
"name": "grpc",
"address": "0.0.0.0:34904",
"address": "0.0.0.0:11104",
"bind_port": true,
"filter_chains": [
{
Expand Down
2 changes: 1 addition & 1 deletion etc/script/report.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ cd ..
cd sdk/go-sdk
echo "" > cover.out
echo "test go-sdk"
go test -count=1 -failfast -timeout 120s ./... -coverprofile cover.out -covermode=atomic
go test -count=1 -failfast -timeout 120s $(go list ./... | grep -v runtime) -coverprofile cover.out -covermode=atomic
cat cover.out >> ../../cover.out
cd ../..
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ require (
google.golang.org/protobuf v1.27.1
mosn.io/api v1.0.0
mosn.io/layotto/components v0.0.0-20220413092851-55c58dbb1a23
mosn.io/layotto/sdk/go-sdk v0.0.0-20220422112241-cd96c75e590f
mosn.io/layotto/spec v0.0.0-20220413092851-55c58dbb1a23
mosn.io/mosn v1.0.1
mosn.io/pkg v1.0.0
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2121,8 +2121,6 @@ mosn.io/api v0.0.0-20211217011300-b851d129be01/go.mod h1:TBv4bz2f2RbpgdohbVAFRFV
mosn.io/api v1.0.0 h1:EK5jHRaqeszV3tKzgNKX1NZf1JdPU9QTF6E276xQHPk=
mosn.io/api v1.0.0/go.mod h1:TBv4bz2f2RbpgdohbVAFRFVOoN8YyEUiLH3jAh752Qc=
mosn.io/holmes v1.0.1/go.mod h1:pZjPamcZk4Z16xlZySG1rU9psLUCOx6MVNuj/3bfkEk=
mosn.io/layotto/sdk/go-sdk v0.0.0-20220422112241-cd96c75e590f h1:YlTX+AVcE1IoRhHrl56rJnO0zhwyNwPqsHexYWJgSW8=
mosn.io/layotto/sdk/go-sdk v0.0.0-20220422112241-cd96c75e590f/go.mod h1:mMrIBDCM2kTSCFC5a7rog00FPxCVCSh5Qtq81X4f9f8=
mosn.io/mosn v0.25.1-0.20211217125944-69b50c40af81/go.mod h1:JwLkls6oMaap0+P1uZ1d1ccdLPigdK8xH8gDSm3SEq4=
mosn.io/mosn v1.0.1 h1:3X2Sh7B6K2PD/4cKZ72GtXohG+jeubojJBbArXQ/ZqI=
mosn.io/mosn v1.0.1/go.mod h1:NtUWYhOSHgC+yRlLLFGSD1zUbEXKm4XhvLwAbCh1F8U=
Expand Down
4 changes: 2 additions & 2 deletions make/ci.mk
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ integration.wasm: app.image.linux_amd64.faas
$(eval ARCH := $(word 2,$(subst _, ,$(PLATFORM))))
$(eval BUILD_IMAGE := $(REGISTRY_PREFIX)/faas-$(ARCH):$(VERSION))
$(eval WORKDIR := -w /go/src/${PROJECT_NAME} )
$(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))
$(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))
$(DOCKER) run --rm $(INTEGRATE_SUFFIX) $(BUILD_IMAGE) $(ACTION)

.PHONY: integration.runtime
Expand All @@ -68,5 +68,5 @@ integration.runtime: app.image.linux_amd64.integrate
$(eval ARCH := $(word 2,$(subst _, ,$(PLATFORM))))
$(eval BUILD_IMAGE := $(REGISTRY_PREFIX)/integrate-$(ARCH):$(VERSION))
$(eval WORKDIR := -w /go/src/${PROJECT_NAME} )
$(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))
$(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))
$(DOCKER) run --rm $(INTEGRATE_SUFFIX) ${BUILD_IMAGE} $(ACTION)
7 changes: 5 additions & 2 deletions make/common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,11 @@ endif
ifeq ($(origin DOCS_DIR),undefined)
DOCS_DIR := $(ROOT_DIR)/docs
endif
ifeq ($(origin TEST_DIR),undefined)
TEST_DIR := $(ROOT_DIR)/test
ifeq ($(origin TEST_WASM_DIR),undefined)
TEST_WASM_DIR := $(ROOT_DIR)/test
endif
ifeq ($(origin TEST_RUNTIME_DIR),undefined)
TEST_RUNTIME_DIR := $(ROOT_DIR)/sdk/go-sdk/test
endif
ifeq ($(origin DEMO_DIR),undefined)
DEMO_DIR := $(ROOT_DIR)/demo
Expand Down
2 changes: 1 addition & 1 deletion make/golang.mk
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ go.test: go.test.verify
@echo "===========> Run unit test in diagnostics"
$(GO) test -count=1 -timeout=10m -short -v `go list ./diagnostics/...`
@echo "===========> Run unit test in sdk/go-sdk"
@cd sdk/go-sdk && $(GO) test -count=1 -timeout=10m -short -v `go list ./...`
@cd sdk/go-sdk && $(GO) test -count=1 -timeout=10m -short -v `go list ./... | grep -v runtime`
@echo "===========> Run unit test in components"
@cd components/ && $(GO) test -count=1 -timeout=10m -short -v `go list ./...`
@echo "===========> Run unit test in pkg"
Expand Down
1 change: 1 addition & 0 deletions sdk/go-sdk/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ go 1.14

require (
github.com/golang/protobuf v1.5.0
github.com/google/uuid v1.1.2
github.com/pkg/errors v0.9.1
github.com/stretchr/testify v1.7.0
google.golang.org/grpc v1.37.0
Expand Down
1 change: 1 addition & 0 deletions sdk/go-sdk/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y=
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,5 @@
go build ./cmd/layotto
nohup redis-server &
nohup ./layotto start -c ./configs/integrate_config.json &
go get mosn.io/layotto/sdk/go-sdk/client
go test -p 1 -v ./test/runtime/...

cd sdk/go-sdk/test/runtime
go test -p 1 -v ./...
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (
var componentName = "redis"

func TestHelloApi(t *testing.T) {
cli, err := client.NewClientWithAddress("127.0.0.1:34904")
cli, err := client.NewClientWithAddress("127.0.0.1:11104")
if err != nil {
t.Fatal(err)
}
Expand All @@ -48,7 +48,7 @@ func TestHelloApi(t *testing.T) {
}

func TestStateApi(t *testing.T) {
cli, err := client.NewClientWithAddress("127.0.0.1:34904")
cli, err := client.NewClientWithAddress("127.0.0.1:11104")
if err != nil {
t.Fatal(err)
}
Expand All @@ -67,7 +67,7 @@ func TestStateApi(t *testing.T) {
}

func TestLockApi(t *testing.T) {
cli, err := client.NewClientWithAddress("127.0.0.1:34904")
cli, err := client.NewClientWithAddress("127.0.0.1:11104")
if err != nil {
t.Fatal(err)
}
Expand Down Expand Up @@ -138,7 +138,7 @@ func TestLockApi(t *testing.T) {
}

func TestSequencerApi(t *testing.T) {
cli, err := client.NewClientWithAddress("127.0.0.1:34904")
cli, err := client.NewClientWithAddress("127.0.0.1:11104")
if err != nil {
t.Fatal(err)
}
Expand Down

0 comments on commit bb91db8

Please sign in to comment.