Skip to content

Commit

Permalink
Merge pull request openshift#1969 from sinnykumari/mcd-test
Browse files Browse the repository at this point in the history
test/e2e: check that kernel-rt-core pacakge is installed
  • Loading branch information
openshift-merge-robot authored Jul 31, 2020
2 parents 7f08777 + 373ddae commit 2c9371f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/e2e/mcd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ func TestKernelType(t *testing.T) {
assert.Equal(t, infraNode.Annotations[constants.CurrentMachineConfigAnnotationKey], renderedConfig)
assert.Equal(t, infraNode.Annotations[constants.MachineConfigDaemonStateAnnotationKey], constants.MachineConfigDaemonStateDone)

kernelInfo := execCmdOnNode(t, cs, infraNode, "uname", "-a")
if !strings.Contains(kernelInfo, "PREEMPT RT") {
kernelInfo := execCmdOnNode(t, cs, infraNode, "chroot", "/rootfs", "rpm", "-qa", "kernel-rt-core")
if !strings.Contains(kernelInfo, "kernel-rt-core") {
t.Fatalf("Node %s doesn't have expected kernel", infraNode.Name)
}
t.Logf("Node %s has expected kernel", infraNode.Name)
Expand All @@ -210,8 +210,8 @@ func TestKernelType(t *testing.T) {

assert.Equal(t, infraNode.Annotations[constants.CurrentMachineConfigAnnotationKey], oldInfraRenderedConfig)
assert.Equal(t, infraNode.Annotations[constants.MachineConfigDaemonStateAnnotationKey], constants.MachineConfigDaemonStateDone)
kernelInfo = execCmdOnNode(t, cs, infraNode, "uname", "-a")
if strings.Contains(kernelInfo, "PREEMPT RT") {
kernelInfo = execCmdOnNode(t, cs, infraNode, "chroot", "/rootfs", "rpm", "-qa", "kernel-rt-core")
if strings.Contains(kernelInfo, "kernel-rt-core") {
t.Fatalf("Node %s did not rollback successfully", infraNode.Name)
}
t.Logf("Node %s has successfully rolled back", infraNode.Name)
Expand Down

0 comments on commit 2c9371f

Please sign in to comment.