-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #37 from supabase-community/development
workflow: change versions in actions and wrap some errors
- Loading branch information
Showing
11 changed files
with
59 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.3.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-yaml | ||
- id: check-added-large-files | ||
- repo: https://github.com/dnephin/pre-commit-golang | ||
rev: v0.5.0 | ||
hooks: | ||
- id: go-fmt | ||
- id: go-imports | ||
- id: no-go-testing | ||
- id: golangci-lint | ||
- id: go-unit-tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,11 +14,11 @@ func TestNewClient(t *testing.T) { | |
} | ||
|
||
func TestSelect(t *testing.T) { | ||
assert := assert.New(t) | ||
assertions := assert.New(t) | ||
c := createClient(t) | ||
|
||
t.Run("ValidResult", func(t *testing.T) { | ||
got := []map[string]interface{}{} | ||
var got []map[string]interface{} | ||
|
||
if mockResponses { | ||
httpmock.Activate() | ||
|
@@ -29,16 +29,16 @@ func TestSelect(t *testing.T) { | |
} | ||
|
||
bs, count, err := c.From("users").Select("id, name, email", "", false).Execute() | ||
assert.NoError(err) | ||
assertions.NoError(err) | ||
|
||
err = json.Unmarshal(bs, &got) | ||
assert.NoError(err) | ||
assert.EqualValues(users, got) | ||
assert.Equal(countType(0), count) | ||
assertions.NoError(err) | ||
assertions.EqualValues(users, got) | ||
assertions.Equal(countType(0), count) | ||
}) | ||
|
||
t.Run("WithCount", func(t *testing.T) { | ||
got := []map[string]interface{}{} | ||
var got []map[string]interface{} | ||
|
||
if mockResponses { | ||
httpmock.Activate() | ||
|
@@ -53,17 +53,17 @@ func TestSelect(t *testing.T) { | |
} | ||
|
||
bs, count, err := c.From("users").Select("id, name, email", "exact", false).Execute() | ||
assert.NoError(err) | ||
assertions.NoError(err) | ||
|
||
err = json.Unmarshal(bs, &got) | ||
assert.NoError(err) | ||
assert.EqualValues(users, got) | ||
assert.Equal(countType(2), count) | ||
assertions.NoError(err) | ||
assertions.EqualValues(users, got) | ||
assertions.Equal(countType(2), count) | ||
}) | ||
} | ||
|
||
func TestFilter(t *testing.T) { | ||
assert := assert.New(t) | ||
assertions := assert.New(t) | ||
c := createClient(t) | ||
|
||
t.Run("Eq", func(t *testing.T) { | ||
|
@@ -77,7 +77,7 @@ func TestFilter(t *testing.T) { | |
} | ||
|
||
got, _, err := c.From("users").Select("email", "", false).Eq("email", "[email protected]").ExecuteString() | ||
assert.NoError(err) | ||
assert.Equal(want, got) | ||
assertions.NoError(err) | ||
assertions.Equal(want, got) | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters