Commit Briefs

f4705a6414 Oliver Lowe

icinga_test: Don't assign group for random hosts

We can test hostgroup assignment in other tests if desired.


62bf235cf0 Oliver Lowe

icinga_test: Inline permissions response

No need for a file on disk; it's only referenced once.


b717ce9bd5 Oliver Lowe

Test against a fake in-processs icinga server

A lot of the testing doesn't really flex what a real icinga2 server does. We can implement a simple fake server with about 250 lines of Go, then we get all the benefits of really quick feedback and no dependency on an icinga2 server (which isn't super easy to set up) for most tests. More complicated tests are still performed against a real server listening on loopback (if available).


d762d1d1ae Oliver Lowe

Correctly return ErrNoMatch when rescheduling a check

For some reason the API returns an internal server error status rather than a Not Found status (as in other methods in the API). We can catch the condition when results are empty and return ErrNoMatch.


9ffce56b80 Oliver Lowe

Properly encode spaces in filter expressions

This is a bit tricky. url.QueryEscape() encodes spaces in queries as "+", but Icinga2 wants them as "%20". A test case is included because this was kinda tricky to debug.


64e18a8d1e Oliver Lowe

Correctly return ErrNoMatch

The check was incorrect before. The HTTP status on responses is still 200 OK, but with empty results if there are no matches to the filter.


7cb145ba97 Oliver Lowe

Implement checker interface for HostGroup

This also adds a test for checking all hosts in a HostGroup.


02a1a10065 Oliver Lowe

Support cascading delete of objects


191337d0c3 Oliver Lowe

Add checking of services and hosts

And also add a icinga_test package that does the black-box tests i.e. tests which speak to a real icinga server.