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

Gomemcached - Fix mock_handler.go mock file

    XMLWordPrintable

Details

    • Task
    • Resolution: Unresolved
    • Minor
    • Morpheus
    • None
    • XDCR
    • None
    • 0

    Description

      The mock_handler.go mock file, that is auto-generated by mockery, seems to be trying to emulate a function type "handler" in mc_storage.go; and is not an actual interface:
      type handler func(req *gomemcached.MCRequest, s *storage) *gomemcached.MCResponse

       

      Hence it breaks any subsequent runs of mockery due to an undefined parameter type error for the datatype "storage" in the method signatures defined in the mock_handler.go file.

      E.g: func (_m *handler) Execute(req *gomemcached.MCRequest, s *storage) *gomemcached.MCResponse

       

      The current workaround is to delete the original mock_handler.go file and run mockery - it will regenerate the exact same file afresh, along with updating the other mocks based on the new changes made.

      However we will probably have to modify our .mockery.yaml file to prevent its generation entirely.

      Attachments

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

        Activity

          People

            aditya.sood Aditya Sood
            aditya.sood Aditya Sood
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty