فهرست منبع

rng-tools are now started and enabled by ansible. Enabling and testing services in serverspec cause some problems atm

Till Klocke 10 سال پیش
والد
کامیت
4fe3771e25
3فایلهای تغییر یافته به همراه13 افزوده شده و 3 حذف شده
  1. 3 0
      roles/fastd/tasks/main.yml
  2. 1 1
      test/application/fastd_pkg_vars.yml
  3. 9 2
      test/integration/fastd/serverspec/test_spec.rb

+ 3 - 0
roles/fastd/tasks/main.yml

@@ -24,5 +24,8 @@
     - "{{fastd_instances_secret}}"
   notify: Restart fastd
 
+- name: rng-tools need to run
+  service: name=rng-tools state=started enabled=yes pattern=/usr/sbin/rngd
+
 - name: fastd needs to autostart
   service: name=fastd enabled=yes state=started

+ 1 - 1
test/application/fastd_pkg_vars.yml

@@ -18,4 +18,4 @@ fastd_instances:
 
 fastd_instances_secret:
   - name: test
-    secret: some secret
+    secret: 280088c4263359417e9f2daf1771db820ab79eb4f79e3718719b2a976e8a8b5e

+ 9 - 2
test/integration/fastd/serverspec/test_spec.rb

@@ -8,7 +8,14 @@ describe package('fastd') do
 end
 
 # Ansible seems to have problems to enable a service. Needs investigation
-#describe service('fastd') do
+describe service('fastd') do
+  it { should be_running }
+#  it { should be_enabled }
+end
+
+# Detection of running service fails in Debian 7.8. Needs investigation.
+#describe service('rng-tools') do
+#  it { should be_running }
 #  it { should be_enabled }
 #end
 
@@ -44,5 +51,5 @@ end
 describe file('/etc/fastd/test/secret.conf') do
   it { should exist }
   it { should be_file }
-  its(:content) { should contain 'secret "some secret";' }
+  its(:content) { should contain 'secret "280088c4263359417e9f2daf1771db820ab79eb4f79e3718719b2a976e8a8b5e";' }
 end