summaryrefslogtreecommitdiff
path: root/buildscripts/package_test
diff options
context:
space:
mode:
authorJohn Chen <john.chen@mongodb.com>2019-09-16 19:36:56 +0000
committerevergreen <evergreen@mongodb.com>2019-09-16 19:36:56 +0000
commit0d0c7ec99f6005b05ab82cd450e395771e707582 (patch)
treefefeac4db2b3f2a20a1959abe6f16f5558cc9276 /buildscripts/package_test
parent54d1ab613046f06d0524aa9f7a244dfe3a076aa0 (diff)
downloadmongo-0d0c7ec99f6005b05ab82cd450e395771e707582.tar.gz
SERVER-37768 Added Debian10 build variant
Diffstat (limited to 'buildscripts/package_test')
-rw-r--r--buildscripts/package_test/.kitchen.yml5
-rw-r--r--buildscripts/package_test/test/recipes/service/install_mongodb_spec.rb25
2 files changed, 18 insertions, 12 deletions
diff --git a/buildscripts/package_test/.kitchen.yml b/buildscripts/package_test/.kitchen.yml
index 3ee7b703bda..d9e6a41d5f1 100644
--- a/buildscripts/package_test/.kitchen.yml
+++ b/buildscripts/package_test/.kitchen.yml
@@ -49,6 +49,11 @@ platforms:
image_id: ami-71b7750b
transport:
username: admin
+ - name: debian10
+ driver:
+ image_id: ami-02ad06066b040a84b
+ transport:
+ username: admin
- name: rhel62
driver:
# Use rhel 6.3 because chef-solo fails on rhel 6.2
diff --git a/buildscripts/package_test/test/recipes/service/install_mongodb_spec.rb b/buildscripts/package_test/test/recipes/service/install_mongodb_spec.rb
index f927a58fe94..c9a8f0fde61 100644
--- a/buildscripts/package_test/test/recipes/service/install_mongodb_spec.rb
+++ b/buildscripts/package_test/test/recipes/service/install_mongodb_spec.rb
@@ -144,18 +144,19 @@ if deb
it { should be_directory }
end
- if os[:release] == '18.04'
- describe user('mongodb') do
- it { should exist }
- its('groups') { should include 'mongodb' }
- its('shell') { should eq '/usr/sbin/nologin' }
- end
- else
- describe user('mongodb') do
- it { should exist }
- its('groups') { should include 'mongodb' }
- its('shell') { should eq '/bin/false' }
- end
+ describe user('mongodb') do
+ it { should exist }
+ its('groups') { should include 'mongodb' }
+ # All versions of Debian 10 will use /usr/sbin/nologin for service
+ # account shells
+ its('shell') {
+ if ((os[:family] == 'debian' and os[:release].split('.')[0] == '10') or
+ (os[:family] == 'ubuntu' and os[:release] == '18.04'))
+ should eq '/usr/sbin/nologin'
+ else
+ should eq '/bin/false'
+ end
+ }
end
end