Skip to content

Commit 83f05b7

Browse files
authored
Unit tests for node and volume publication methods in concurrent core
1 parent df37273 commit 83f05b7

File tree

2 files changed

+924
-1
lines changed

2 files changed

+924
-1
lines changed

core/concurrent_core.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4873,6 +4873,7 @@ func (o *ConcurrentTridentOrchestrator) AddNode(
48734873
return
48744874
}
48754875

4876+
// UpdateNode updates the publication state of a node. It does not create a new node if it does not exist.
48764877
func (o *ConcurrentTridentOrchestrator) UpdateNode(
48774878
ctx context.Context, nodeName string, flags *models.NodePublicationStateFlags,
48784879
) (err error) {
@@ -4888,6 +4889,9 @@ func (o *ConcurrentTridentOrchestrator) UpdateNode(
48884889
return err
48894890
}
48904891
node := results[0].Node.Read
4892+
if node == nil {
4893+
return errors.NotFoundError("node %v was not found", nodeName)
4894+
}
48914895

48924896
// Update node publication state based on state flags
48934897
if flags != nil {

0 commit comments

Comments
 (0)