Skip to content

Conversation

@nissy-dev
Copy link

@nissy-dev nissy-dev commented Dec 10, 2025

Fix #347

I ran the tests locally and confirmed they passed without any issues.

make local-test
go test -race ./... -count=1
?   	github.com/yannh/kubeconform/cmd/kubeconform	[no test files]
?   	github.com/yannh/kubeconform/examples	[no test files]
?   	github.com/yannh/kubeconform/pkg/cache	[no test files]
ok  	github.com/yannh/kubeconform/pkg/config	1.370s
ok  	github.com/yannh/kubeconform/pkg/loader	9.785s
ok  	github.com/yannh/kubeconform/pkg/output	2.142s
ok  	github.com/yannh/kubeconform/pkg/registry	3.501s
ok  	github.com/yannh/kubeconform/pkg/resource	2.594s
ok  	github.com/yannh/kubeconform/pkg/validator	3.079s

func validateDuration(v any) error {
// Try validation with the Go duration format
if _, err := time.ParseDuration(v.(string)); err == nil {
if _, err := strfmt.ParseDuration(v.(string)); err == nil {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's more appropriate to use https://github.com/kubernetes/kube-openapi.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

'2w' is not valid duration

1 participant