Skip to content
Merged
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
25 changes: 0 additions & 25 deletions test/e2e/mcd_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package e2e_test

import (
"encoding/json"
"fmt"
"os/exec"
"strings"
Expand All @@ -20,9 +19,6 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/fields"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/apimachinery/pkg/types"
"k8s.io/apimachinery/pkg/util/intstr"
"k8s.io/apimachinery/pkg/util/jsonmergepatch"
"k8s.io/apimachinery/pkg/util/uuid"
"k8s.io/apimachinery/pkg/util/wait"
)
Expand Down Expand Up @@ -144,7 +140,6 @@ func waitForPoolComplete(t *testing.T, cs *framework.ClientSet, pool, target str

func TestMCDeployed(t *testing.T) {
cs := framework.NewClientSet("")
bumpPoolMaxUnavailableTo(t, cs, 3)

// TODO: bring this back to 10
for i := 0; i < 3; i++ {
Expand Down Expand Up @@ -172,21 +167,6 @@ func TestMCDeployed(t *testing.T) {
}
}

func bumpPoolMaxUnavailableTo(t *testing.T, cs *framework.ClientSet, max int) {
pool, err := cs.MachineConfigPools().Get("worker", metav1.GetOptions{})
require.Nil(t, err)
old, err := json.Marshal(pool)
require.Nil(t, err)
maxUnavailable := intstr.FromInt(max)
pool.Spec.MaxUnavailable = &maxUnavailable
new, err := json.Marshal(pool)
require.Nil(t, err)
patch, err := jsonmergepatch.CreateThreeWayJSONMergePatch(old, new, old)
require.Nil(t, err)
_, err = cs.MachineConfigPools().Patch("worker", types.MergePatchType, patch)
require.Nil(t, err)
}

func mcdForNode(cs *framework.ClientSet, node *corev1.Node) (*corev1.Pod, error) {
// find the MCD pod that has spec.nodeNAME = node.Name and get its name:
listOptions := metav1.ListOptions{
Expand All @@ -209,7 +189,6 @@ func mcdForNode(cs *framework.ClientSet, node *corev1.Node) (*corev1.Pod, error)

func TestUpdateSSH(t *testing.T) {
cs := framework.NewClientSet("")
bumpPoolMaxUnavailableTo(t, cs, 3)

// create a dummy MC with an sshKey for user Core
mcName := fmt.Sprintf("sshkeys-worker-%s", uuid.NewUUID())
Expand Down Expand Up @@ -264,7 +243,6 @@ func TestUpdateSSH(t *testing.T) {

func TestKernelArguments(t *testing.T) {
cs := framework.NewClientSet("")
bumpPoolMaxUnavailableTo(t, cs, 3)
kargsMC := &mcfgv1.MachineConfig{
ObjectMeta: metav1.ObjectMeta{
Name: fmt.Sprintf("kargs-%s", uuid.NewUUID()),
Expand Down Expand Up @@ -362,7 +340,6 @@ func TestPoolDegradedOnFailToRender(t *testing.T) {

func TestReconcileAfterBadMC(t *testing.T) {
cs := framework.NewClientSet("")
bumpPoolMaxUnavailableTo(t, cs, 3)

// create a MC that contains a valid ignition config but is not reconcilable
mcadd := createMCToAddFile("add-a-file", "/etc/mytestconfs", "test", "root")
Expand Down Expand Up @@ -467,7 +444,6 @@ func TestReconcileAfterBadMC(t *testing.T) {

func TestDontDeleteRPMFiles(t *testing.T) {
cs := framework.NewClientSet("")
bumpPoolMaxUnavailableTo(t, cs, 3)

mcHostFile := createMCToAddFile("modify-host-file", "/etc/motd", "mco-test", "root")

Expand Down Expand Up @@ -524,7 +500,6 @@ func TestDontDeleteRPMFiles(t *testing.T) {

func TestFIPS(t *testing.T) {
cs := framework.NewClientSet("")
bumpPoolMaxUnavailableTo(t, cs, 3)
fipsMC := &mcfgv1.MachineConfig{
ObjectMeta: metav1.ObjectMeta{
Name: fmt.Sprintf("fips-%s", uuid.NewUUID()),
Expand Down