Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-50360

[CLI] Some sub-tests are skipped because of early return

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 7.1.0
    • 7.1.0
    • tools
    • Untriaged
    • 1
    • Unknown

    Description

      What is the issue?
      Some of the sub-tests in couchbase-cli repo are skipped because a return statement is used, which returns from the top-level test instead of a sub-test.

      One example is in the top-level test test_validation in X509AdapterFactoryTest (test_x509_adapter.py):

              for name, test in tests.items():
                  print(name)
                  with self.subTest(name=name):
                      if "valid" in test and test["valid"]:
                          X509AdapterFactory(**test["kwargs"])
                          return
       
                      with self.assertRaisesRegex(X509AdapterError, re.escape(test["message"]) if "message" in test else ""):
                          X509AdapterFactory(**test["kwargs"])
      

      but we need to make sure all other tests are run as well.

      Attachments

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

        Activity

          James Lee, couldn't find any other places where tests could be skipped for this or any other reason.

          maks.januska Maksimiljans Januska added a comment - James Lee , couldn't find any other places where tests could be skipped for this or any other reason.

          Build couchbase-server-7.1.0-2048 contains couchbase-cli commit 6ed6dab with commit message:
          MB-50360 Fix some sub-tests being skipped because of early return

          build-team Couchbase Build Team added a comment - Build couchbase-server-7.1.0-2048 contains couchbase-cli commit 6ed6dab with commit message: MB-50360 Fix some sub-tests being skipped because of early return

          No QE verification needed

          arunkumar Arunkumar Senthilnathan (Inactive) added a comment - No QE verification needed

          People

            maks.januska Maksimiljans Januska
            maks.januska Maksimiljans Januska
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty