Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mononoke/integration tests: fix returning different output in OSS cases in tests #60

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions eden/mononoke/tests/integration/library.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ fi

ALLOWED_IDENTITY_TYPE="${FB_ALLOWED_IDENTITY_TYPE:-X509_SUBJECT_NAME}"
ALLOWED_IDENTITY_DATA="${FB_ALLOWED_IDENTITY_DATA:-CN=localhost,O=Mononoke,C=US,ST=CA}"
JSON_CLIENT_ID="${FB_JSON_CLIENT_ID:-[\"X509_SUBJECT_NAME:CN=localhost,O=Mononoke,C=US,ST=CA\"]}"

if [[ -n "$DB_SHARD_NAME" ]]; then
MONONOKE_DEFAULT_START_TIMEOUT=60
Expand Down Expand Up @@ -1648,6 +1649,12 @@ function summarize_scuba_json() {
jq -S "if (.normal.log_tag | match(\"^($interesting_tags)\$\")) then ${key_spec:3} else empty end"
}

if [ -z "$HAS_FB" ]; then
function format_single_scuba_sample() {
jq -S .
}
fi

function regenerate_hg_filenodes() {
"$MONONOKE_REGENERATE_HG_FILENODES" \
"${COMMON_ARGS[@]}" \
Expand Down
7 changes: 1 addition & 6 deletions eden/mononoke/tests/integration/run_tests_getdeps.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,7 @@ def get_test_groups(repo_root):
"test-walker-count-objects.t",
"test-walker-error-as-data.t",
},
TestGroup.BROKEN: {
"test-fastreplay-inline-args.t", # Returns different data in OSS
"test-remotefilelog-lfs-client-certs.t", # Returns different data in OSS
"test-server.t", # Returns different data in OSS
"test-unbundle-replay-hg-recording.t", # Returns different data in OSS
},
TestGroup.BROKEN: set(),
}

if platform == "darwin":
Expand Down
7 changes: 2 additions & 5 deletions eden/mononoke/tests/integration/test-fastreplay-inline-args.t
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Test a few more options
Replay Succeeded

Check logging structure
$ grep "Replay Succeeded" "$fastreplay_log" | grep gettreepack | head -n 1 | jq .
$ grep "Replay Succeeded" "$fastreplay_log" | grep gettreepack | head -n 1 | format_single_scuba_sample
{
"int": {
"completion_time_us": *, (glob)
Expand All @@ -57,15 +57,12 @@ Check logging structure
"time": * (glob)
},
"normal": {
"build_revision": *, (glob)
"build_rule": *, (glob)
"command": "gettreepack",
"command_args": "[{\"basemfnodes\":\"\",\"depth\":\"65536\",\"directories\":\"\",\"mfnodes\":\"7c9b4fd8b49377e2fead2e9610bb8db910a98c53\",\"rootdir\":\"\"}]",
"log_tag": "Replay Succeeded",
"recorded_mononoke_session_id": *, (glob)
"recorded_server": "mononoke",
"reponame": "repo",
"server_hostname": * (glob)
"reponame": "repo"
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,8 @@ Now, remove the killswitch. This will work
Finally, check what identities the client presented.

$ wait_for_json_record_count "$TESTTMP/scuba.json" 2
$ jq -S .normvector.client_identities "$TESTTMP/scuba.json"
[
"MACHINE:devvm000.lla0.facebook.com",
"MACHINE_TIER:devvm",
"USER:myusername0"
]
[
"MACHINE:devvm000.lla0.facebook.com",
"MACHINE_TIER:devvm",
"USER:myusername0"
]
$ diff <(
> jq -S .normvector.client_identities "$TESTTMP/scuba.json"
> ) <(
> printf "$JSON_CLIENT_ID\n$JSON_CLIENT_ID" | jq -S .
> )
64 changes: 0 additions & 64 deletions eden/mononoke/tests/integration/test-server.t

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ Check history again. We're back to where we were:
(master_bookmark) 7a8f33ce453248a6f5cc4747002e931c77234fbd pushrebase * (glob)
(master_bookmark) 26805aba1e600a82e93661149f2313866a221a7b blobimport * (glob)

$ jq -S . < $TESTTMP/scuba.json
$ format_single_scuba_sample < $TESTTMP/scuba.json
{
"int": {
"age_s": *, (glob)
Expand All @@ -105,10 +105,7 @@ Check history again. We're back to where we were:
},
"normal": {
"bookmark": "master_bookmark",
"build_revision": *, (glob)
"build_rule": "fbcode:eden/mononoke/unbundle_replay:unbundle_replay",
"from_cs_id": "c3384961b16276f2db77df9d7c874bbe981cf0525bd6f84a502f919044f2dabd",
"server_hostname": *, (glob)
"to_cs_id": "604bc07f395768cd320516a640bef6a1af75d13b4214d44ae3faa2a36f1203bb"
}
}