-
Notifications
You must be signed in to change notification settings - Fork 86
Conversation
I think the reason it's breaking for you is that the alert contact ID doesn't exist. can you try adding an alert contact resource to your test? i.e.
|
@louy |
I see. Let me try this locally. However, the error message you mentioned looks like UR rejecting your alert contact id rather than an issue in threshold/recurrence |
But this test will only work if you have a paid for account that you are running the tests with on CI (are you?) |
Sadly no, so I think for the purpose of making the test work for non-paid users (including myself) we can set them to 0 |
Ok I see the problem now. Yeah you're right |
Looking at their API, I think I remember what the issue was now. The I think for this one you can skip this step in the test and it should work fine:
Please do this in a separate test case (rather than updating the existing http monitor test case) and I'll merge :) |
2cc5631
to
780ac00
Compare
@louy I updated it, not sure why the tests are failing to check out the code? Also does that I did make sense? Will terraform try to change the |
I'm not sure why the build is breaking either, but I suspect it's an issue with circleci's permission to access github. Maybe try to re-authorise it or something? :) I don't think TF will try to update this every time, but the issue is rather that TF can't import this field (which is why the ImportVerify test step fails). If we can add a few |
Sorry it's taken me a while btw. Just busy at work as you can imagine |
79ca216
to
37d3d0e
Compare
@louy I figured out why it was failing. It was failing because of I setup automatic builds for my fork for #9 I think you have set it not to build fork's because they would have access to your API key. I have added your suggested changes, tests pass locally. Let me know if there is anything else to get this merged so we can try it out? |
Sadly the uptimerobot API doesn't support fetching them
37d3d0e
to
5d6932a
Compare
Makes sense. Yeah I guess I don't want anyone to be able to get hold of my api key ;) I've merged this now and it should be released in v0.3.0 |
@louy I have tried working on this but I got very stuck with adding proper tests :( I don't know how which method to use to validate a "hash"
I am pretty sure this actually sets and updates the recurrence and threshold correctly but I can't validate without fixing the tests.
I also think my biggest issue is I somehow need to modify the
GetMonitor
method by adjusting thetype Monitor struct {
to include theAlertContacts
Any advice?