Skip to content

Commit

Permalink
Fix (gateway) merge of service settings order
Browse files Browse the repository at this point in the history
  • Loading branch information
pentateu committed Sep 18, 2019
1 parent e3a1eed commit 9902a29
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ func (svc *HttpService) startServer(context moleculer.BrokerContext) {
// Started httpService started. It process the settings (default + params), starts a http server,
// notify the plugins that the http server is starting.
func (svc *HttpService) Started(context moleculer.BrokerContext, schema moleculer.ServiceSchema) {
svc.settings = service.MergeSettings(defaultSettings, svc.Settings)
svc.settings = service.MergeSettings(defaultSettings, schema.Settings, svc.Settings)
address := svc.getAddress()
svc.server = &http.Server{Addr: address}
svc.router = mux.NewRouter()
Expand Down
2 changes: 1 addition & 1 deletion gateway_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ var _ = Describe("API Gateway Integration Tests", func() {

response, err := http.Get("http://localhost:3552/printer/print?content=HellowWorld")
Expect(err).Should(BeNil())
Expect(bodyContent(response)).Should(Equal("printed content: HellowWorld"))
Expect(bodyContent(response)).Should(Equal("printed content: Hello World"))

servicesBkr.Stop()
gatewayBkr.Stop()
Expand Down

0 comments on commit 9902a29

Please sign in to comment.