couchbaselabs / mobile-testkit

Mobile QE Test Framework
15 stars 12 forks source link

Add a test case for binary documents #1388

Open raghusarangapani opened 7 years ago

raghusarangapani commented 7 years ago
sridevi-15 commented 7 years ago

Here is the SDK to create binary document https://developer.couchbase.com/documentation/server/current/sdk/nonjson.html

Just one document is fine to check the error

  1. Right now it does not throw any errors or warnings in sg-logs with sg 1.5.0-573, but it says invalid json. When you do get on doc, it says 'invalid json' in response

May be we should wait until the bug is fixed as the expected behavior for binary document is differrent. Here is the ticket : https://github.com/couchbase/sync_gateway/issues/2916

sridevi-15 commented 6 years ago

Code to add raw docs from couchbase import FMT_BYTES from couchbase.bucket import Bucket SDK_CLIENT = Bucket(’couchbase://192.168.33.10/data-bucket’, password='password')

SDK_CLIENT.upsert("sg_doc_1", 'Hello, UTF-16 World!'.encode('utf16'),format=FMT_BYTES)