Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions test/extended/machine_config/machine_config_node.go
Original file line number Diff line number Diff line change
Expand Up @@ -418,8 +418,21 @@ func ValidateMCNConditionOnNodeDegrade(oc *exutil.CLI, fixture string, isSno boo
degradedNodeMCN, degradedErr = clientSet.MachineconfigurationV1().MachineConfigNodes().Get(context.TODO(), degradedNode.Name, metav1.GetOptions{})
o.Expect(degradedErr).NotTo(o.HaveOccurred(), fmt.Sprintf("Error getting MCN of degraded node '%v'.", degradedNode.Name))
framework.Logf("Validating that `AppliedFilesAndOS` and `UpdateExecuted` conditions in '%v' MCN have a status of 'Unknown'.", degradedNodeMCN.Name)
o.Expect(CheckMCNConditionStatus(degradedNodeMCN, mcfgv1.MachineConfigNodeUpdateFilesAndOS, metav1.ConditionUnknown)).Should(o.BeTrue(), "Condition 'AppliedFilesAndOS' does not have the expected status of 'Unknown'.")
o.Expect(CheckMCNConditionStatus(degradedNodeMCN, mcfgv1.MachineConfigNodeUpdateExecuted, metav1.ConditionUnknown)).Should(o.BeTrue(), "Condition 'UpdateExecuted' does not have the expected status of 'Unknown'.")
// TODO: Update post debugging
degradedNodeMCNAppliedFilesCondition := GetMCNCondition(degradedNodeMCN, mcfgv1.MachineConfigNodeUpdateFilesAndOS)
degradedNodeMCNExecutedCondition := GetMCNCondition(degradedNodeMCN, mcfgv1.MachineConfigNodeUpdateExecuted)
framework.Logf("degradedNodeMCNAppliedFilesCondition.Message: %v, degradedNodeMCNAppliedFilesCondition.Reason: %v, degradedNodeMCNAppliedFilesCondition.Status: %v", degradedNodeMCNAppliedFilesCondition.Message, degradedNodeMCNAppliedFilesCondition.Reason, degradedNodeMCNAppliedFilesCondition.Status)
if !CheckMCNConditionStatus(degradedNodeMCN, mcfgv1.MachineConfigNodeUpdateFilesAndOS, metav1.ConditionUnknown) {
framework.Logf("would error on this condition for MachineConfigNodeUpdateFilesAndOS check")
framework.Logf("MCN: %v", degradedNodeMCN)
}
framework.Logf("degradedNodeMCNExecutedCondition.Message: %v, degradedNodeMCNExecutedCondition.Reason: %v, degradedNodeMCNExecutedCondition.Status: %v", degradedNodeMCNExecutedCondition.Message, degradedNodeMCNExecutedCondition.Reason, degradedNodeMCNExecutedCondition.Status)
if !CheckMCNConditionStatus(degradedNodeMCN, mcfgv1.MachineConfigNodeUpdateExecuted, metav1.ConditionUnknown) {
framework.Logf("would error on this condition for MachineConfigNodeUpdateExecuted check")
framework.Logf("MCN: %v", degradedNodeMCN)
}
// o.Expect(CheckMCNConditionStatus(degradedNodeMCN, mcfgv1.MachineConfigNodeUpdateFilesAndOS, metav1.ConditionUnknown)).Should(o.BeTrue(), "Condition 'AppliedFilesAndOS' does not have the expected status of 'Unknown'.")
// o.Expect(CheckMCNConditionStatus(degradedNodeMCN, mcfgv1.MachineConfigNodeUpdateExecuted, metav1.ConditionUnknown)).Should(o.BeTrue(), "Condition 'UpdateExecuted' does not have the expected status of 'Unknown'.")
nodeDegradedCondition := GetMCNCondition(degradedNodeMCN, mcfgv1.MachineConfigNodeNodeDegraded)
o.Expect(nodeDegradedCondition).NotTo(o.BeNil())
o.Expect(nodeDegradedCondition.Status).Should(o.Equal(metav1.ConditionTrue), "Condition 'NodeDegraded' does not have the expected status of 'True'.")
Expand Down