8000 fix(ContainerList): group containers missing engineName (#13554) · podman-desktop/podman-desktop@23277a1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 23277a1

Browse files
authored
fix(ContainerList): group containers missing engineName (#13554)
Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>
1 parent ead33d7 commit 23277a1

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

‎packages/renderer/src/lib/container/container-utils.spec.ts†10000 Ž

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ test('container group status should be stopped when any compose container is sto
159159
Names: ['container1'],
160160
State: 'RUNNING',
161161
ImageID: 'sha256:dummy-sha256',
162+
engineName: 'podman',
162163
} as unknown as ContainerInfo;
163164
const containerInfo2 = {
164165
Id: 'container2',
@@ -167,6 +168,7 @@ test('container group status should be stopped when any compose container is sto
167168
Names: ['container2'],
168169
State: 'STOPPED',
169170
ImageID: 'sha256:dummy-sha256',
171+
engineName: 'podman',
170172
} as unknown as ContainerInfo;
171173
const groups = containerUtils.getContainerGroups([
172174
containerUtils.getContainerInfoUI(containerInfo),
@@ -177,6 +179,7 @@ test('container group status should be stopped when any compose container is sto
177179
expect(group.name).toBe(groupName);
178180
expect(group.type).toBe(ContainerGroupInfoTypeUI.COMPOSE);
179181
expect(group.status).toBe('STOPPED');
182+
expect(group.engineName).toBe('podman');
180183
});
181184

182185
test('container group status should be running when the pod status is running', async () => {
@@ -193,6 +196,7 @@ test('container group status should be running when the pod status is running',
193196
State: 'RUNNING',
194197
pod: pod,
195198
ImageID: 'sha256:dummy-sha256',
199+
engineName: 'podman',
196200
} as unknown as ContainerInfo;
197201
const containerInfo2 = {
198202
Id: 'container2',
@@ -201,6 +205,7 @@ test('container group status should be running when the pod status is running',
201205
State: 'RUNNING',
202206
pod: pod,
203207
ImageID: 'sha256:dummy-sha256',
208+
engineName: 'podman',
204209
} as unknown as ContainerInfo;
205210
const groups = containerUtils.getContainerGroups([
206211
containerUtils.getContainerInfoUI(containerInfo),
@@ -210,6 +215,7 @@ test('container group status should be running when the pod status is running',
210215
expect(group.name).toBe(groupName);
211216
expect(group.type).toBe(ContainerGroupInfoTypeUI.POD);
212217
expect(group.status).toBe('RUNNING');
218+
expect(group.engineName).toBe('podman');
213219
});
214220

215221
test('container group status should be degraded when the pod status is degraded', async () => {

‎packages/renderer/src/lib/container/container-utils.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ export class ContainerUtils {
193193
type: ContainerGroupInfoTypeUI.COMPOSE,
194194
engineId: containerInfo.engineId,
195195
engineType: containerInfo.engineType,
196+
engineName: containerInfo.engineName,
196197
};
197198
}
198199

@@ -206,6 +207,7 @@ export class ContainerUtils {
206207
status: (podInfo.status ?? '').toUpperCase(),
207208
engineId: containerInfo.engineId,
208209
engineType: containerInfo.engineType,
210+
engineName: containerInfo.engineName,
209211
};
210212
}
211213

@@ -216,6 +218,7 @@ export class ContainerUtils {
216218
status: (containerInfo.Status ?? '').toUpperCase(),
217219
engineType: containerInfo.engineType,
218220
id: containerInfo.Id, // since the container is standalone, let's use its ID as groupInfo#id
221+
engineName: containerInfo.engineName,
219222
};
220223
}
221224

@@ -244,6 +247,7 @@ export class ContainerUtils {
244247
status: group.status,
245248
engineId: group.engineId,
246249
engineType: group.engineType,
250+
engineName: group.engineName,
247251
allContainersCount: 0,
248252
containers: [],
249253
});

0 commit comments

Comments
 (0)
0