TestX509RoundtripUsingDomain 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 a domain name which is also present in the node cert.
(t *testing.T)
| 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. |
| 51 | func TestX509RoundtripUsingDomain(t *testing.T) { |
| 52 | base.SetUpTestLogging(t, base.LevelDebug, base.KeyAll) |
| 53 | |
| 54 | ctx := base.TestCtx(t) |
| 55 | tb, _, _, _ := setupX509Tests(t, false) |
| 56 | defer tb.Close(ctx) |
| 57 | |
| 58 | rt := NewRestTester(t, &RestTesterConfig{CustomTestBucket: tb, useTLSServer: true}) |
| 59 | defer rt.Close() |
| 60 | |
| 61 | // write a doc to ensure bucket ops work |
| 62 | tr := rt.SendAdminRequest(http.MethodPut, "/db/"+t.Name(), `{"sgwrite":true}`) |
| 63 | RequireStatus(t, tr, http.StatusCreated) |
| 64 | |
| 65 | // wait for doc to come back over DCP |
| 66 | rt.WaitForDoc(t.Name()) |
| 67 | } |
| 68 | |
| 69 | func TestX509UnknownAuthorityWrap(t *testing.T) { |
| 70 | base.SetUpTestLogging(t, base.LevelDebug, base.KeyAll) |
nothing calls this directly
no test coverage detected