Skip to content
This repository has been archived by the owner on May 6, 2022. It is now read-only.

Move closing stream after error handling, add container name in e2e scenario #2629

Merged
merged 1 commit into from
May 30, 2019

Conversation

mszostok
Copy link
Contributor

This PR is a

  • Feature Implementation
  • Bug Fix
  • Documentation

What this PR does / why we need it:

In e2e scenario:

  • add container name while fetching the logs. If you do not specify the container name then the function can return an error when pod has multiple container, e.g. when u have enabled sidecar injection
    Error getting logs for pod ups-broker: a container name must be specified for pod ups-broker, choose one of: [ups-broker istio-proxy] or one of the init containers: [istio-init]
    
  • move closing stream after error handling. If GetLogs command will fail then returned stream is nil and you cannot defer Close function on it because the panic will be thrown
    •! Panic in Spec Teardown (AfterEach) [24.577 seconds]
    [service-catalog] walkthrough
    /go/src/github.com/kubernetes-incubator/service-catalog/test/e2e/framework/framework.go:94
    Runs through the walkthrough with namespaced resources [AfterEach]
    /go/src/github.com/kubernetes-incubator/service-catalog/test/e2e/walkthrough.go:360
    
    Test Panicked
    runtime error: invalid memory address or nil pointer dereference
    /usr/local/go/src/runtime/panic.go:513
    
    Full Stack Trace
    /usr/local/go/src/runtime/panic.go:513 +0x1b9
    github.com/kubernetes-incubator/service-catalog/test/e2e.glob..func3.2()
    /go/src/github.com/kubernetes-incubator/service-catalog/test/e2e/walkthrough.go:72 +0x105
    github.com/kubernetes-incubator/service-catalog/vendor/github.com/onsi/ginkgo/internal/leafnodes.(*runner).runSync(0xc000358660, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
    /go/src/github.com/kubernetes-incubator/service-catalog/test/e2e/e2e.go:46 +0x16c
    github.com/kubernetes-incubator/service-catalog/test/e2e.TestE2E(0xc000211100)
    /go/src/github.com/kubernetes-incubator/service-catalog/test/e2e/e2e_test.go:40 +0x2b
    testing.tRunner(0xc000211100, 0x1ef7f88)
    /usr/local/go/src/testing/testing.go:827 +0xbf
    created by testing.(*T).Run
    /usr/local/go/src/testing/testing.go:878 +0x353
    

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label May 18, 2019
@k8s-ci-robot
Copy link
Contributor

Hi @mszostok. Thanks for your PR.

I'm waiting for a kubernetes-incubator or kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels May 18, 2019
@k8s-ci-robot k8s-ci-robot requested review from jberkhahn and jboyd01 May 18, 2019 21:45
@mszostok
Copy link
Contributor Author

/kind bug

@jberkhahn
Copy link
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels May 19, 2019
@jberkhahn
Copy link
Contributor

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm Indicates that a PR is ready to be merged. label May 28, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jberkhahn

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 28, 2019
@jberkhahn
Copy link
Contributor

/test pull-service-catalog-xbuild

1 similar comment
@mszostok
Copy link
Contributor Author

/test pull-service-catalog-xbuild

@k8s-ci-robot k8s-ci-robot merged commit aea0685 into kubernetes-retired:master May 30, 2019
viviyww pushed a commit to viviyww/service-catalog that referenced this pull request Jun 20, 2019
@mszostok mszostok deleted the fix-e2e-scenario branch August 13, 2019 21:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants