Skip to content

Commit 8685861

Browse files
author
Craig O'Donnell
authored
consider PendingChartCreation as part of upgrade process (#4544)
1 parent 9d84ee7 commit 8685861

File tree

2 files changed

+22
-13
lines changed

2 files changed

+22
-13
lines changed

web/src/utilities/utilities.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,8 @@ export const Utilities = {
681681
const normalizedState = this.clusterState(cluster.state);
682682
if (
683683
normalizedState === "Upgrading" ||
684-
normalizedState === "Upgrading addons"
684+
normalizedState === "Upgrading addons" ||
685+
normalizedState === "Creating addons"
685686
) {
686687
return true;
687688
}

web/src/utilities/utilities.test.js

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -85,20 +85,28 @@ describe("Utilities", () => {
8585
});
8686

8787
it("should return true if the user has tried to deploy the current version and a cluster upgrade is in progress", () => {
88-
const apps = [
89-
{
90-
downstream: {
91-
currentVersion: {
92-
status: "deployed",
93-
},
94-
cluster: {
95-
requiresUpgrade: true,
96-
state: "Installing",
88+
for (const installationState of [
89+
"CopyingArtifacts",
90+
"Enqueued",
91+
"Installing",
92+
"AddonsInstalling",
93+
"PendingChartCreation",
94+
]) {
95+
const apps = [
96+
{
97+
downstream: {
98+
currentVersion: {
99+
status: "deployed",
100+
},
101+
cluster: {
102+
requiresUpgrade: true,
103+
state: installationState,
104+
},
97105
},
98106
},
99-
},
100-
];
101-
expect(Utilities.shouldShowClusterUpgradeModal(apps)).toBe(true);
107+
];
108+
expect(Utilities.shouldShowClusterUpgradeModal(apps)).toBe(true);
109+
}
102110
});
103111

104112
it("should return false if there are is one installation that does not have a state", () => {

0 commit comments

Comments
 (0)