build: move e2e dependencies into e2e/go.mod

Several packages are only used while running the e2e suite. These
packages are less important to update, as the they can not influence the
final executable that is part of the Ceph-CSI container-image.

By moving these dependencies out of the main Ceph-CSI go.mod, it is
easier to identify if a reported CVE affects Ceph-CSI, or only the
testing (like most of the Kubernetes CVEs).

Signed-off-by: Niels de Vos <ndevos@ibm.com>
This commit is contained in:
Niels de Vos
2025-03-04 08:57:28 +01:00
committed by mergify[bot]
parent 15da101b1b
commit bec6090996
8047 changed files with 1407827 additions and 3453 deletions

44
e2e/vendor/github.com/karrick/godirwalk/scanner.go generated vendored Normal file
View File

@ -0,0 +1,44 @@
package godirwalk
import "sort"
type scanner interface {
Dirent() (*Dirent, error)
Err() error
Name() string
Scan() bool
}
// sortedScanner enumerates through a directory's contents after reading the
// entire directory and sorting the entries by name. Used by walk to simplify
// its implementation.
type sortedScanner struct {
dd []*Dirent
de *Dirent
}
func newSortedScanner(osPathname string, scratchBuffer []byte) (*sortedScanner, error) {
deChildren, err := ReadDirents(osPathname, scratchBuffer)
if err != nil {
return nil, err
}
sort.Sort(deChildren)
return &sortedScanner{dd: deChildren}, nil
}
func (d *sortedScanner) Err() error {
d.dd, d.de = nil, nil
return nil
}
func (d *sortedScanner) Dirent() (*Dirent, error) { return d.de, nil }
func (d *sortedScanner) Name() string { return d.de.name }
func (d *sortedScanner) Scan() bool {
if len(d.dd) > 0 {
d.de, d.dd = d.dd[0], d.dd[1:]
return true
}
return false
}