@@ -93,7 +93,7 @@ func TestAggregateWithNil(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestSingularAggregate(t *testing.T) {
|
||||
var slice []error = []error{fmt.Errorf("err")}
|
||||
var slice = []error{fmt.Errorf("err")}
|
||||
var agg Aggregate
|
||||
var err error
|
||||
|
||||
@@ -121,7 +121,7 @@ func TestSingularAggregate(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestPluralAggregate(t *testing.T) {
|
||||
var slice []error = []error{fmt.Errorf("abc"), fmt.Errorf("123")}
|
||||
var slice = []error{fmt.Errorf("abc"), fmt.Errorf("123")}
|
||||
var agg Aggregate
|
||||
var err error
|
||||
|
||||
@@ -149,7 +149,7 @@ func TestPluralAggregate(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestDedupeAggregate(t *testing.T) {
|
||||
var slice []error = []error{fmt.Errorf("abc"), fmt.Errorf("abc")}
|
||||
var slice = []error{fmt.Errorf("abc"), fmt.Errorf("abc")}
|
||||
var agg Aggregate
|
||||
|
||||
agg = NewAggregate(slice)
|
||||
@@ -165,7 +165,7 @@ func TestDedupeAggregate(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestDedupePluralAggregate(t *testing.T) {
|
||||
var slice []error = []error{fmt.Errorf("abc"), fmt.Errorf("abc"), fmt.Errorf("123")}
|
||||
var slice = []error{fmt.Errorf("abc"), fmt.Errorf("abc"), fmt.Errorf("123")}
|
||||
var agg Aggregate
|
||||
|
||||
agg = NewAggregate(slice)
|
||||
@@ -181,7 +181,7 @@ func TestDedupePluralAggregate(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestFlattenAndDedupeAggregate(t *testing.T) {
|
||||
var slice []error = []error{fmt.Errorf("abc"), fmt.Errorf("abc"), NewAggregate([]error{fmt.Errorf("abc")})}
|
||||
var slice = []error{fmt.Errorf("abc"), fmt.Errorf("abc"), NewAggregate([]error{fmt.Errorf("abc")})}
|
||||
var agg Aggregate
|
||||
|
||||
agg = NewAggregate(slice)
|
||||
@@ -197,7 +197,7 @@ func TestFlattenAndDedupeAggregate(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestFlattenAggregate(t *testing.T) {
|
||||
var slice []error = []error{fmt.Errorf("abc"), fmt.Errorf("abc"), NewAggregate([]error{fmt.Errorf("abc"), fmt.Errorf("def"), NewAggregate([]error{fmt.Errorf("def"), fmt.Errorf("ghi")})})}
|
||||
var slice = []error{fmt.Errorf("abc"), fmt.Errorf("abc"), NewAggregate([]error{fmt.Errorf("abc"), fmt.Errorf("def"), NewAggregate([]error{fmt.Errorf("def"), fmt.Errorf("ghi")})})}
|
||||
var agg Aggregate
|
||||
|
||||
agg = NewAggregate(slice)
|
||||
|
@@ -39,7 +39,7 @@ func TestAddAnnotation(t *testing.T) {
|
||||
assert.Equal(t, annotations["foo.admission.k8s.io/key1"], "value1", "admission annotations should not be overwritten")
|
||||
|
||||
// test invalid plugin names
|
||||
var testCases map[string]string = map[string]string{
|
||||
var testCases = map[string]string{
|
||||
"invalid dns subdomain": "INVALID-DNS-Subdomain/policy",
|
||||
"no plugin name": "policy",
|
||||
"no key name": "foo.admission.k8s.io",
|
||||
|
Reference in New Issue
Block a user