Skip to content

Commit

Permalink
chore: Use sets, not lists, to define jobs (dfinity#1314)
Browse files Browse the repository at this point in the history
as hydra doesn’t like lists, it wants names for all jobs. Fixes dfinity#1309.
  • Loading branch information
nomeata authored Jan 20, 2021
1 parent cb8bcf6 commit c5be319
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
8 changes: 4 additions & 4 deletions e2e/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ let
assets = lib.gitOnlySource ./assets;
};
in
[
(import ./tests-dfx args)
(import ./tests-replica args)
]
{
dfx = import ./tests-dfx args;
replica = import ./tests-replica args;
}
5 changes: 3 additions & 2 deletions e2e/tests-dfx/build.bash
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,9 @@ teardown() {

@test "build succeeds with URL as network parameter" {
dfx_start
dfx canister --network http://127.0.0.1:${REPLICA_PORT} create --all
assert_command dfx build --network http://127.0.0.1:${REPLICA_PORT}
webserver_port=$(cat .dfx/webserver-port)
dfx canister --network http://127.0.0.1:$webserver_port create --all
assert_command dfx build --network http://127.0.0.1:$webserver_port
}

@test "build succeeds when requested network is configured" {
Expand Down
6 changes: 3 additions & 3 deletions e2e/tests-dfx/ping.bash
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ teardown() {
}

@test "dfx ping can have a URL for network to ping" {
dfx_start --host 127.0.0.1:12346

assert_command dfx ping http://127.0.0.1:12346
dfx_start
webserver_port=$(cat .dfx/webserver-port)
assert_command dfx ping http://127.0.0.1:$webserver_port
assert_match "\"ic_api_version\""
}
5 changes: 3 additions & 2 deletions e2e/tests-dfx/provider.bash
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ teardown() {

@test "network as URL creates the expected name" {
dfx_start
dfx canister --network http://127.0.0.1:${REPLICA_PORT} create --all
[ -d ".dfx/http___127_0_0_1_${REPLICA_PORT}" ]
webserver_port=$(cat .dfx/webserver-port)
dfx canister --network http://127.0.0.1:$webserver_port create --all
[ -d ".dfx/http___127_0_0_1_$webserver_port" ]
}
2 changes: 0 additions & 2 deletions e2e/utils/_.bash
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ dfx_start() {
printf "Replica Configured Port: %s\n" "${port}"
printf "Webserver Configured Port: %s\n" "${webserver_port}"

export REPLICA_PORT=${webserver_port}

timeout 5 sh -c \
"until nc -z localhost ${port}; do echo waiting for replica; sleep 1; done" \
|| (echo "could not connect to replica on port ${port}" && exit 1)
Expand Down
2 changes: 1 addition & 1 deletion shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ in
pkgs.mkCompositeShell {
name = "dfinity-sdk-env";
inputsFrom = pkgs.stdenv.lib.attrValues packages.shells;
buildInputs = [ pkgs.nix-fmt ];
nativeBuildInputs = [ pkgs.nix-fmt ];
}

0 comments on commit c5be319

Please sign in to comment.