Skip to content

Commit

Permalink
Move to go.nhat.io (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
nhatthm authored Aug 28, 2022
1 parent 66b465a commit 0084dc0
Show file tree
Hide file tree
Showing 78 changed files with 646 additions and 619 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/update-registry.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: 'update-registry'

on:
push:
tags:
- v*
workflow_dispatch:

env:
MODULE_NAME: grpcmock

jobs:
notify:
runs-on: ubuntu-latest
strategy:
matrix:
registry: [ go.nhat.io, go-staging.nhat.io ]
steps:
- name: notify ${{ matrix.registry }}
uses: benc-uk/workflow-dispatch@v1
with:
workflow: build
repo: nhatthm/${{ matrix.registry }}
token: ${{ secrets.REGISTRY_TOKEN }}
inputs: '{"modules": "${{ env.MODULE_NAME }}"}'
ref: 'master'
46 changes: 23 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
> ⚠️ From `v0.20.0`, the project will be rebranded to `go.nhat.io/grpcmock`. `v.19.x` is the last version with `github.com/nhatthm/grpcmock`.
> ⚠️ From `v0.20.0`, the project will be rebranded to `go.nhat.io/grpcmock`. `v.19.0` is the last version with `github.com/nhatthm/grpcmock`.
# gRPC Test Utilities for Golang

[![GitHub Releases](https://img.shields.io/github/v/release/nhatthm/grpcmock)](https://github.com/nhatthm/grpcmock/releases/latest)
[![Build Status](https://github.com/nhatthm/grpcmock/actions/workflows/test.yaml/badge.svg)](https://github.com/nhatthm/grpcmock/actions/workflows/test.yaml)
[![codecov](https://codecov.io/gh/nhatthm/grpcmock/branch/master/graph/badge.svg?token=eTdAgDE2vR)](https://codecov.io/gh/nhatthm/grpcmock)
[![Go Report Card](https://goreportcard.com/badge/github.com/nhatthm/grpcmock)](https://goreportcard.com/report/github.com/nhatthm/grpcmock)
[![GoDevDoc](https://img.shields.io/badge/dev-doc-00ADD8?logo=go)](https://pkg.go.dev/github.com/nhatthm/grpcmock)
[![Go Report Card](https://goreportcard.com/badge/go.nhat.io/grpcmock)](https://goreportcard.com/report/go.nhat.io/grpcmock)
[![GoDevDoc](https://img.shields.io/badge/dev-doc-00ADD8?logo=go)](https://pkg.go.dev/go.nhat.io/grpcmock)
[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/donate/?hosted_button_id=PJZSGJN57TDJY)

Test gRPC service and client like a pro.
Expand Down Expand Up @@ -36,7 +36,7 @@ Test gRPC service and client like a pro.
## Install

```bash
go get github.com/nhatthm/grpcmock
go get go.nhat.io/grpcmock
```

[<sub><sup>[table of contents]</sup></sub>](#table-of-contents)
Expand All @@ -61,9 +61,9 @@ import (
"testing"
"time"

"github.com/nhatthm/grpcmock"
grpcAssert "github.com/nhatthm/grpcmock/assert"
"github.com/stretchr/testify/assert"
"go.nhat.io/grpcmock"
xassert "go.nhat.io/grpcmock/assert"
)

func TestGetItems(t *testing.T) {
Expand Down Expand Up @@ -94,7 +94,7 @@ func TestGetItems(t *testing.T) {
grpcmock.WithInsecure(),
)

grpcAssert.EqualMessage(t, expected, out)
xassert.EqualMessage(t, expected, out)
assert.NoError(t, err)
}
```
Expand All @@ -113,9 +113,9 @@ import (
"testing"
"time"

"github.com/nhatthm/grpcmock"
grpcAssert "github.com/nhatthm/grpcmock/assert"
"github.com/stretchr/testify/assert"
"go.nhat.io/grpcmock"
xassert "go.nhat.io/grpcmock/assert"
)

func TestCreateItems(t *testing.T) {
Expand All @@ -142,7 +142,7 @@ func TestCreateItems(t *testing.T) {
grpcmock.WithInsecure(),
)

grpcAssert.EqualMessage(t, expected, out)
xassert.EqualMessage(t, expected, out)
assert.NoError(t, err)
}
```
Expand All @@ -161,9 +161,9 @@ import (
"testing"
"time"

"github.com/nhatthm/grpcmock"
grpcAssert "github.com/nhatthm/grpcmock/assert"
"github.com/stretchr/testify/assert"
"go.nhat.io/grpcmock"
xassert "go.nhat.io/grpcmock/assert"
)

func TestListItems(t *testing.T) {
Expand Down Expand Up @@ -200,7 +200,7 @@ func TestListItems(t *testing.T) {
assert.Len(t, actual, len(expected))

for i := 0; i < len(expected); i++ {
grpcAssert.EqualMessage(t, expected[i], actual[i])
xassert.EqualMessage(t, expected[i], actual[i])
}
}
```
Expand All @@ -222,9 +222,9 @@ import (
"testing"
"time"

"github.com/nhatthm/grpcmock"
grpcAssert "github.com/nhatthm/grpcmock/assert"
"github.com/stretchr/testify/assert"
"go.nhat.io/grpcmock"
xassert "go.nhat.io/grpcmock/assert"
"google.golang.org/grpc"
)

Expand Down Expand Up @@ -284,7 +284,7 @@ func TestTransformItems(t *testing.T) {
assert.Len(t, actual, len(expected))

for i := 0; i < len(expected); i++ {
grpcAssert.EqualMessage(t, expected[i], actual[i])
xassert.EqualMessage(t, expected[i], actual[i])
}
}
```
Expand All @@ -302,7 +302,7 @@ import (
"context"
"time"

"github.com/nhatthm/grpcmock"
"go.nhat.io/grpcmock"
"google.golang.org/grpc/test/bufconn"
)

Expand Down Expand Up @@ -333,7 +333,7 @@ import (
"context"
"time"

"github.com/nhatthm/grpcmock"
"go.nhat.io/grpcmock"
"google.golang.org/grpc/test/bufconn"
)

Expand Down Expand Up @@ -361,7 +361,7 @@ import (
"context"
"time"

"github.com/nhatthm/grpcmock"
"go.nhat.io/grpcmock"
"google.golang.org/grpc"
"google.golang.org/grpc/test/bufconn"
)
Expand Down Expand Up @@ -396,7 +396,7 @@ import (
"context"
"time"

"github.com/nhatthm/grpcmock"
"go.nhat.io/grpcmock"
"google.golang.org/grpc/test/bufconn"
)

Expand Down Expand Up @@ -425,7 +425,7 @@ import (
"context"
"time"

"github.com/nhatthm/grpcmock"
"go.nhat.io/grpcmock"
"google.golang.org/grpc"
"google.golang.org/grpc/test/bufconn"
)
Expand Down Expand Up @@ -460,7 +460,7 @@ import (
"context"
"time"

"github.com/nhatthm/grpcmock"
"go.nhat.io/grpcmock"
"google.golang.org/grpc/test/bufconn"
)

Expand Down Expand Up @@ -488,7 +488,7 @@ import (
"context"
"time"

"github.com/nhatthm/grpcmock"
"go.nhat.io/grpcmock"
"google.golang.org/grpc"
"google.golang.org/grpc/test/bufconn"
)
Expand Down
4 changes: 2 additions & 2 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
"google.golang.org/grpc/metadata"
"google.golang.org/grpc/test/bufconn"

"github.com/nhatthm/grpcmock/errors"
"github.com/nhatthm/grpcmock/stream"
"go.nhat.io/grpcmock/errors"
"go.nhat.io/grpcmock/stream"
)

var methodRegex = regexp.MustCompile(`/?[^/]+/[^/]+$`)
Expand Down
Loading

0 comments on commit 0084dc0

Please sign in to comment.