Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mv api module integration test out of test framework #645

Merged
merged 1 commit into from
Jul 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions api/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ build-test-so-local:
-ldflags "-B 0x$(shell head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') " \
--buildmode=c-shared \
-cover -covermode=atomic -coverpkg=${PROJECT_NAME}/... \
-v -o plugins/tests/integration/${TARGET_SO} \
${PROJECT_NAME}/api/plugins/tests/integration/libgolang
-v -o tests/integration/${TARGET_SO} \
${PROJECT_NAME}/api/tests/integration/libgolang

# Go 1.19+ adds vcs check which will cause error "fatal: detected dubious ownership in repository at '...'".
# So here we disable the error via git configuration when running inside Docker.
Expand All @@ -46,11 +46,11 @@ build-test-so:
.PHONY: integration-test
integration-test:
test -d /tmp/htnn_coverage && rm -rf /tmp/htnn_coverage || true
$(foreach PKG, $(shell go list ./plugins/tests/integration/...), \
$(foreach PKG, $(shell go list ./tests/integration/...), \
go test -v ${PKG} || exit 1; \
)

# The benchmark running time can be controlled via env var HTNN_DATA_PLANE_BENCHMARK_DURATION
.PHONY: benchmark
benchmark:
go test -tags benchmark -v ./plugins/tests/integration/ -run TestBenchmark
go test -tags benchmark -v ./tests/integration/ -run TestBenchmark

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@

syntax = "proto3";

package api.plugins.tests.integration;
package api.tests.integration;

option go_package = "mosn.io/htnn/api/plugins/tests/integration";
option go_package = "mosn.io/htnn/api/tests/integration";

message Config {
bool need = 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (

"mosn.io/htnn/api/pkg/consumer"
"mosn.io/htnn/api/pkg/filtermanager"
_ "mosn.io/htnn/api/plugins/tests/integration" // for plugins used in the test
_ "mosn.io/htnn/api/plugins/tests/integration/data_plane" // for utility plugins provided in the test framework
_ "mosn.io/htnn/api/tests/integration" // for plugins used in the test
)

func init() {
Expand Down
Loading