Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/mockery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
with:
go-version: 'stable'
- name: Generate Mocks
run: go run github.com/vektra/mockery/v2
run: go tool mockery
- uses: stefanzweifel/git-auto-commit-action@v6
name: Commit changes
with:
Expand Down
4 changes: 3 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ require (
github.com/spf13/viper v1.20.1
github.com/stretchr/testify v1.10.0
github.com/urfave/cli/v3 v3.4.1
github.com/vektra/mockery/v2 v2.53.2
golang.org/x/crypto v0.41.0
golang.org/x/exp v0.0.0-20250813145105-42675adae3e6
google.golang.org/grpc v1.74.2
Expand Down Expand Up @@ -96,6 +95,7 @@ require (
github.com/spf13/pflag v1.0.6 // indirect
github.com/stretchr/objx v0.5.2 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/vektra/mockery/v2 v2.53.2 // indirect
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect
github.com/xrash/smetrics v0.0.0-20250705151800-55b8f293f342
go.uber.org/multierr v1.11.0 // indirect
Expand All @@ -115,3 +115,5 @@ replace (
google.golang.org/genproto => google.golang.org/genproto v0.0.0-20250811230008-5f3141c8851a
google.golang.org/genproto/googleapis/rpc => google.golang.org/genproto/googleapis/rpc v0.0.0-20250811230008-5f3141c8851a
)

tool github.com/vektra/mockery/v2
30 changes: 0 additions & 30 deletions support/file/file_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,36 +75,6 @@ func TestGetContent(t *testing.T) {
assert.Contains(t, content, "Version")
}

func TestGetFrameworkContent(t *testing.T) {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The GetFrameworkContent function is not used actually for now, we can remove it if Go v1.24 doesn't support testing it directly. We can add the tests in goravel/example when implementing goravel/goravel#719

// Test successful case - reading a known framework file
content, err := GetFrameworkContent("support/constant.go")
assert.Nil(t, err)
assert.NotEmpty(t, content)
assert.Contains(t, content, "Version")

// Test successful case - reading another framework file
content, err = GetFrameworkContent("support/file/file.go")
assert.Nil(t, err)
assert.NotEmpty(t, content)
assert.Contains(t, content, "package file")

// Test case with non-existent file
content, err = GetFrameworkContent("non/existent/file.go")
assert.NotNil(t, err)
assert.Empty(t, content)

// Test case with empty file path
content, err = GetFrameworkContent("")
assert.NotNil(t, err)
assert.Empty(t, content)

// Test case with file path that contains expected framework content
content, err = GetFrameworkContent("go.mod")
assert.Nil(t, err)
assert.NotEmpty(t, content)
assert.Contains(t, content, "module github.com/goravel/framework")
}

func TestPutContent(t *testing.T) {
if !env.IsWindows() {
// directory creation failure
Expand Down
7 changes: 0 additions & 7 deletions tool.go

This file was deleted.

Loading