(ringConfig Config, id string, options ...TestLifecyclerConfigOption)
| 58 | } |
| 59 | |
| 60 | func testLifecyclerConfig(ringConfig Config, id string, options ...TestLifecyclerConfigOption) LifecyclerConfig { |
| 61 | var lifecyclerConfig LifecyclerConfig |
| 62 | flagext.DefaultValues(&lifecyclerConfig) |
| 63 | lifecyclerConfig.Addr = "0.0.0.0" |
| 64 | lifecyclerConfig.Port = 1 |
| 65 | lifecyclerConfig.ListenPort = 0 |
| 66 | lifecyclerConfig.RingConfig = ringConfig |
| 67 | lifecyclerConfig.NumTokens = 1 |
| 68 | lifecyclerConfig.ID = id |
| 69 | lifecyclerConfig.Zone = zone(1) |
| 70 | lifecyclerConfig.FinalSleep = 0 |
| 71 | lifecyclerConfig.HeartbeatPeriod = 100 * time.Millisecond |
| 72 | |
| 73 | // Apply any provided options |
| 74 | for _, option := range options { |
| 75 | option(&lifecyclerConfig) |
| 76 | } |
| 77 | |
| 78 | return lifecyclerConfig |
| 79 | } |
| 80 | |
| 81 | func checkNormalised(d interface{}, id string) bool { |
| 82 | desc, ok := d.(*Desc) |
no test coverage detected