Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(cli): check if node is ACTIVE after it is started #616

Merged
merged 9 commits into from
Dec 11, 2023
Prev Previous commit
Next Next commit
style: fix indentation and apply format
Signed-off-by: Lenin Mehedy <lenin.mehedy@swirldslabs.com>
  • Loading branch information
leninmehedy committed Dec 8, 2023
commit d1e7710a491aecc87510ad3c54783f88c0987361
8 changes: 7 additions & 1 deletion fullstack-network-manager/src/commands/node.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,13 @@ export class NodeCommand extends BaseCommand {
const podName = Templates.renderNetworkPodName(nodeId)

try {
await this.kubectl.wait('pod', '--for=jsonpath=\'{.status.phase}\'=Running', '-l fullstack.hedera.com/type=network-node', `-l fullstack.hedera.com/node-name=${nodeId}`, '--timeout=300s', `-n "${namespace}"`)
await this.kubectl.wait('pod',
'--for=jsonpath=\'{.status.phase}\'=Running',
'-l fullstack.hedera.com/type=network-node',
`-l fullstack.hedera.com/node-name=${nodeId}`,
'--timeout=300s',
`-n "${namespace}"`
)

return podName
} catch (e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ describe('ShellRunner', () => {
it('should run command', async () => {
await shellRunner.run('ls -l')
expect(loggerSpy).toHaveBeenNthCalledWith(1, 'Executing command: \'ls -l\'')
expect(loggerSpy).toHaveBeenNthCalledWith(2,'Finished executing: \'ls -l\'', {
'commandExitCode': expect.any(Number),
'commandExitSignal': null,
'commandOutput': expect.any(Array)
expect(loggerSpy).toHaveBeenNthCalledWith(2, 'Finished executing: \'ls -l\'', {
commandExitCode: expect.any(Number),
commandExitSignal: null,
commandOutput: expect.any(Array)
})
expect(readableSpy).toHaveBeenCalledWith('data', expect.anything())
expect(childProcessSpy).toHaveBeenCalledWith('exit', expect.anything())
Expand Down