#### integration testing This repository contains integration tests that validate the argo stack. It leverages the argopkgs repo, but overrides some sources in it with their master branch counterparts. see file `default.nix` for details. The intended usage is to override (some of) the source(s) with WIP version(s), as part of development or continuous integration. This gitlab CI snippets shows how to do this on a nix-enabled runner. Mind that this setup tracks argotest master. ``` {.yml} integration.test: stage: test script: - BUILD=$PWD - git clone https://xgitlab.cels.anl.gov/argo/argotest.git - cd argotest - nix-shell -A test --run "./argotk.hs helloworld" --arg nrm-src ../. artifacts: paths: - argotest/_output/cmd_err.log - argotest/_output/cmd_out.log - argotest/_output/daemon_out.log - argotest/_output/daemon_out.log - argotest/_output/nrm.log - argotest/_output/time.log expire_in: 1 week except: - /^wip\/.*/ - /^WIP\/.*/ tags: - integration ``` Standalone usage: example with the nrm source in `../`, provision the dependencies using: ``` {.bash} nix-shell -A test --arg nrm-src ../nrm ``` Then use the tool: ``` {.bash} ./argotk.hs --help ``` Output: ``` {.txt} Usage: argotk.hs COMMAND Available options: COMMAND Type of action to run -h,--help Show this help text Available commands: clean Clean sockets, logfiles. daemon Set up and launch the daemon in synchronous mode, with properly cleaned sockets, logfiles. application Setup stack and run an arbitrary command in a container. helloworld Test 1: Setup stack and check that hello world app sends message back to cmd. ``` ``` {.bash} ./argotk.hs helloworld --help ``` ``` {.txt} Usage: argotk.hs helloworld Test 1: Setup stack and check that hello world app sends message back to cmd. Available options: -h,--help Show this help text ``` ``` {.bash} ./argotk.hs application --help ``` ``` {.txt} Usage: argotk.hs application COMMAND Setup stack and run an arbitrary command in a container. Available options: COMMAND Application to run inside the container -h,--help Show this help text ``` ##### Hacking - edit `.README.md` in place of README.md. - the ./shake.hs build file takes care of a few things for the development workflow (readme and completion generation).