Skip to content

Commit 7bf961f

Browse files
committed
adjust test case to work with parentnode
1 parent 9a0a17c commit 7bf961f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

packages/core/src/test/awsService/ec2/explorer/ec2ParentNode.test.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,13 @@ describe('ec2ParentNode', function () {
158158
})
159159

160160
it('does refresh explorer when timer goes and status changed', async function () {
161-
sinon.assert.notCalled(refreshStub)
162161
const statusUpdateStub = sinon.stub(Ec2Client.prototype, 'getInstanceStatus').resolves('running')
163-
testNode.pollingSet.add('0')
162+
const instances = [{ Name: 'firstOne', InstanceId: '0', LastSeenStatus: 'pending' }]
163+
164+
getInstanceStub.resolves(mapToInstanceCollection(instances))
165+
await testNode.updateChildren()
166+
167+
sinon.assert.notCalled(refreshStub)
164168
await clock.tickAsync(6000)
165169
sinon.assert.called(refreshStub)
166170
statusUpdateStub.restore()

0 commit comments

Comments
 (0)