debian-mirror-gitlab/workhorse/internal/version/version_test.go

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
416 B
Go
Raw Normal View History

2022-11-25 23:54:43 +05:30
package version
import (
"testing"
"github.com/stretchr/testify/require"
)
func TestVersion(t *testing.T) {
require.Equal(t, GetApplicationVersion(), "gitlab-workhorse (unknown)-(unknown)")
SetVersion("15.3", "123.123")
require.Equal(t, GetApplicationVersion(), "gitlab-workhorse (15.3)-(123.123)")
SetVersion("", "123.123")
require.Equal(t, GetApplicationVersion(), "gitlab-workhorse ()-(123.123)")
}