Fix issue with consul version tests
Signed-off-by: Mark Anderson <manderson@hashicorp.com>
This commit is contained in:
parent
cb1b08141f
commit
ab1f0be711
|
@ -6,6 +6,7 @@ import (
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"testing"
|
"testing"
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
)
|
)
|
||||||
|
@ -31,12 +32,13 @@ func golden(t *testing.T, name, got string) string {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestFormat(t *testing.T) {
|
func TestFormat(t *testing.T) {
|
||||||
|
buildDate, _ := time.Parse(time.RFC3339, "2022-06-01T13:18:45Z")
|
||||||
info := VersionInfo{
|
info := VersionInfo{
|
||||||
HumanVersion: "1.99.3-beta1",
|
HumanVersion: "1.99.3-beta1",
|
||||||
Version: "1.99.3",
|
Version: "1.99.3",
|
||||||
Prerelease: "beta1",
|
Prerelease: "beta1",
|
||||||
Revision: "5e5dbedd47a5f875b60e241c5555a9caab595246",
|
Revision: "5e5dbedd47a5f875b60e241c5555a9caab595246",
|
||||||
BuildDate: "2022-06-01T13:18:45Z",
|
BuildDate: buildDate,
|
||||||
RPC: RPCVersionInfo{
|
RPC: RPCVersionInfo{
|
||||||
Default: 2,
|
Default: 2,
|
||||||
Min: 1,
|
Min: 1,
|
||||||
|
|
Loading…
Reference in New Issue