Commits
- Commit:
717a9e7823638c994c6620883fcee2ef98da294b- From:
- Oliver Lowe <o@olowe.co>
- Date:
Keep test data in version control
While here also don't log messages in testing unless there's an error.
- Commit:
dca9442c1f7da187028aaaf66f2ebf7c34d6a863- From:
- Oliver Lowe <o@olowe.co>
- Date:
Catch all HostStates and ServiceStates
This is closer to the Icinga spec, anything greater than 2 or 3 is unknown.
- Commit:
e35b73d5e39c5601f8db91e5dc8fc38642d1dea4- From:
- Oliver Lowe <o@olowe.co>
- Date:
Only log on test error
No news is good news!
- Commit:
0324b0fdd256bf328e1eab17200b23aa803d0bd5- From:
- Oliver Lowe <o@olowe.co>
- Date:
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.
- Commit:
46fe962a8b8f10d81d0281a5097886b71c99afda- From:
- Oliver Lowe <o@olowe.co>
- Date:
Revert "Create a new client interface"
This reverts commit bd3b8a33c54037e66233db80fd1120eb0b6215f1.
It's a bad idea. I'm writing a fake server instead so that we can use
the real client code.
- Commit:
bd3b8a33c54037e66233db80fd1120eb0b6215f1- From:
- Oliver Lowe <o@olowe.co>
- Date:
Create a new client interface
So that testing the client doesn't involve making real HTTP requests.
- Commit:
d762d1d1aeb9ddb5a796ccfe1fefa3edea7e242f- From:
- Oliver Lowe <o@olowe.co>
- Date:
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.
- Commit:
46ca0f68f521c66d60a5d6646a0a15350533c9b8- From:
- Oliver Lowe <o@olowe.co>
- Date:
Marshal using struct tags rather than a custom map
I was excluding some struct fields so I thought I'd need to do some custom marshalling .
But you don't need to do this as you can use struct tags to optionally exclude things
from being put into JSON. Now there's no longer duplicate code between struct tags and keys in a map when marshalling. Handy!
- Commit:
f8031e6577708de406336a0d73dcb1bb922238bc- From:
- Oliver Lowe <o@olowe.co>
- Date:
Delete unused testUser var
This was used in some old tests but is now unused.
- Commit:
9ffce56b80990611dbb20ba6c4af4df4f9846140- From:
- Oliver Lowe <o@olowe.co>
- Date:
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.
- Commit:
64e18a8d1ef9f178f91aed840a371f3785c4d188- From:
- Oliver Lowe <o@olowe.co>
- Date:
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.
- Commit:
562d5c1eb8a76a65d49d14b36edefb846f747494- From:
- Oliver Lowe <o@olowe.co>
- Date:
Store acknowledgement status of hosts, services
- Commit:
1646fdebffc4c9069b824f65f8639120c224f312- From:
- Oliver Lowe <o@olowe.co>
- Date:
Actually return permissions grante to the client
Before we were just returning an empty response or something
non-meaningful
- Commit:
cb9dde9996675a4d56608eab8b57109da8484c29- From:
- Oliver Lowe <o@olowe.co>
- Date:
Let users schedule their own checks
- Commit:
dd1562c064ef82c610805dfd8cdaca5af54f6d22- From:
- Oliver Lowe <o@olowe.co>
- Date:
Always format generated code
While here document what is needed to actually run go generate.
- Commit:
f5fde32e94d77a44e85a28f9263531b34fdf7c8b- From:
- Oliver Lowe <o@olowe.co>
- Date:
Handle last check result of services
Includes a test to know that we're handling the JSON properly.
- Commit:
7cb145ba970416743d12a36bb0a4df59264203da- From:
- Oliver Lowe <o@olowe.co>
- Date:
Implement checker interface for HostGroup
This also adds a test for checking all hosts in a HostGroup.
- Commit:
dd0af5f789c1bac0444c33fcc4434922be48d1e7- From:
- Oliver Lowe <o@olowe.co>
- Date:
Correctly marshal Hosts into JSON
We were missing some attributes, like not adding any groups or display
names. This also adds a test which checks whether we are marshalling
hosts into JSON correctly.
- Commit:
e2cace7fed7b46be01306cd0b4e94093b0bdcec2- From:
- Oliver Lowe <o@olowe.co>
- Date:
Document checker Check() methods
- Commit:
02a1a10065dd3be4f89f30756adc670b1a8ab468- From:
- Oliver Lowe <o@olowe.co>
- Date:
Support cascading delete of objects
- Commit:
da19a2fd0fbbf44bc5495e68c7f24103d025b3b6- From:
- Oliver Lowe <o@olowe.co>
- Date:
Store host state type
- Commit:
191337d0c3d59aa9a990eb5192664d5c5079f187- From:
- Oliver Lowe <o@olowe.co>
- Date:
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.
- Commit:
e6fcfaf5b395db10ed791a73814b9e002be4a980- From:
- Oliver Lowe <o@olowe.co>
- Date:
Set accurate crud.go header comment
getopt(1) clears the value of "$@", so grab it before it's cleared
- Commit:
5105405ecc4e2ca95d7a7bab841b3de1520fc852- From:
- Oliver Lowe <o@olowe.co>
- Date:
deduplicate new test client code
This adds a newTestClient option so that we aren't constantly creating
new http transports clients and all that
- Commit:
e0c24850440b8bcaa5bf6a49c0dd493fb30e94fb- From:
- Oliver Lowe <o@olowe.co>
- Date:
Support Icinga2 hostgroups
Tests of hostgroup operations are done in TestFilter
