Skip to content

Commit

Permalink
moving mockWatcher to only file that uses it
Browse files Browse the repository at this point in the history
  • Loading branch information
carolinaecalderon committed Jul 4, 2023
1 parent 6d70b39 commit bb94d28
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
11 changes: 11 additions & 0 deletions master/internal/rm/kubernetesrm/informer_intg_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,17 @@ import (
"github.com/determined-ai/determined/master/internal/mocks"
)

type mockWatcher struct {
c chan watch.Event
}

func (m *mockWatcher) Stop() {
close(m.c)
}
func (m *mockWatcher) ResultChan() <-chan watch.Event {
return m.c
}

// operations is a tuple struct (name, action) for testing
// events handled by the node informer. Name refers to the
// node name & action refers to the Watch.Event.Type.
Expand Down
11 changes: 0 additions & 11 deletions master/internal/rm/kubernetesrm/mock_client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,14 +227,3 @@ func (m *mockRoundTripInterface) RoundTrip(req *http.Request) (*http.Response, e
Body: io.NopCloser(strings.NewReader(msg)),
}, nil
}

type mockWatcher struct {
c chan watch.Event
}

func (m *mockWatcher) Stop() {
close(m.c)
}
func (m *mockWatcher) ResultChan() <-chan watch.Event {
return m.c
}

0 comments on commit bb94d28

Please sign in to comment.