Skip to content

Commit 4fb0594

Browse files
committed
avoid writing sam.json
1 parent bd22485 commit 4fb0594

File tree

2 files changed

+10
-239
lines changed

2 files changed

+10
-239
lines changed

sam.json

Lines changed: 0 additions & 239 deletions
This file was deleted.

test/unit/credentials-structure-test.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,25 @@ let mockAwsLite = (args) => {
1313
})
1414
}
1515

16+
// Mock the SAM module directly to prevent sam.json file creation
17+
let mockSam = proxyquire('../../src/sam', {
18+
'./00-before': (params, callback) => {
19+
// Skip file writing, just call callback with dry-run result
20+
callback(null, 'dry-run')
21+
},
22+
})
23+
1624
let deploy = proxyquire('../../', {
1725
'@aws-lite/client': mockAwsLite,
26+
'./src/sam': mockSam,
1827
})
1928

2029
test('deploy.sam credentials accepted', async t => {
2130
t.plan(3)
2231
let inv = await inventory({
2332
rawArc: '@app\ntest-app\n@static',
2433
deployStage: 'staging',
34+
shouldHydrate: false,
2535
})
2636
await deploy.sam({
2737
credentials: {

0 commit comments

Comments
 (0)