Skip to content
This repository was archived by the owner on Jul 19, 2022. It is now read-only.

Commit

Permalink
add test script
Browse files Browse the repository at this point in the history
  • Loading branch information
betorvs committed Dec 9, 2019
1 parent f817b0a commit 5b80617
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Versioning](http://semver.org/spec/v2.0.0.html).

### Added
- Correct issue [#6](https://github.com/betorvs/sensu-opsgenie-handler/issues/6): `trim additional ending slash in --url argument`

- add script test.all.events.sh

## [0.0.6] - 2019-11-24

Expand Down
30 changes: 30 additions & 0 deletions test.all.events.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/usr/bin/env bash

list="event
event.withAnnotations
event_with_opsgenie_priority.check
event_with_opsgenie_priority"

for event in $list ;
do
echo "${event} With URL https://api.opsgenie.com/"
cat ${event}.json | ./sensu-opsgenie-handler --url 'https://api.opsgenie.com/'
sleep 5
cat ${event}.resolved.json | ./sensu-opsgenie-handler --url 'https://api.opsgenie.com/'
done
sleep 5
for event in $list ;
do
echo "${event} With URL https://api.opsgenie.com"
cat ${event}.json | ./sensu-opsgenie-handler --url 'https://api.opsgenie.com'
sleep 5
cat ${event}.resolved.json | ./sensu-opsgenie-handler --url 'https://api.opsgenie.com'
done
sleep 5
for event in $list ;
do
echo "${event} Without URL"
cat ${event}.json | ./sensu-opsgenie-handler
sleep 5
cat ${event}.resolved.json | ./sensu-opsgenie-handler
done

0 comments on commit 5b80617

Please sign in to comment.