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
    • Resolution: Fixed
    • Major
    • 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

          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