test: make sure /_/candid interface is available with dfx start
`dfx start` and `dfx bootstrap` both provide access to the candid interface through the `/_/candid` web endpoint, but we only have an e2e test for `dfx bootstrap`.  This adds a test for the same behavior with `dfx start`.
@@ -14,6 +14,20 @@ teardown() {
standard_teardown
}
+@test "candid interface available through dfx start" {
+ dfx_start
+
+ assert_command dfx deploy
+
+ ID=$(dfx canister id hello)
+ PORT=$(cat .dfx/webserver-port)
+ assert_command curl http://localhost:"$PORT"/_/candid?canisterId="$ID" -o ./web.txt
+ assert_command diff .dfx/local/canisters/hello/hello.did ./web.txt
+ assert_command curl http://localhost:"$PORT"/_/candid?canisterId="$ID"\&format=js -o ./web.txt
+ # Relax diff as it's produced by two different compilers.
+ assert_command diff --ignore-all-space --ignore-blank-lines .dfx/local/canisters/hello/hello.did.js ./web.txt
+}
+
@test "dfx restarts the replica" {
[ "$USE_IC_REF" ] && skip "skip for ic-ref"
