Skip to content

Commit d370128

Browse files
committed
fix test
1 parent a2fd132 commit d370128

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

tests/Feature/Vaults/AwsSsmVaultTest.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,7 @@
281281
'Value' => 'new-secret-value',
282282
'Type' => 'SecureString',
283283
'Overwrite' => true,
284+
'KeyId' => null,
284285
])
285286
->andReturn(new Result([]));
286287

@@ -313,6 +314,7 @@
313314
'Value' => 'plain-value',
314315
'Type' => 'String',
315316
'Overwrite' => true,
317+
'KeyId' => null,
316318
])
317319
->andReturn(new Result([]));
318320

@@ -364,6 +366,9 @@
364366
// Mock the putParameter and getParameter calls that set() will make
365367
$this->mockClient->shouldReceive('putParameter')
366368
->once()
369+
->with(\Mockery::on(function ($params) {
370+
return $params['KeyId'] === null;
371+
}))
367372
->andReturn(new Result([]));
368373

369374
$getResult = new Result([
@@ -407,7 +412,7 @@
407412
$this->mockClient->shouldReceive('putParameter')
408413
->once()
409414
->with(\Mockery::on(function ($params) use ($unicodeValue) {
410-
return $params['Value'] === $unicodeValue;
415+
return $params['Value'] === $unicodeValue && $params['KeyId'] === null;
411416
}))
412417
->andReturn(new Result([]));
413418

@@ -433,7 +438,7 @@
433438
$this->mockClient->shouldReceive('putParameter')
434439
->once()
435440
->with(\Mockery::on(function ($params) {
436-
return $params['Value'] === '';
441+
return $params['Value'] === '' && $params['KeyId'] === null;
437442
}))
438443
->andReturn(new Result([]));
439444

0 commit comments

Comments
 (0)