diff options
author | Florian Staudacher <florian_staudacher@yahoo.de> | 2015-08-03 19:58:32 +0300 |
---|---|---|
committer | Florian Staudacher <florian_staudacher@yahoo.de> | 2015-08-24 23:04:53 +0300 |
commit | ea397ffdfbc1ee43ad746efb69b569e06b4873ce (patch) | |
tree | a3b87e01492ec4ebd225e07ef4acb889a7f738de /spec/workers | |
parent | aeea030c9a7185147f1b4f5fe97ffea78e62ebc2 (diff) |
Add connection test for pods in the network
* add a class for checking pod connectivity
* extend pod model to handle new functionality
* add an admin frontend to list pods and re-trigger checks manually
* add a daily worker to run through all the pods
* add unit tests for most of the new code
Diffstat (limited to 'spec/workers')
-rw-r--r-- | spec/workers/recurring_pod_check_spec.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/workers/recurring_pod_check_spec.rb b/spec/workers/recurring_pod_check_spec.rb new file mode 100644 index 000000000..b7f240f1e --- /dev/null +++ b/spec/workers/recurring_pod_check_spec.rb @@ -0,0 +1,17 @@ + +require "spec_helper" + +describe Workers::RecurringPodCheck do + before do + @pods = (0..4).map do + FactoryGirl.create(:pod).tap { |pod| + expect(pod).to receive(:test_connection!) + } + end + allow(Pod).to receive(:find_in_batches) { @pods } + end + + it "performs a connection test on all existing pods" do + Workers::RecurringPodCheck.new.perform + end +end |