Uploaded image for project: 'Couchbase Mobile'
  1. Couchbase Mobile
  2. CM-1188

Investigate and fix test_tombstone_docs_via_sdk

    XMLWordPrintable

Details

    • Task
    • Resolution: Done
    • Major
    • None
    • None
    • None

    Description

      Error Messagecouchbase.exceptions.LCB_0x405 (generated, catch: ): <RC=0x405[LCB_ERR_SDK_FEATURE_UNAVAILABLE (1029)], Couldn't create instance. Either bad credentials/hosts/bucket names were passed, or there was an internal error in creating the object, C Source=(src/bucket.c,1121)>Stacktraceparams_from_base_test_setup = {'base_url': 'http://10.100.180.187:8080', 'cbl_ce': False, 'cbl_db': 'cbl-test1711091770.7552269', 'cbl_log_decoder_build': None, ...}
      tombstone_type = 'delete'
       
          @pytest.mark.channels
          @pytest.mark.syncgateway
          @pytest.mark.parametrize("tombstone_type", [
              pytest.param("delete"),
              pytest.param("expire")
          ])
          def test_tombstone_docs_via_sdk(params_from_base_test_setup, tombstone_type):
              """
              @summary:
                  1. Have sync function to update the channels
                  2. Enable xattrs and start SGW
                  3. Create docs and add user xattrs to the doc and have all docs sync to cbl
                  4. have it expired/ delete via SDK in few mins
                  5. Verify docs are not accessed via CBL
              """
              sg_db = "db"
              sg_url = params_from_base_test_setup["sg_url"]
              sg_admin_url = params_from_base_test_setup["sg_admin_url"]
              cluster_config = params_from_base_test_setup["cluster_config"]
              sg_blip_url = params_from_base_test_setup["target_url"]
              base_url = params_from_base_test_setup["base_url"]
              db = params_from_base_test_setup["db"]
              cbl_db = params_from_base_test_setup["source_db"]
              mode = params_from_base_test_setup["mode"]
              ssl_enabled = params_from_base_test_setup["ssl_enabled"]
              sync_gateway_version = params_from_base_test_setup["sync_gateway_version"]
              xattrs_enabled = params_from_base_test_setup["xattrs_enabled"]
              need_sgw_admin_auth = params_from_base_test_setup["need_sgw_admin_auth"]
          
              if not xattrs_enabled or sync_gateway_version < "3.0.0":
                  pytest.skip('Test did not enable xattrs or sgw version is not 3.0 and above')
          
              sg_channel1_value1 = "xattrs_channel_one"
              sg_channels_1 = [sg_channel1_value1]
              username = "autotest_1"
              password = "password"
              user_custom_channel = "channel1"
              sg_doc_xattrs_id = 'sg_xattrs_6'
              sg_conf_name = "custom_sync/sync_gateway_custom_sync"
              continuous = True
              sg_config = sync_gateway_config_path_for_mode(sg_conf_name, mode)
          
              # Create CBL database
              sg_client = MobileRestClient()
          
              # 1. Have sync function to update the channels
              # Replace with sync function on sgw config to use user xattrs for channels
              temp_sg_config = replace_xattrs_sync_func_in_config(sg_config, user_custom_channel)
          
              # 2. Enable xattrs and start SGW
              c_cluster = cluster.Cluster(config=cluster_config)
              c_cluster.reset(sg_config_path=temp_sg_config)
          
              cbs_ip = c_cluster.servers[0].host
              cbs_bucket = c_cluster.servers[0].get_bucket_names()[0]
      >       sdk_bucket = get_sdk_client_with_bucket(ssl_enabled, c_cluster, cbs_ip, cbs_bucket)
       

      Could be related to: 

       

      https://issues.couchbase.com/browse/PYCBC-1183

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            gilad.kalchheim Gilad Kalchheim
            gilad.kalchheim Gilad Kalchheim
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty