17 lines
822 B
Go
17 lines
822 B
Go
package archguard
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"golang.org/x/tools/go/analysis/analysistest"
|
|
)
|
|
|
|
// The acceptance set: every bypass that ever defeated a predecessor, replayed against the analyzer.
|
|
// The fixtures carry `// want` on each planted line, so a form the analyzer stops catching fails HERE
|
|
// rather than in the shipping tree six months later. The negative controls in the same files are the
|
|
// other half — a guard that reports everything is as useless as one that reports nothing.
|
|
func TestSeamsCatchEveryKnownBypass(t *testing.T) {
|
|
analysistest.Run(t, analysistest.TestData(), StageSeam, "textmachine/backend/stagesites")
|
|
analysistest.Run(t, analysistest.TestData(), RequestSeam, "textmachine/backend/requestsites")
|
|
analysistest.Run(t, analysistest.TestData(), EgressSeam, "textmachine/backend/egresssites")
|
|
}
|