-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Keystone] Launcher: don't fail if some capabilities are missing locally
If the onchain registry has capabilities that are not enabled locally, we don't want to fail everything but continue launching other capabilities that are available.
- Loading branch information
Showing
3 changed files
with
37 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -113,6 +113,9 @@ func TestLauncher_WiresUpExternalCapabilities(t *testing.T) { | |
|
||
triggerCapID := randomWord() | ||
targetCapID := randomWord() | ||
// one capability from onchain registry is not set up locally | ||
fullMissingTargetID := "[email protected]" | ||
missingTargetCapID := randomWord() | ||
dID := uint32(1) | ||
// The below state describes a Workflow DON (AcceptsWorkflows = true), | ||
// which exposes the streams-trigger and write_chain capabilities. | ||
|
@@ -130,8 +133,9 @@ func TestLauncher_WiresUpExternalCapabilities(t *testing.T) { | |
Members: nodes, | ||
}, | ||
CapabilityConfigurations: map[string]registrysyncer.CapabilityConfiguration{ | ||
fullTriggerCapID: {}, | ||
fullTargetID: {}, | ||
fullTriggerCapID: {}, | ||
fullTargetID: {}, | ||
fullMissingTargetID: {}, | ||
}, | ||
}, | ||
}, | ||
|
@@ -144,35 +148,39 @@ func TestLauncher_WiresUpExternalCapabilities(t *testing.T) { | |
ID: "[email protected]", | ||
CapabilityType: capabilities.CapabilityTypeTarget, | ||
}, | ||
fullMissingTargetID: { | ||
ID: fullMissingTargetID, | ||
CapabilityType: capabilities.CapabilityTypeTarget, | ||
}, | ||
}, | ||
IDsToNodes: map[p2ptypes.PeerID]kcr.INodeInfoProviderNodeInfo{ | ||
nodes[0]: { | ||
NodeOperatorId: 1, | ||
Signer: randomWord(), | ||
P2pId: nodes[0], | ||
EncryptionPublicKey: randomWord(), | ||
HashedCapabilityIds: [][32]byte{triggerCapID, targetCapID}, | ||
HashedCapabilityIds: [][32]byte{triggerCapID, targetCapID, missingTargetCapID}, | ||
}, | ||
nodes[1]: { | ||
NodeOperatorId: 1, | ||
Signer: randomWord(), | ||
P2pId: nodes[1], | ||
EncryptionPublicKey: randomWord(), | ||
HashedCapabilityIds: [][32]byte{triggerCapID, targetCapID}, | ||
HashedCapabilityIds: [][32]byte{triggerCapID, targetCapID, missingTargetCapID}, | ||
}, | ||
nodes[2]: { | ||
NodeOperatorId: 1, | ||
Signer: randomWord(), | ||
P2pId: nodes[2], | ||
EncryptionPublicKey: randomWord(), | ||
HashedCapabilityIds: [][32]byte{triggerCapID, targetCapID}, | ||
HashedCapabilityIds: [][32]byte{triggerCapID, targetCapID, missingTargetCapID}, | ||
}, | ||
nodes[3]: { | ||
NodeOperatorId: 1, | ||
Signer: randomWord(), | ||
P2pId: nodes[3], | ||
EncryptionPublicKey: randomWord(), | ||
HashedCapabilityIds: [][32]byte{triggerCapID, targetCapID}, | ||
HashedCapabilityIds: [][32]byte{triggerCapID, targetCapID, missingTargetCapID}, | ||
}, | ||
}, | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters