diff --git a/.github/workflows/test-hack.yml b/.github/workflows/test-hack.yml index fc7222deec7..eaabe9755e8 100644 --- a/.github/workflows/test-hack.yml +++ b/.github/workflows/test-hack.yml @@ -79,6 +79,9 @@ jobs: - name: dependencies run: | make proto/deps + - name: Pre-Run tests for hack packages + run: | + make test/hack - name: Run tests for hack packages / gotestfmt run: | TEST_RESULT_DIR=${GITHUB_WORKSPACE} make test/hack/gotestfmt diff --git a/Makefile.d/test.mk b/Makefile.d/test.mk index a859dea1896..c5b71ab7aab 100644 --- a/Makefile.d/test.mk +++ b/Makefile.d/test.mk @@ -90,6 +90,7 @@ test/hack/tparse: \ tparse/install set -euo pipefail rm -rf "$(TEST_RESULT_DIR)/`echo $@ | sed -e 's%/%-%g'`-result.json" + go mod vendor go test -short -shuffle=on -race -mod=readonly -json -cover \ $(ROOTDIR)/hack/gorules/... \ $(ROOTDIR)/hack/helm/... \ @@ -97,6 +98,7 @@ test/hack/tparse: \ $(ROOTDIR)/hack/tools/... \ | tee "$(TEST_RESULT_DIR)/`echo $@ | sed -e 's%/%-%g'`-result.json" \ | tparse -pass -notests + rm -rf $(ROOTDIR)/vendor .PHONY: test/all/tparse ## run tests for all Go codes and show table @@ -154,6 +156,7 @@ test/hack/gotestfmt: \ gotestfmt/install set -euo pipefail rm -rf "$(TEST_RESULT_DIR)/`echo $@ | sed -e 's%/%-%g'`-result.json" + go mod vendor go test -short -shuffle=on -race -mod=readonly -json -cover \ $(ROOTDIR)/hack/gorules/... \ $(ROOTDIR)/hack/helm/... \ @@ -161,6 +164,7 @@ test/hack/gotestfmt: \ $(ROOTDIR)/hack/tools/... \ | tee "$(TEST_RESULT_DIR)/`echo $@ | sed -e 's%/%-%g'`-result.json" \ | gotestfmt -showteststatus + rm -rf $(ROOTDIR)/vendor .PHONY: test/all/gotestfmt ## run tests for all Go codes and show table @@ -190,11 +194,13 @@ test/cmd: .PHONY: test/hack ## run tests for hack test/hack: + go mod vendor go test -short -shuffle=on -race -mod=readonly -cover \ $(ROOTDIR)/hack/gorules... \ $(ROOTDIR)/hack/helm/... \ $(ROOTDIR)/hack/license/...\ $(ROOTDIR)/hack/tools/... + rm -rf $(ROOTDIR)/vendor .PHONY: test/all ## run tests for all Go codes diff --git a/apis/grpc/v1/payload/interface.go b/apis/grpc/v1/payload/interface.go index 245051eb74e..a63d41e0bbc 100644 --- a/apis/grpc/v1/payload/interface.go +++ b/apis/grpc/v1/payload/interface.go @@ -21,9 +21,9 @@ type Payload interface { ProtoMessage() ProtoReflect() protoreflect.Message Descriptor() ([]byte, []int) - // MarshalToSizedBufferVT(dAtA []byte) (int, error) - // MarshalToVT(dAtA []byte) (int, error) - // MarshalVT() (dAtA []byte, err error) - // SizeVT() (n int) - // UnmarshalVT(dAtA []byte) error + MarshalToSizedBufferVT(dAtA []byte) (int, error) + MarshalToVT(dAtA []byte) (int, error) + MarshalVT() (dAtA []byte, err error) + SizeVT() (n int) + UnmarshalVT(dAtA []byte) error } diff --git a/hack/gorules/rules_test.go b/hack/gorules/rules_test.go index 9548753bc53..713f5db1cb6 100644 --- a/hack/gorules/rules_test.go +++ b/hack/gorules/rules_test.go @@ -1,5 +1,3 @@ -//go:build exclude - // Copyright (C) 2019-2023 vdaas.org vald team // // Licensed under the Apache License, Version 2.0 (the "License");