Skip to content

Commit 4c81edb

Browse files
authored
Merge pull request kubernetes#89905 from oomichi/DescribeIng
Move DescribeIng() into e2eingress
2 parents 4ae223f + 2f5f160 commit 4c81edb

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

test/e2e/framework/ingress/ingress_utils.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,6 +557,14 @@ func (j *TestJig) runUpdate(ing *networkingv1beta1.Ingress) (*networkingv1beta1.
557557
return ing, err
558558
}
559559

560+
// DescribeIng describes information of ingress by running kubectl describe ing.
561+
func DescribeIng(ns string) {
562+
framework.Logf("\nOutput of kubectl describe ing:\n")
563+
desc, _ := framework.RunKubectl(
564+
ns, "describe", "ing", fmt.Sprintf("--namespace=%v", ns))
565+
framework.Logf(desc)
566+
}
567+
560568
// Update retrieves the ingress, performs the passed function, and then updates it.
561569
func (j *TestJig) Update(update func(ing *networkingv1beta1.Ingress)) {
562570
var err error
@@ -569,7 +577,7 @@ func (j *TestJig) Update(update func(ing *networkingv1beta1.Ingress)) {
569577
update(j.Ingress)
570578
j.Ingress, err = j.runUpdate(j.Ingress)
571579
if err == nil {
572-
framework.DescribeIng(j.Ingress.Namespace)
580+
DescribeIng(j.Ingress.Namespace)
573581
return
574582
}
575583
if !apierrors.IsConflict(err) && !apierrors.IsServerTimeout(err) {

test/e2e/framework/util.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1236,14 +1236,6 @@ func GetAllMasterAddresses(c clientset.Interface) []string {
12361236
return ips.List()
12371237
}
12381238

1239-
// DescribeIng describes information of ingress by running kubectl describe ing.
1240-
func DescribeIng(ns string) {
1241-
Logf("\nOutput of kubectl describe ing:\n")
1242-
desc, _ := RunKubectl(
1243-
ns, "describe", "ing", fmt.Sprintf("--namespace=%v", ns))
1244-
Logf(desc)
1245-
}
1246-
12471239
// CreateEmptyFileOnPod creates empty file at given path on the pod.
12481240
// TODO(alejandrox1): move to subpkg pod once kubectl methods have been refactored.
12491241
func CreateEmptyFileOnPod(namespace string, podName string, filePath string) error {

test/e2e/network/ingress.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ var _ = SIGDescribe("Loadbalancing: L7", func() {
101101
// Platform specific cleanup
102102
ginkgo.AfterEach(func() {
103103
if ginkgo.CurrentGinkgoTestDescription().Failed {
104-
framework.DescribeIng(ns)
104+
e2eingress.DescribeIng(ns)
105105
}
106106
if jig.Ingress == nil {
107107
ginkgo.By("No ingress created, no cleanup necessary")
@@ -257,7 +257,7 @@ var _ = SIGDescribe("Loadbalancing: L7", func() {
257257
// Platform specific cleanup
258258
ginkgo.AfterEach(func() {
259259
if ginkgo.CurrentGinkgoTestDescription().Failed {
260-
framework.DescribeIng(ns)
260+
e2eingress.DescribeIng(ns)
261261
}
262262
if jig.Ingress == nil {
263263
ginkgo.By("No ingress created, no cleanup necessary")
@@ -614,7 +614,7 @@ var _ = SIGDescribe("Loadbalancing: L7", func() {
614614
// Platform specific cleanup
615615
ginkgo.AfterEach(func() {
616616
if ginkgo.CurrentGinkgoTestDescription().Failed {
617-
framework.DescribeIng(ns)
617+
e2eingress.DescribeIng(ns)
618618
}
619619
if jig.Ingress == nil {
620620
ginkgo.By("No ingress created, no cleanup necessary")
@@ -741,7 +741,7 @@ var _ = SIGDescribe("Loadbalancing: L7", func() {
741741
framework.ExpectNoError(gce.GcloudComputeResourceDelete("firewall-rules", fmt.Sprintf("ingress-80-443-%v", ns), framework.TestContext.CloudConfig.ProjectID))
742742
}
743743
if ginkgo.CurrentGinkgoTestDescription().Failed {
744-
framework.DescribeIng(ns)
744+
e2eingress.DescribeIng(ns)
745745
}
746746
defer nginxController.TearDown()
747747
if jig.Ingress == nil {

0 commit comments

Comments
 (0)