Commits


Use default MarshalJSON method There's no point doing so much manual work and testing just to keep fields under a "attrs" key when marshalling to JSON. When creating the object we can just: 1. Marshal the object to JSON 2. Put it all under a "attrs" key. Now it's easier to imagine the mapping of the structs to JSON, since they follow the same rules as everything else in Go.


Keep test data in version control While here also don't log messages in testing unless there's an error.


Only log on test error No news is good news!


Just panic on unlikely user test error We're just testing, so we don't need super robust error handling code. And if any of those conditions aren't met then we have serious problems anyway.


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.


deduplicate new test client code This adds a newTestClient option so that we aren't constantly creating new http transports clients and all that


Support Icinga2 hostgroups Tests of hostgroup operations are done in TestFilter


Add tests for user management