( ctx context.Context, t testing.TB, fEng *fakeEngineConfigurable, k key.NodePublic, lastHandshake time.Time, )
| 1082 | } |
| 1083 | |
| 1084 | func expectStatusWithHandshake( |
| 1085 | ctx context.Context, t testing.TB, fEng *fakeEngineConfigurable, k key.NodePublic, lastHandshake time.Time, |
| 1086 | ) <-chan struct{} { |
| 1087 | t.Helper() |
| 1088 | called := make(chan struct{}) |
| 1089 | go func() { |
| 1090 | select { |
| 1091 | case <-ctx.Done(): |
| 1092 | t.Error("timeout waiting for status") |
| 1093 | return |
| 1094 | case b := <-fEng.status: |
| 1095 | b.AddPeer(k, &ipnstate.PeerStatus{ |
| 1096 | PublicKey: k, |
| 1097 | LastHandshake: lastHandshake, |
| 1098 | Active: true, |
| 1099 | }) |
| 1100 | select { |
| 1101 | case <-ctx.Done(): |
| 1102 | t.Error("timeout sending done") |
| 1103 | case fEng.statusDone <- struct{}{}: |
| 1104 | close(called) |
| 1105 | return |
| 1106 | } |
| 1107 | } |
| 1108 | }() |
| 1109 | return called |
| 1110 | } |
| 1111 | |
| 1112 | func TestConfigMaps_updatePeers_nonexist(t *testing.T) { |
| 1113 | t.Parallel() |
no test coverage detected