Skip to content

Commit

Permalink
fix underlay e2e (#1828)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangzujian committed Aug 24, 2022
1 parent 1a3a169 commit 8005300
Showing 1 changed file with 25 additions and 19 deletions.
44 changes: 25 additions & 19 deletions test/e2e/underlay/underlay.go
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ var _ = Describe("[Underlay]", func() {
ObjectMeta: metav1.ObjectMeta{
Name: name,
Namespace: Namespace,
Annotations: map[string]string{util.LogicalSwitchAnnotation: name},
Annotations: map[string]string{util.LogicalSwitchAnnotation: subnet.Name},
},
Spec: corev1.PodSpec{
Containers: []corev1.Container{
Expand Down Expand Up @@ -379,9 +379,10 @@ var _ = Describe("[Underlay]", func() {
var autoMount bool
pod := &corev1.Pod{
ObjectMeta: metav1.ObjectMeta{
Name: f.GetName(),
Namespace: Namespace,
Labels: map[string]string{"e2e": "true"},
Name: f.GetName(),
Namespace: Namespace,
Labels: map[string]string{"e2e": "true"},
Annotations: map[string]string{util.LogicalSwitchAnnotation: Subnet},
},
Spec: corev1.PodSpec{
Containers: []corev1.Container{
Expand Down Expand Up @@ -450,9 +451,10 @@ var _ = Describe("[Underlay]", func() {
var autoMount bool
pod := &corev1.Pod{
ObjectMeta: metav1.ObjectMeta{
Name: f.GetName(),
Namespace: Namespace,
Labels: map[string]string{"e2e": "true"},
Name: f.GetName(),
Namespace: Namespace,
Labels: map[string]string{"e2e": "true"},
Annotations: map[string]string{util.LogicalSwitchAnnotation: Subnet},
},
Spec: corev1.PodSpec{
Containers: []corev1.Container{
Expand Down Expand Up @@ -541,9 +543,10 @@ var _ = Describe("[Underlay]", func() {
var autoMount bool
pod := &corev1.Pod{
ObjectMeta: metav1.ObjectMeta{
Name: f.GetName(),
Namespace: Namespace,
Labels: map[string]string{"e2e": "true"},
Name: f.GetName(),
Namespace: Namespace,
Labels: map[string]string{"e2e": "true"},
Annotations: map[string]string{util.LogicalSwitchAnnotation: Subnet},
},
Spec: corev1.PodSpec{
NodeName: nodes[0],
Expand Down Expand Up @@ -634,9 +637,10 @@ var _ = Describe("[Underlay]", func() {
for i := range nodes {
pods[i] = &corev1.Pod{
ObjectMeta: metav1.ObjectMeta{
Name: fmt.Sprintf("%s-%d", name, i+1),
Namespace: Namespace,
Labels: map[string]string{"e2e": "true"},
Name: fmt.Sprintf("%s-%d", name, i+1),
Namespace: Namespace,
Labels: map[string]string{"e2e": "true"},
Annotations: map[string]string{util.LogicalSwitchAnnotation: Subnet},
},
Spec: corev1.PodSpec{
NodeName: nodes[i],
Expand Down Expand Up @@ -725,9 +729,10 @@ var _ = Describe("[Underlay]", func() {
var autoMount bool
upod := &corev1.Pod{
ObjectMeta: metav1.ObjectMeta{
Name: f.GetName(),
Namespace: Namespace,
Labels: map[string]string{"e2e": "true"},
Name: f.GetName(),
Namespace: Namespace,
Labels: map[string]string{"e2e": "true"},
Annotations: map[string]string{util.LogicalSwitchAnnotation: Subnet},
},
Spec: corev1.PodSpec{
Containers: []corev1.Container{
Expand Down Expand Up @@ -813,9 +818,10 @@ var _ = Describe("[Underlay]", func() {
var autoMount bool
pod := &corev1.Pod{
ObjectMeta: metav1.ObjectMeta{
Name: f.GetName(),
Namespace: Namespace,
Labels: map[string]string{"e2e": "true"},
Name: f.GetName(),
Namespace: Namespace,
Labels: map[string]string{"e2e": "true"},
Annotations: map[string]string{util.LogicalSwitchAnnotation: Subnet},
},
Spec: corev1.PodSpec{
Containers: []corev1.Container{
Expand Down

0 comments on commit 8005300

Please sign in to comment.