Uploaded image for project: 'Ruby Driver'
  1. Ruby Driver
  2. RUBY-2661

Accept both linux and linux-gnu as oses in test suite

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 2.15.0
    • Affects Version/s: None
    • Component/s: Tests
    • Labels:
      None

      Ruby 2.7.3 changed the value in os:

      root@4efa7639a0e1:/pubfiles# rbenv shell 2.7.2
      root@4efa7639a0e1:/pubfiles# ruby -v
      ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x86_64-linux]
      root@4efa7639a0e1:/pubfiles# ruby -rrbconfig -e "puts RbConfig::CONFIG['host_os']"
      linux-gnu
      root@4efa7639a0e1:/pubfiles# rbenv shell 2.7.3
      root@4efa7639a0e1:/pubfiles# ruby -v
      ruby 2.7.3p183 (2021-04-05 revision 6847ee089d) [x86_64-linux]
      root@4efa7639a0e1:/pubfiles# ruby -rrbconfig -e "puts RbConfig::CONFIG['host_os']"
      linux
      

      This causes a test failure:

                                                                                                                
        1) Mongo::Server::AppMetadata#document behaves like app metadata document linux includes operating system information
           Failure/Error: document[:client][:os][:name].should == 'linux-gnu'
           
             expected: "linux-gnu"
                  got: "linux" (using ==)
           Shared Example Group: "app metadata document" called from ./spec/mongo/server/app_metadata_spec.rb:153
           # ./spec/mongo/server/app_metadata_shared.rb:26:in `block (3 levels) in <top (required)>'
           # ./spec/support/background_thread_registry.rb:65:in `block (2 levels) in <top (required)>'
      
      

            Assignee:
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Reporter:
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: