From 363472b54975364afab9657dc2ccdbff4d660627 Mon Sep 17 00:00:00 2001 From: Dimitris Christodoulou Date: Thu, 4 Apr 2024 09:53:38 +0100 Subject: [PATCH] RCBC-476: FeatureNotAvailable for cb2 ping/diagnostics --- lib/couchbase/protostellar/bucket.rb | 4 ++++ lib/couchbase/protostellar/cluster.rb | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/lib/couchbase/protostellar/bucket.rb b/lib/couchbase/protostellar/bucket.rb index caff9e2b..0faae03a 100644 --- a/lib/couchbase/protostellar/bucket.rb +++ b/lib/couchbase/protostellar/bucket.rb @@ -46,6 +46,10 @@ def default_collection def collections Management::CollectionManager.new(client: @client, bucket_name: @name) end + + def ping(_options = Options::Ping::DEFAULT) + raise Couchbase::Error::FeatureNotAvailable, "The #{Protostellar::NAME} protocol does not support ping" + end end end end diff --git a/lib/couchbase/protostellar/cluster.rb b/lib/couchbase/protostellar/cluster.rb index 3cc4a3de..eb1257a9 100644 --- a/lib/couchbase/protostellar/cluster.rb +++ b/lib/couchbase/protostellar/cluster.rb @@ -144,6 +144,14 @@ def search_query(index_name, query, options = Couchbase::Options::Search::DEFAUL ResponseConverter::Search.to_search_result(resp, options) end + def diagnostics(_options = Options::Diagnostics::DEFAULT) + raise Couchbase::Error::FeatureNotAvailable, "The #{Protostellar::NAME} protocol does not support diagnostics" + end + + def ping(_options = Options::Ping::DEFAULT) + raise Couchbase::Error::FeatureNotAvailable, "The #{Protostellar::NAME} protocol does not support ping" + end + private def initialize(host, options = ConnectOptions.new)