Skip to content

Commit aebdfb4

Browse files
author
Johan De Wit
committed
[Acceptance] Client package is now intalled bu the server (mandatory for mongosh) - removed to avoid duplicated resources
1 parent f08c045 commit aebdfb4

File tree

6 files changed

+1
-41
lines changed

6 files changed

+1
-41
lines changed

spec/acceptance/database_spec.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
it 'compiles with no errors' do
99
pp = <<-EOS
1010
class { 'mongodb::server': }
11-
-> class { 'mongodb::client': }
1211
-> mongodb::db { 'testdb1':
1312
user => 'testuser',
1413
password => 'testpass',
@@ -24,7 +23,7 @@ class { 'mongodb::server': }
2423

2524
it 'creates the databases' do
2625
shell("mongosh testdb1 --eval 'EJSON.stringify(db.getMongo().getDBs())'")
27-
shell("mongsho testdb2 --eval 'EJSON.stringify(db.getMongo().getDBs())'")
26+
shell("mongosh testdb2 --eval 'EJSON.stringify(db.getMongo().getDBs())'")
2827
end
2928
end
3029

@@ -34,7 +33,6 @@ class { 'mongodb::server': }
3433
class { 'mongodb::server':
3534
port => 27018,
3635
}
37-
-> class { 'mongodb::client': }
3836
-> mongodb::db { 'testdb1':
3937
user => 'testuser',
4038
password => 'testpass',

spec/acceptance/mongos_spec.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ class { 'mongodb::server':
2525
replset_members => ['127.0.0.1:27019'],
2626
port => 27019,
2727
}
28-
-> class { 'mongodb::client': }
2928
-> class { 'mongodb::mongos':
3029
configdb => ['test/127.0.0.1:27019'],
3130
}
@@ -73,9 +72,6 @@ class { 'mongodb::mongos':
7372
service_ensure => stopped,
7473
service_enable => false
7574
}
76-
-> class { 'mongodb::client':
77-
ensure => absent,
78-
}
7975
EOS
8076
apply_manifest(pp, catch_failures: true)
8177
apply_manifest(pp, catch_changes: true)

spec/acceptance/replset_spec.rb

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,6 @@ class { 'mongodb::globals': }
1515
package_ensure => absent,
1616
service_ensure => stopped
1717
}
18-
if $::osfamily == 'RedHat' {
19-
class { 'mongodb::client':
20-
ensure => absent
21-
}
22-
}
2318
EOS
2419

2520
apply_manifest_on(hosts.reverse, pp, catch_failures: true)
@@ -32,9 +27,6 @@ class { 'mongodb::globals': }
3227
bind_ip => '0.0.0.0',
3328
replset => 'test',
3429
}
35-
if $::osfamily == 'RedHat' {
36-
class { 'mongodb::client': }
37-
}
3830
EOS
3931

4032
apply_manifest_on(hosts.reverse, pp, catch_failures: true)
@@ -85,11 +77,6 @@ class { 'mongodb::globals': }
8577
package_ensure => absent,
8678
service_ensure => stopped
8779
}
88-
if $::osfamily == 'RedHat' {
89-
class { 'mongodb::client':
90-
ensure => absent
91-
}
92-
}
9380
EOS
9481

9582
apply_manifest_on(hosts.reverse, pp, catch_failures: true)
@@ -126,9 +113,6 @@ class { 'mongodb::server':
126113
YXIsJ0gYcu9XG3mx10LbdPJvxSMg'
127114
128115
}
129-
if $::osfamily == 'RedHat' {
130-
include mongodb::client
131-
}
132116
EOS
133117

