-
Notifications
You must be signed in to change notification settings - Fork 98
Expand file tree
/
Copy pathinfo.bash
More file actions
48 lines (36 loc) · 1.04 KB
/
info.bash
File metadata and controls
48 lines (36 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/usr/bin/env bats
load ../utils/_
setup() {
standard_setup
dfx_new
}
teardown() {
dfx_stop
standard_teardown
}
@test "displays the replica port" {
assert_command_fail dfx info replica-port
assert_contains "No replica port found"
dfx_start
assert_command dfx info replica-port
assert_eq "$(get_replica_port)"
}
@test "displays the default webserver port for the local shared network" {
assert_command dfx info webserver-port
assert_eq "4943"
}
@test "displays the webserver port for a project-specific network" {
define_project_network
assert_command dfx info webserver-port
assert_eq "8000"
}
@test "displays path to networks.json" {
assert_command dfx info networks-json-path
assert_eq "$E2E_NETWORKS_JSON"
}
@test "displays the replica revision included in dfx" {
nix_sources_path="${BATS_TEST_DIRNAME}/../../nix/sources.json"
expected_rev="$(jq -r '."replica-x86_64-linux".rev' "$nix_sources_path")"
assert_command dfx info replica-rev
assert_eq "$expected_rev"
}