diff --git a/.github/workflows/build-short.yml b/.github/workflows/build-short.yml index c5912b5..c543a46 100644 --- a/.github/workflows/build-short.yml +++ b/.github/workflows/build-short.yml @@ -1,4 +1,4 @@ -name: 'Build Hub' +name: 'Build and Test Hub' on: push: @@ -10,4 +10,5 @@ jobs: - uses: actions/setup-go@v2.1.3 with: go-version: 1.16.5 - - run: go build . \ No newline at end of file + - run: go build . + - run: cd server && go test -v \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 155ce43..51ace2b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: 'Build Hub' +name: 'Build and Test Hub' on: push: @@ -30,3 +30,4 @@ jobs: - run: go get github.com/golang/protobuf/protoc-gen-go google.golang.org/grpc/cmd/protoc-gen-go-grpc - run: go build . - run: ./protobuf/build.sh + - run: cd server && go test -v diff --git a/server/federation_test.go b/server/federation_test.go index 02ac4d2..b6286a8 100644 --- a/server/federation_test.go +++ b/server/federation_test.go @@ -158,8 +158,9 @@ func TestPeerWriter(t *testing.T) { Port: "50051", } } else { + x := i + 1 msg = &pb.ServerMessage{ - Address: fmt.Sprintf("%d.%d.%d.%d", i, i, i, i), + Address: fmt.Sprintf("%d.%d.%d.%d", x, x, x, x), Port: "50051", } }