From 3550e128bbd9c6a5f7b297beef1184d08e97c4a6 Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Thu, 24 Dec 2020 10:24:38 +0300 Subject: [PATCH] [#236] Fix SDK minor version number Signed-off-by: Leonard Lyubich --- pkg/version.go | 4 ++-- pkg/version_test.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/version.go b/pkg/version.go index 1d5f5f72..0c64956b 100644 --- a/pkg/version.go +++ b/pkg/version.go @@ -10,7 +10,7 @@ import ( // Version represents v2-compatible version. type Version refs.Version -const sdkMjr, sdkMnr = 2, 0 +const sdkMjr, sdkMnr = 2, 1 // NewVersionFromV2 wraps v2 Version message to Version. func NewVersionFromV2(v *refs.Version) *Version { @@ -72,7 +72,7 @@ func IsSupportedVersion(v *Version) error { switch mjr := v.Major(); mjr { case 2: switch mnr := v.Minor(); mnr { - case 0: + case 0, 1: return nil } } diff --git a/pkg/version_test.go b/pkg/version_test.go index 73ee6ffb..fe7f6617 100644 --- a/pkg/version_test.go +++ b/pkg/version_test.go @@ -46,7 +46,7 @@ func TestIsSupportedVersion(t *testing.T) { }{ { mjr: 2, - maxMnr: 0, + maxMnr: 1, }, } { v.SetMajor(item.mjr)