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 eb1706b commit 4c40a20
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 @@ -307,7 +307,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 @@ -376,9 +376,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 @@ -447,9 +448,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 @@ -538,9 +540,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 @@ -631,9 +634,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 @@ -722,9 +726,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 @@ -810,9 +815,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 4c40a20

Please sign in to comment.