Search index management spec test incompatible with Local Atlas Docker image

XMLWordPrintableJSON

    • Type: Build Failure
    • Resolution: Fixed
    • Priority: Unknown
    • 2.1.3
    • Affects Version/s: None
    • Component/s: Atlas Testing
    • None
    • Hide

      DRIVERS-3357:
      Summary of necessary driver changes

      • Update the search index management prose tests to check only the value of latestDefinition.mappings.dynamic

      Commits for syncing spec/prose tests
      (and/or refer to an existing language POC if needed)

      Context for other referenced/linked tickets

      • CLOUDP-366814
      Show
      DRIVERS-3357 : Summary of necessary driver changes Update the search index management prose tests to check only the value of latestDefinition.mappings.dynamic Commits for syncing spec/prose tests (and/or refer to an existing language POC if needed) https://github.com/mongodb/specifications/commit/418037534364ace8eb6bdbf989284e0ce84b8493   Context for other referenced/linked tickets CLOUDP-366814
    • 🔵 Done
    • PHP Drivers
    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?
    • None
    • None
    • None
    • None
    • None
    • None

      Using the docker image mongodb/mongodb-atlas-local:41e1caf82c8f, the result of 
      $listSearchIndexes has changed. The "latestDefinition" of each index always contain an empty "fields" map.
       
      The spec tests need to be updated: https://github.com/mongodb/specifications/blob/master/source/index-management/tests/README.md 
       

      ./vendor/bin/phpunit tests/SpecTests/SearchIndexSpecTest.php
      Test configuration:
        URI: mongodb://localhost:27018/
        Database: phplib_test
        API version: Not configured
        
        crypt_shared: Not available 
        mongocryptd: Available
      
      PHPUnit 10.5.60 by Sebastian Bergmann and contributors.
      
      Runtime:       PHP 8.5.0
      Configuration: phpunit.xml
      
      FF.E.                                                               5 / 5 (100%)
      
      Time: 00:25.272, Memory: 10.00 MB
      
      There was 1 error:
      
      1) MongoDB\Tests\SpecTests\SearchIndexSpecTest::testUpdateSearchIndex
      MongoDB\Driver\Exception\CommandException: "mappings.fields" must be a document
      
      src/Operation/UpdateSearchIndex.php:79
      src/Collection.php:1031
      tests/SpecTests/SearchIndexSpecTest.php:135
      
      --
      
      There were 2 failures:
      
      1) MongoDB\Tests\SpecTests\SearchIndexSpecTest::testCreateAndListSearchIndexes
      Failed asserting that two strings are equal.
      --- Expected
      +++ Actual
      @@ @@
      -'{ "mappings" : { "dynamic" : false } }'
      +'{ "mappings" : { "dynamic" : false, "fields" : { } } }'
      
      tests/TestCase.php:108
      tests/SpecTests/SearchIndexSpecTest.php:58
      
      2) MongoDB\Tests\SpecTests\SearchIndexSpecTest::testCreateMultipleIndexesInBatch
      Failed asserting that two strings are equal.
      --- Expected
      +++ Actual
      @@ @@
      -'{ "mappings" : { "dynamic" : false } }'
      +'{ "mappings" : { "dynamic" : false, "fields" : { } } }'
      
      tests/TestCase.php:108
      tests/SpecTests/SearchIndexSpecTest.php:84
      
      

            Assignee:
            Jérôme Tamarelle
            Reporter:
            Jérôme Tamarelle
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: