Skip to content

Commit 61155e0

Browse files
committed
added network deploy
Signed-off-by: Jeromy Cannon <jeromy@swirldslabs.com>
1 parent 9aeebef commit 61155e0

File tree

3 files changed

+27
-2
lines changed

3 files changed

+27
-2
lines changed

src/commands/network.ts

+4
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@ export class NetworkCommand extends BaseCommand {
130130
flags.debugNodeAlias,
131131
flags.loadBalancerEnabled,
132132
flags.log4j2Xml,
133+
// TODO remove namespace once remote config gets it from local config
134+
flags.namespace,
133135
flags.deployment,
134136
flags.nodeAliasesUnparsed,
135137
flags.persistentVolumeClaims,
@@ -556,6 +558,8 @@ export class NetworkCommand extends BaseCommand {
556558
flags.debugNodeAlias,
557559
flags.loadBalancerEnabled,
558560
flags.log4j2Xml,
561+
// TODO remove namespace once remote config gets it from local config
562+
flags.namespace,
559563
flags.persistentVolumeClaims,
560564
flags.profileName,
561565
flags.profileFile,

src/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ export function main(argv: any) {
9595

9696
const clusterName = configManager.getFlag(flags.clusterRef) || currentClusterName;
9797

98-
if (contextNamespace?.name) {
99-
configManager.setFlag(flags.namespace, contextNamespace);
98+
if (!configManager.getFlag(flags.namespace)) {
99+
configManager.setFlag(flags.namespace, contextNamespace?.name);
100100
}
101101

102102
// apply precedence for flags

test/e2e/commands/dual_cluster_full.test.ts

+21
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,23 @@ async function manuallyCreateRemoteConfigConfigMap(
131131
}
132132
}
133133

134+
function soloNetworkDeployArgv(deployment: string, namespace: NamespaceName): any {
135+
const argv = newArgv();
136+
argv.push('network');
137+
argv.push('deploy');
138+
argv.push(optionFromFlag(Flags.cacheDir));
139+
argv.push(getTestCacheDir());
140+
argv.push(optionFromFlag(Flags.devMode));
141+
argv.push(optionFromFlag(Flags.deployment));
142+
argv.push(deployment);
143+
argv.push(optionFromFlag(Flags.quiet));
144+
// TOD add solo chart directory
145+
// TODO remove once the remote config manager is updated to pull the namespace from the local config
146+
argv.push(optionFromFlag(Flags.namespace));
147+
argv.push(namespace.name);
148+
return argv;
149+
}
150+
134151
describe('Dual Cluster Full E2E Test', async function dualClusterFullE2eTest(): Promise<void> {
135152
this.bail(true);
136153
const testName: string = 'dual-cluster-full';
@@ -208,6 +225,10 @@ describe('Dual Cluster Full E2E Test', async function dualClusterFullE2eTest():
208225
});
209226

210227
// TODO network deploy
228+
it(`${testName}: network deploy`, async () => {
229+
main(soloNetworkDeployArgv(deployment, namespace));
230+
});
231+
211232
// TODO node setup
212233
// TODO node start
213234
// TODO mirror node deploy

0 commit comments

Comments
 (0)