This is the first version patch to add an integration test for bins package. The test
is following the steps in https://github.com/alexjg/linkd-playground. This version covers the steps
before we git push the local changes and do git clone.
This test is not embedded in CI workflow yet. Run `cargo test` (recommend `cargo test -- --nocapture`)
under bins to execute the test.
Han Xu (1):
basic integration test for bins
bins/Cargo.lock | 29 +++
bins/Cargo.toml | 1 +
bins/tests/Cargo.toml | 13 ++
bins/tests/integration_test.rs | 392 +++++++++++++++++++++++++++++++++
4 files changed, 435 insertions(+)
create mode 100644 bins/tests/Cargo.toml
create mode 100644 bins/tests/integration_test.rs
--
2.32.0 (Apple Git-132)
[PATCH radicle-link v1 1/1] basic integration test for bins
Finally I got the full test working, with the same steps as in Alex's
playground script, except it is done in Rust now and we can just run
`cargo test`.
Also, thanks to Alex's pointer to a git version check, I found a bug that
it turns out that git version 2.25.1 (Ubuntu 20.04) or version 2.30.1
(Debian 11) can support our request-pull with no problem. But the Git
version checking code in link-git/src/protocol/ls.rs and fetch.rs
will insert namespaces into the refs. As the result, `linkd` on the seed
will panic and `request-pull` will fail.
Please see the test case doc comments for more details. Here is a log of
running this test, so that you can see what the test looks like.
================= TEST LOG =====================================
radicle-link/bins/tests (integration-test) $ cargo test -- --nocapture
Compiling tests v0.1.0 (/home/pi/work/radicle-link/bins/tests)
Finished test [unoptimized + debuginfo] target(s) in 0.69s
Running integration_test.rs
(/home/pi/work/radicle-link/bins/target/debug/deps/integration_test-52234403479d7335)
running 1 test
== create lnk homes for two peers and one seed ==
/tmp/link-local-1: wrote passphase
/tmp/link-local-1: play
/tmp/link-local-1: Compiling link-git v0.1.0
(/home/pi/work/radicle-link/link-git)
/tmp/link-local-1: Compiling radicle-git-ext v0.1.0
(/home/pi/work/radicle-link/git-ext)
/tmp/link-local-1: Compiling link-crypto v0.1.0
(/home/pi/work/radicle-link/link-crypto)
/tmp/link-local-1: Compiling radicle-macros v0.1.0
(/home/pi/work/radicle-link/macros)
/tmp/link-local-1: Compiling link-replication v0.1.0
(/home/pi/work/radicle-link/link-replication)
/tmp/link-local-1: Compiling link-identities v0.1.0
(/home/pi/work/radicle-link/link-identities)
/tmp/link-local-1: Compiling cob v0.1.0 (/home/pi/work/radicle-link/cob)
/tmp/link-local-1: Compiling link-hooks v0.1.0
(/home/pi/work/radicle-link/link-hooks)
/tmp/link-local-1: Compiling link-tracking v0.1.0
(/home/pi/work/radicle-link/link-tracking)
/tmp/link-local-1: Compiling librad v0.1.0
(/home/pi/work/radicle-link/librad)
/tmp/link-local-1: Compiling lnk-clib v0.1.0
(/home/pi/work/radicle-link/cli/lnk-clib)
/tmp/link-local-1: Compiling lnk-identities v0.1.0
(/home/pi/work/radicle-link/cli/lnk-identities)
/tmp/link-local-1: Compiling lnk-profile v0.1.0
(/home/pi/work/radicle-link/cli/lnk-profile)
/tmp/link-local-1: Compiling lnk-sync v0.1.0
(/home/pi/work/radicle-link/cli/lnk-sync)
/tmp/link-local-1: Compiling lnk-exe v0.1.0
(/home/pi/work/radicle-link/cli/lnk-exe)
/tmp/link-local-1: Compiling lnk v0.1.0 (/home/pi/work/radicle-link/bins/lnk)
/tmp/link-local-1: Finished dev [unoptimized + debuginfo]
target(s) in 44.43s
/tmp/link-local-1: Running
`/home/pi/work/radicle-link/bins/target/debug/lnk profile create`
/tmp/link-local-1: please enter your passphrase: profile id:
0cd616e9-1c18-4b32-857c-470f1e719a98
/tmp/link-local-1: peer id:
hydo86fxtnqwcy3o7ut5gypre4nc1a551u9jdkoonzpjxkphfwwqiq
/tmp/link-local-2: wrote passphase
/tmp/link-local-2: play
/tmp/link-local-2: Finished dev [unoptimized + debuginfo] target(s) in 0.26s
/tmp/link-local-2: Running
`/home/pi/work/radicle-link/bins/target/debug/lnk profile create`
/tmp/link-local-2: please enter your passphrase: profile id:
9d69fbe0-7d32-40d5-bcb5-2f3164682648
/tmp/link-local-2: peer id:
hyn4ycegfgq369pczgcc5i36ztmopmwy4rktnok4cg69jowdd1oejg
/tmp/seed-home: wrote passphase
/tmp/seed-home: play
/tmp/seed-home: Finished dev [unoptimized + debuginfo] target(s) in 0.17s
/tmp/seed-home: Running
`/home/pi/work/radicle-link/bins/target/debug/lnk profile create`
test two_peers_and_a_seed has been running for over 60 seconds
/tmp/seed-home: please enter your passphrase: profile id:
e049dbbb-b426-4fd2-8f96-d863f2aa7ff9
/tmp/seed-home: peer id: hybodew66mqgue1t7a976bznwtbs7fhu3f8m9461m3fdhfbdwhqa8w
== add ssh keys for each profile to the ssh-agent ==
/tmp/link-local-1: wrote passphase
/tmp/link-local-1: play
/tmp/link-local-1: Finished dev [unoptimized + debuginfo] target(s) in 0.16s
/tmp/link-local-1: Running
`/home/pi/work/radicle-link/bins/target/debug/lnk profile ssh add`
/tmp/link-local-1: please enter your passphrase: added key for profile
id `0cd616e9-1c18-4b32-857c-470f1e719a98`
/tmp/link-local-2: wrote passphase
/tmp/link-local-2: play
/tmp/link-local-2: Finished dev [unoptimized + debuginfo] target(s) in 0.18s
/tmp/link-local-2: Running
`/home/pi/work/radicle-link/bins/target/debug/lnk profile ssh add`
/tmp/link-local-2: please enter your passphrase: added key for profile
id `9d69fbe0-7d32-40d5-bcb5-2f3164682648`
/tmp/seed-home: wrote passphase
/tmp/seed-home: play
/tmp/seed-home: Finished dev [unoptimized + debuginfo] target(s) in 0.17s
/tmp/seed-home: Running
`/home/pi/work/radicle-link/bins/target/debug/lnk profile ssh add`
/tmp/seed-home: please enter your passphrase: added key for profile id
`e049dbbb-b426-4fd2-8f96-d863f2aa7ff9`
== Creating local link 1 identity ==
/tmp/link-local-1: Finished dev [unoptimized + debuginfo] target(s) in 0.17s
/tmp/link-local-1: Running
`/home/pi/work/radicle-link/bins/target/debug/lnk identities person
create new --payload '{"name":"sockpuppet1"}'`
/tmp/link-local-1:
{"urn":"rad:git:hnrkqmwrob5fb8sae9egn1stciqhj5tjcicwo","payload":{"https://radicle.xyz/link/identities/person/v1":{"name":"sockpuppet1"}}}
/tmp/link-local-1: Finished dev [unoptimized + debuginfo] target(s) in 0.16s
/tmp/link-local-1: Running
`/home/pi/work/radicle-link/bins/target/debug/lnk identities local set
--urn 'rad:git:hnrkqmwrob5fb8sae9egn1stciqhj5tjcicwo'`
/tmp/link-local-1: set default identity to
`rad:git:hnrkqmwrob5fb8sae9egn1stciqhj5tjcicwo`
== Creating local link 2 identity ==
/tmp/link-local-2: Finished dev [unoptimized + debuginfo] target(s) in 0.16s
/tmp/link-local-2: Running
`/home/pi/work/radicle-link/bins/target/debug/lnk identities person
create new --payload '{"name":"sockpuppet2"}'`
/tmp/link-local-2:
{"urn":"rad:git:hnrkntsedajm1hoy7zizz8nytqqf8jt3ng3po","payload":{"https://radicle.xyz/link/identities/person/v1":{"name":"sockpuppet2"}}}
/tmp/link-local-2: Finished dev [unoptimized + debuginfo] target(s) in 0.18s
/tmp/link-local-2: Running
`/home/pi/work/radicle-link/bins/target/debug/lnk identities local set
--urn 'rad:git:hnrkntsedajm1hoy7zizz8nytqqf8jt3ng3po'`
/tmp/link-local-2: set default identity to
`rad:git:hnrkntsedajm1hoy7zizz8nytqqf8jt3ng3po`
== Create a local repository ==
/tmp/link-local-1: Finished dev [unoptimized + debuginfo] target(s) in 0.17s
/tmp/link-local-1: Running
`/home/pi/work/radicle-link/bins/target/debug/lnk identities project
create new --path ./peer1_proj_1660720324161 --payload
'{"default_branch":"master","name":"peer1_proj_1660720324161"}'`
/tmp/link-local-1:
{"urn":"rad:git:hnrkf7x96s1pwdxux1ee45o1pq6fyk58tixto","payload":{"https://radicle.xyz/link/identities/project/v1":{"name":"peer1_proj_1660720324161","description":null,"default_branch":"master"}}}
our project URN: rad:git:hnrkf7x96s1pwdxux1ee45o1pq6fyk58tixto
== Add the seed to the local peer seed configs ==
/tmp/seed-home: Finished dev [unoptimized + debuginfo] target(s) in 0.17s
/tmp/seed-home: Running
`/home/pi/work/radicle-link/bins/target/debug/lnk profile peer`
/tmp/seed-home: hybodew66mqgue1t7a976bznwtbs7fhu3f8m9461m3fdhfbdwhqa8w
/tmp/link-local-1: Finished dev [unoptimized + debuginfo] target(s) in 0.17s
/tmp/link-local-1: Running
`/home/pi/work/radicle-link/bins/target/debug/lnk profile get`
/tmp/link-local-1: 0cd616e9-1c18-4b32-857c-470f1e719a98
/tmp/link-local-2: Finished dev [unoptimized + debuginfo] target(s) in 0.17s
/tmp/link-local-2: Running
`/home/pi/work/radicle-link/bins/target/debug/lnk profile get`
/tmp/link-local-2: 9d69fbe0-7d32-40d5-bcb5-2f3164682648
== Start the seed linkd ==
linkd stdout redirected to linkd_1660720325160.log
== Start the peer 1 gitd ==
/tmp/link-local-1: Finished dev [unoptimized + debuginfo] target(s) in 0.66s
/tmp/link-local-1: Running
`/home/pi/work/radicle-link/bins/target/debug/lnk profile peer`
/tmp/link-local-1: hydo86fxtnqwcy3o7ut5gypre4nc1a551u9jdkoonzpjxkphfwwqiq
started lnk-gitd
== Make some changes in the repo ==
git-commit: Output { status: ExitStatus(unix_wait_status(0)), stdout:
"[master 6b7017d] test commit\n 1 file changed, 1 insertion(+)\n
create mode 100644 test\n", stderr: "" }
== Add the linkd remote to the repo ==
ssh-keygen: Output { status: ExitStatus(unix_wait_status(0)), stdout:
"# Host [127.0.0.1]:9987 found: line 1\n/home/pi/.ssh/known_hosts
updated.\nOriginal contents retained as
/home/pi/.ssh/known_hosts.old\n", stderr: "" }
The authenticity of host '[127.0.0.1]:9987 ([127.0.0.1]:9987)' can't
be established.
git-push: ED25519 key fingerprint is
SHA256:s5MnhkyLhIdIdL/2DVDfPheb9JPrfQF0jSgY4qehqMM.
git-push: Are you sure you want to continue connecting
(yes/no/[fingerprint])? yes
git-push: Warning: Permanently added '[127.0.0.1]:9987' (ED25519) to
the list of known hosts.
git-push: Enumerating objects: 4, done.
Counting objects: 100% (4/4), done./4)
Writing objects: 100% (3/3), 239 bytes | 239.00 KiB/s, done.
git-push: Total 3 (delta 0), reused 0 (delta 0)
git-push: request-pull to
`hybodew66mqgue1t7a976bznwtbs7fhu3f8m9461m3fdhfbdwhqa8w`
git-push: Checking if request-pull is allowed for
`rad:git:hnrkf7x96s1pwdxux1ee45o1pq6fyk58tixto`
git-push: Tracked
`refs/rad/remotes/hnrkf7x96s1pwdxux1ee45o1pq6fyk58tixto/hydo86fxtnqwcy3o7ut5gypre4nc1a551u9jdkoonzpjxkphfwwqiq`
git-push: Starting replication for
`rad:git:hnrkf7x96s1pwdxux1ee45o1pq6fyk58tixto`
git-push: updated references:
git-push: +refs/rad/id->b86734e7dcd8c57d1b533b3cdc228626a557a89a
git-push: +refs/namespaces/hnrkqmwrob5fb8sae9egn1stciqhj5tjcicwo/refs/rad/id->77c13533f7359d0903f0111c3c21521f864a0557
git-push: +refs/remotes/hydo86fxtnqwcy3o7ut5gypre4nc1a551u9jdkoonzpjxkphfwwqiq/rad/ids/hnrkqmwrob5fb8sae9egn1stciqhj5tjcicwo->77c13533f7359d0903f0111c3c21521f864a0557
git-push: +refs/rad/ids/hnrkqmwrob5fb8sae9egn1stciqhj5tjcicwo->77c13533f7359d0903f0111c3c21521f864a0557
git-push: +refs/remotes/hydo86fxtnqwcy3o7ut5gypre4nc1a551u9jdkoonzpjxkphfwwqiq/rad/id->b86734e7dcd8c57d1b533b3cdc228626a557a89a
git-push: +refs/remotes/hydo86fxtnqwcy3o7ut5gypre4nc1a551u9jdkoonzpjxkphfwwqiq/heads/master->85d6729f10f248391a8b2b11e02d4a925d874799
git-push: +refs/remotes/hydo86fxtnqwcy3o7ut5gypre4nc1a551u9jdkoonzpjxkphfwwqiq/rad/self->77c13533f7359d0903f0111c3c21521f864a0557
git-push: +refs/remotes/hydo86fxtnqwcy3o7ut5gypre4nc1a551u9jdkoonzpjxkphfwwqiq/rad/signed_refs->a065e7c06c12c28d8ca959eb7eef1d1d5dd5c088
git-push:
git-push: updating signed refs
git-push: signed refs state was updated
git-push: skipping announce, use `--announce-on-push` if you wish to
execute this step
git-push: To ssh://127.0.0.1:9987/rad:git:hnrkf7x96s1pwdxux1ee45o1pq6fyk58tixto.git
git-push: 85d6729..6b7017d master -> master
== Clone to peer2 ==
/tmp/link-local-2: Finished dev [unoptimized + debuginfo] target(s) in 0.16s
/tmp/link-local-2: Running
`/home/pi/work/radicle-link/bins/target/debug/lnk clone --urn
'rad:git:hnrkf7x96s1pwdxux1ee45o1pq6fyk58tixto' --path
peer2_proj_1660720452541 --peer
hydo86fxtnqwcy3o7ut5gypre4nc1a551u9jdkoonzpjxkphfwwqiq`
/tmp/link-local-2: cloning urn
rad:git:hnrkf7x96s1pwdxux1ee45o1pq6fyk58tixto into
peer2_proj_1660720452541
/tmp/link-local-2: syncing monorepo with seeds
/tmp/link-local-2: working copy created at
`/home/pi/work/radicle-link/bins/tests/peer2_proj_1660720452541/.git/`
== Kill linkd (seed) ==
test two_peers_and_a_seed ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered
out; finished in 213.72s
Han Xu (1):
Add integration test for bins
bins/Cargo.lock | 29 +++
bins/Cargo.toml | 1 +
bins/tests/Cargo.toml | 13 +
bins/tests/integration_test.rs | 458 +++++++++++++++++++++++++++++++++
link-git/src/protocol/fetch.rs | 2 +-
link-git/src/protocol/ls.rs | 2 +-
6 files changed, 503 insertions(+), 2 deletions(-)
create mode 100644 bins/tests/Cargo.toml
create mode 100644 bins/tests/integration_test.rs
--
2.32.0 (Apple Git-132)
[PATCH radicle-link v2 1/1] Add integration test for bins
On 17/08/22 12:29am, Han Xu wrote:
> diff --git a/bins/tests/integration_test.rs b/bins/tests/integration_test.rs> new file mode 100644> index 00000000..d6d3b4ae> --- /dev/null> +++ b/bins/tests/integration_test.rs
[...]
> +enum LnkCmd {> + ProfileCreate,> + ProfileGet,> + ProfilePeer,> + ProfileSshAdd,> + IdPersonCreate(String), // the associated string is "the person's name".> + IdLocalSet(String), // the associated string is "urn".> + IdProjectCreate(String), // the associated string is "the project name".> + Clone(String, String), // the associated string is "urn", "peer_id"> +}> +> +/// Runs a `cmd` for `lnk_home`. Rebuilds `lnk` if necessary.> +/// Return.0: true if this is the parent (i.e. test) process,> +/// false if this is the child (i.e. lnk) process.> +/// Return.1: an output that depends on the `cmd`.> +fn run_lnk(cmd: LnkCmd, lnk_home: &str, passphrase: &[u8]) -> (bool, String) {
What's the reasoning behing using this API where we fork and check if
we're in a child vs using the std::process::Command APIs?
> diff --git a/link-git/src/protocol/fetch.rs b/link-git/src/protocol/fetch.rs> index a5a73065..562e433d 100644> --- a/link-git/src/protocol/fetch.rs> +++ b/link-git/src/protocol/fetch.rs> @@ -39,7 +39,7 @@ use super::{packwriter::PackWriter, remote_git_version, transport};> // cf. https://lore.kernel.org/git/CD2XNXHACAXS.13J6JTWZPO1JA@schmidt/> // Fixed in `git.git` 1ab13eb, which should land in 2.34> fn must_namespace_want_ref(caps: &client::Capabilities) -> bool {> - static FIXED_AFTER: Lazy<Version> = Lazy::new(|| Version::new("2.33.0").unwrap());> + static FIXED_AFTER: Lazy<Version> = Lazy::new(|| Version::new("2.25.0").unwrap());
This is quite surprising to me but as long as we've tested it and it
works that's great! We should probably change the comment above about it
landing in 2.34 though.
Re: [PATCH radicle-link v2 1/1] Add integration test for bins
On Wed, Aug 17, 2022 at 9:32 AM Alex Good <alex@memoryandthought.me> wrote:
>> On 17/08/22 12:29am, Han Xu wrote:> > diff --git a/bins/tests/integration_test.rs b/bins/tests/integration_test.rs> > new file mode 100644> > index 00000000..d6d3b4ae> > --- /dev/null> > +++ b/bins/tests/integration_test.rs>> [...]
Does this [...] mean something? (sorry I don't know)
>> > +enum LnkCmd {> > + ProfileCreate,> > + ProfileGet,> > + ProfilePeer,> > + ProfileSshAdd,> > + IdPersonCreate(String), // the associated string is "the person's name".> > + IdLocalSet(String), // the associated string is "urn".> > + IdProjectCreate(String), // the associated string is "the project name".> > + Clone(String, String), // the associated string is "urn", "peer_id"> > +}> > +> > +/// Runs a `cmd` for `lnk_home`. Rebuilds `lnk` if necessary.> > +/// Return.0: true if this is the parent (i.e. test) process,> > +/// false if this is the child (i.e. lnk) process.> > +/// Return.1: an output that depends on the `cmd`.> > +fn run_lnk(cmd: LnkCmd, lnk_home: &str, passphrase: &[u8]) -> (bool, String) {>> What's the reasoning behing using this API where we fork and check if> we're in a child vs using the std::process::Command APIs?
This is the most reliable way I could find to input a passphrase into
the lnk command's terminal input (TTY).
>> > diff --git a/link-git/src/protocol/fetch.rs b/link-git/src/protocol/fetch.rs> > index a5a73065..562e433d 100644> > --- a/link-git/src/protocol/fetch.rs> > +++ b/link-git/src/protocol/fetch.rs> > @@ -39,7 +39,7 @@ use super::{packwriter::PackWriter, remote_git_version, transport};> > // cf. https://lore.kernel.org/git/CD2XNXHACAXS.13J6JTWZPO1JA@schmidt/> > // Fixed in `git.git` 1ab13eb, which should land in 2.34> > fn must_namespace_want_ref(caps: &client::Capabilities) -> bool {> > - static FIXED_AFTER: Lazy<Version> = Lazy::new(|| Version::new("2.33.0").unwrap());> > + static FIXED_AFTER: Lazy<Version> = Lazy::new(|| Version::new("2.25.0").unwrap());>> This is quite surprising to me but as long as we've tested it and it> works that's great! We should probably change the comment above about it> landing in 2.34 though.
It was surprising to me too. It seems the fix 1ab13eb did land to git 2.34:
https://github.com/git/git/blob/master/Documentation/RelNotes/2.34.0.txt#L248
But I'm not sure if it impacts the exact code path for our case. I
will update the comment about the reason to change to 2.25.0 based on
testing.
[PATCH radicle-link v3 0/1] Add integration test for bins and fix git version checks
This is the 3rd version (re-rolling) patch to add an integration test for `bins` package.
The test case scenario follows the steps in https://github.com/alexjg/linkd-playground ,
except it is in Rust now and we can just run `cargo test`. To see a more helpful output,
please run `cargo test -- --nocapture` from the `bins/tests` directory.
The only non-test code change is in git version checks. In our testing, it shows that
git 2.25.1 on Ubuntu 20.04 and git 2.30.2 on Debian 11 do not need the workaround that
adds "namespaces" manually. Hence fixing the git version checked against.
This patch also addresses the comments from the 2nd version, and I opted to re-rolling
instead of adding new commits.
Han Xu (1):
Add integration test for bins and fix git version checks
bins/Cargo.lock | 29 +++
bins/Cargo.toml | 1 +
bins/tests/Cargo.toml | 13 +
bins/tests/integration_test.rs | 449 +++++++++++++++++++++++++++++++++
link-git/src/protocol/fetch.rs | 5 +-
link-git/src/protocol/ls.rs | 5 +-
6 files changed, 500 insertions(+), 2 deletions(-)
create mode 100644 bins/tests/Cargo.toml
create mode 100644 bins/tests/integration_test.rs
--
2.32.0 (Apple Git-132)
[PATCH radicle-link v3 1/1] Add integration test for bins and fix git version checks
This patch is an update on the previous v3 patch, with the following changes:
- Added a check for refs/heads/master between peers. This is because I noticed
a bug where `git push` from peer1 only pushs an older commit as `heads/master`
to the seed node.
- Found the root cause of the above bug and included a fix in
cli/gitd-lib/src/hooks.rs. The root cause is that currently a peer does
request_pull before updating the signed refs, hence the request pull only
has an old signed refs for heads/master.
Han Xu (3):
Add integration test for bins and fix git version checks
check peer1 and peer2 ref/heads/master
fix post_receive to send updated refs in requst_pull
bins/Cargo.lock | 29 ++
bins/Cargo.toml | 1 +
bins/tests/Cargo.toml | 13 +
bins/tests/integration_test.rs | 468 +++++++++++++++++++++++++++++++++
cli/gitd-lib/src/hooks.rs | 19 +-
link-git/src/protocol/fetch.rs | 5 +-
link-git/src/protocol/ls.rs | 5 +-
7 files changed, 530 insertions(+), 10 deletions(-)
create mode 100644 bins/tests/Cargo.toml
create mode 100644 bins/tests/integration_test.rs
--
2.32.0 (Apple Git-132)
[PATCH radicle-link v4 1/3] Add integration test for bins and fix git version checks
On 24/08/22 10:41pm, Han Xu wrote:
> diff --git a/bins/tests/integration_test.rs b/bins/tests/integration_test.rs> +enum LnkCmd {> + ProfileCreate,> + ProfileGet,> + ProfilePeer,> + ProfileSshAdd,> + IdPersonCreate(String), // the associated string is "the person's name".> + IdLocalSet(String), // the associated string is "urn".> + IdProjectCreate(String), // the associated string is "the project name".> + Clone(String, String), // the associated string is "urn", "peer_id"> +}> +> +/// Runs a `cmd` for `lnk_home`. Rebuilds `lnk` if necessary.> +/// Return.0: true if this is the parent (i.e. test) process,> +/// false if this is the child (i.e. lnk) process.> +/// Return.1: an output that depends on the `cmd`.> +fn run_lnk(cmd: LnkCmd, lnk_home: &str, passphrase: &[u8]) -> (bool, String) {
I still find this return and switch on the returned `bool` a bit
cumbersome. Is it worth using something like
https://docs.rs/pty-process/latest/pty_process/struct.Child.html
which would give us basically the same API as `std::process::Child`?
Failing that we could write a little macro to remove all the `is_parent`
checks in the calling code.
> +fn spawn_lnk_gitd(lnk_home: &str, manifest_path: &str, peer_id: &str) {> + let port = "9987";> + let xdg_runtime_dir = env!("XDG_RUNTIME_DIR");> + let rpc_socket = format!("{}/link-peer-{}-rpc.socket", xdg_runtime_dir, peer_id);> + let target_dir = bins_target_dir();> + let exec_path = format!("{}/debug/lnk-gitd", &target_dir);> +> + Command::new("cargo")> + .arg("build")> + .arg("--target-dir")> + .arg(&target_dir)> + .arg("--manifest-path")> + .arg(manifest_path)> + .arg("-p")> + .arg("lnk-gitd")> + .stdout(Stdio::inherit())> + .output()> + .expect("cargo build lnk-gitd failed");> +> + Command::new("systemd-socket-activate")> + .arg("-l")> + .arg(port)> + .arg("--fdname=ssh")> + .arg("-E")> + .arg("SSH_AUTH_SOCK")> + .arg("-E")> + .arg("RUST_BACKTRACE")> + .arg(&exec_path)> + .arg(lnk_home)> + .arg("--linkd-rpc-socket")> + .arg(rpc_socket)> + .arg("--push-seeds")> + .arg("--fetch-seeds")> + .arg("--linger-timeout")> + .arg("10000")> + .spawn()> + .expect("lnk-gitd failed to start");
This is platform dependent (i.e. OSX doesn't have
`systemd-socket-activate`). We also don't really need to use the socket
activated version of this, we could just run `lnk_home --push-seeds
--fetch-seeds --addr 127.0.0.1:<some port>` (i.e. no `--linger-timeout`)
which will immediately run `lnk-gitd` and keep it running until it's
killed.
Re: [PATCH radicle-link v4 1/3] Add integration test for bins and fix git version checks
So I am trying to get some collaboration on testing going between testing CLI type binaries across
Is there a reason none of these could be used ?
https://crates.io/crates/trycmdhttps://crates.io/crates/term-transcript
out of date: https://github.com/rust-rspec/rspechttps://crates.io/crates/trybuildhttps://nexte.st/book/leaky-tests.html
compiletest seems to have detached yay https://github.com/Manishearth/compiletest-rs
and ofc insta https://crates.io/crates/instahttps://crates.io/crates/snapboxhttps://crates.io/crates/assert_cmd, https://crates.io/crates/assert_fshttps://crates.io/crates/ducthttps://crates.io/crates/rexpecthttps://crates.io/crates/dir-diff
I use insta a lot myself
Rust idiomatic way is to use small crates from the ecosystem
If we are still going ahead of using Rust to do integration tests.
------- Original Message -------
On Friday, August 26th, 2022 at 1:44 AM, Alex Good <alex@memoryandthought.me> wrote:
> > > On 24/08/22 10:41pm, Han Xu wrote:> > > diff --git a/bins/tests/integration_test.rs b/bins/tests/integration_test.rs> > +enum LnkCmd {> > + ProfileCreate,> > + ProfileGet,> > + ProfilePeer,> > + ProfileSshAdd,> > + IdPersonCreate(String), // the associated string is "the person's name".> > + IdLocalSet(String), // the associated string is "urn".> > + IdProjectCreate(String), // the associated string is "the project name".> > + Clone(String, String), // the associated string is "urn", "peer_id"> > +}> > +> > +/// Runs a `cmd` for `lnk_home`. Rebuilds `lnk` if necessary.> > +/// Return.0: true if this is the parent (i.e. test) process,> > +/// false if this is the child (i.e. lnk) process.> > +/// Return.1: an output that depends on the `cmd`.> > +fn run_lnk(cmd: LnkCmd, lnk_home: &str, passphrase: &[u8]) -> (bool, String) {> > > I still find this return and switch on the returned `bool` a bit> cumbersome. Is it worth using something like> https://docs.rs/pty-process/latest/pty_process/struct.Child.html> which would give us basically the same API as `std::process::Child`?> > Failing that we could write a little macro to remove all the `is_parent`> checks in the calling code.> > > +fn spawn_lnk_gitd(lnk_home: &str, manifest_path: &str, peer_id: &str) {> > + let port = "9987";> > + let xdg_runtime_dir = env!("XDG_RUNTIME_DIR");> > + let rpc_socket = format!("{}/link-peer-{}-rpc.socket", xdg_runtime_dir, peer_id);> > + let target_dir = bins_target_dir();> > + let exec_path = format!("{}/debug/lnk-gitd", &target_dir);> > +> > + Command::new("cargo")> > + .arg("build")> > + .arg("--target-dir")> > + .arg(&target_dir)> > + .arg("--manifest-path")> > + .arg(manifest_path)> > + .arg("-p")> > + .arg("lnk-gitd")> > + .stdout(Stdio::inherit())> > + .output()> > + .expect("cargo build lnk-gitd failed");> > +> > + Command::new("systemd-socket-activate")> > + .arg("-l")> > + .arg(port)> > + .arg("--fdname=ssh")> > + .arg("-E")> > + .arg("SSH_AUTH_SOCK")> > + .arg("-E")> > + .arg("RUST_BACKTRACE")> > + .arg(&exec_path)> > + .arg(lnk_home)> > + .arg("--linkd-rpc-socket")> > + .arg(rpc_socket)> > + .arg("--push-seeds")> > + .arg("--fetch-seeds")> > + .arg("--linger-timeout")> > + .arg("10000")> > + .spawn()> > + .expect("lnk-gitd failed to start");> > > This is platform dependent (i.e. OSX doesn't have> `systemd-socket-activate`). We also don't really need to use the socket> activated version of this, we could just run `lnk_home --push-seeds --fetch-seeds --addr 127.0.0.1:<some port>` (i.e. no `--linger-timeout`)> > which will immediately run `lnk-gitd` and keep it running until it's> killed.
Re: [PATCH radicle-link v4 1/3] Add integration test for bins and fix git version checks
On Thu, Aug 25, 2022 at 8:44 AM Alex Good <alex@memoryandthought.me> wrote:
>> On 24/08/22 10:41pm, Han Xu wrote:> > diff --git a/bins/tests/integration_test.rs b/bins/tests/integration_test.rs> > +enum LnkCmd {> > + ProfileCreate,> > + ProfileGet,> > + ProfilePeer,> > + ProfileSshAdd,> > + IdPersonCreate(String), // the associated string is "the person's name".> > + IdLocalSet(String), // the associated string is "urn".> > + IdProjectCreate(String), // the associated string is "the project name".> > + Clone(String, String), // the associated string is "urn", "peer_id"> > +}> > +> > +/// Runs a `cmd` for `lnk_home`. Rebuilds `lnk` if necessary.> > +/// Return.0: true if this is the parent (i.e. test) process,> > +/// false if this is the child (i.e. lnk) process.> > +/// Return.1: an output that depends on the `cmd`.> > +fn run_lnk(cmd: LnkCmd, lnk_home: &str, passphrase: &[u8]) -> (bool, String) {>> I still find this return and switch on the returned `bool` a bit> cumbersome. Is it worth using something like> https://docs.rs/pty-process/latest/pty_process/struct.Child.html> which would give us basically the same API as `std::process::Child`?>> Failing that we could write a little macro to remove all the `is_parent`> checks in the calling code.
Thanks for your suggestion. I've created a macro to replace the run_lnk fn
and removed all `is_parent` checks.
>> > +fn spawn_lnk_gitd(lnk_home: &str, manifest_path: &str, peer_id: &str) {> > + let port = "9987";> > + let xdg_runtime_dir = env!("XDG_RUNTIME_DIR");> > + let rpc_socket = format!("{}/link-peer-{}-rpc.socket", xdg_runtime_dir, peer_id);> > + let target_dir = bins_target_dir();> > + let exec_path = format!("{}/debug/lnk-gitd", &target_dir);> > +> > + Command::new("cargo")> > + .arg("build")> > + .arg("--target-dir")> > + .arg(&target_dir)> > + .arg("--manifest-path")> > + .arg(manifest_path)> > + .arg("-p")> > + .arg("lnk-gitd")> > + .stdout(Stdio::inherit())> > + .output()> > + .expect("cargo build lnk-gitd failed");> > +> > + Command::new("systemd-socket-activate")> > + .arg("-l")> > + .arg(port)> > + .arg("--fdname=ssh")> > + .arg("-E")> > + .arg("SSH_AUTH_SOCK")> > + .arg("-E")> > + .arg("RUST_BACKTRACE")> > + .arg(&exec_path)> > + .arg(lnk_home)> > + .arg("--linkd-rpc-socket")> > + .arg(rpc_socket)> > + .arg("--push-seeds")> > + .arg("--fetch-seeds")> > + .arg("--linger-timeout")> > + .arg("10000")> > + .spawn()> > + .expect("lnk-gitd failed to start");>> This is platform dependent (i.e. OSX doesn't have> `systemd-socket-activate`). We also don't really need to use the socket> activated version of this, we could just run `lnk_home --push-seeds> --fetch-seeds --addr 127.0.0.1:<some port>` (i.e. no `--linger-timeout`)> which will immediately run `lnk-gitd` and keep it running until it's> killed.
Good to know that. I've updated the code to remove the use of
systemd-socket-activate.
Will send out the new version of the patch.
Thanks!
Han
[PATCH radicle-link v5 0/5] Add integration test for bins and fix bugs found
This is the 5th version (re-rolling) patch to add an integration test for `bins` package.
It is built on top of version 4 patch and addressed review comments (see new commits):
- created a new macro to simplify the test code.
- removed the use of systemd-socket-activate.
The test case scenario follows the steps in https://github.com/alexjg/linkd-playground ,
except it is in Rust now and we can just run `cargo test`. To see a more helpful output,
please run `cargo test -- --nocapture` from the `bins/tests` directory.
We also found two bugs along the way:
1. Git version checks are off. In our testing, it shows that
git 2.25.1 on Ubuntu 20.04 and git 2.30.2 on Debian 11 do not need the workaround that
adds "namespaces" manually. Hence fixing the git version checked against.
2. `request_pull` to the seed fails to pull the latest commit. The reason being that
the signed_refs for `heads/master` is not the latest. A fix is provided.
Han Xu (5):
Add integration test for bins and fix git version checks
check peer1 and peer2 ref/heads/master
fix post_receive to send updated refs in requst_pull
Use macro to refactor run_lnk
remove the use of systemd-socket-activate
bins/Cargo.lock | 29 +++
bins/Cargo.toml | 1 +
bins/tests/Cargo.toml | 13 +
bins/tests/integration_test.rs | 417 +++++++++++++++++++++++++++++++++
cli/gitd-lib/src/hooks.rs | 19 +-
link-git/src/protocol/fetch.rs | 5 +-
link-git/src/protocol/ls.rs | 5 +-
7 files changed, 479 insertions(+), 10 deletions(-)
create mode 100644 bins/tests/Cargo.toml
create mode 100644 bins/tests/integration_test.rs
--
2.32.0 (Apple Git-132)
[PATCH radicle-link v5 1/5] Add integration test for bins and fix git version checks
On Thu, Aug 25, 2022 at 9:10 AM <MissM_signed@protonmail.ch> wrote:
>> So I am trying to get some collaboration on testing going between testing CLI type binaries across>> Is there a reason none of these could be used ?
I am open to use any of those if they are deemed necessary or helpful.
So far I've built the integration test
using the basic Rust / Cargo test facility and only one crate (`pty`).
I felt it provides a good baseline for
a testing of `bins`. We can always refactor the test code once we
decide to use some of the crates you
listed.
Another thing is that, as you probably mentioned I believe, a
well-documented test strategy is needed before
we adopt some framework-like crates, for example instra. If we already
have it, please let me know, I might
have missed something. If we are in the process of defining the test
strategy, I'm open to the discussion.
>> https://crates.io/crates/trycmd> https://crates.io/crates/term-transcript> out of date: https://github.com/rust-rspec/rspec> https://crates.io/crates/trybuild> https://nexte.st/book/leaky-tests.html>> compiletest seems to have detached yay https://github.com/Manishearth/compiletest-rs> and ofc insta https://crates.io/crates/insta> https://crates.io/crates/snapbox> https://crates.io/crates/assert_cmd, https://crates.io/crates/assert_fs> https://crates.io/crates/duct> https://crates.io/crates/rexpect> https://crates.io/crates/dir-diff>> I use insta a lot myself
Is there an example of how to use insta for testing some parts of
radicle-link? An example will be good if we want to adopt it going
forward.
>> Rust idiomatic way is to use small crates from the ecosystem>> If we are still going ahead of using Rust to do integration tests.>> ------- Original Message -------> On Friday, August 26th, 2022 at 1:44 AM, Alex Good <alex@memoryandthought.me> wrote:>>> >>> >>> > On 24/08/22 10:41pm, Han Xu wrote:> >>> > > diff --git a/bins/tests/integration_test.rs b/bins/tests/integration_test.rs> > > +enum LnkCmd {> > > + ProfileCreate,> > > + ProfileGet,> > > + ProfilePeer,> > > + ProfileSshAdd,> > > + IdPersonCreate(String), // the associated string is "the person's name".> > > + IdLocalSet(String), // the associated string is "urn".> > > + IdProjectCreate(String), // the associated string is "the project name".> > > + Clone(String, String), // the associated string is "urn", "peer_id"> > > +}> > > +> > > +/// Runs a `cmd` for `lnk_home`. Rebuilds `lnk` if necessary.> > > +/// Return.0: true if this is the parent (i.e. test) process,> > > +/// false if this is the child (i.e. lnk) process.> > > +/// Return.1: an output that depends on the `cmd`.> > > +fn run_lnk(cmd: LnkCmd, lnk_home: &str, passphrase: &[u8]) -> (bool, String) {> >>> >>> > I still find this return and switch on the returned `bool` a bit> > cumbersome. Is it worth using something like> > https://docs.rs/pty-process/latest/pty_process/struct.Child.html> > which would give us basically the same API as `std::process::Child`?> >>> > Failing that we could write a little macro to remove all the `is_parent`> > checks in the calling code.> >>> > > +fn spawn_lnk_gitd(lnk_home: &str, manifest_path: &str, peer_id: &str) {> > > + let port = "9987";> > > + let xdg_runtime_dir = env!("XDG_RUNTIME_DIR");> > > + let rpc_socket = format!("{}/link-peer-{}-rpc.socket", xdg_runtime_dir, peer_id);> > > + let target_dir = bins_target_dir();> > > + let exec_path = format!("{}/debug/lnk-gitd", &target_dir);> > > +> > > + Command::new("cargo")> > > + .arg("build")> > > + .arg("--target-dir")> > > + .arg(&target_dir)> > > + .arg("--manifest-path")> > > + .arg(manifest_path)> > > + .arg("-p")> > > + .arg("lnk-gitd")> > > + .stdout(Stdio::inherit())> > > + .output()> > > + .expect("cargo build lnk-gitd failed");> > > +> > > + Command::new("systemd-socket-activate")> > > + .arg("-l")> > > + .arg(port)> > > + .arg("--fdname=ssh")> > > + .arg("-E")> > > + .arg("SSH_AUTH_SOCK")> > > + .arg("-E")> > > + .arg("RUST_BACKTRACE")> > > + .arg(&exec_path)> > > + .arg(lnk_home)> > > + .arg("--linkd-rpc-socket")> > > + .arg(rpc_socket)> > > + .arg("--push-seeds")> > > + .arg("--fetch-seeds")> > > + .arg("--linger-timeout")> > > + .arg("10000")> > > + .spawn()> > > + .expect("lnk-gitd failed to start");> >>> >>> > This is platform dependent (i.e. OSX doesn't have> > `systemd-socket-activate`). We also don't really need to use the socket> > activated version of this, we could just run `lnk_home --push-seeds --fetch-seeds --addr 127.0.0.1:<some port>` (i.e. no `--linger-timeout`)> >>> > which will immediately run `lnk-gitd` and keep it running until it's> > killed.
Re: [PATCH radicle-link v4 1/3] Add integration test for bins and fix git version checks
No,
As a developer -
It is our job to choose the right tool for the job -
Re-using is one of the core competencies of ours -
I don't see even attempts to evaluate the options I gave you.
Don't expect anyone else to effectively do your work after for you.
Correcting mistakes is one but not even looking at the list and engaging in technical merits is another.
It is a massive stress having to clean up after someone when they were told of options to do it properly without extra effort.
We don't really need a strategy to do the right thing (tm)
This fallacy goes two ways -
Now we are adding code that should not exists without strategy -
We are now adding some low level code that is wholly redundant to test other low level code..
I mean what are we testing here.. the tests or the code ?
Like why are we dealing with pty's and the logistics of it ?
When e.g. trycmd - first on the list - does that in minimal manner ?
Think of it like this:
Every line of code is liability.
Just pick the right tool for the job (tm)
------- Original Message -------
On Friday, August 26th, 2022 at 7:15 AM, Han <keepsimple@gmail.com> wrote:
> > > On Thu, Aug 25, 2022 at 9:10 AM MissM_signed@protonmail.ch wrote:> > > So I am trying to get some collaboration on testing going between testing CLI type binaries across> > > > Is there a reason none of these could be used ?> > > I am open to use any of those if they are deemed necessary or helpful.> So far I've built the integration test> using the basic Rust / Cargo test facility and only one crate (`pty`).> I felt it provides a good baseline for> a testing of `bins`. We can always refactor the test code once we> decide to use some of the crates you> listed.> > Another thing is that, as you probably mentioned I believe, a> well-documented test strategy is needed before> we adopt some framework-like crates, for example instra. If we already> have it, please let me know, I might> have missed something. If we are in the process of defining the test> strategy, I'm open to the discussion.> > > https://crates.io/crates/trycmd> > https://crates.io/crates/term-transcript> > out of date: https://github.com/rust-rspec/rspec> > https://crates.io/crates/trybuild> > https://nexte.st/book/leaky-tests.html> > > > compiletest seems to have detached yay https://github.com/Manishearth/compiletest-rs> > and ofc insta https://crates.io/crates/insta> > https://crates.io/crates/snapbox> > https://crates.io/crates/assert_cmd, https://crates.io/crates/assert_fs> > https://crates.io/crates/duct> > https://crates.io/crates/rexpect> > https://crates.io/crates/dir-diff> > > > I use insta a lot myself> > > Is there an example of how to use insta for testing some parts of> radicle-link? An example will be good if we want to adopt it going> forward.> > > Rust idiomatic way is to use small crates from the ecosystem> > > > If we are still going ahead of using Rust to do integration tests.> > > > ------- Original Message -------> > On Friday, August 26th, 2022 at 1:44 AM, Alex Good alex@memoryandthought.me wrote:> > > > > On 24/08/22 10:41pm, Han Xu wrote:> > > > > > diff --git a/bins/tests/integration_test.rs b/bins/tests/integration_test.rs> > > > +enum LnkCmd {> > > > + ProfileCreate,> > > > + ProfileGet,> > > > + ProfilePeer,> > > > + ProfileSshAdd,> > > > + IdPersonCreate(String), // the associated string is "the person's name".> > > > + IdLocalSet(String), // the associated string is "urn".> > > > + IdProjectCreate(String), // the associated string is "the project name".> > > > + Clone(String, String), // the associated string is "urn", "peer_id"> > > > +}> > > > +> > > > +/// Runs a `cmd` for `lnk_home`. Rebuilds `lnk` if necessary.> > > > +/// Return.0: true if this is the parent (i.e. test) process,> > > > +/// false if this is the child (i.e. lnk) process.> > > > +/// Return.1: an output that depends on the `cmd`.> > > > +fn run_lnk(cmd: LnkCmd, lnk_home: &str, passphrase: &[u8]) -> (bool, String) {> > > > > I still find this return and switch on the returned `bool` a bit> > > cumbersome. Is it worth using something like> > > https://docs.rs/pty-process/latest/pty_process/struct.Child.html> > > which would give us basically the same API as `std::process::Child`?> > > > > Failing that we could write a little macro to remove all the `is_parent`> > > checks in the calling code.> > > > > > +fn spawn_lnk_gitd(lnk_home: &str, manifest_path: &str, peer_id: &str) {> > > > + let port = "9987";> > > > + let xdg_runtime_dir = env!("XDG_RUNTIME_DIR");> > > > + let rpc_socket = format!("{}/link-peer-{}-rpc.socket", xdg_runtime_dir, peer_id);> > > > + let target_dir = bins_target_dir();> > > > + let exec_path = format!("{}/debug/lnk-gitd", &target_dir);> > > > +> > > > + Command::new("cargo")> > > > + .arg("build")> > > > + .arg("--target-dir")> > > > + .arg(&target_dir)> > > > + .arg("--manifest-path")> > > > + .arg(manifest_path)> > > > + .arg("-p")> > > > + .arg("lnk-gitd")> > > > + .stdout(Stdio::inherit())> > > > + .output()> > > > + .expect("cargo build lnk-gitd failed");> > > > +> > > > + Command::new("systemd-socket-activate")> > > > + .arg("-l")> > > > + .arg(port)> > > > + .arg("--fdname=ssh")> > > > + .arg("-E")> > > > + .arg("SSH_AUTH_SOCK")> > > > + .arg("-E")> > > > + .arg("RUST_BACKTRACE")> > > > + .arg(&exec_path)> > > > + .arg(lnk_home)> > > > + .arg("--linkd-rpc-socket")> > > > + .arg(rpc_socket)> > > > + .arg("--push-seeds")> > > > + .arg("--fetch-seeds")> > > > + .arg("--linger-timeout")> > > > + .arg("10000")> > > > + .spawn()> > > > + .expect("lnk-gitd failed to start");> > > > > This is platform dependent (i.e. OSX doesn't have> > > `systemd-socket-activate`). We also don't really need to use the socket> > > activated version of this, we could just run `lnk_home --push-seeds --fetch-seeds --addr 127.0.0.1:<some port>` (i.e. no `--linger-timeout`)> > > > > which will immediately run `lnk-gitd` and keep it running until it's> > > killed.
Re: [PATCH radicle-link v4 1/3] Add integration test for bins and fix git version checks
On 26/08/22 02:49am, MissM_signed@protonmail.ch wrote:
> No,>>> As a developer ->> It is our job to choose the right tool for the job ->> Re-using is one of the core competencies of ours ->> I don't see even attempts to evaluate the options I gave you.
To me that seems like work that you should be doing. Both Han and I have
responded to a previous message you sent about using a library for this.
We both took the time to outline our concerns in detail, for some reason
you decided not to respond.
It seems then that we have a difference of opinion on what should be
done here. We're all collaborators here, and you seem to have the most
experience with these libraries, you're also the person most interested
in using these libraries, as such you seem best placed to present the
case for them - I would be interested to hear it.
>> Don't expect anyone else to effectively do your work after for you.
This is an extremely uncharitable take. Everyone here is working hard in
good faith. Han is on the fith reroll of this patch and has been very
willing to accomodate feedback - he's clearly not expecting other people
to do his work.
>> Correcting mistakes is one but not even looking at the list and engaging in technical merits is another.>> It is a massive stress having to clean up after someone when they were told of options to do it properly without extra effort.>> We don't really need a strategy to do the right thing (tm)>>> This fallacy goes two ways ->>> Now we are adding code that should not exists without strategy ->> We are now adding some low level code that is wholly redundant to test other low level code..>>> I mean what are we testing here.. the tests or the code ?>> Like why are we dealing with pty's and the logistics of it ?>> When e.g. trycmd - first on the list - does that in minimal manner ?
`trycmd` doesn't seem minimal to me, it requires rewriting your tests as
literate markdown files. This is quite dramatic - maybe it's good, maybe
it's bad, but it's certainly not an obvious decision. As I said, you
seem to be more familiar with all these libraries, I would be keen to see
what you think the code should look like and what you think the
advantages and disadvantages are.
Re: [PATCH radicle-link v5 0/5] Add integration test for bins and fix bugs found
This is the 6th version (re-rolling) patch to add an integration test for `bins` package.
It is built on top of version 5 patch and addressed review comments:
- refactor the code styling.
- squash the patch into two commits only.
The test case scenario follows the steps in https://github.com/alexjg/linkd-playground ,
except it is in Rust now and we can just run `cargo test`. To see a more helpful output,
please run `cargo test -- --nocapture` from the `bins/tests` directory.
We also found two bugs along the way:
1. Git version checks are off. In our testing, it shows that
git 2.25.1 on Ubuntu 20.04 and git 2.30.2 on Debian 11 do not need the workaround that
adds "namespaces" manually. Hence fixing the git version checked against.
2. `request_pull` to the seed fails to pull the latest commit. The reason being that
the signed_refs for `heads/master` is not the latest. A fix is provided.
Han Xu (2):
Add integration test for bins and fix git version checks
fix post_receive to send updated refs in request_pull
bins/Cargo.lock | 29 +++
bins/Cargo.toml | 1 +
bins/tests/Cargo.toml | 13 +
bins/tests/integration_test.rs | 456 +++++++++++++++++++++++++++++++++
cli/gitd-lib/src/hooks.rs | 19 +-
link-git/src/protocol/fetch.rs | 5 +-
link-git/src/protocol/ls.rs | 5 +-
7 files changed, 518 insertions(+), 10 deletions(-)
create mode 100644 bins/tests/Cargo.toml
create mode 100644 bins/tests/integration_test.rs
--
2.32.0 (Apple Git-132)
[PATCH radicle-link v6 1/2] Add integration test for bins and fix git version checks