Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Staudacher <florian_staudacher@yahoo.de>2015-08-03 19:58:32 +0300
committerFlorian Staudacher <florian_staudacher@yahoo.de>2015-08-24 23:04:53 +0300
commitea397ffdfbc1ee43ad746efb69b569e06b4873ce (patch)
treea3b87e01492ec4ebd225e07ef4acb889a7f738de /spec/workers
parentaeea030c9a7185147f1b4f5fe97ffea78e62ebc2 (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.rb17
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