-
Notifications
You must be signed in to change notification settings - Fork 285
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
initial git over slapi endpoints behind /slapigit
Summary: We want to be able to distinguish if we're using git over edenapi or regular edenapi, but reuse all the code we can at the same time. This puts the info which flavour of the protocol we speak in the `State` which later on handlers can read if they want to. We can also straight away block or allow handlers. Reviewed By: lmvasquezg Differential Revision: D63995106 fbshipit-source-id: 95006537bd30bf71b575af39f9e90bbf3e592d40
- Loading branch information
1 parent
0312b19
commit af4af4c
Showing
6 changed files
with
152 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Copyright (c) Meta Platforms, Inc. and affiliates. | ||
# | ||
# This software may be used and distributed according to the terms of the | ||
# GNU General Public License found in the LICENSE file in the root | ||
# directory of this source tree. | ||
|
||
$ . "${TEST_FIXTURES}/library.sh" | ||
|
||
Start up SaplingRemoteAPI server. | ||
$ setup_mononoke_config | ||
$ start_and_wait_for_mononoke_server | ||
List repos. | ||
$ sslcurl -s "https://localhost:$MONONOKE_SOCKET/slapigit/repos" | ||
{"message":"Unsupported SaplingRemoteApi flavour","request_id":"*"} (no-eol) (glob) | ||
Test request with a missing mandatory header | ||
$ sslcurl_noclientinfo_test -s "https://localhost:$MONONOKE_SOCKET/slapigit/repos" | ||
{"message:"Error: X-Client-Info header not provided or wrong format (expected json)."} (no-eol) | ||
Test that health check request still passes | ||
$ sslcurl_noclientinfo_test -s "https://localhost:$MONONOKE_SOCKET/edenapi/health_check" | ||
I_AM_ALIVE (no-eol) | ||
$ sslcurl -s "https://localhost:$MONONOKE_SOCKET/slapigit/health_check" | ||
I_AM_ALIVE (no-eol) | ||
$ sslcurl -X POST -s "https://localhost:$MONONOKE_SOCKET/slapigit/repo/trees" | ||
{"message":"Unsupported SaplingRemoteApi flavour","request_id":"*"} (no-eol) (glob) | ||
$ sslcurl -X POST -s "https://localhost:$MONONOKE_SOCKET/slapigit/repo/commit/location_to_hash" | ||
{"message":"Unsupported SaplingRemoteApi flavour","request_id":"*"} (no-eol) (glob) |