fix broken test and some minor comment typos

This commit is contained in:
nils måsén 2023-11-11 14:14:38 +01:00
parent 8f736a371e
commit fb13af4f97
3 changed files with 5 additions and 4 deletions

View file

@ -187,7 +187,7 @@ func Run(c *cobra.Command, names []string) {
metrics.RegisterScan(metric)
}, updateLock)
httpAPI.RegisterFunc(updateHandler.Path, updateHandler.Handle)
// If polling isn't enabled the scheduler is never started and
// If polling isn't enabled the scheduler is never started, and
// we need to trigger the startup messages manually.
if !unblockHTTPAPI {
writeStartupMessage(c, time.Time{}, filterDesc)

View file

@ -70,7 +70,8 @@ var _ = Describe("the client", func() {
It("should gracefully fail with a useful message", func() {
c := dockerClient{}
pinnedContainer := MockContainer(WithImageName("sha256:fa5269854a5e615e51a72b17ad3fd1e01268f278a6684c8ed3c5f0cdce3f230b"))
c.PullImage(context.Background(), pinnedContainer)
err := c.PullImage(context.Background(), pinnedContainer)
Expect(err).To(MatchError(`container uses a pinned image, and cannot be updated by watchtower`))
})
})
})

View file

@ -60,7 +60,7 @@ func (n *shoutrrrTypeNotifier) GetNames() []string {
return names
}
// GetNames returns a list of URLs for notification services that has been added
// GetURLs returns a list of URLs for notification services that has been added
func (n *shoutrrrTypeNotifier) GetURLs() []string {
return n.Urls
}
@ -73,7 +73,7 @@ func (n *shoutrrrTypeNotifier) AddLogHook() {
n.receiving = true
log.AddHook(n)
// Do the sending in a separate goroutine so we don't block the main process.
// Do the sending in a separate goroutine, so we don't block the main process.
go sendNotifications(n)
}