mirror of
https://github.com/containers/podman.git
synced 2025-12-01 18:49:18 +08:00
test/tools: vendor ginkgo v2.11
Ginkgo currently logs a warning because the cli version (defnied in test/tools/go.mod) does not match the library version (defnied in go.mod). Simply fix this by updating ginkgo to the latest version. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
5
test/tools/vendor/github.com/onsi/ginkgo/v2/ginkgo/generators/generate_command.go
generated
vendored
5
test/tools/vendor/github.com/onsi/ginkgo/v2/ginkgo/generators/generate_command.go
generated
vendored
@@ -32,6 +32,9 @@ func BuildGenerateCommand() command.Command {
|
||||
{Name: "template-data", KeyPath: "CustomTemplateData",
|
||||
UsageArgument: "template-data-file",
|
||||
Usage: "If specified, generate will use the contents of the file passed as data to be rendered in the test file template"},
|
||||
{Name: "tags", KeyPath: "Tags",
|
||||
UsageArgument: "build-tags",
|
||||
Usage: "If specified, generate will create a test file that uses the given build tags (i.e. `--tags e2e,!unit` will add `//go:build e2e,!unit`)"},
|
||||
},
|
||||
&conf,
|
||||
types.GinkgoFlagSections{},
|
||||
@@ -59,6 +62,7 @@ You can also pass a <filename> of the form "file.go" and generate will emit "fil
|
||||
}
|
||||
|
||||
type specData struct {
|
||||
BuildTags string
|
||||
Package string
|
||||
Subject string
|
||||
PackageImportPath string
|
||||
@@ -93,6 +97,7 @@ func generateTestFileForSubject(subject string, conf GeneratorsConfig) {
|
||||
}
|
||||
|
||||
data := specData{
|
||||
BuildTags: getBuildTags(conf.Tags),
|
||||
Package: determinePackageName(packageName, conf.Internal),
|
||||
Subject: formattedName,
|
||||
PackageImportPath: getPackageImportPath(),
|
||||
|
||||
6
test/tools/vendor/github.com/onsi/ginkgo/v2/ginkgo/generators/generate_templates.go
generated
vendored
6
test/tools/vendor/github.com/onsi/ginkgo/v2/ginkgo/generators/generate_templates.go
generated
vendored
@@ -1,6 +1,7 @@
|
||||
package generators
|
||||
|
||||
var specText = `package {{.Package}}
|
||||
var specText = `{{.BuildTags}}
|
||||
package {{.Package}}
|
||||
|
||||
import (
|
||||
{{.GinkgoImport}}
|
||||
@@ -14,7 +15,8 @@ var _ = {{.GinkgoPackage}}Describe("{{.Subject}}", func() {
|
||||
})
|
||||
`
|
||||
|
||||
var agoutiSpecText = `package {{.Package}}
|
||||
var agoutiSpecText = `{{.BuildTags}}
|
||||
package {{.Package}}
|
||||
|
||||
import (
|
||||
{{.GinkgoImport}}
|
||||
|
||||
12
test/tools/vendor/github.com/onsi/ginkgo/v2/ginkgo/generators/generators_common.go
generated
vendored
12
test/tools/vendor/github.com/onsi/ginkgo/v2/ginkgo/generators/generators_common.go
generated
vendored
@@ -1,6 +1,7 @@
|
||||
package generators
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"go/build"
|
||||
"os"
|
||||
"path/filepath"
|
||||
@@ -14,6 +15,7 @@ type GeneratorsConfig struct {
|
||||
Agouti, NoDot, Internal bool
|
||||
CustomTemplate string
|
||||
CustomTemplateData string
|
||||
Tags string
|
||||
}
|
||||
|
||||
func getPackageAndFormattedName() (string, string, string) {
|
||||
@@ -62,3 +64,13 @@ func determinePackageName(name string, internal bool) string {
|
||||
|
||||
return name + "_test"
|
||||
}
|
||||
|
||||
// getBuildTags returns the resultant string to be added.
|
||||
// If the input string is not empty, then returns a `//go:build {}` string,
|
||||
// otherwise returns an empty string.
|
||||
func getBuildTags(tags string) string {
|
||||
if tags != "" {
|
||||
return fmt.Sprintf("//go:build %s\n", tags)
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
2
test/tools/vendor/github.com/onsi/ginkgo/v2/types/version.go
generated
vendored
2
test/tools/vendor/github.com/onsi/ginkgo/v2/types/version.go
generated
vendored
@@ -1,3 +1,3 @@
|
||||
package types
|
||||
|
||||
const VERSION = "2.9.6"
|
||||
const VERSION = "2.11.0"
|
||||
|
||||
Reference in New Issue
Block a user