File: progress_report_test.go

package info (click to toggle)
golang-github-onsi-ginkgo-v2 2.15.0-1~bpo12%2B1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm-backports
  • size: 4,112 kB
  • sloc: javascript: 59; sh: 14; makefile: 7
file content (37 lines) | stat: -rw-r--r-- 1,195 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package internal_test

import (
	"time"

	. "github.com/onsi/ginkgo/v2"
	"github.com/onsi/ginkgo/v2/internal"
	"github.com/onsi/ginkgo/v2/types"
	. "github.com/onsi/gomega"
)

var _ = Describe("ProgressReport", func() {
	Describe("The goroutine stack", func() {
		It("is better tested in the internal integration tests because this test package lives in internal which is a key part of the logic for how the goroutine stack is analyzed...", func() {
			//empty
		})

	})

	Context("when includeAll is false", func() {
		It("does not include any other goroutines", func() {
			pr, err := internal.NewProgressReport(false, types.SpecReport{}, Node{}, time.Now(), types.SpecEvent{}, "", types.TimelineLocation{}, []string{}, []string{}, false)
			Ω(err).ShouldNot(HaveOccurred())

			Ω(pr.OtherGoroutines()).Should(HaveLen(0))
		})
	})

	Context("when includeAll is true", func() {
		It("includes all other goroutines", func() {
			pr, err := internal.NewProgressReport(false, types.SpecReport{}, Node{}, time.Now(), types.SpecEvent{}, "", types.TimelineLocation{}, []string{}, []string{}, true)
			Ω(err).ShouldNot(HaveOccurred())

			Ω(pr.OtherGoroutines()).ShouldNot(HaveLen(0))
		})
	})
})