Skip to content

Commit

Permalink
does it still work?
Browse files Browse the repository at this point in the history
  • Loading branch information
smonero committed Aug 8, 2024
1 parent 6844879 commit b490226
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 31 deletions.
4 changes: 0 additions & 4 deletions server/neptune/gateway/event/modified_pull_request_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ import (
"github.com/runatlantis/atlantis/server/models"
)

type legacyHandler interface {
Handle(ctx context.Context, request *http.BufferedRequest, event PullRequest, allRoots []*valid.MergedProjectCfg) error
}

type prSignaler interface {
SignalWithStartWorkflow(ctx context.Context, rootCfgs []*valid.MergedProjectCfg, prRequest pr.Request) (client.WorkflowRun, error)
}
Expand Down
27 changes: 0 additions & 27 deletions server/neptune/gateway/event/modified_pull_request_handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,6 @@ func TestModifiedPullHandler_Handle_BranchStrategy(t *testing.T) {
pull := event.PullRequest{
Pull: pullRequest,
}
legacyHandler := &mockLegacyHandler{
expectedEvent: pull,
expectedAllRoots: []*valid.MergedProjectCfg{legacyRoot},
expectedT: t,
}
prRequest := pr.Request{
Revision: "sha",
Repo: testRepo,
Expand Down Expand Up @@ -143,7 +138,6 @@ func TestModifiedPullHandler_Handle_BranchStrategy(t *testing.T) {
}
err := pullHandler.Handle(context.Background(), &http.BufferedRequest{}, pull)
assert.NoError(t, err)
assert.True(t, legacyHandler.called)
assert.True(t, signaler.called)
}

Expand Down Expand Up @@ -191,11 +185,6 @@ func TestModifiedPullHandler_Handle_MergeStrategy(t *testing.T) {
pr := event.PullRequest{
Pull: pullRequest,
}
legacyHandler := &mockLegacyHandler{
expectedEvent: pr,
expectedAllRoots: []*valid.MergedProjectCfg{root},
expectedT: t,
}
pullHandler := event.ModifiedPullHandler{
Logger: logger,
Scheduler: &sync.SynchronousScheduler{Logger: logger},
Expand All @@ -210,7 +199,6 @@ func TestModifiedPullHandler_Handle_MergeStrategy(t *testing.T) {
}
err := pullHandler.Handle(context.Background(), &http.BufferedRequest{}, pr)
assert.NoError(t, err)
assert.True(t, legacyHandler.called)
assert.True(t, signaler.called)
}

Expand All @@ -231,21 +219,6 @@ func (r *mockConfigBuilder) Build(_ context.Context, commit *config.RepoCommit,
return r.rootConfigs, r.error
}

type mockLegacyHandler struct {
expectedEvent event.PullRequest
expectedAllRoots []*valid.MergedProjectCfg
expectedT *testing.T
error error
called bool
}

func (l *mockLegacyHandler) Handle(ctx context.Context, _ *http.BufferedRequest, event event.PullRequest, allRoots []*valid.MergedProjectCfg) error {
l.called = true
assert.Equal(l.expectedT, l.expectedEvent, event)
assert.Equal(l.expectedT, l.expectedAllRoots, allRoots)
return l.error
}

type mockPRSignaler struct {
called bool
error error
Expand Down

0 comments on commit b490226

Please sign in to comment.