zegl / kube-score

Kubernetes object analysis with recommendations for improved reliability and security. kube-score actively prevents downtime and bugs in your Kubernetes YAML and Charts. Static code analysis for Kubernetes.
https://kube-score.com
MIT License
2.72k stars 174 forks source link

Upgrade k8s.io/api to 0.23 #428

Closed zegl closed 2 years ago

zegl commented 2 years ago

kube-score builds with the updated dependency, but the tests are failing

See #426 for more info.

=== RUN   TestParse
    parse_test.go:38: 
            Error Trace:    parse_test.go:38
            Error:          Not equal: 
                            expected: "Failed to parse /v1, Kind=Service: err=v1.Service.Spec: v1.ServiceSpec.Ports: []v1.ServicePort: v1.ServicePort.NodePort: readUint32: unexpected character: \xff, error found in #10 byte of ...|odePort\":\"${PORT}\",\"|..., bigger context ...|\"namespace\":\"test\"},\"spec\":{\"ports\":[{\"nodePort\":\"${PORT}\",\"port\":\"${PORT_EXPOSE}\",\"targetPort\":\"${P|..."
                            actual  : "Failed to parse /v1, Kind=Service: err=json: cannot unmarshal string into Go struct field ServicePort.spec.ports.nodePort of type int32"

                            Diff:
                            --- Expected
                            +++ Actual
                            @@ -1 +1 @@
                            -Failed to parse /v1, Kind=Service: err=v1.Service.Spec: v1.ServiceSpec.Ports: []v1.ServicePort: v1.ServicePort.NodePort: readUint32: unexpected character: �, error found in #10 byte of ...|odePort":"${PORT}","|..., bigger context ...|"namespace":"test"},"spec":{"ports":[{"nodePort":"${PORT}","port":"${PORT_EXPOSE}","targetPort":"${P|...
                            +Failed to parse /v1, Kind=Service: err=json: cannot unmarshal string into Go struct field ServicePort.spec.ports.nodePort of type int32
            Test:           TestParse
--- FAIL: TestParse (0.08s)