We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1076a90 commit c666af7Copy full SHA for c666af7
1 file changed
tests/serve/plugin.py
@@ -3,6 +3,7 @@
3
import time
4
from concurrent import futures
5
from cloudquery.sdk import serve
6
+from cloudquery.sdk import message
7
from cloudquery.plugin_v3 import plugin_pb2_grpc, plugin_pb2, arrow
8
from cloudquery.sdk.internal.memdb import MemDB
9
@@ -29,6 +30,14 @@ def test_plugin_serve():
29
30
response = stub.GetTables(plugin_pb2.GetTables.Request())
31
schemas = arrow.new_schemas_from_bytes(response.tables)
32
assert len(schemas) == 1
33
+
34
+ response = stub.Sync(plugin_pb2.Sync.Request())
35
+ total_records = 0
36
+ for msg in response:
37
+ if msg.insert is not None:
38
+ rec = arrow.new_record_from_bytes(msg.insert.record)
39
+ total_records += 1
40
+ assert total_records == 1
41
finally:
42
cmd.stop()
43
pool.shutdown()
0 commit comments