Change:
<!-- Please use this template while reporting a bug and provide as much info as possible. Not doing so may result in your bug not being addressed in a timely manner. Thanks!--What happened: When the comment section associated with the conformance test is separated with more that four spaces/tabs etc then the comment is ignored. What you expected to happen: Comment associated with the conformance test should be used instead of ginkgo comments. How to reproduce it (as minimally and precisely as possible): Anything else we need to know?: Received output (due to extra tabs) Expected output: Release : v1.13 If the restart policy is set to ‘Always’, Pod MUST be restarted when terminated, If restart policy is ‘OnFailure’, Pod MUST be started only if it is terminated with non-zero exit code. If the restart policy is ‘Never’, Pod MUST never be restarted. All these three test cases MUST verify the restart counts accordingly. Environment: Kubernetes version (use ): 1.13 /kind bug
/area conformance /sig architecture thanks for the report and the fix!
Issues go stale after 90d of inactivity. Mark the issue as fresh with . Stale issues rot after an additional 30d of inactivity and eventually close. If this issue is safe to close now please do so with . Send feedback to sig-testing, kubernetes/test-infra and/or . /lifecycle stale
Stale issues rot after 30d of inactivity. Mark the issue as fresh with . Rotten issues close after an additional 30d of inactivity. If this issue is safe to close now please do so with . Send feedback to sig-testing, kubernetes/test-infra and/or . /lifecycle rotten
/remove-lifecycle rotten

Discussion:
func (v *visitor) comment(x *ast.BasicLit) string { for _, comm := range v.cMap.Comments() { testOffset := int(x.Pos()-comm.End()) - len("framework.ConformanceIt("") <del> if 0 < testOffset && testOffset < 3 { return comm.Text() </del> <ins> //Cannot assume the offset is within three or four tabs from the test block itself. //It is better to trim the newlines, tabs, etc and then we if the comment is followed //by the test block itself so that we can associate the comment with it properly. if 0 <= testOffset && testOffset <= 10 { b1 := make([]byte, x.Pos()-comm.End()) //if we fail to open the file to compare the content we just assume the //proximity of the comment and apply it. myf, err := os.Open(v.FileSet.File(x.Pos()).Name()) if err == nil { if _, err := myf.Seek(int64(comm.End()), 0); err == nil { if _, err := myf.Read(b1); err == nil { if strings.Compare(strings.Trim(string(b1), "t rn"), "framework.ConformanceIt("") == 0 { return comm.Text() } } } } else { //comment section's end is noticed within 10 characters from framework.ConformanceIt block return comm.Text() } </ins> } } return ""

Description: `By default the stdout and stderr from the process being executed in a pod MUST be sent to the pod's logs.` + "nn"}}, }, <ins> {"e2e/foo.go", ` var _ = framework.KubeDescribe("Feature", func() { Context("with context and extra spaces before It block should still pick up Testname", func() { //					Testname: Test with spaces //Description: Should pick up testname even if it is not within 3 spaces //even when executed from memory. framework.ConformanceIt("should work", func() {}) }) })`, []conformanceData{{URL: "https://github.com/kubernetes/kubernetes/tree/master/e2e/foo.go#L8", TestName: "Test with spaces", Description: `Should pick up testname even if it is not within 3 spaces even when executed from memory.` + "nn"}}, }, </ins> } func TestConformance(t *testing.T) {