diff --git a/rest/bootstrap_test.go b/rest/bootstrap_test.go index 6bec80580a..c7dcf3cd55 100644 --- a/rest/bootstrap_test.go +++ b/rest/bootstrap_test.go @@ -86,9 +86,14 @@ func TestBootstrapRESTAPISetup(t *testing.T) { require.Nil(t, dbConfigResp.Sync) require.Equal(t, uint32(1234), *dbConfigResp.CacheConfig.RevCacheConfig.Size) + dbContext := sc.databases_["db1"] + bucketUUID := dbContext.BucketUUID // Sanity check to use the database resp = BootstrapAdminRequest(t, http.MethodPut, "/db1/doc1", `{"foo":"bar"}`) - resp.RequireResponse(http.StatusCreated, `{"id":"doc1","ok":true,"rev":"1-cd809becc169215072fd567eebd8b8de"}`) + collection := db.GetSingleDatabaseCollection(t, dbContext) + fetchedDoc, _, err := collection.GetDocWithXattr(ctx, "doc1", db.DocUnmarshalCAS) + require.NoError(t, err) + resp.RequireResponse(http.StatusCreated, fmt.Sprintf(`{"id":"doc1","ok":true,"rev":"1-cd809becc169215072fd567eebd8b8de", "current_version": {"source_id":"%s", "version": %d}}`, bucketUUID, fetchedDoc.Cas)) resp = BootstrapAdminRequest(t, http.MethodGet, "/db1/doc1", ``) resp.RequireResponse(http.StatusOK, `{"_id":"doc1","_rev":"1-cd809becc169215072fd567eebd8b8de","foo":"bar"}`)