You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
boundary/internal/target/tcp/exports_test.go

20 lines
557 B

package tcp
import "github.com/hashicorp/boundary/internal/target"
// Expose functions and variables for tests.
var (
TestId = testId
TestTargetName = testTargetName
DefaultTableName = defaultTableName
)
// NewTestTarget is a test helper that bypasses the scopeId checks
// performed by NewTarget, allowing tests to create Targets with
// nil scopeIds for more robust testing.
func NewTestTarget(scopeId string, opt ...target.Option) target.Target {
t, _ := targetHooks{}.NewTarget("testScope", opt...)
t.SetScopeId(scopeId)
return t
}