Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tests to the nodejs-function meta-buildpack (#44)
* Add tests to the nodejs-function meta-buildpack Ticket: https://gus.lightning.force.com/lightning/r/ADM_Work__c/a07AH0000008mOuYAI/view The "regular" nodejs metabuildpack is already tested under test/meta-buildpack/nodejs. This adds local files to ensure that the functions metabuildpack can be built without errors. * Make nodejs-function not depend on heroku/nodejs * Swap test and regular buildpack.toml Before we were accidentally using the docker images in test: ``` $ pack buildpack package test --config test/meta-buildpacks/nodejs-function/package.toml -v Downloading buildpack from URI: file:///Users/rschneeman/Documents/projects/work/cnb/buildpacks-nodejs/test/meta-buildpacks/nodejs-function Downloading buildpack from image: public.ecr.aws/heroku-buildpacks/heroku-nodejs-engine-buildpack@sha256:4fa85f23b1df1138039ec6f5667da48da2af7858767b8840a754c54b39b42ca1 Pulling image public.ecr.aws/heroku-buildpacks/heroku-nodejs-engine-buildpack@sha256:4fa85f23b1df1138039ec6f5667da48da2af7858767b8840a754c54b39b42ca1 public.ecr.aws/heroku-buildpacks/heroku-nodejs-engine-buildpack@sha256:4fa85f23b1df1138039ec6f5667da48da2af7858767b8840a754c54b39b42ca1: Pulling from heroku-buildpacks/heroku-nodejs-engine-buildpack Digest: sha256:4fa85f23b1df1138039ec6f5667da48da2af7858767b8840a754c54b39b42ca1 Status: Image is up to date for public.ecr.aws/heroku-buildpacks/heroku-nodejs-engine-buildpack@sha256:4fa85f23b1df1138039ec6f5667da48da2af7858767b8840a754c54b39b42ca1 Downloading buildpack from image: public.ecr.aws/heroku-buildpacks/heroku-nodejs-npm-buildpack@sha256:248ce84d07d2b9a11ca2433aee91bec48b2e029aac968e14f57711fe4270159a Pulling image public.ecr.aws/heroku-buildpacks/heroku-nodejs-npm-buildpack@sha256:248ce84d07d2b9a11ca2433aee91bec48b2e029aac968e14f57711fe4270159a public.ecr.aws/heroku-buildpacks/heroku-nodejs-npm-buildpack@sha256:248ce84d07d2b9a11ca2433aee91bec48b2e029aac968e14f57711fe4270159a: Pulling from heroku-buildpacks/heroku-nodejs-npm-buildpack Digest: sha256:248ce84d07d2b9a11ca2433aee91bec48b2e029aac968e14f57711fe4270159a Status: Image is up to date for public.ecr.aws/heroku-buildpacks/heroku-nodejs-npm-buildpack@sha256:248ce84d07d2b9a11ca2433aee91bec48b2e029aac968e14f57711fe4270159a Downloading buildpack from image: public.ecr.aws/heroku-buildpacks/heroku-nodejs-typescript-buildpack@sha256:accfc74412af9702c86d370f6289dc9674acc33023369e68f9687b6b4a1b63bd Pulling image public.ecr.aws/heroku-buildpacks/heroku-nodejs-typescript-buildpack@sha256:accfc74412af9702c86d370f6289dc9674acc33023369e68f9687b6b4a1b63bd public.ecr.aws/heroku-buildpacks/heroku-nodejs-typescript-buildpack@sha256:accfc74412af9702c86d370f6289dc9674acc33023369e68f9687b6b4a1b63bd: Pulling from heroku-buildpacks/heroku-nodejs-typescript-buildpack Digest: sha256:accfc74412af9702c86d370f6289dc9674acc33023369e68f9687b6b4a1b63bd Status: Image is up to date for public.ecr.aws/heroku-buildpacks/heroku-nodejs-typescript-buildpack@sha256:accfc74412af9702c86d370f6289dc9674acc33023369e68f9687b6b4a1b63bd Downloading buildpack from image: docker.io/heroku/streaming-http-adapter-buildpack:1.4.0 Pulling image docker.io/heroku/streaming-http-adapter-buildpack:1.4.0 1.4.0: Pulling from heroku/streaming-http-adapter-buildpack Digest: sha256:74afa72b64c4322a75c75174334ea58d590a5419bf0269543ec73c2ebc184692 Status: Image is up to date for heroku/streaming-http-adapter-buildpack:1.4.0 Downloading buildpack from image: docker.io/heroku/node-function-buildpack:1.5.0 Pulling image docker.io/heroku/node-function-buildpack:1.5.0 1.5.0: Pulling from heroku/node-function-buildpack Digest: sha256:5ca5d43c012cdd863c3e86289688dba2e7f337a718842b07741f07d1eeccf6a2 Status: Image is up to date for heroku/node-function-buildpack:1.5.0 Downloading buildpack from URI: https://github.com/forcedotcom/nodejs-sf-fx-buildpack/releases/download/v2.0.6/nodejs-sf-fx-buildpack-v2.0.6.tgz Using cached version of https://github.com/forcedotcom/nodejs-sf-fx-buildpack/releases/download/v2.0.6/nodejs-sf-fx-buildpack-v2.0.6.tgz Successfully created package test ``` With this change we're now pointing the "regular" function buildpack at docker and the test buildpack at the location on disk: ``` $ pack buildpack package test --config test/meta-buildpacks/nodejs-function/package.toml -v Downloading buildpack from URI: file:///Users/rschneeman/Documents/projects/work/cnb/buildpacks-nodejs/test/meta-buildpacks/nodejs-function Downloading buildpack from URI: file:///Users/rschneeman/Documents/projects/work/cnb/buildpacks-nodejs/buildpacks/nodejs Downloading buildpack from URI: file:///Users/rschneeman/Documents/projects/work/cnb/buildpacks-nodejs/buildpacks/npm Downloading buildpack from URI: file:///Users/rschneeman/Documents/projects/work/cnb/buildpacks-nodejs/buildpacks/typescript Downloading buildpack from image: docker.io/heroku/streaming-http-adapter-buildpack:1.4.0 Pulling image docker.io/heroku/streaming-http-adapter-buildpack:1.4.0 1.4.0: Pulling from heroku/streaming-http-adapter-buildpack Digest: sha256:74afa72b64c4322a75c75174334ea58d590a5419bf0269543ec73c2ebc184692 Status: Image is up to date for heroku/streaming-http-adapter-buildpack:1.4.0 Downloading buildpack from image: docker.io/heroku/node-function-buildpack:1.5.0 Pulling image docker.io/heroku/node-function-buildpack:1.5.0 1.5.0: Pulling from heroku/node-function-buildpack Digest: sha256:5ca5d43c012cdd863c3e86289688dba2e7f337a718842b07741f07d1eeccf6a2 Status: Image is up to date for heroku/node-function-buildpack:1.5.0 Downloading buildpack from URI: https://github.com/forcedotcom/nodejs-sf-fx-buildpack/releases/download/v2.0.6/nodejs-sf-fx-buildpack-v2.0.6.tgz Using cached version of https://github.com/forcedotcom/nodejs-sf-fx-buildpack/releases/download/v2.0.6/nodejs-sf-fx-buildpack-v2.0.6.tgz ERROR: saving image: buildpack heroku/[email protected] references buildpack heroku/[email protected] which is not present ⛄ 3.0.1 🚀 ~/Documents/projects/work/cnb/buildpacks-nodejs (schneems/node-function-invoker-smoke-test) $ pack buildpack package test --config test/meta-buildpacks/nodejs-function/package.toml -v Downloading buildpack from URI: file:///Users/rschneeman/Documents/projects/work/cnb/buildpacks-nodejs/test/meta-buildpacks/nodejs-function Downloading buildpack from URI: file:///Users/rschneeman/Documents/projects/work/cnb/buildpacks-nodejs/buildpacks/nodejs Downloading buildpack from URI: file:///Users/rschneeman/Documents/projects/work/cnb/buildpacks-nodejs/buildpacks/npm Downloading buildpack from URI: file:///Users/rschneeman/Documents/projects/work/cnb/buildpacks-nodejs/buildpacks/typescript Downloading buildpack from image: docker.io/heroku/streaming-http-adapter-buildpack:1.4.0 Pulling image docker.io/heroku/streaming-http-adapter-buildpack:1.4.0 1.4.0: Pulling from heroku/streaming-http-adapter-buildpack Digest: sha256:74afa72b64c4322a75c75174334ea58d590a5419bf0269543ec73c2ebc184692 Status: Image is up to date for heroku/streaming-http-adapter-buildpack:1.4.0 Downloading buildpack from image: docker.io/heroku/node-function-buildpack:1.5.0 Pulling image docker.io/heroku/node-function-buildpack:1.5.0 1.5.0: Pulling from heroku/node-function-buildpack Digest: sha256:5ca5d43c012cdd863c3e86289688dba2e7f337a718842b07741f07d1eeccf6a2 Status: Image is up to date for heroku/node-function-buildpack:1.5.0 Downloading buildpack from URI: https://github.com/forcedotcom/nodejs-sf-fx-buildpack/releases/download/v2.0.6/nodejs-sf-fx-buildpack-v2.0.6.tgz Using cached version of https://github.com/forcedotcom/nodejs-sf-fx-buildpack/releases/download/v2.0.6/nodejs-sf-fx-buildpack-v2.0.6.tgz Successfully created package test ``` Co-authored-by: Manuel Fuchs <[email protected]>
- Loading branch information