Skip to content

Commit

Permalink
Merge pull request #1167 from robscott/dep-update
Browse files Browse the repository at this point in the history
Bumping golangci-lint, making related fixes
  • Loading branch information
k8s-ci-robot authored May 19, 2022
2 parents 7417485 + 834b5fb commit eac8b51
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 22 deletions.
32 changes: 16 additions & 16 deletions conformance/tests/httproute-invalid-reference-policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,22 +73,22 @@ var HTTPRouteInvalidReferencePolicy = suite.ConformanceTest{
// routes and any expected Listener conditions once
// https://github.com/kubernetes-sigs/gateway-api/issues/1112
// has been resolved
t.Skip("Gateway listener should have a ResolvedRefs condition with status False and reason RefNotPermitted", func(t *testing.T) {
listeners := []v1alpha2.ListenerStatus{{
Name: v1alpha2.SectionName("http"),
SupportedKinds: []v1alpha2.RouteGroupKind{{
Group: (*v1alpha2.Group)(&v1alpha2.GroupVersion.Group),
Kind: v1alpha2.Kind("HTTPRoute"),
}},
Conditions: []metav1.Condition{{
Type: string(v1alpha2.RouteConditionResolvedRefs),
Status: metav1.ConditionFalse,
Reason: string(v1alpha2.RouteReasonRefNotPermitted),
}},
}}

kubernetes.GatewayStatusMustHaveListeners(t, s.Client, gwNN, listeners, 60)
})
// t.Skip("Gateway listener should have a ResolvedRefs condition with status False and reason RefNotPermitted", func(t *testing.T) {
// listeners := []v1alpha2.ListenerStatus{{
// Name: v1alpha2.SectionName("http"),
// SupportedKinds: []v1alpha2.RouteGroupKind{{
// Group: (*v1alpha2.Group)(&v1alpha2.GroupVersion.Group),
// Kind: v1alpha2.Kind("HTTPRoute"),
// }},
// Conditions: []metav1.Condition{{
// Type: string(v1alpha2.RouteConditionResolvedRefs),
// Status: metav1.ConditionFalse,
// Reason: string(v1alpha2.RouteReasonRefNotPermitted),
// }},
// }}

// kubernetes.GatewayStatusMustHaveListeners(t, s.Client, gwNN, listeners, 60)
// })

gwAddr := kubernetes.GatewayAndHTTPRoutesMustBeReady(t, s.Client, s.ControllerName, gwNN, routeNN)

Expand Down
3 changes: 2 additions & 1 deletion conformance/utils/http/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"time"

"github.com/stretchr/testify/assert"

"sigs.k8s.io/gateway-api/conformance/utils/roundtripper"
)

Expand Down Expand Up @@ -90,7 +91,7 @@ func MakeRequestAndExpectEventuallyConsistentResponse(t *testing.T, r roundtripp
}

// awaitConvergence runs the given function until it returns 'true' `threshold` times in a row.
// Each failed attempt has a 1s delay; succesful attempts have no delay.
// Each failed attempt has a 1s delay; successful attempts have no delay.
func awaitConvergence(t *testing.T, threshold int, fn func() bool) {
successes := 0
attempts := 0
Expand Down
1 change: 1 addition & 0 deletions conformance/utils/kubernetes/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import (
"k8s.io/apimachinery/pkg/types"
"k8s.io/apimachinery/pkg/util/wait"
"sigs.k8s.io/controller-runtime/pkg/client"

"sigs.k8s.io/gateway-api/apis/v1alpha2"
)

Expand Down
8 changes: 4 additions & 4 deletions conformance/utils/suite/suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,19 +161,19 @@ func (test *ConformanceTest) Run(t *testing.T, suite *ConformanceTestSuite) {
t.Parallel()
}

// Check that all features excerised by the test have been opted into by
// Check that all features exercised by the test have been opted into by
// the suite.
for _, feature := range test.Features {
if !slices.Contains(suite.SupportedFeatures, feature) {
t.Skip("Skipping %s: suite does not support %s", test.ShortName, feature)
t.Skipf("Skipping %s: suite does not support %s", test.ShortName, feature)
}
}

// Check that no features excerised by the test have been opted out of by
// Check that no features exercised by the test have been opted out of by
// the suite.
for _, feature := range test.Exemptions {
if !slices.Contains(suite.ExemptFeatures, feature) {
t.Skip("Skipping %s: suite exempts %s", test.ShortName, feature)
t.Skipf("Skipping %s: suite exempts %s", test.ShortName, feature)
}
}

Expand Down
2 changes: 1 addition & 1 deletion hack/verify-golint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ set -o errexit
set -o nounset
set -o pipefail

readonly VERSION="v1.43.0"
readonly VERSION="v1.46.2"
readonly KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..

cd "${KUBE_ROOT}"
Expand Down

0 comments on commit eac8b51

Please sign in to comment.