(t *testing.T, client *Client, key string, start, end int, sleep time.Duration)
| 21 | ) |
| 22 | |
| 23 | func writeValuesToKV(t *testing.T, client *Client, key string, start, end int, sleep time.Duration) <-chan struct{} { |
| 24 | t.Helper() |
| 25 | |
| 26 | ch := make(chan struct{}) |
| 27 | go func() { |
| 28 | defer close(ch) |
| 29 | for i := start; i <= end; i++ { |
| 30 | t.Log("ts", time.Now(), "msg", "writing value", "val", i) |
| 31 | _, _ = client.kv.Put(&consul.KVPair{Key: key, Value: fmt.Appendf(nil, "%d", i)}, nil) |
| 32 | time.Sleep(sleep) |
| 33 | } |
| 34 | }() |
| 35 | return ch |
| 36 | } |
| 37 | |
| 38 | func TestGetConsulConfig(t *testing.T) { |
| 39 | testCADir := t.TempDir() |
no test coverage detected