Welcome to mirror list, hosted at ThFree Co, Russian Federation.

version_test.go « version « internal « workhorse - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 9d0581e093b3de507976f760ee1ffc80e9709166 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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)")
}