TestX509RoundtripUsingIP is a happy-path roundtrip write test for SG connecting to CBS using valid X.509 certs for authentication. The test enforces SG connects using an IP address which is also present in the node cert.
(t *testing.T)
| 29 | // TestX509RoundtripUsingIP is a happy-path roundtrip write test for SG connecting to CBS using valid X.509 certs for authentication. |
| 30 | // The test enforces SG connects using an IP address which is also present in the node cert. |
| 31 | func TestX509RoundtripUsingIP(t *testing.T) { |
| 32 | base.SetUpTestLogging(t, base.LevelDebug, base.KeyAll) |
| 33 | |
| 34 | ctx := base.TestCtx(t) |
| 35 | tb, _, _, _ := setupX509Tests(t, true) |
| 36 | defer tb.Close(ctx) |
| 37 | |
| 38 | rt := NewRestTester(t, &RestTesterConfig{CustomTestBucket: tb, useTLSServer: true}) |
| 39 | defer rt.Close() |
| 40 | |
| 41 | // write a doc to ensure bucket ops work |
| 42 | tr := rt.SendAdminRequest(http.MethodPut, "/db/"+t.Name(), `{"sgwrite":true}`) |
| 43 | RequireStatus(t, tr, http.StatusCreated) |
| 44 | |
| 45 | // wait for doc to come back over DCP |
| 46 | rt.WaitForDoc(t.Name()) |
| 47 | } |
| 48 | |
| 49 | // TestX509RoundtripUsingDomain is a happy-path roundtrip write test for SG connecting to CBS using valid X.509 certs for authentication. |
| 50 | // The test enforces SG connects using a domain name which is also present in the node cert. |
nothing calls this directly
no test coverage detected