|
@@ -1282,6 +1282,25 @@ func runServer(t *testing.T, runConfig *runServerConfig) {
|
|
|
checkPruneServerEntriesTest(t, runConfig, testDataDirName, pruneServerEntryTestCases)
|
|
checkPruneServerEntriesTest(t, runConfig, testDataDirName, pruneServerEntryTestCases)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+func sendNotificationReceived(c chan<- struct{}) {
|
|
|
|
|
+ select {
|
|
|
|
|
+ case c <- struct{}{}:
|
|
|
|
|
+ default:
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+func waitOnNotification(t *testing.T, c, timeoutSignal <-chan struct{}, timeoutMessage string) {
|
|
|
|
|
+ if timeoutSignal == nil {
|
|
|
|
|
+ <-c
|
|
|
|
|
+ } else {
|
|
|
|
|
+ select {
|
|
|
|
|
+ case <-c:
|
|
|
|
|
+ case <-timeoutSignal:
|
|
|
|
|
+ t.Fatalf(timeoutMessage)
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
func checkExpectedServerTunnelLogFields(
|
|
func checkExpectedServerTunnelLogFields(
|
|
|
runConfig *runServerConfig,
|
|
runConfig *runServerConfig,
|
|
|
expectClientBPFField bool,
|
|
expectClientBPFField bool,
|
|
@@ -2136,25 +2155,6 @@ func paveBlocklistFile(t *testing.T, blocklistFilename string) {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-func sendNotificationReceived(c chan<- struct{}) {
|
|
|
|
|
- select {
|
|
|
|
|
- case c <- struct{}{}:
|
|
|
|
|
- default:
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-func waitOnNotification(t *testing.T, c, timeoutSignal <-chan struct{}, timeoutMessage string) {
|
|
|
|
|
- if timeoutSignal == nil {
|
|
|
|
|
- <-c
|
|
|
|
|
- } else {
|
|
|
|
|
- select {
|
|
|
|
|
- case <-c:
|
|
|
|
|
- case <-timeoutSignal:
|
|
|
|
|
- t.Fatalf(timeoutMessage)
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
type pruneServerEntryTestCase struct {
|
|
type pruneServerEntryTestCase struct {
|
|
|
IPAddress string
|
|
IPAddress string
|
|
|
ExplicitTag bool
|
|
ExplicitTag bool
|