Skip to content

Commit

Permalink
Create tmp dir in docker container and include bash
Browse files Browse the repository at this point in the history
  • Loading branch information
owickstrom committed Nov 5, 2022
1 parent 7289672 commit 0c653e4
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 20 deletions.
15 changes: 8 additions & 7 deletions default.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
{ pkgs ? (import ./nix/nixpkgs.nix)
, specstrom ? import ./nix/specstrom.nix
, chromedriver ? pkgs.chromedriver
, includeBrowsers ? true
}:
{ pkgs ? (import ./nix/nixpkgs.nix), specstrom ? import ./nix/specstrom.nix
, chromedriver ? pkgs.chromedriver, includeBrowsers ? true }:
let
poetry2nix = import ./nix/poetry2nix.nix { inherit pkgs; };

Expand Down Expand Up @@ -44,8 +41,12 @@ let
docker = pkgs.dockerTools.buildImage {
name = "quickstrom/quickstrom";
tag = "latest";
contents =
[ pkgs.coreutils (quickstrom-wrapped { includeBrowsers = true; }) ];
extraCommands = "mkdir -m 0777 tmp";
contents = [
pkgs.coreutils
pkgs.bash
(quickstrom-wrapped { includeBrowsers = true; })
];
config = { Cmd = [ "quickstrom" ]; };
};
in {
Expand Down
22 changes: 9 additions & 13 deletions docs/source/tutorials/first.rst
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,10 @@ Let's run some tests! Launch Quickstrom from within your
$ docker run --rm \
-v $PWD:/my-first-spec \
quickstrom/quickstrom \
quickstrom check \
/my-first-spec/AudioPlayer.spec.purs \
/my-first-spec/AudioPlayer.html \
quickstrom/quickstrom:0.5.0 \
quickstrom -I/my-first-spec check \
audioplayer \
/my-first-spec/audioplayer.html \
--browser=chrome
You should see output like the following:
Expand Down Expand Up @@ -277,16 +277,12 @@ Run Quickstrom again, now that we've fleshed out the specification:
.. code-block:: console
$ docker run --rm \
--network quickstrom \
-v $PWD:/my-first-spec \
quickstrom/quickstrom \
quickstrom check \
--webdriver-host=webdriver \
--webdriver-path=/wd/hub \
--browser=chrome \
--tests=5 \
/my-first-spec/AudioPlayer.spec.purs \
/my-first-spec/AudioPlayer.html
quickstrom/quickstrom:0.5.0 \
quickstrom -I/my-first-spec check \
audioplayer \
/my-first-spec/audioplayer.html \
--browser=chrome
You'll see a bunch of output, involving shrinking tests and more. It
should end with something like the following:
Expand Down

0 comments on commit 0c653e4

Please sign in to comment.