mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-04 01:40:07 +00:00
fix TestInterPodAffinity case
This commit is contained in:
parent
98442617cc
commit
7d996aa97f
@ -64,7 +64,7 @@ func TestInterPodAffinity(t *testing.T) {
|
|||||||
|
|
||||||
cs := context.clientSet
|
cs := context.clientSet
|
||||||
podLabel := map[string]string{"service": "securityscan"}
|
podLabel := map[string]string{"service": "securityscan"}
|
||||||
// podLabel2 := map[string]string{"security": "S1"}
|
podLabel2 := map[string]string{"security": "S1"}
|
||||||
|
|
||||||
tests := []struct {
|
tests := []struct {
|
||||||
pod *v1.Pod
|
pod *v1.Pod
|
||||||
@ -74,7 +74,7 @@ func TestInterPodAffinity(t *testing.T) {
|
|||||||
errorType string
|
errorType string
|
||||||
test string
|
test string
|
||||||
}{
|
}{
|
||||||
/*{
|
{
|
||||||
pod: &v1.Pod{
|
pod: &v1.Pod{
|
||||||
ObjectMeta: metav1.ObjectMeta{
|
ObjectMeta: metav1.ObjectMeta{
|
||||||
Name: "fakename",
|
Name: "fakename",
|
||||||
@ -91,7 +91,6 @@ func TestInterPodAffinity(t *testing.T) {
|
|||||||
{
|
{
|
||||||
Key: "security",
|
Key: "security",
|
||||||
Operator: metav1.LabelSelectorOpDoesNotExist,
|
Operator: metav1.LabelSelectorOpDoesNotExist,
|
||||||
Values: []string{"securityscan"},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -586,7 +585,7 @@ func TestInterPodAffinity(t *testing.T) {
|
|||||||
node: nodes[0],
|
node: nodes[0],
|
||||||
fits: false,
|
fits: false,
|
||||||
test: "satisfies the PodAffinity but doesn't satisfies the PodAntiAffinity with the existing pod",
|
test: "satisfies the PodAffinity but doesn't satisfies the PodAntiAffinity with the existing pod",
|
||||||
},*/
|
},
|
||||||
{
|
{
|
||||||
pod: &v1.Pod{
|
pod: &v1.Pod{
|
||||||
ObjectMeta: metav1.ObjectMeta{
|
ObjectMeta: metav1.ObjectMeta{
|
||||||
|
Loading…
Reference in New Issue
Block a user