Skip to content

Commit

Permalink
up tests
Browse files Browse the repository at this point in the history
  • Loading branch information
samirtahir91 committed Apr 1, 2024
1 parent 891ed74 commit 1845e1f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions internal/controller/githubapp_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,19 @@ import (
githubappv1 "github-app-operator/api/v1"
)

// fakeClient implements the client.Client interface for testing purposes
type fakeClient struct {
ListFunc func(ctx context.Context, list runtime.Object, opts ...client.ListOption) error

Check failure on line 40 in internal/controller/githubapp_controller_test.go

View workflow job for this annotation

GitHub Actions / golangci-lint and staticcheck

undefined: runtime

Check failure on line 40 in internal/controller/githubapp_controller_test.go

View workflow job for this annotation

GitHub Actions / golangci-lint and staticcheck

undefined: client
}

// List mocks the List method of the client.Client interface
func (c *fakeClient) List(ctx context.Context, list runtime.Object, opts ...client.ListOption) error {

Check failure on line 44 in internal/controller/githubapp_controller_test.go

View workflow job for this annotation

GitHub Actions / golangci-lint and staticcheck

undefined: runtime

Check failure on line 44 in internal/controller/githubapp_controller_test.go

View workflow job for this annotation

GitHub Actions / golangci-lint and staticcheck

undefined: client
if c.ListFunc != nil {
return c.ListFunc(ctx, list, opts...)
}
return nil
}

var _ = Describe("GithubApp controller", func() {

const (
Expand Down

0 comments on commit 1845e1f

Please sign in to comment.