Skip to content

Commit 9902a29

Browse files
committed
Fix (gateway) merge of service settings order
1 parent e3a1eed commit 9902a29

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

gateway.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ func (svc *HttpService) startServer(context moleculer.BrokerContext) {
341341
// Started httpService started. It process the settings (default + params), starts a http server,
342342
// notify the plugins that the http server is starting.
343343
func (svc *HttpService) Started(context moleculer.BrokerContext, schema moleculer.ServiceSchema) {
344-
svc.settings = service.MergeSettings(defaultSettings, svc.Settings)
344+
svc.settings = service.MergeSettings(defaultSettings, schema.Settings, svc.Settings)
345345
address := svc.getAddress()
346346
svc.server = &http.Server{Addr: address}
347347
svc.router = mux.NewRouter()

gateway_integration_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ var _ = Describe("API Gateway Integration Tests", func() {
124124

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

129129
servicesBkr.Stop()
130130
gatewayBkr.Stop()

0 commit comments

Comments
 (0)