2023-02-02 17:15:17 -08:00
|
|
|
// Copyright (c) HashiCorp, Inc.
|
2023-01-05 12:09:31 -05:00
|
|
|
// SPDX-License-Identifier: BUSL-1.1
|
2023-02-02 17:15:17 -08:00
|
|
|
|
2023-01-05 12:09:31 -05:00
|
|
|
package targets
|
|
|
|
|
|
2023-05-18 12:11:11 -04:00
|
|
|
import (
|
|
|
|
|
"testing"
|
|
|
|
|
)
|
2023-01-05 12:09:31 -05:00
|
|
|
|
|
|
|
|
// SetupSuiteTargetFilters is used to ensure that OSS tests run from the ENT repo use the OSS level of target filtering
|
2023-09-07 11:52:00 -07:00
|
|
|
// WARNING: Do NOT run tests in parallel when using this.
|
2023-01-05 12:09:31 -05:00
|
|
|
func SetupSuiteTargetFilters(t *testing.T) {
|
|
|
|
|
oldFn := AuthorizeSessionWorkerFilterFn
|
|
|
|
|
AuthorizeSessionWorkerFilterFn = AuthorizeSessionWithWorkerFilter
|
|
|
|
|
|
|
|
|
|
t.Cleanup(func() {
|
|
|
|
|
AuthorizeSessionWorkerFilterFn = oldFn
|
|
|
|
|
})
|
|
|
|
|
}
|