134118
apply_manifest_on(hosts.reverse, pp, catch_failures: true)
@@ -166,9 +150,6 @@ class { 'mongodb::server':
166150
nc1ohyB0lNt8lHf1U00mtgDSV3fwo5LkwhRi6d+bDBTL/C6MZETMLdyCqDlTdUWG
167151
YXIsJ0gYcu9XG3mx10LbdPJvxSMg'
168152
}
169-
if $::osfamily == 'RedHat' {
170-
include mongodb::client
171-
}
172153
mongodb_replset { 'test':
173154
auth_enabled => true,
174155
members => [#{hosts.map { |x| "'#{x}:27017'" }.join(',')}],

spec/acceptance/server_spec.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
it 'works with no errors' do
3131
pp = <<-EOS
3232
class { 'mongodb::server': }
33-
-> class { 'mongodb::client': }
3433
EOS
3534

3635
apply_manifest(pp, catch_failures: true)
@@ -65,7 +64,6 @@ class { 'mongodb::server': }
6564
class { 'mongodb::server':
6665
port => 27018,
6766
}
68-
-> class { 'mongodb::client': }
6967
EOS
7068

7169
apply_manifest(pp, catch_failures: true)
@@ -107,7 +105,6 @@ class { 'mongodb::server':
107105
restart => true,
108106
set_parameter => ['enableLocalhostAuthBypass: true']
109107
}
110-
class { 'mongodb::client': }
111108
112109
mongodb_user { "User admin on db admin":
113110
ensure => present,
@@ -170,7 +167,6 @@ class { 'mongodb::server':
170167
service_ensure => stopped,
171168
service_enable => false
172169
}
173-
-> class { 'mongodb::client': ensure => absent, }
174170
EOS
175171
apply_manifest(pp, catch_failures: true)
176172
apply_manifest(pp, catch_changes: true)

spec/acceptance/sharding_spec.rb

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ class { 'mongodb::globals': }
1515
mongodb_replset { 'foo' :
1616
members => ["shard:27018"],
1717
}
18-
if $::osfamily == 'RedHat' {
19-
class { 'mongodb::client': }
20-
}
2118
EOS
2219

2320
apply_manifest_on(hosts_as('shard'), pp, catch_failures: true)
@@ -40,9 +37,6 @@ class { 'mongodb::mongos' :
4037
member => 'foo/shard:27018',
4138
keys => [{'foo.toto' => {'name' => 1}}]
4239
}
43-
if $::osfamily == 'RedHat' {
44-
class { 'mongodb::client': }
45-
}
4640
EOS
4741

4842
apply_manifest_on(hosts_as('router'), pp, catch_failures: true)

spec/acceptance/user_spec.rb

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
it 'compiles with no errors' do
88
pp = <<-EOS
99
class { 'mongodb::server': }
10-
-> class { 'mongodb::client': }
1110
-> mongodb_database { 'testdb': ensure => present }
1211
->
1312
mongodb_user {'testuser':
@@ -30,7 +29,6 @@ class { 'mongodb::server': }
3029
it 'removes a user with no errors' do
3130
pp = <<-EOS
3231
class { 'mongodb::server': }
33-
-> class { 'mongodb::client': }
3432
-> mongodb_database { 'testdb': ensure => present }
3533
->
3634
mongodb_user {'testuser':
@@ -55,7 +53,6 @@ class { 'mongodb::server': }
5553
it 'works with no errors' do
5654
pp = <<-EOS
5755
class { 'mongodb::server': port => 27018 }
58-
-> class { 'mongodb::client': }
5956
-> mongodb_database { 'testdb': ensure => present }
6057
->
6158
mongodb_user {'testuser':
@@ -80,7 +77,6 @@ class { 'mongodb::server': port => 27018 }
8077
it 'compiles with no errors' do
8178
pp = <<-EOS
8279
class { 'mongodb::server': }
83-
-> class { 'mongodb::client': }
8480
-> mongodb_database { 'testdb': ensure => present }
8581
->
8682
mongodb_user {'testuser':
@@ -106,7 +102,6 @@ class { 'mongodb::server': }
106102
it 'compiles with no errors' do
107103
pp = <<-EOS
108104
class { 'mongodb::server': }
109-
-> class { 'mongodb::client': }
110105
-> mongodb_database { 'testdb': ensure => present }
111106
-> mongodb_database { 'testdb2': ensure => present }
112107
->

0 commit comments

Comments
 (0)