Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
deaswang committed Jan 22, 2021
1 parent 46b92be commit d0a1c52
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion api/test/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"fmt"
"os"
"strings"
"testing"
"time"

Expand Down Expand Up @@ -157,7 +158,11 @@ func (ts *testSuite) testVersion(t *testing.T) {
if err != nil {
t.Fatal(err)
}
require.Equal(t, v.Version, build.BuildVersion)
versions := strings.Split(v.Version, "+")
if len(versions) <= 0 {
t.Fatal("empty version")
}
require.Equal(t, versions[0], build.BuildVersion)
}

func (ts *testSuite) testSearchMsg(t *testing.T) {
Expand Down

0 comments on commit d0a1c52

Please sign in to comment.