-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15654 from jmchilton/object_store_ui_followup
Follow up on object store selection PR.
- Loading branch information
Showing
18 changed files
with
564 additions
and
313 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { getSelectableObjectStores } from "./services"; | ||
jest.mock("./services"); | ||
|
||
const OBJECT_STORES = [ | ||
{ object_store_id: "object_store_1", badges: [], quota: { enabled: false }, private: false }, | ||
{ object_store_id: "object_store_2", badges: [], quota: { enabled: false }, private: false }, | ||
]; | ||
|
||
export function setupSelectableMock() { | ||
const mockGetObjectStores = getSelectableObjectStores as jest.MockedFunction<typeof getSelectableObjectStores>; | ||
mockGetObjectStores.mockResolvedValue(OBJECT_STORES); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { fetcher } from "@/schema/fetcher"; | ||
|
||
const getObjectStores = fetcher.path("/api/object_store").method("get").create(); | ||
|
||
export async function getSelectableObjectStores() { | ||
const { data } = await getObjectStores({ selectable: true }); | ||
return data; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.