GODT-1743: Terminate running bridge if has old version.

This commit is contained in:
Jakub
2022-07-22 13:18:38 +02:00
parent 1e2f4e9ebb
commit c4eb1a0f5b
4 changed files with 149 additions and 3 deletions

View File

@ -21,7 +21,9 @@ import (
"strings"
"testing"
"github.com/Masterminds/semver/v3"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestIncrementRestartFlag(t *testing.T) {
@ -47,3 +49,15 @@ func TestIncrementRestartFlag(t *testing.T) {
})
}
}
func TestVersionLessThan(t *testing.T) {
r := require.New(t)
old := semver.MustParse("1.1.0")
current := semver.MustParse("1.1.1")
newer := semver.MustParse("1.1.2")
r.True(old.LessThan(current))
r.False(current.LessThan(current))
r.False(newer.LessThan(current))
}