forked from flapjack/flapjack
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
revert some of the media interval changes, not needed
- Loading branch information
1 parent
f8b01fc
commit 0c9e2c4
Showing
17 changed files
with
1,197 additions
and
1,243 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -84,12 +84,11 @@ def find_or_create_check(check_data) | |
medium = Flapjack::Data::Medium.find_by_id(medium_data['id']) | ||
expect(medium).to be nil | ||
medium = Flapjack::Data::Medium.new( | ||
:id => medium_data['id'], | ||
:type => medium_data['type'], | ||
:address => medium_data['address'], | ||
:initial_failure_interval => medium_data['initial_failure_interval'].to_i * 60, | ||
:repeat_failure_interval => medium_data['repeat_failure_interval'].to_i * 60, | ||
:rollup_threshold => medium_data['rollup_threshold'].to_i | ||
:id => medium_data['id'], | ||
:type => medium_data['type'], | ||
:address => medium_data['address'], | ||
:interval => medium_data['interval'].to_i * 60, | ||
:rollup_threshold => medium_data['rollup_threshold'].to_i | ||
) | ||
expect(medium.save).to be true | ||
contact.media << medium | ||
|
@@ -174,7 +173,7 @@ def find_or_create_check(check_data) | |
'name' => 'John Smith') | ||
|
||
sms = Flapjack::Data::Medium.new(:type => 'sms', | ||
:address => '+61888888888', :initial_failure_interval => 600, :repeat_failure_interval => 600) | ||
:address => '+61888888888', :interval => 600) | ||
expect(sms.save).to be true | ||
contact.media << sms | ||
|
||
|
@@ -211,7 +210,7 @@ def find_or_create_check(check_data) | |
'name' => 'Jane Smith') | ||
|
||
email = Flapjack::Data::Medium.new(:type => 'email', | ||
:address => '[email protected]', :initial_failure_interval => 600, :repeat_failure_interval => 600) | ||
:address => '[email protected]', :interval => 600) | ||
expect(email.save).to be true | ||
contact.media << email | ||
|
||
|
@@ -247,7 +246,7 @@ def find_or_create_check(check_data) | |
'name' => 'James Smithson') | ||
|
||
sns = Flapjack::Data::Medium.new(:type => 'sns', | ||
:address => 'arn:aws:sns:us-east-1:698519295917:My-Topic', :initial_failure_interval => 600, :repeat_failure_interval => 600) | ||
:address => 'arn:aws:sns:us-east-1:698519295917:My-Topic', :interval => 600) | ||
expect(sns.save).to be true | ||
contact.media << sns | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,8 +10,7 @@ | |
let(:medium_data) { | ||
{:type => 'email', | ||
:address => '[email protected]', | ||
:initial_failure_interval => 120, | ||
:repeat_failure_interval => 60, | ||
:interval => 120, | ||
:rollup_threshold => 3 | ||
} | ||
} | ||
|
@@ -148,14 +147,14 @@ | |
expect(Flapjack::Data::Medium).to receive(:find_by_ids!). | ||
with(medium.id, medium_2.id).and_return([medium, medium_2]) | ||
|
||
expect(medium).to receive(:initial_failure_interval=).with(80) | ||
expect(medium).to receive(:interval=).with(80) | ||
expect(medium).to receive(:save).and_return(true) | ||
|
||
expect(medium_2).to receive(:initial_failure_interval=).with(80) | ||
expect(medium_2).to receive(:interval=).with(80) | ||
expect(medium_2).to receive(:save).and_return(true) | ||
|
||
patch "/media/#{medium.id},#{medium_2.id}", | ||
Flapjack.dump_json([{:op => 'replace', :path => '/media/0/initial_failure_interval', :value => 80}]), | ||
Flapjack.dump_json([{:op => 'replace', :path => '/media/0/interval', :value => 80}]), | ||
jsonapi_patch_env | ||
expect(last_response.status).to eq(204) | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.