mirror of
https://github.com/containrrr/watchtower.git
synced 2025-12-13 21:56:38 +01:00
feat(http): optional query parameter to update only containers of a specified image (#1289)
* feat(http): optional query parameter to update only containers of a specified image * fix style issues * comma separated image parameter * Support comma-separated query parameter as well as specifying it multiple times Co-authored-by: nils måsén <nils@piksel.se> * fixed compile error * fixed FilterByImageTag Not sure what changed in my testing setup, but Docker reports image names including the tag name now. * consistent use of image/tag (use image) * fixed multiple image queries * assuming I'm right here, only block on lock when any images are specified. * add unit tests for image filter. didn't add tests for update api because they didn't already exist * whoops. * use ImageName instead, add unit test for empty ImageName filter. Co-authored-by: nils måsén <nils@piksel.se>
This commit is contained in:
parent
33b8a9822c
commit
739f328ee5
6 changed files with 96 additions and 8 deletions
|
|
@ -78,3 +78,17 @@ func (_m *FilterableContainer) Scope() (string, bool) {
|
|||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// ImageName provides a mock function with given fields:
|
||||
func (_m *FilterableContainer) ImageName() string {
|
||||
ret := _m.Called()
|
||||
|
||||
var r0 string
|
||||
if rf, ok := ret.Get(0).(func() string); ok {
|
||||
r0 = rf()
|
||||
} else {
|
||||
r0 = ret.Get(0).(string)
|
||||
}
|
||||
|
||||
return r0
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue