diff --git a/test/e2e.spec.ts b/test/e2e.spec.ts index 6cfe94d7..7cca2656 100644 --- a/test/e2e.spec.ts +++ b/test/e2e.spec.ts @@ -111,4 +111,11 @@ export class E2EConnectorSpec { return indexSamples(httpClient, {to: 'http://localhost', samples: './node_modules/@openstapps/core/test/resources'}) .should.be.rejectedWith(ApiError); } + + @test + async indexShouldFailDirectoryWithoutData() { + return indexSamples(httpClient, {to: 'http://localhost', samples: './test/emptyDir/'}) + .should.be.rejectedWith('Could not index samples. None were retrived from the file system.'); + } + } diff --git a/test/emptyDir/.gitignore b/test/emptyDir/.gitignore new file mode 100644 index 00000000..86d0cb27 --- /dev/null +++ b/test/emptyDir/.gitignore @@ -0,0 +1,4 @@ +# Ignore everything in this directory +* +# Except this file +!.gitignore \ No newline at end of file