boring
This commit is contained in:
@@ -9364,9 +9364,6 @@ func TestValidateNode(t *testing.T) {
|
||||
core.ResourceName("hugepages-1Gi"): resource.MustParse("0"),
|
||||
},
|
||||
},
|
||||
Spec: core.NodeSpec{
|
||||
ExternalID: "external",
|
||||
},
|
||||
},
|
||||
{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
@@ -9381,9 +9378,6 @@ func TestValidateNode(t *testing.T) {
|
||||
core.ResourceName(core.ResourceMemory): resource.MustParse("0"),
|
||||
},
|
||||
},
|
||||
Spec: core.NodeSpec{
|
||||
ExternalID: "external",
|
||||
},
|
||||
},
|
||||
{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
@@ -9399,7 +9393,6 @@ func TestValidateNode(t *testing.T) {
|
||||
},
|
||||
},
|
||||
Spec: core.NodeSpec{
|
||||
ExternalID: "external",
|
||||
// Add a valid taint to a node
|
||||
Taints: []core.Taint{{Key: "GPU", Value: "true", Effect: "NoSchedule"}},
|
||||
},
|
||||
@@ -9437,9 +9430,6 @@ func TestValidateNode(t *testing.T) {
|
||||
core.ResourceName(core.ResourceMemory): resource.MustParse("0"),
|
||||
},
|
||||
},
|
||||
Spec: core.NodeSpec{
|
||||
ExternalID: "external",
|
||||
},
|
||||
},
|
||||
{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
@@ -9455,8 +9445,7 @@ func TestValidateNode(t *testing.T) {
|
||||
},
|
||||
},
|
||||
Spec: core.NodeSpec{
|
||||
ExternalID: "external",
|
||||
PodCIDR: "192.168.0.0/16",
|
||||
PodCIDR: "192.168.0.0/16",
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -9479,9 +9468,6 @@ func TestValidateNode(t *testing.T) {
|
||||
core.ResourceName(core.ResourceMemory): resource.MustParse("10G"),
|
||||
},
|
||||
},
|
||||
Spec: core.NodeSpec{
|
||||
ExternalID: "external",
|
||||
},
|
||||
},
|
||||
"invalid-labels": {
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
@@ -9494,28 +9480,12 @@ func TestValidateNode(t *testing.T) {
|
||||
core.ResourceName(core.ResourceMemory): resource.MustParse("10G"),
|
||||
},
|
||||
},
|
||||
Spec: core.NodeSpec{
|
||||
ExternalID: "external",
|
||||
},
|
||||
},
|
||||
"missing-external-id": {
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: "abc-123",
|
||||
Labels: validSelector,
|
||||
},
|
||||
Status: core.NodeStatus{
|
||||
Capacity: core.ResourceList{
|
||||
core.ResourceName(core.ResourceCPU): resource.MustParse("10"),
|
||||
core.ResourceName(core.ResourceMemory): resource.MustParse("10G"),
|
||||
},
|
||||
},
|
||||
},
|
||||
"missing-taint-key": {
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: "dedicated-node1",
|
||||
},
|
||||
Spec: core.NodeSpec{
|
||||
ExternalID: "external",
|
||||
// Add a taint with an empty key to a node
|
||||
Taints: []core.Taint{{Key: "", Value: "special-user-1", Effect: "NoSchedule"}},
|
||||
},
|
||||
@@ -9525,7 +9495,6 @@ func TestValidateNode(t *testing.T) {
|
||||
Name: "dedicated-node1",
|
||||
},
|
||||
Spec: core.NodeSpec{
|
||||
ExternalID: "external",
|
||||
// Add a taint with an invalid key to a node
|
||||
Taints: []core.Taint{{Key: "NoUppercaseOrSpecialCharsLike=Equals", Value: "special-user-1", Effect: "NoSchedule"}},
|
||||
},
|
||||
@@ -9544,7 +9513,6 @@ func TestValidateNode(t *testing.T) {
|
||||
},
|
||||
},
|
||||
Spec: core.NodeSpec{
|
||||
ExternalID: "external",
|
||||
// Add a taint with a bad value to a node
|
||||
Taints: []core.Taint{{Key: "dedicated", Value: "some\\bad\\value", Effect: "NoSchedule"}},
|
||||
},
|
||||
@@ -9563,7 +9531,6 @@ func TestValidateNode(t *testing.T) {
|
||||
},
|
||||
},
|
||||
Spec: core.NodeSpec{
|
||||
ExternalID: "external",
|
||||
// Add a taint with an empty effect to a node
|
||||
Taints: []core.Taint{{Key: "dedicated", Value: "special-user-3", Effect: ""}},
|
||||
},
|
||||
@@ -9582,7 +9549,6 @@ func TestValidateNode(t *testing.T) {
|
||||
},
|
||||
},
|
||||
Spec: core.NodeSpec{
|
||||
ExternalID: "external",
|
||||
// Add a taint with NoExecute effect to a node
|
||||
Taints: []core.Taint{{Key: "dedicated", Value: "special-user-3", Effect: "NoScheduleNoAdmit"}},
|
||||
},
|
||||
@@ -9592,7 +9558,6 @@ func TestValidateNode(t *testing.T) {
|
||||
Name: "dedicated-node1",
|
||||
},
|
||||
Spec: core.NodeSpec{
|
||||
ExternalID: "external",
|
||||
// Add two taints to the node with the same key and effect; should be rejected.
|
||||
Taints: []core.Taint{
|
||||
{Key: "dedicated", Value: "special-user-1", Effect: "NoSchedule"},
|
||||
@@ -9622,9 +9587,6 @@ func TestValidateNode(t *testing.T) {
|
||||
core.ResourceName(core.ResourceMemory): resource.MustParse("0"),
|
||||
},
|
||||
},
|
||||
Spec: core.NodeSpec{
|
||||
ExternalID: "external",
|
||||
},
|
||||
},
|
||||
"invalid-podController": {
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
@@ -9657,9 +9619,6 @@ func TestValidateNode(t *testing.T) {
|
||||
core.ResourceName(core.ResourceMemory): resource.MustParse("0"),
|
||||
},
|
||||
},
|
||||
Spec: core.NodeSpec{
|
||||
ExternalID: "external",
|
||||
},
|
||||
},
|
||||
"multiple-pre-allocated-hugepages": {
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
@@ -9678,9 +9637,6 @@ func TestValidateNode(t *testing.T) {
|
||||
core.ResourceName("hugepages-1Gi"): resource.MustParse("10Gi"),
|
||||
},
|
||||
},
|
||||
Spec: core.NodeSpec{
|
||||
ExternalID: "external",
|
||||
},
|
||||
},
|
||||
"invalid-pod-cidr": {
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
@@ -9696,8 +9652,7 @@ func TestValidateNode(t *testing.T) {
|
||||
},
|
||||
},
|
||||
Spec: core.NodeSpec{
|
||||
ExternalID: "external",
|
||||
PodCIDR: "192.168.0.0",
|
||||
PodCIDR: "192.168.0.0",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
Reference in New Issue
Block a user