Skip to content

Commit 8b94a05

Browse files
committed
quick upstream test update
1 parent 27fed56 commit 8b94a05

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

internal/mode/static/nginx/runtime/manager.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ import (
1919
//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -generate
2020

2121
const (
22-
// PidFile specifies the location of the PID file for the Nginx process
22+
// PidFile specifies the location of the PID file for the Nginx process.
2323
PidFile = "/var/run/nginx/nginx.pid"
24-
// PidFileTimeout defines the timeout duration for accessing the PID file
24+
// PidFileTimeout defines the timeout duration for accessing the PID file.
2525
PidFileTimeout = 10000 * time.Millisecond
26-
// NginxReloadTimeout sets the timeout duration for reloading the Nginx configuration
26+
// NginxReloadTimeout sets the timeout duration for reloading the Nginx configuration.
2727
NginxReloadTimeout = 60000 * time.Millisecond
2828
)
2929

@@ -239,7 +239,7 @@ func (p *ProcessHandlerImpl) FindMainProcess(
239239
}
240240

241241
func (p *ProcessHandlerImpl) ReadFile(file string) ([]byte, error) {
242-
return p.ReadFile(file)
242+
return p.readFile(file)
243243
}
244244

245245
func (p *ProcessHandlerImpl) Kill(pid int) error {

internal/mode/static/nginx/runtime/manager_test.go

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -164,18 +164,16 @@ var _ = Describe("NGINX Runtime Manager", func() {
164164
Peers: []ngxclient.Peer{
165165
{ID: 1, Name: "peer1-name"},
166166
},
167-
Queue: ngxclient.Queue{Size: 10},
168-
Keepalives: 5,
169-
Zombies: 2,
167+
Queue: ngxclient.Queue{Size: 10},
168+
Zombies: 2,
170169
},
171170
"upstream2": {
172171
Zone: "zone2",
173172
Peers: []ngxclient.Peer{
174173
{ID: 2, Name: "peer2-name"},
175174
},
176-
Queue: ngxclient.Queue{Size: 20},
177-
Keepalives: 3,
178-
Zombies: 1,
175+
Queue: ngxclient.Queue{Size: 20},
176+
Zombies: 1,
179177
},
180178
}
181179

@@ -184,7 +182,7 @@ var _ = Describe("NGINX Runtime Manager", func() {
184182
upstreams, err := manager.GetUpstreams()
185183

186184
Expect(err).NotTo(HaveOccurred())
187-
Expect(upstreams).To(Equal(expUpstreams))
185+
Expect(expUpstreams).To(Equal(upstreams))
188186
})
189187

190188
It("returns an error when GetUpstreams fails", func() {

0 commit comments

Comments
 (0)