MCPcopy Create free account
hub / github.com/FairwindsOps/pluto / TestInstance_checkVersion

Function TestInstance_checkVersion

pkg/api/versions_test.go:735–770  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

733}
734
735func TestInstance_checkVersion(t *testing.T) {
736 tests := []struct {
737 name string
738 instance *Instance
739 stub *Stub
740 want *Version
741 }{
742 {
743 name: "empty kind",
744 instance: &Instance{
745 DeprecatedVersions: []Version{
746 {Kind: "", Name: "cert-manager.k8s.io", Component: "cert-manager"},
747 },
748 },
749 stub: &Stub{
750 Kind: "any",
751 APIVersion: "cert-manager.k8s.io",
752 Metadata: StubMeta{
753 Name: "foo",
754 Namespace: "foobar",
755 },
756 },
757 want: &Version{
758 Name: "cert-manager.k8s.io",
759 Kind: "any",
760 Component: "cert-manager",
761 },
762 },
763 }
764 for _, tt := range tests {
765 t.Run(tt.name, func(t *testing.T) {
766 got := tt.instance.checkVersion(tt.stub)
767 assert.EqualValues(t, tt.want, got)
768 })
769 }
770}

Callers

nothing calls this directly

Calls 1

checkVersionMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…