* Find a file that exists on all projects so we can test if Docker can see it too * @param {string} servicePath * @return {string} file name
(servicePath, pluginInstance)
| 61 | * @return {string} file name |
| 62 | */ |
| 63 | function findTestFile(servicePath, pluginInstance) { |
| 64 | if (fse.pathExistsSync(path.join(servicePath, 'serverless.yml'))) { |
| 65 | return 'serverless.yml' |
| 66 | } |
| 67 | if (fse.pathExistsSync(path.join(servicePath, 'serverless.yaml'))) { |
| 68 | return 'serverless.yaml' |
| 69 | } |
| 70 | if (fse.pathExistsSync(path.join(servicePath, 'serverless.json'))) { |
| 71 | return 'serverless.json' |
| 72 | } |
| 73 | if (fse.pathExistsSync(path.join(servicePath, 'requirements.txt'))) { |
| 74 | return 'requirements.txt' |
| 75 | } |
| 76 | throw new ServerlessError( |
| 77 | 'Unable to find serverless.{yml|yaml|json} or requirements.txt for getBindPath()', |
| 78 | 'PYTHON_REQUIREMENTS_MISSING_GET_BIND_PATH_FILE', |
| 79 | { stack: false }, |
| 80 | ) |
| 81 | } |
| 82 | |
| 83 | /** |
| 84 | * Test bind path to make sure it's working |
no outgoing calls
no test coverage detected
searching dependent graphs…