loadCertsIntoLocalCouchbaseServer will upload the given certs into Couchbase Server (via SSH and the REST API)
(ctx context.Context, couchbaseServerURL url.URL, ca *caPair, node *nodePair, localMacOSUser string)
| 290 | |
| 291 | // loadCertsIntoLocalCouchbaseServer will upload the given certs into Couchbase Server (via SSH and the REST API) |
| 292 | func loadCertsIntoLocalCouchbaseServer(ctx context.Context, couchbaseServerURL url.URL, ca *caPair, node *nodePair, localMacOSUser string) error { |
| 293 | |
| 294 | localMacOSCouchbaseServerInbox := "/Users/" + localMacOSUser + "/Library/Application Support/Couchbase/var/lib/couchbase/inbox" |
| 295 | |
| 296 | // Copy node cert and key |
| 297 | err := copyLocalFile(node.PEMFilepath, localMacOSCouchbaseServerInbox) |
| 298 | if err != nil { |
| 299 | return err |
| 300 | } |
| 301 | base.DebugfCtx(ctx, base.KeyAll, "copied x509 node chain.pem to integration test server") |
| 302 | |
| 303 | err = copyLocalFile(node.KeyFilePath, localMacOSCouchbaseServerInbox) |
| 304 | if err != nil { |
| 305 | return err |
| 306 | } |
| 307 | base.DebugfCtx(ctx, base.KeyAll, "copied x509 node pkey.key to integration test server") |
| 308 | return uploadCACertViaREST(ctx, couchbaseServerURL, ca) |
| 309 | } |
| 310 | |
| 311 | func uploadCACertViaREST(ctx context.Context, couchbaseServerURL url.URL, ca *caPair) error { |
| 312 | restAPIURL := basicAuthRESTPIURLFromConnstrHost(couchbaseServerURL) |
no test coverage detected