Skip to content

Commit

Permalink
Updates to coral to use envStatus
Browse files Browse the repository at this point in the history
Signed-off-by: Aindriu Lavelle <[email protected]>
  • Loading branch information
aindriu-aiven committed Sep 21, 2023
1 parent ef3f755 commit f69daaf
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ const mockedEnvironmentsResponse: EnvironmentPaginatedApiResponse =
tenantName: "default",
clusterName: "DEV",
envStatus: "OFFLINE",
envStatusTime: '2023-09-21T11:47:15.664615239',
otherParams: "",
showDeleteEnv: false,
totalNoPages: "1",
Expand Down Expand Up @@ -66,6 +67,7 @@ const mockedEnvironmentsResponse: EnvironmentPaginatedApiResponse =
tenantName: "default",
clusterName: "DEV_CLS",
envStatus: "ONLINE",
envStatusTime: '2023-09-21T11:47:15.664615239',
otherParams: "",
showDeleteEnv: false,
totalNoPages: "1",
Expand Down Expand Up @@ -98,6 +100,7 @@ const mockedEnvironmentsResponse: EnvironmentPaginatedApiResponse =
tenantName: "default",
clusterName: "TST",
envStatus: "ONLINE",
envStatusTime: '2023-09-21T11:47:15.664615239',
otherParams:
"default.partitions=2,max.partitions=2,default.replication.factor=1,max.replication.factor=1,topic.prefix=,topic.suffix=",
showDeleteEnv: false,
Expand Down Expand Up @@ -131,6 +134,7 @@ const mockedEnvironmentsResponse: EnvironmentPaginatedApiResponse =
tenantName: "default",
clusterName: "DEV",
envStatus: "OFFLINE",
envStatusTime: '2023-09-21T11:47:15.664615239',
otherParams: "",
showDeleteEnv: false,
totalNoPages: "1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ const mockedEnvironmentsResponse: EnvironmentPaginatedApiResponse =
tenantName: "default",
clusterName: "TST_CONNCT",
envStatus: "ONLINE",
envStatusTime: '2023-09-21T11:47:15.664615239',
showDeleteEnv: false,
totalNoPages: "1",
currentPage: "1",
Expand All @@ -55,6 +56,7 @@ const mockedEnvironmentsResponse: EnvironmentPaginatedApiResponse =
tenantName: "default",
clusterName: "DEV",
envStatus: "OFFLINE",
envStatusTime: '2023-09-21T11:47:15.664615239',
showDeleteEnv: false,
totalNoPages: "1",
currentPage: "1",
Expand All @@ -72,6 +74,7 @@ const mockedEnvironmentsResponse: EnvironmentPaginatedApiResponse =
tenantName: "default",
clusterName: "UIKLAW",
envStatus: "ONLINE",
envStatusTime: '2023-09-21T11:47:15.664615239',
showDeleteEnv: false,
totalNoPages: "1",
currentPage: "1",
Expand All @@ -89,6 +92,7 @@ const mockedEnvironmentsResponse: EnvironmentPaginatedApiResponse =
tenantName: "default",
clusterName: "UIKLAW",
envStatus: "ONLINE",
envStatusTime: '2023-09-21T11:47:15.664615239',
showDeleteEnv: false,
totalNoPages: "1",
currentPage: "1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ const mockedEnvironmentsResponse: EnvironmentPaginatedApiResponse =
tenantName: "default",
clusterName: "TST_SCHEMA",
envStatus: "ONLINE",
envStatusTime: '2023-09-21T11:47:15.664615239',
showDeleteEnv: false,
totalNoPages: "1",
currentPage: "1",
Expand All @@ -59,6 +60,7 @@ const mockedEnvironmentsResponse: EnvironmentPaginatedApiResponse =
tenantName: "default",
clusterName: "DEV_CLS",
envStatus: "ONLINE",
envStatusTime: '2023-09-21T11:47:15.664615239',
showDeleteEnv: false,
totalNoPages: "1",
currentPage: "1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ describe("EnvironmentStatus", () => {
mockGetUpdateEnvStatus.mockResolvedValue({
result: "success",
envStatus: "ONLINE",
envStatusTime: '2023-09-21T11:47:15.664615239',
});

expect(screen.getByText("Working")).toBeVisible();
Expand All @@ -108,6 +109,7 @@ describe("EnvironmentStatus", () => {
mockGetUpdateEnvStatus.mockResolvedValue({
result: "success",
envStatus: "OFFLINE",
envStatusTime: '2023-09-21T11:47:15.664615239',
});

expect(screen.getByText("Working")).toBeVisible();
Expand Down Expand Up @@ -152,6 +154,7 @@ describe("EnvironmentStatus", () => {
mockGetUpdateEnvStatus.mockResolvedValue({
result: "success",
envStatus: "OFFLINE",
envStatusTime: '2023-09-21T11:47:15.664615239',
});

expect(screen.getByText("Working")).toBeVisible();
Expand Down
8 changes: 7 additions & 1 deletion coral/types/api.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ export type paths = {
"/chPwd": {
post: operations["changePwd"];
};
"/cache/environment/tenant/{tenantId}/id/{id}": {
"/cache/tenant/{tenantId}/entityType/environment/id/{id}": {
post: operations["addEnvToCache"];
delete: operations["removeEnvFromCache"];
};
Expand Down Expand Up @@ -2861,6 +2861,9 @@ export type operations = {
};
addEnvToCache: {
parameters: {
header: {
Authorization: string;
};
path: {
tenantId: number;
id: number;
Expand All @@ -2882,6 +2885,9 @@ export type operations = {
};
removeEnvFromCache: {
parameters: {
header: {
Authorization: string;
};
path: {
tenantId: number;
id: number;
Expand Down

0 comments on commit f69daaf

Please sign in to comment.