()
| 25 | func mockConfig_insecure() {} |
| 26 | |
| 27 | func ExampleConfig_insecure() { |
| 28 | forUnitTestsRunInMockedContext(mockConfig_insecure, func() { |
| 29 | cli, err := clientv3.New(clientv3.Config{ |
| 30 | Endpoints: exampleEndpoints(), |
| 31 | DialTimeout: dialTimeout, |
| 32 | }) |
| 33 | if err != nil { |
| 34 | log.Fatal(err) |
| 35 | } |
| 36 | defer cli.Close() // make sure to close the client |
| 37 | |
| 38 | _, err = cli.Put(context.TODO(), "foo", "bar") |
| 39 | if err != nil { |
| 40 | log.Fatal(err) |
| 41 | } |
| 42 | }) |
| 43 | |
| 44 | // Without the line below the test is not being executed |
| 45 | |
| 46 | // Output: |
| 47 | } |
| 48 | |
| 49 | func mockConfig_withTLS() {} |
| 50 |
nothing calls this directly
no test coverage detected
searching dependent graphs…