kojiapi: add simple test for the /status API
Add a simple unit test for the koji API. This adds a Handler() method to the koji.Server struct, which made writing the test easier. This is a direction we want to go in anyway in the future.
This commit is contained in:
parent
6b137d0ac5
commit
d7bff4bd3b
2 changed files with 57 additions and 0 deletions
|
|
@ -64,6 +64,10 @@ func (s *Server) Serve(listener net.Listener) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (s *Server) Handler() http.Handler {
|
||||
return s.server.Handler
|
||||
}
|
||||
|
||||
// apiHandlers implements api.ServerInterface - the http api route handlers
|
||||
// generated from api/openapi.yml. This is a separate object, because these
|
||||
// handlers should not be exposed on the `Server` object.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue