Skip to content

Commit df9ccae

Browse files
fix: add GetOrganizations to MockGPUCreateStore for test compatibility
Co-Authored-By: Alec Fong <alecsanf@usc.edu>
1 parent f7172bf commit df9ccae

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

pkg/cmd/gpucreate/gpucreate_test.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,13 @@ func (m *MockGPUCreateStore) GetActiveOrganizationOrDefault() (*entity.Organizat
4848
return m.Org, nil
4949
}
5050

51+
func (m *MockGPUCreateStore) GetOrganizations(_ *store.GetOrganizationsOptions) ([]entity.Organization, error) {
52+
if m.Org != nil {
53+
return []entity.Organization{*m.Org}, nil
54+
}
55+
return []entity.Organization{}, nil
56+
}
57+
5158
func (m *MockGPUCreateStore) GetWorkspace(workspaceID string) (*entity.Workspace, error) {
5259
if ws, ok := m.Workspaces[workspaceID]; ok {
5360
return ws, nil

0 commit comments

Comments
 (0)