Skip to content

Commit

Permalink
License spec ignores mock_ prefixed files
Browse files Browse the repository at this point in the history
- remove unnecessary Copyright header in generated mock since these are
  no longer in source control
  • Loading branch information
aramprice committed Mar 22, 2024
1 parent 959726a commit fa2d9f6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src/bpm/license_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ var _ = Describe("our go source code", func() {
}

// Skip generated code
if strings.HasPrefix(filepath.Base(path), "fake_") {
if strings.HasPrefix(filepath.Base(path), "mock_") {
return nil
}

Expand Down
4 changes: 2 additions & 2 deletions src/bpm/runc/lifecycle/lifecycle.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ import (
"bpm/usertools"
)

//go:generate go run go.uber.org/mock/mockgen -destination ./mock_lifecycle/mocks.go bpm/runc/lifecycle UserFinder,CommandRunner,RuncAdapter,RuncClient

const (
ContainerSigQuitGracePeriod = 2 * time.Second
ContainerStatePollInterval = 1 * time.Second
Expand All @@ -52,8 +54,6 @@ func IsNotExist(err error) bool {
return err == isNotExistError
}

//go:generate go run go.uber.org/mock/mockgen -copyright_file ./mock_lifecycle/header.txt -destination ./mock_lifecycle/mocks.go bpm/runc/lifecycle UserFinder,CommandRunner,RuncAdapter,RuncClient

type UserFinder interface {
Lookup(username string) (specs.User, error)
}
Expand Down
14 changes: 0 additions & 14 deletions src/bpm/runc/lifecycle/mock_lifecycle/header.txt

This file was deleted.

0 comments on commit fa2d9f6

Please sign in to comment.