mongoid 7.5.4 → 7.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +4 -4
- data/Rakefile +85 -46
- data/lib/mongoid/contextual/mongo.rb +26 -1
- data/lib/mongoid/version.rb +5 -1
- data/spec/mongoid/config_spec.rb +1 -0
- data/spec/mongoid/contextual/mongo_spec.rb +10 -0
- data/spec/mongoid/copyable_spec.rb +1 -0
- data/spec/mongoid/criteria/queryable/extensions/bignum_spec.rb +2 -1
- data/spec/mongoid/criteria/queryable/extensions/fixnum_spec.rb +2 -1
- data/spec/mongoid/query_cache_spec.rb +2 -1
- data/spec/mongoid/serializable_spec.rb +7 -14
- data/spec/shared/CANDIDATE.md +28 -0
- data/spec/shared/lib/mrss/docker_runner.rb +8 -1
- data/spec/shared/lib/mrss/lite_constraints.rb +2 -2
- data/spec/shared/lib/mrss/release/candidate.rb +281 -0
- data/spec/shared/lib/mrss/release/product_data.rb +144 -0
- data/spec/shared/lib/mrss/server_version_registry.rb +17 -24
- data/spec/shared/lib/mrss/spec_organizer.rb +32 -3
- data/spec/shared/lib/mrss/utils.rb +28 -6
- data/spec/shared/lib/tasks/candidate.rake +64 -0
- data/spec/shared/share/Dockerfile.erb +33 -107
- data/spec/shared/shlib/distro.sh +10 -0
- data/spec/shared/shlib/server.sh +60 -29
- data/spec/shared/shlib/set_env.sh +12 -71
- data/spec/support/expectations.rb +20 -17
- metadata +16 -38
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- metadata.gz.sig +0 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9ff7d60d6b900150abc528548490b2b678708dfe05af7818255c48511bb0162a
|
|
4
|
+
data.tar.gz: a17bd4adb82448f3577cec52a0fab82660227d5e8bce6a9058a499449375da04
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 52adb1bd5f193bf327925d8650bffb9ea9761395b0b7e691f6c18f3ea9a56cc94c6d4824dd7b29e2316ecbb916a338430f4e96dde248982f78b451fb580afe62
|
|
7
|
+
data.tar.gz: 0a5147d6b5c686c8e103b41de6424ef6835097ca98abbc5d2b883f29f381cb090a5ad2c4a896d640dbe0216d49824a4eeca061b201d2e34e8d1228393440153d
|
data/README.md
CHANGED
|
@@ -19,9 +19,9 @@ Compatibility
|
|
|
19
19
|
|
|
20
20
|
Mongoid supports and is tested against:
|
|
21
21
|
|
|
22
|
-
- MRI 2.
|
|
23
|
-
- JRuby 9.
|
|
24
|
-
- MongoDB server
|
|
22
|
+
- MRI 2.7 - 3.1
|
|
23
|
+
- JRuby 9.3
|
|
24
|
+
- MongoDB server 3.6 - 8.0
|
|
25
25
|
|
|
26
26
|
Issues
|
|
27
27
|
------
|
|
@@ -40,7 +40,7 @@ License
|
|
|
40
40
|
-------
|
|
41
41
|
|
|
42
42
|
Copyright (c) 2009-2016 Durran Jordan
|
|
43
|
-
Copyright (c) 2015-
|
|
43
|
+
Copyright (c) 2015-present MongoDB, Inc.
|
|
44
44
|
|
|
45
45
|
Permission is hereby granted, free of charge, to any person obtaining
|
|
46
46
|
a copy of this software and associated documentation files (the
|
data/Rakefile
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
|
+
# rubocop:todo all
|
|
2
3
|
|
|
3
4
|
require "bundler"
|
|
4
|
-
require "bundler/gem_tasks"
|
|
5
5
|
Bundler.setup
|
|
6
6
|
|
|
7
7
|
ROOT = File.expand_path(File.join(File.dirname(__FILE__)))
|
|
@@ -10,34 +10,53 @@ $: << File.join(ROOT, 'spec/shared/lib')
|
|
|
10
10
|
|
|
11
11
|
require "rake"
|
|
12
12
|
require "rspec/core/rake_task"
|
|
13
|
-
require 'mrss/spec_organizer'
|
|
14
|
-
require 'rubygems/package'
|
|
15
|
-
require 'rubygems/security/policies'
|
|
16
|
-
|
|
17
|
-
def signed_gem?(path_to_gem)
|
|
18
|
-
Gem::Package.new(path_to_gem, Gem::Security::HighSecurity).verify
|
|
19
|
-
true
|
|
20
|
-
rescue Gem::Security::Exception => e
|
|
21
|
-
false
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
$LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
|
|
25
|
-
require "mongoid/version"
|
|
26
13
|
|
|
27
|
-
|
|
28
|
-
|
|
14
|
+
if File.exist?('./spec/shared/lib/tasks/candidate.rake')
|
|
15
|
+
load 'spec/shared/lib/tasks/candidate.rake'
|
|
16
|
+
end
|
|
29
17
|
|
|
30
|
-
|
|
18
|
+
desc 'Build the gem'
|
|
31
19
|
task :build do
|
|
32
|
-
|
|
20
|
+
command = %w[ gem build ]
|
|
21
|
+
command << "--output=#{ENV['GEM_FILE_NAME']}" if ENV['GEM_FILE_NAME']
|
|
22
|
+
command << (ENV['GEMSPEC'] || 'mongoid.gemspec')
|
|
23
|
+
system(*command)
|
|
33
24
|
end
|
|
34
25
|
|
|
35
|
-
|
|
36
|
-
|
|
26
|
+
# `rake version` is used by the deployment system so get the release version
|
|
27
|
+
# of the product beng deployed. It must do nothing more than just print the
|
|
28
|
+
# product version number.
|
|
29
|
+
#
|
|
30
|
+
# See the mongodb-labs/driver-github-tools/ruby/publish Github action.
|
|
31
|
+
desc "Print the current value of Mongoid::VERSION"
|
|
32
|
+
task :version do
|
|
33
|
+
require 'mongoid/version'
|
|
34
|
+
|
|
35
|
+
puts Mongoid::VERSION
|
|
37
36
|
end
|
|
38
37
|
|
|
38
|
+
# overrides the default Bundler-provided `release` task, which also
|
|
39
|
+
# builds the gem. Our release process assumes the gem has already
|
|
40
|
+
# been built (and signed via GPG), so we just need `rake release` to
|
|
41
|
+
# push the gem to rubygems.
|
|
39
42
|
task :release do
|
|
40
|
-
|
|
43
|
+
require 'mongoid/version'
|
|
44
|
+
|
|
45
|
+
if ENV['GITHUB_ACTION'].nil?
|
|
46
|
+
abort <<~WARNING
|
|
47
|
+
`rake release` must be invoked from the `Mongoid Release` GitHub action,
|
|
48
|
+
and must not be invoked locally. This ensures the gem is properly signed
|
|
49
|
+
and distributed by the appropriate user.
|
|
50
|
+
|
|
51
|
+
Note that it is the `rubygems/release-gem@v1` step in the `Mongoid Release`
|
|
52
|
+
action that invokes this task. Do not rename or remove this task, or the
|
|
53
|
+
release-gem step will fail. Reimplement this task with caution.
|
|
54
|
+
|
|
55
|
+
mongoid-#{Mongoid::VERSION}.gem was NOT pushed to RubyGems.
|
|
56
|
+
WARNING
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
system 'gem', 'push', "mongoid-#{Mongoid::VERSION}.gem"
|
|
41
60
|
end
|
|
42
61
|
|
|
43
62
|
RSpec::Core::RakeTask.new("spec") do |spec|
|
|
@@ -49,6 +68,46 @@ RSpec::Core::RakeTask.new('spec:progress') do |spec|
|
|
|
49
68
|
spec.pattern = "spec/**/*_spec.rb"
|
|
50
69
|
end
|
|
51
70
|
|
|
71
|
+
desc 'Build and validate the evergreen config'
|
|
72
|
+
task eg: %w[ eg:build eg:validate ]
|
|
73
|
+
|
|
74
|
+
# 'eg' == 'evergreen', but evergreen is too many letters for convenience
|
|
75
|
+
namespace :eg do
|
|
76
|
+
desc 'Builds the .evergreen/config.yml file from the templates'
|
|
77
|
+
task :build do
|
|
78
|
+
ruby '.evergreen/update-evergreen-configs'
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
desc 'Validates the .evergreen/config.yml file'
|
|
82
|
+
task :validate do
|
|
83
|
+
system 'evergreen validate --project mongoid .evergreen/config.yml'
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
desc 'Updates the evergreen executable to the latest available version'
|
|
87
|
+
task :update do
|
|
88
|
+
system 'evergreen get-update --install'
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
desc 'Runs the current branch as an evergreen patch'
|
|
92
|
+
task :patch do
|
|
93
|
+
system 'evergreen patch --uncommitted --project mongoid --browse --auto-description --yes'
|
|
94
|
+
end
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
namespace :generate do
|
|
98
|
+
desc 'Generates a mongoid.yml from the template'
|
|
99
|
+
task :config do
|
|
100
|
+
require 'mongoid'
|
|
101
|
+
require 'erb'
|
|
102
|
+
|
|
103
|
+
template_path = 'lib/rails/generators/mongoid/config/templates/mongoid.yml'
|
|
104
|
+
database_name = ENV['DATABASE_NAME'] || 'my_db'
|
|
105
|
+
|
|
106
|
+
config = ERB.new(File.read(template_path), trim_mode: '-').result(binding)
|
|
107
|
+
File.write('mongoid.yml', config)
|
|
108
|
+
end
|
|
109
|
+
end
|
|
110
|
+
|
|
52
111
|
CLASSIFIERS = [
|
|
53
112
|
[%r,^mongoid/attribute,, :attributes],
|
|
54
113
|
[%r,^mongoid/association/[or],, :associations_referenced],
|
|
@@ -64,6 +123,8 @@ RUN_PRIORITY = %i(
|
|
|
64
123
|
)
|
|
65
124
|
|
|
66
125
|
def spec_organizer
|
|
126
|
+
require 'mrss/spec_organizer'
|
|
127
|
+
|
|
67
128
|
Mrss::SpecOrganizer.new(
|
|
68
129
|
root: ROOT,
|
|
69
130
|
classifiers: CLASSIFIERS,
|
|
@@ -97,34 +158,12 @@ desc "Generate all documentation"
|
|
|
97
158
|
task :docs => 'docs:yard'
|
|
98
159
|
|
|
99
160
|
namespace :docs do
|
|
100
|
-
desc "Generate yard
|
|
161
|
+
desc "Generate yard documentation"
|
|
101
162
|
task :yard do
|
|
163
|
+
require "mongoid/version"
|
|
164
|
+
|
|
102
165
|
out = File.join('yard-docs', Mongoid::VERSION)
|
|
103
166
|
FileUtils.rm_rf(out)
|
|
104
167
|
system "yardoc -o #{out} --title mongoid-#{Mongoid::VERSION}"
|
|
105
168
|
end
|
|
106
169
|
end
|
|
107
|
-
|
|
108
|
-
namespace :release do
|
|
109
|
-
task :check_private_key do
|
|
110
|
-
unless File.exist?('gem-private_key.pem')
|
|
111
|
-
raise "No private key present, cannot release"
|
|
112
|
-
end
|
|
113
|
-
end
|
|
114
|
-
end
|
|
115
|
-
|
|
116
|
-
desc 'Verifies that all built gems in pkg/ are valid'
|
|
117
|
-
task :verify do
|
|
118
|
-
gems = Dir['pkg/*.gem']
|
|
119
|
-
if gems.empty?
|
|
120
|
-
puts 'There are no gems in pkg/ to verify'
|
|
121
|
-
else
|
|
122
|
-
gems.each do |gem|
|
|
123
|
-
if signed_gem?(gem)
|
|
124
|
-
puts "#{gem} is signed"
|
|
125
|
-
else
|
|
126
|
-
abort "#{gem} is not signed"
|
|
127
|
-
end
|
|
128
|
-
end
|
|
129
|
-
end
|
|
130
|
-
end
|
|
@@ -65,7 +65,14 @@ module Mongoid
|
|
|
65
65
|
# @return [ Integer ] The number of matches.
|
|
66
66
|
def count(options = {}, &block)
|
|
67
67
|
return super(&block) if block_given?
|
|
68
|
-
|
|
68
|
+
|
|
69
|
+
try_cache(:count) do
|
|
70
|
+
if valid_for_count_documents?
|
|
71
|
+
view.count_documents(options)
|
|
72
|
+
else
|
|
73
|
+
view.count(options)
|
|
74
|
+
end
|
|
75
|
+
end
|
|
69
76
|
end
|
|
70
77
|
|
|
71
78
|
# Get the estimated number of documents matching the query.
|
|
@@ -902,6 +909,24 @@ module Mongoid
|
|
|
902
909
|
docs = eager_load(docs)
|
|
903
910
|
limit ? docs : docs.first
|
|
904
911
|
end
|
|
912
|
+
|
|
913
|
+
# Queries whether the current context is valid for use with
|
|
914
|
+
# the #count_documents? predicate. A context is valid if it
|
|
915
|
+
# does not include a `$where` operator.
|
|
916
|
+
#
|
|
917
|
+
# @return [ true | false ] whether or not the current context
|
|
918
|
+
# excludes a `$where` operator.
|
|
919
|
+
def valid_for_count_documents?(hash = view.filter)
|
|
920
|
+
# Note that `view.filter` is a BSON::Document, and all keys in a
|
|
921
|
+
# BSON::Document are strings; we don't need to worry about symbol
|
|
922
|
+
# representations of `$where`.
|
|
923
|
+
hash.keys.each do |key|
|
|
924
|
+
return false if key == '$where'
|
|
925
|
+
return false if hash[key].is_a?(Hash) && !valid_for_count_documents?(hash[key])
|
|
926
|
+
end
|
|
927
|
+
|
|
928
|
+
true
|
|
929
|
+
end
|
|
905
930
|
end
|
|
906
931
|
end
|
|
907
932
|
end
|
data/lib/mongoid/version.rb
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
module Mongoid
|
|
4
|
-
|
|
4
|
+
# The current version of Mongoid
|
|
5
|
+
#
|
|
6
|
+
# Note that this file is automatically updated via `rake candidate:create`.
|
|
7
|
+
# Manual changes to this file will be overwritten by that rake task.
|
|
8
|
+
VERSION = '7.6.0'
|
|
5
9
|
end
|
data/spec/mongoid/config_spec.rb
CHANGED
|
@@ -558,6 +558,7 @@ describe Mongoid::Config do
|
|
|
558
558
|
|
|
559
559
|
# Wrapping libraries are only recognized by driver 2.13.0+.
|
|
560
560
|
min_driver_version '2.13'
|
|
561
|
+
ruby_version_lt '3.0'
|
|
561
562
|
|
|
562
563
|
it 'passes uuid to driver' do
|
|
563
564
|
Mongo::Client.should receive(:new).with(SpecConfig.instance.addresses,
|
|
@@ -189,6 +189,16 @@ describe Mongoid::Contextual::Mongo do
|
|
|
189
189
|
end
|
|
190
190
|
end
|
|
191
191
|
end
|
|
192
|
+
|
|
193
|
+
context 'when for_js is present' do
|
|
194
|
+
let(:context) do
|
|
195
|
+
Band.for_js('this.name == "Depeche Mode"')
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
it 'counts the expected records' do
|
|
199
|
+
expect(context.count).to eq(1)
|
|
200
|
+
end
|
|
201
|
+
end
|
|
192
202
|
end
|
|
193
203
|
|
|
194
204
|
describe "#estimated_count" do
|
|
@@ -4,6 +4,7 @@ require "spec_helper"
|
|
|
4
4
|
require 'mongoid/association/referenced/has_many_models'
|
|
5
5
|
|
|
6
6
|
describe Mongoid::QueryCache do
|
|
7
|
+
require_mri
|
|
7
8
|
|
|
8
9
|
around do |spec|
|
|
9
10
|
Mongoid::QueryCache.clear_cache
|
|
@@ -21,7 +22,7 @@ describe Mongoid::QueryCache do
|
|
|
21
22
|
end
|
|
22
23
|
|
|
23
24
|
after do
|
|
24
|
-
Mrss::SessionRegistry.instance.verify_sessions_ended!
|
|
25
|
+
# Mrss::SessionRegistry.instance.verify_sessions_ended!
|
|
25
26
|
end
|
|
26
27
|
|
|
27
28
|
let(:reset_legacy_qc_warning) do
|
|
@@ -528,13 +528,11 @@ describe Mongoid::Serializable do
|
|
|
528
528
|
end
|
|
529
529
|
|
|
530
530
|
it "includes the first relation" do
|
|
531
|
-
expect(relation_hash[0]).to include
|
|
532
|
-
{ "_id" => "kudamm", "street" => "Kudamm" }
|
|
531
|
+
expect(relation_hash[0]).to include({ "_id" => "kudamm", "street" => "Kudamm" })
|
|
533
532
|
end
|
|
534
533
|
|
|
535
534
|
it "includes the second relation" do
|
|
536
|
-
expect(relation_hash[1]).to include
|
|
537
|
-
{ "_id" => "tauentzienstr", "street" => "Tauentzienstr" }
|
|
535
|
+
expect(relation_hash[1]).to include( "_id" => "tauentzienstr", "street" => "Tauentzienstr" )
|
|
538
536
|
end
|
|
539
537
|
end
|
|
540
538
|
|
|
@@ -545,13 +543,11 @@ describe Mongoid::Serializable do
|
|
|
545
543
|
end
|
|
546
544
|
|
|
547
545
|
it "includes the first relation" do
|
|
548
|
-
expect(relation_hash[0]).to include
|
|
549
|
-
{ "_id" => "kudamm", "street" => "Kudamm" }
|
|
546
|
+
expect(relation_hash[0]).to include({ "_id" => "kudamm", "street" => "Kudamm" })
|
|
550
547
|
end
|
|
551
548
|
|
|
552
549
|
it "includes the second relation" do
|
|
553
|
-
expect(relation_hash[1]).to include
|
|
554
|
-
{ "_id" => "tauentzienstr", "street" => "Tauentzienstr" }
|
|
550
|
+
expect(relation_hash[1]).to include({ "_id" => "tauentzienstr", "street" => "Tauentzienstr" })
|
|
555
551
|
end
|
|
556
552
|
end
|
|
557
553
|
|
|
@@ -670,8 +666,7 @@ describe Mongoid::Serializable do
|
|
|
670
666
|
end
|
|
671
667
|
|
|
672
668
|
it "includes the specified relation" do
|
|
673
|
-
expect(relation_hash).to include
|
|
674
|
-
{ "_id" => "leo-marvin", "first_name" => "Leo", "last_name" => "Marvin" }
|
|
669
|
+
expect(relation_hash).to include({ "_id" => "Leo-Marvin", "first_name" => "Leo", "last_name" => "Marvin" })
|
|
675
670
|
end
|
|
676
671
|
end
|
|
677
672
|
|
|
@@ -682,8 +677,7 @@ describe Mongoid::Serializable do
|
|
|
682
677
|
end
|
|
683
678
|
|
|
684
679
|
it "includes the specified relation" do
|
|
685
|
-
expect(relation_hash).to include
|
|
686
|
-
{ "_id" => "leo-marvin", "first_name" => "Leo", "last_name" => "Marvin" }
|
|
680
|
+
expect(relation_hash).to include({ "_id" => "Leo-Marvin", "first_name" => "Leo", "last_name" => "Marvin" })
|
|
687
681
|
end
|
|
688
682
|
end
|
|
689
683
|
|
|
@@ -694,8 +688,7 @@ describe Mongoid::Serializable do
|
|
|
694
688
|
end
|
|
695
689
|
|
|
696
690
|
it "includes the specified relation sans exceptions" do
|
|
697
|
-
expect(relation_hash).to include
|
|
698
|
-
{ "first_name" => "Leo", "last_name" => "Marvin" }
|
|
691
|
+
expect(relation_hash).to include({ "first_name" => "Leo", "last_name" => "Marvin" })
|
|
699
692
|
end
|
|
700
693
|
end
|
|
701
694
|
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Candidate Tasks
|
|
2
|
+
|
|
3
|
+
When using the `candidate` rake tasks, you must make sure:
|
|
4
|
+
|
|
5
|
+
1. You are using at least `git` version 2.49.0.
|
|
6
|
+
2. You have the `gh` CLI tool installed.
|
|
7
|
+
3. You are logged into `gh` with an account that has collaborator access to the repository.
|
|
8
|
+
4. You have run `gh repo set-default` from the root of your local checkout to set the default repository to the canonical MongoDB repo.
|
|
9
|
+
5. The `origin` remote for your local checkout is set to your own fork.
|
|
10
|
+
6. The `upstream` remote for your local checkout is set to the canonical
|
|
11
|
+
MongoDB repo.
|
|
12
|
+
|
|
13
|
+
Once configured, you can use the following commands:
|
|
14
|
+
|
|
15
|
+
1. `rake candidate:prs` - This will list all pull requests that will be included in the next release. Any with `[?]` are unlabelled (or are not labelled with a recognized label). Otherwise, `[b]` means `bug`, `[f]` means `feature`, and `[x]` means `bcbreak`.
|
|
16
|
+
2. `rake candidate:preview` - This will generate and display the release notes for the next release, based on the associated pull requests.
|
|
17
|
+
3. `rake candidate:create` - This will create a new PR against the default repository, using the generated release notes as the description. The new PR will be given the `release-candidate` label.
|
|
18
|
+
|
|
19
|
+
Then, after the release candidate PR is approved and merged, the release process will automatically bundle, sign, and release the new version.
|
|
20
|
+
|
|
21
|
+
Once you've merged the PR, you can switch to the "Actions" tab for the repository on GitHub and look for the "Release" workflow (might be named differently), which should have triggered automatically. You can monitor the progress of the release there. If there are any problems, the workflow is generally safe to re-run after you've addressed them.
|
|
22
|
+
|
|
23
|
+
Things to do after the release succeeds:
|
|
24
|
+
|
|
25
|
+
1. Copy the release notes from the PR and create a new release announcement on the forums (https://www.mongodb.com/community/forums/c/announcements/driver-releases/110).
|
|
26
|
+
2. If the release was not automatically announced in #ruby, copy a link to the GitHub release or MongoDB forum post there.
|
|
27
|
+
3. Close the release in Jira.
|
|
28
|
+
|
|
@@ -195,12 +195,15 @@ module Mrss
|
|
|
195
195
|
'debian81' => 'debian:jessie',
|
|
196
196
|
'debian92' => 'debian:stretch',
|
|
197
197
|
'debian10' => 'debian:buster',
|
|
198
|
+
'debian11' => 'debian:bullseye',
|
|
198
199
|
'ubuntu1404' => 'ubuntu:trusty',
|
|
199
200
|
'ubuntu1604' => 'ubuntu:xenial',
|
|
200
201
|
'ubuntu1804' => 'ubuntu:bionic',
|
|
201
202
|
'ubuntu2004' => 'ubuntu:focal',
|
|
203
|
+
'ubuntu2204' => 'ubuntu:jammy',
|
|
202
204
|
'rhel62' => 'centos:6',
|
|
203
205
|
'rhel70' => 'centos:7',
|
|
206
|
+
'rhel80' => 'rockylinux:8',
|
|
204
207
|
}.freeze
|
|
205
208
|
|
|
206
209
|
def base_image
|
|
@@ -231,6 +234,10 @@ module Mrss
|
|
|
231
234
|
distro =~ /debian|ubuntu/
|
|
232
235
|
end
|
|
233
236
|
|
|
237
|
+
def ubuntu?
|
|
238
|
+
distro=~ /ubuntu/
|
|
239
|
+
end
|
|
240
|
+
|
|
234
241
|
def preload?
|
|
235
242
|
!!@options[:preload]
|
|
236
243
|
end
|
|
@@ -275,7 +282,7 @@ module Mrss
|
|
|
275
282
|
|
|
276
283
|
def num_exposed_ports
|
|
277
284
|
case @env['TOPOLOGY'] || 'standalone'
|
|
278
|
-
when 'standalone'
|
|
285
|
+
when 'standalone', 'replica-set-single-node'
|
|
279
286
|
1
|
|
280
287
|
when 'replica-set'
|
|
281
288
|
3
|
|
@@ -98,8 +98,8 @@ module Mrss
|
|
|
98
98
|
def min_libmongocrypt_version(version)
|
|
99
99
|
require_libmongocrypt
|
|
100
100
|
before(:all) do
|
|
101
|
-
actual_version =
|
|
102
|
-
min_version =
|
|
101
|
+
actual_version = Utils.parse_version(Mongo::Crypt::Binding.mongocrypt_version(nil))
|
|
102
|
+
min_version = Utils.parse_version(version)
|
|
103
103
|
unless actual_version >= min_version
|
|
104
104
|
skip "libmongocrypt version #{min_version} required, but version #{actual_version} is available"
|
|
105
105
|
end
|