Commit b00daa0 1 parent 397f8fb commit b00daa0 Copy full SHA for b00daa0
File tree 3 files changed +19
-23
lines changed
3 files changed +19
-23
lines changed Original file line number Diff line number Diff line change @@ -241,28 +241,26 @@ func TestServicingControllerReconcile(t *testing.T) {
241
241
expectedReboot : false ,
242
242
expectedReplace : true ,
243
243
},
244
- /*
245
- {
246
- message: "Nodes with outdate OS should be rebooted",
247
- options: &FakeKlusterOptions{
248
- Phase: models.KlusterPhaseRunning,
249
- LastService: nil,
250
- NodePools: []FakeNodePoolOptions{
251
- {
252
- AllowReboot: true,
253
- AllowReplace: true,
254
- NodeHealthy: true,
255
- NodeOSOutdated: true,
256
- NodeKubeletOutdated: false,
257
- Size: 1,
258
- },
244
+ {
245
+ message : "Nodes with outdate OS should be rebooted" ,
246
+ options : & FakeKlusterOptions {
247
+ Phase : models .KlusterPhaseRunning ,
248
+ LastService : nil ,
249
+ NodePools : []FakeNodePoolOptions {
250
+ {
251
+ AllowReboot : true ,
252
+ AllowReplace : true ,
253
+ NodeHealthy : true ,
254
+ NodeOSOutdated : true ,
255
+ NodeKubeletOutdated : false ,
256
+ Size : 1 ,
259
257
},
260
258
},
261
- expectedDrain: true,
262
- expectedReboot: true,
263
- expectedReplace: false,
264
259
},
265
- */
260
+ expectedDrain : true ,
261
+ expectedReboot : true ,
262
+ expectedReplace : false ,
263
+ },
266
264
{
267
265
message : "Up-to-date Node should neither be rebooted nor be replaced" ,
268
266
options : & FakeKlusterOptions {
Original file line number Diff line number Diff line change 5
5
6
6
"github.com/go-kit/kit/log"
7
7
"github.com/pkg/errors"
8
- core_v1 "k8s.io/api/core/v1"
9
8
"k8s.io/client-go/tools/record"
10
9
11
10
"github.com/sapcc/kubernikus/pkg/api/models"
@@ -155,8 +154,7 @@ func (r *KlusterReconciler) Do() error {
155
154
156
155
update := r .Lister .Updating ()
157
156
replace := r .Lister .Replace ()
158
- //reboot := r.Lister.Reboot()
159
- reboot := make ([]* core_v1.Node , 0 )
157
+ reboot := r .Lister .Reboot ()
160
158
161
159
// The following block retires already updating nodes
162
160
if len (update ) > 0 {
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ func (k *NodeTests) Run(t *testing.T) {
47
47
_ = t .Run ("Created" , k .StateRunning ) &&
48
48
t .Run ("Tagged" , k .Tagged ) &&
49
49
t .Run ("Registered" , k .Registered ) &&
50
- // t.Run("LatestContainerLinux", k.LatestContainerLinux) &&
50
+ t .Run ("LatestContainerLinux" , k .LatestContainerLinux ) &&
51
51
t .Run ("Schedulable" , k .StateSchedulable ) &&
52
52
t .Run ("NetworkUnavailable" , k .ConditionNetworkUnavailable ) &&
53
53
t .Run ("Healthy" , k .StateHealthy ) &&
You can’t perform that action at this time.
0 commit comments