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

tuqtng catalog file implementation does not correctly map file path to id on windows

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 3.0
    • 2.1.0
    • query
    • Security Level: Public
    • None

    Description

      json_test.go:104: 15: SELECT META().id FROM catalog
      json_test.go:198: results don't match, actual: []interface {}{map[string]interface {}

      {"id":"c:\\src\\src\\github.com\\couchbaselabs\\tuqtng\\test\\json\\catalog\\book1"}

      , map[string]interface {}

      {"id":"c:\\src\\src\\github.com\\couchbaselabs\\tuqtng\\test\\json\\catalog\\movie1"}

      , map[string]interface {}{"id":"c:\\src\\src\\github.com\\couchbaselabs\\tuqtng\\test\\json\\catalog
      tvshow1"}}, expected: []interface {}{map[string]interface {}

      {"id":"book1"}

      , map[string]interface {}

      {"id":"movie1"}

      , map[string]interface {}{"id":"tvshow1"}}, for case file: json\cases\case_functions.json, index: 15
      json_test.go:104: 16: SELECT META().id FROM contacts AS contact OVER child IN contact.children
      json_test.go:104: 17: SELECT META(contact).id FROM contacts AS contact OVER child IN contact.children
      json_test.go:198: results don't match, actual: []interface {}{map[string]interface {}

      {"id":"c:\\src\\src\\github.com\\couchbaselabs\\tuqtng\\test\\json\\contacts\\dave"}

      , map[string]interface {}

      {"id":"c:\\src\\src\\github.com\\couchbaselabs\\tuqtng\\test\\json\\contacts\\dave"}

      , map[string]interface {}

      {"id":"c:\\src\\src\\github.com\\couchbaselabs\\tuqtng\\test\\json\\contacts\\earl"}

      , map[string]interface {}

      {"id":"c:\\src\\src\\github.com\\couchbaselabs\\tuqtng\\test\\json\\contacts\\earl"}

      , map[string]interface {}

      {"id":"c:\\src\\src\\github.com\\couchbaselabs\\tuqtng\\test\\json\\contacts\\ian"}

      , map[string]interface {}{"id":"c:\\src\\src\\github.com\\couchbaselabs\\tuqtng\\test\\json\\contacts
      ian"}}, expected: []interface {}{map[string]interface {}

      {"id":"dave"}

      , map[string]interface {}

      {"id":"dave"}

      , map[string]interface {}

      {"id":"earl"}

      , map[string]interface {}

      {"id":"earl"}

      , map[string]interface {}

      {"id":"ian"}

      , map[string]interface {}{"id":"ian"}}, for case file: json\cases\case_functions.json, index: 17

      This conversion is done by the method:

      func documentPathToId(p string) string

      { _, file := path.Split(p) ext := path.Ext(file) return file[0 : len(file)-len(ext)] }

      It seems that path.Split() does not do what we expect.

      Attachments

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

        Activity

          People

            iryna iryna
            mschoch Marty Schoch [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty