log any missing files

This commit is contained in:
Brian Gough
2017-09-07 13:51:36 +01:00
parent 0fac2655f7
commit acab9d45a0
4 changed files with 33 additions and 13 deletions

View File

@@ -32,7 +32,6 @@ describe "ResourceWriter", ->
]
@ResourceWriter._writeResourceToDisk = sinon.stub().callsArg(3)
@ResourceWriter._removeExtraneousFiles = sinon.stub().callsArg(2)
@ResourceStateManager.checkProjectStateHashMatches = sinon.stub().callsArg(2)
@ResourceStateManager.saveProjectStateHash = sinon.stub().callsArg(3)
@ResourceWriter.syncResourcesToDisk({
project_id: @project_id
@@ -65,9 +64,10 @@ describe "ResourceWriter", ->
"resource-1-mock"
]
@ResourceWriter._writeResourceToDisk = sinon.stub().callsArg(3)
@ResourceWriter._removeExtraneousFiles = sinon.stub().callsArg(2)
@ResourceWriter._removeExtraneousFiles = sinon.stub().callsArgWith(2, null, @outputFiles = [], @allFiles = [])
@ResourceStateManager.checkProjectStateHashMatches = sinon.stub().callsArgWith(2, null, @resources)
@ResourceStateManager.saveProjectStateHash = sinon.stub().callsArg(3)
@ResourceStateManager.checkResourceFiles = sinon.stub().callsArg(3)
@ResourceWriter.syncResourcesToDisk({
project_id: @project_id,
syncType: "incremental",
@@ -85,6 +85,11 @@ describe "ResourceWriter", ->
.calledWith(@resources, @basePath)
.should.equal true
it "should check each resource exists", ->
@ResourceStateManager.checkResourceFiles
.calledWith(@resources, @allFiles, @basePath)
.should.equal true
it "should write each resource to disk", ->
for resource in @resources
@ResourceWriter._writeResourceToDisk