Use narrowly scoped interfaces for client access
Use custom narrowly scoped interfaces for client access from the RollingUpdater and Resizer. This allows for more flexible downstream integration and unit testing without imposing a burden to implement the entire client.Interface for just a handful of methods.
This commit is contained in:
@@ -253,7 +253,7 @@ Update succeeded. Deleting foo-v1
|
||||
|
||||
for _, test := range tests {
|
||||
updater := RollingUpdater{
|
||||
fakeClientFor("default", test.responses),
|
||||
&RealRollingUpdaterClient{fakeClientFor("default", test.responses)},
|
||||
"default",
|
||||
}
|
||||
var buffer bytes.Buffer
|
||||
@@ -296,7 +296,7 @@ Update succeeded. Deleting foo-v1
|
||||
{newRc(3, 3), nil},
|
||||
{newRc(3, 3), nil},
|
||||
}
|
||||
updater := RollingUpdater{fakeClientFor("default", responses), "default"}
|
||||
updater := RollingUpdater{&RealRollingUpdaterClient{fakeClientFor("default", responses)}, "default"}
|
||||
|
||||
var buffer bytes.Buffer
|
||||
if err := updater.Update(&buffer, rc, rcExisting, 0, time.Millisecond, time.Millisecond); err != nil {
|
||||
|
Reference in New Issue
Block a user