(server *Server, pluginRepo PluginRepository)
| 147 | } |
| 148 | |
| 149 | func configurePluginRepositoryServer(server *Server, pluginRepo PluginRepository) *Server { |
| 150 | // Suppresses ginkgo server logs |
| 151 | server.HTTPTestServer.Config.ErrorLog = log.New(&bytes.Buffer{}, "", 0) |
| 152 | |
| 153 | jsonBytes, err := json.Marshal(pluginRepo) |
| 154 | Expect(err).ToNot(HaveOccurred()) |
| 155 | |
| 156 | server.AppendHandlers( |
| 157 | RespondWith(http.StatusOK, string(jsonBytes)), |
| 158 | RespondWith(http.StatusOK, string(jsonBytes)), |
| 159 | RespondWith(http.StatusOK, string(jsonBytes)), |
| 160 | RespondWith(http.StatusOK, string(jsonBytes)), |
| 161 | ) |
| 162 | |
| 163 | return server |
| 164 | } |
no outgoing calls
no test coverage detected