sapling/eden/scm/tests/test-cats.t
Jordan Webster 6911b9e41b status: enable rust status by default in tests
Summary: And disable it for tests that fail. We can fix these tests incrementally moving forwards.

Reviewed By: DurhamG

Differential Revision: D37952660

fbshipit-source-id: 454d8cc6db1ea5a1ec2ceadf047dc1b62744c484
2022-08-03 13:12:34 -07:00

35 lines
1.1 KiB
Perl

#chg-compatible
#if no-windows
$ setconfig workingcopy.ruststatus=False
$ disable treemanifest
$ configure dummyssh
#require serve
#require bucktest
$ hg init test
$ cd test
$ echo foo>foo
$ hg addremove
adding foo
$ hg commit -m 1
$ hg verify
warning: verify does not actually check anything in this repo
$ cert="${HGTEST_CERTDIR}/localhost.crt"
$ cert_key="${HGTEST_CERTDIR}/localhost.key"
$ PROXY_PORT=$(shuf -i 60002-65530 -n 1)
$ printf "HTTP/1.1 401 Unauthorized\r\n\r\n" | ncat -lkv --ssl-cert "$cert" --ssl-key "$cert_key" localhost "$PROXY_PORT" 1>/dev/null 2>/dev/null &
$ echo "$!" >> "$DAEMON_PIDS"
$ echo '{"crypto_auth_tokens": "cats"}' > cats
$ cats_file="$(pwd)/cats"
$ hg push --config http.verbose=True --config cats.some.priority=1 --config cats.some.path="$cats_file" --insecure --config paths.default=mononoke://localhost:$PROXY_PORT/test --config auth.mononoke.cert=$cert --config auth.mononoke.key=$cert_key --config auth.mononoke.prefix=mononoke://* 2> /dev/null | grep -o "x-forwarded-cats: cats"
x-forwarded-cats: cats
#endif