mirror of
https://github.com/cloudflare/cloudflared.git
synced 2025-08-08 17:09:49 +00:00
TUN-8685: Bump coredns dependency
Closes TUN-8685
This commit is contained in:
5
vendor/github.com/onsi/ginkgo/v2/ginkgo/generators/generate_command.go
generated
vendored
5
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
vendor/github.com/onsi/ginkgo/v2/ginkgo/generators/generate_templates.go
generated
vendored
6
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
vendor/github.com/onsi/ginkgo/v2/ginkgo/generators/generators_common.go
generated
vendored
12
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 ""
|
||||
}
|
||||
|
4
vendor/github.com/onsi/ginkgo/v2/ginkgo/outline/ginkgo.go
generated
vendored
4
vendor/github.com/onsi/ginkgo/v2/ginkgo/outline/ginkgo.go
generated
vendored
@@ -244,9 +244,7 @@ func labelFromCallExpr(ce *ast.CallExpr) []string {
|
||||
}
|
||||
if id.Name == "Label" {
|
||||
ls := extractLabels(expr)
|
||||
for _, label := range ls {
|
||||
labels = append(labels, label)
|
||||
}
|
||||
labels = append(labels, ls...)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user