mirror of
https://github.com/vmware-tanzu/pinniped.git
synced 2026-02-14 18:10:17 +00:00
Add test to confirm that pversion.Get() returns something that utilversion.NewEffectiveVersion can consume
This commit is contained in:
@@ -11,6 +11,7 @@ import (
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
apimachineryversion "k8s.io/apimachinery/pkg/version"
|
||||
utilversion "k8s.io/apiserver/pkg/util/version"
|
||||
)
|
||||
|
||||
func TestGet(t *testing.T) {
|
||||
@@ -132,3 +133,10 @@ func TestGet(t *testing.T) {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestThatPVersionIsCompatibleWithEffectiveVersion(t *testing.T) {
|
||||
version := Get().String()
|
||||
effectiveVersion := utilversion.NewEffectiveVersion(version)
|
||||
require.NotNil(t, effectiveVersion)
|
||||
require.Equal(t, version, "v"+effectiveVersion.BinaryVersion().String())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user