test/e2e: drop TestFIPS
Day 2 FIPS is broken and this test is consistently failing.  Day 2 FIPS
will be dropped in so this test will be unneeded.
Related-to:
@@ -498,85 +498,6 @@ func TestDontDeleteRPMFiles(t *testing.T) {
}
}
-func TestFIPS(t *testing.T) {
- cs := framework.NewClientSet("")
- fipsMC := &mcfgv1.MachineConfig{
- ObjectMeta: metav1.ObjectMeta{
- Name: fmt.Sprintf("fips-%s", uuid.NewUUID()),
- Labels: mcLabelForWorkers(),
- },
- Spec: mcfgv1.MachineConfigSpec{
- Config: ctrlcommon.NewIgnConfig(),
- FIPS: true,
- },
- }
-
- mcp, err := cs.MachineConfigPools().Get("worker", metav1.GetOptions{})
- if err != nil {
- t.Error(err)
- }
- workerOldMc := mcp.Status.Configuration.Name
-
- _, err = cs.MachineConfigs().Create(fipsMC)
- if err != nil {
- t.Fatal(err)
- }
- t.Logf("Created %s", fipsMC.Name)
- renderedConfig, err := waitForRenderedConfig(t, cs, "worker", fipsMC.Name)
- if err != nil {
- t.Fatal(err)
- }
- if err := waitForPoolComplete(t, cs, "worker", renderedConfig); err != nil {
- t.Fatal(err)
- }
- nodes, err := getNodesByRole(cs, "worker")
- if err != nil {
- t.Fatal(err)
- }
- for _, node := range nodes {
- assert.Equal(t, node.Annotations[constants.CurrentMachineConfigAnnotationKey], renderedConfig)
- assert.Equal(t, node.Annotations[constants.MachineConfigDaemonStateAnnotationKey], constants.MachineConfigDaemonStateDone)
- mcd, err := mcdForNode(cs, &node)
- require.Nil(t, err)
- mcdName := mcd.ObjectMeta.Name
- fipsBytes, err := exec.Command("oc", "rsh", "-n", "openshift-machine-config-operator", mcdName,
- "chroot", "/rootfs", "fips-mode-setup", "--check").CombinedOutput()
- require.Nil(t, err)
- fips := string(fipsBytes)
- if !strings.Contains(fips, "FIPS mode is enabled") {
- t.Fatalf("FIPS hasn't been enabled on node %s: %s", node.Name, fips)
- }
- t.Logf("Node %s has expected FIPS mode", node.Name)
- }
-
- if err := cs.MachineConfigs().Delete(fipsMC.Name, &metav1.DeleteOptions{}); err != nil {
- t.Error(err)
- }
- if err := waitForPoolComplete(t, cs, "worker", workerOldMc); err != nil {
- t.Fatal(err)
- }
-
- nodes, err = getNodesByRole(cs, "worker")
- if err != nil {
- t.Fatal(err)
- }
- for _, node := range nodes {
- assert.Equal(t, node.Annotations[constants.CurrentMachineConfigAnnotationKey], workerOldMc)
- assert.Equal(t, node.Annotations[constants.MachineConfigDaemonStateAnnotationKey], constants.MachineConfigDaemonStateDone)
- mcd, err := mcdForNode(cs, &node)
- require.Nil(t, err)
- mcdName := mcd.ObjectMeta.Name
- fipsBytes, err := exec.Command("oc", "rsh", "-n", "openshift-machine-config-operator", mcdName,
- "chroot", "/rootfs", "fips-mode-setup", "--check").CombinedOutput()
- require.Nil(t, err)
- fips := string(fipsBytes)
- if !strings.Contains(fips, "FIPS mode is disabled") {
- t.Fatalf("FIPS hasn't been disabled on node %s: %s", node.Name, fips)
- }
- t.Logf("Node %s has expected FIPS mode", node.Name)
- }
-}
-
func TestCustomPool(t *testing.T) {
cs := framework.NewClientSet("")
