You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 31, 2023. It is now read-only.
Once added a console software environment, you can create a gateway for the environment.
When you delete the ops environment you get the following error:
This is presumably because we refresh the gateways, however, the environment that the gateway belongs to doesn't exist anymore.
This is present in v1.0.20.
Edit: I suspect that this isn't a console environment problem only - we should make sure we have stricter tests to catch things like this in future.
Expected Behavior
Actual Behavior
Possible Fix
I created a test which reproduces this problem and should actually fail.
I haven't written a fix, as we will probably need to change our REFRESH_GATEWAYS command to be a bit more complex than just refreshing the tree.
it('should delete a environment which has gateways created from it', async () => {
const environmentRegistryEntry: FabricEnvironmentRegistryEntry = new FabricEnvironmentRegistryEntry();
environmentRegistryEntry.name = 'myEnvironmentB';
geConnectedEnvironmentRegistryStub.returns(environmentRegistryEntry);
const gatewayRegistryEntry: FabricGatewayRegistryEntry = new FabricGatewayRegistryEntry({name: 'myGateway', fromEnvironment: 'myEnvironmentB', associatedWallet: ''});
await FabricGatewayRegistry.instance().add(gatewayRegistryEntry);
await vscode.commands.executeCommand(ExtensionCommands.DELETE_ENVIRONMENT);
environments = await FabricEnvironmentRegistry.instance().getAll();
environments.length.should.equal(2);
await vscode.commands.executeCommand('gatewaysExplorer.focus');
environments[0].name.should.equal(FabricRuntimeUtil.LOCAL_FABRIC);
environments[1].should.deep.equal(myEnvironmentA);
commandSpy.should.have.been.calledWith(ExtensionCommands.DISCONNECT_ENVIRONMENT);
commandSpy.should.not.have.been.calledWith(ExtensionCommands.DISCONNECT_GATEWAY);
await ExtensionUtil.sleep(3000);
logSpy.getCall(0).should.have.been.calledWithExactly(LogType.INFO, undefined, `delete environment`);
logSpy.getCall(1).should.have.been.calledWithExactly(LogType.SUCCESS, `Successfully deleted ${myEnvironmentB.name} environment`);
logSpy.should.not.have.been.calledWith(LogType.ERROR);
});
Jakeeyturner
changed the title
Error when deleting console environment (with gateway)
Error when deleting console environment with gateway created from it
Feb 20, 2020
Jakeeyturner
changed the title
Error when deleting console environment with gateway created from it
Error when deleting environment with gateway created from it
Feb 20, 2020
Description
Once added a console software environment, you can create a gateway for the environment.
When you delete the ops environment you get the following error:
This is presumably because we refresh the gateways, however, the environment that the gateway belongs to doesn't exist anymore.
This is present in v1.0.20.
Edit: I suspect that this isn't a console environment problem only - we should make sure we have stricter tests to catch things like this in future.
Expected Behavior
Actual Behavior
Possible Fix
I created a test which reproduces this problem and should actually fail.
I haven't written a fix, as we will probably need to change our REFRESH_GATEWAYS command to be a bit more complex than just refreshing the tree.
Steps to Reproduce
Existing issues
Log File
Your Environment
The text was updated successfully, but these errors were encountered: