MCPcopy Create free account
hub / github.com/cli/cli / acceptanceTestGroups

Function acceptanceTestGroups

acceptance/acceptance_test.go:654–674  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

652}
653
654func acceptanceTestGroups(t *testing.T) []string {
655 t.Helper()
656
657 entries, err := os.ReadDir("testdata")
658 require.NoError(t, err)
659
660 var groups []string
661 for _, entry := range entries {
662 if !entry.IsDir() {
663 continue
664 }
665
666 files, err := filepath.Glob(filepath.Join("testdata", entry.Name(), "*.txtar"))
667 require.NoError(t, err)
668 if len(files) > 0 {
669 groups = append(groups, entry.Name())
670 }
671 }
672 require.NotEmpty(t, groups)
673 return groups
674}
675
676func selectAcceptanceTestGroups(available []string, requested string) ([]string, error) {
677 if requested == "" || requested == "all" {

Callers 1

TestAcceptanceFunction · 0.85

Calls 3

JoinMethod · 0.80
HelperMethod · 0.65
NameMethod · 0.65

Tested by

no test coverage detected