Binds OpenFlow and OVSDB IPs
[integration/packaging/puppet-opendaylight.git] / spec / spec_helper_acceptance.rb
index 339ed420faa50b3e5fc7c6866df0f3f31a1d8ac8..389fabc6843b731c0b983b18eb0996ea1a860a95 100644 (file)
@@ -322,9 +322,31 @@ def odl_bind_ip_validation(options = {})
       its(:content) { should match /sshHost = #{odl_bind_ip}/ }
     end
 
+    describe file('/opt/opendaylight/etc/org.opendaylight.ovsdb.library.cfg') do
+      it { should be_file }
+      it { should be_owned_by 'odl' }
+      it { should be_grouped_into 'odl' }
+      its(:content) { should match /ovsdb-listener-ip = #{odl_bind_ip}/ }
+    end
+
+    describe file('/opt/opendaylight/etc/opendaylight/datastore/initial/config/default-openflow-connection-config.xml') do
+      it { should be_file }
+      it { should be_owned_by 'odl' }
+      it { should be_grouped_into 'odl' }
+      its(:content) { should match /<address>#{odl_bind_ip}<\/address>/ }
+    end
+
     describe command("loop_count=0; until [[ \$loop_count -ge 30 ]]; do netstat -punta | grep 8101 | grep #{odl_bind_ip} && break; loop_count=\$[\$loop_count+1]; sleep 1; done; echo \"Waited \$loop_count seconds to detect ODL karaf bound to IP\"") do
       its(:exit_status) { should eq 0 }
     end
+
+    describe command("loop_count=0; until [[ \$loop_count -ge 60 ]]; do netstat -punta | grep 6653 | grep #{odl_bind_ip} && break; loop_count=\$[\$loop_count+1]; sleep 1; done; echo \"Waited \$loop_count seconds to detect ODL karaf bound to IP\"") do
+      its(:exit_status) { should eq 0 }
+    end
+
+    describe command("loop_count=0; until [[ \$loop_count -ge 60 ]]; do netstat -punta | grep 6640 | grep #{odl_bind_ip} && break; loop_count=\$[\$loop_count+1]; sleep 1; done; echo \"Waited \$loop_count seconds to detect ODL karaf bound to IP\"") do
+      its(:exit_status) { should eq 0 }
+    end
   end
 end