Skip to content

test spec

nupthale edited this page May 9, 2019 · 1 revision

create

application

should create a dir called app

should create a file called rda.config.js

  • should contain container prop with name and docs value

  • should contain docker prop with ports value

  • should contain an empty suites prop

should create an readme.md file

should gen .gitignore file

should gen pre-commit file in .git dir

should run rde lint without error

container

should create app/template dir, and a rdc.config.js file

should create a file called rdc.config.js

  • should contain framework prop

  • should contain docker prop with tag

  • should contain docker prop with empty ports

  • should contain a empty mapping prop

should create an readme.md file

should gen .gitignore file

should gen pre-commit file in .git dir

should run rde lint without error

extends(不做)

  • should create app/template dir

  • should create rdc.config.js

    • should contain extends prop with value

    • should create

suite

run

should throw error if no config file found

should create .cache dir with Dockerfile, docker-compose.yml, package.json, .cache file

should create node_modules dir in /usr/rde

isApp

should create app dir and rda.config.js file in rdc dir

should create .rde dir in docker image

isContainer

should volumn app dir and template dir and rdc.config.js to docker

should not contain .rde dir at first

should create .rde dir after run

should create /tmp/rde_rdc_tmp dir

should run rde lint without error

when to rebuild

should rebuild when local cache file not exist

should rebuild when local package.json in cache has changed

should rebuild when rdc version changed if app

should rebuild when rdc extends has changed if container

docker:run

isApp

should not regen .rde dir if .rde dir exist

should volumn app dir and copy to .rde

isContainer

should call composeRdcChain & renderDir

should volumn app and template and rdc.config.js and copy to .rde

should call watcher start if run with -w flag

publish

precheck

should check dir structure

  • should throw error if app/template is empty or not exist

  • should throw error if rdc.config.js file not found

should check rdc.config.js

  • should throw error if framework prop does not exist or empty

  • should throw error if docs prop does not exist or empty

  • should throw error if mappings prop not exist

    • should throw error if ‘from’ does not start with app

    • should throw error if ‘to’ start with template

  • should throw error if docker prop not exist or tag and ports not exist

should throw error if run without -tag flag

should gen dockerfile

Clone this wiki locally