mirror of
https://github.com/netbirdio/netbird.git
synced 2026-05-31 04:59:54 +00:00
ssh/server: keep testing dep out of the wasm build
test.go is a non-_test.go file so its exported StartTestServer helper is visible to the ssh/proxy and ssh/client external test packages. That drags the testing/flag/regexp chain into every build that links ssh/server, including the wasm client (via the engine). Gate the file with //go:build !js: native test packages still see the helper, wasm drops the dependency.
This commit is contained in:
@@ -1,3 +1,11 @@
|
||||
// This file is intentionally named test.go (not test_test.go) so the exported
|
||||
// StartTestServer helper is visible to the ssh/proxy and ssh/client external
|
||||
// test packages, not just this package's own tests. The //go:build !js tag
|
||||
// keeps its "testing" import — and the whole testing/flag/regexp transitive
|
||||
// chain it drags in — out of the wasm client, which links ssh/server through
|
||||
// the engine but never runs Go tests under GOOS=js.
|
||||
//go:build !js
|
||||
|
||||
package server
|
||||
|
||||
import (
|
||||
|
||||
Reference in New Issue
Block a user