Commit Graph

36 Commits

Author SHA1 Message Date
Fintan Halpenny ad63583bee
cli: rad node example
Tests the rad node CLI subcommand.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-03-07 15:38:41 +01:00
Alexis Sellier 85df613682
cli: Implement automatic issue announcement 2023-03-07 08:40:20 +01:00
Alexis Sellier e69be6051d
cli: Give more control over `init` announcement
Instead of always announcing the inventory, by default we don't.
Users can run `rad push` to trigger an announcement.
2023-03-06 15:38:42 +01:00
Alexis Sellier 2a687502c5
cli: Improve `rad inspect`
* Don't always require auth
* Fix `--refs` sub-command
2023-03-01 13:03:42 +01:00
Alexis Sellier 207030d2e1
cli: Don't fail clone if we have repo locally 2023-02-27 18:19:02 +01:00
Alexis Sellier 06a92d52d9
cob: Use hashes for operation ids
It's fairly easy for a user to (by mistake or intentionally) create two
operations with the same OpId. This patch makes it much less likely,
and ensures that if the OpId is equal, it's because the operations
are identical.
2023-02-27 17:11:48 +01:00
Alexis Sellier 950fae209d
Make `ReadStorage` more usable
Previously, we were not able to access a `ReadRepository` instance
through `ReadStorage`. With this change, we are able to.
2023-02-15 22:08:20 +01:00
xla 97f7064094 cli: Extract crate for md based tests
To allow that functionality to be published for reuse.

Signed-off-by: xla <self@xla.is>
2023-02-15 15:25:38 +11:00
Alexis Sellier ee513ccf7e
node: Complete the "relay" seed test
These are the final changes to get the "relay" scenario passing.
There are still some issues left, though it's done as far as the
test is concerned.
2023-02-14 20:31:40 +01:00
Fintan Halpenny 6b674a38c1
cli: rad id example
Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-02-13 13:50:52 +00:00
Fintan Halpenny b257f482cb
cli: rad id command
Introduces the `rad id` subcommand for interacting with the identity
proposal cob.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-02-13 13:50:52 +00:00
Alexis Sellier 3ae826dee2
node: Add clone test with seed acting as relay 2023-02-13 10:30:04 +01:00
Alexis Sellier 3e7761740f
node: Rely on inventory announcement in `rad init` 2023-02-13 09:59:44 +01:00
Adam Szkoda 93ba7f593c
cli: Fix a test failing on macos: rad_checkout 2023-02-10 15:01:06 +01:00
Alexis Sellier b2dbf12862
cli: Fix `rad rm` command 2023-02-10 12:56:11 +01:00
Sebastian Martinez 5c491284dd
cli: Add `LANG` env var to tests
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-02-10 12:16:46 +01:00
Slack Coder 02c07d7be1
cli: Test rad-clone is deterministic
The last commit of a newly cloned repository should remain untouched by
making `Node::project()` use a repository fixture instead of a randomly
generated one.

Signed-off-by: Slack Coder <slackcoder@server.ky>
2023-02-09 16:49:52 +01:00
Alexis Sellier b108342fab
cli: Test clone failure for unknown repo 2023-02-08 21:28:59 +01:00
Alexis Sellier 69ac8be8fd
node: Update local routing table on announce 2023-02-08 21:28:49 +01:00
Alexis Sellier 9177e67de6
cli: Use same project for clone test 2023-02-08 20:21:35 +01:00
Alexis Sellier 2649e9c6fe
cli: Add `rad-clone` test 2023-02-07 10:46:12 +01:00
Alexis Sellier b542ddcd6c
node: Create shared test environment
We move and combine some of the test code, so that the CLI tests and
node tests use shared code.
2023-02-07 10:46:12 +01:00
Alexis Sellier abb288e742
cli: Use constant for env vars 2023-02-07 10:46:12 +01:00
Alexis Sellier 0a9bb23e4e
Replace `RAD_DEBUG` with `RAD_SEED`
The latter is strictly more powerful.
2023-01-25 17:09:16 +01:00
Alexis Sellier bb135b64b3
cli: Get `rad-checkout` working properly 2023-01-24 14:54:56 +01:00
Alexis Sellier b78790622f
cli: Improve test utilities
This will allow easy creation of multiple users with deterministic keys.

Signed-off-by: Alexis Sellier <self@cloudhead.io>
2023-01-24 10:46:57 +01:00
Alexis Sellier be9def8b11
Rename `profile::Paths` to `profile::Home`
This makes the intent clearer.

Signed-off-by: Alexis Sellier <self@cloudhead.io>
2023-01-17 11:01:36 +01:00
Alexis Sellier d31968509d
Speed up node E2E tests
By allowing the node to run using a `MockSigner`, we speed up tests
significantly, since PBKDF2 doesn't need to run.

Signed-off-by: Alexis Sellier <self@cloudhead.io>
2023-01-17 11:01:36 +01:00
Slack Coder 8f8eacc078
github: Workaround test dep on git remote helper
Workaround a client documentation test dependency on radicle's
radicle-remote-helper.

The framework has yet to support using the projects version directly.  A
proper fix is non-trivial.

Signed-off-by: Slack Coder <slackcoder@server.ky>
2023-01-17 10:08:44 +01:00
Slack Coder 54bcb91339
cli: Allow using `git` in doc tests
Define git author name and email address, and others to allow using it
deterministically in documentation tests.

Signed-off-by: Slack Coder <slackcoder@server.ky>
2023-01-17 10:08:44 +01:00
Slack Coder a6d59b3c0e
cli: alter use subcommands for patch
Make `rad patch` accept subcommands for specifying its operation in
place of the '--command' notation.

For instance `rad patch update` versus `rad patch --update`.  Also make
the default operation list active patches, replacing patch creation.
Patch creation is now done via `rad patch open`.

Make these changes in a way consistent with other commands like `rad
delegate`.

Add '--no-confirm' to patch to support this subcommand's documentation
test.

Signed-off-by: Slack Coder <slackcoder@server.ky>
2023-01-17 10:08:44 +01:00
Alexis Sellier f193d7d6cc
Improvements to keystore
* Use the correct passphrase type everywhere
* Allow conversion of secret key
* Extract logic for storing a key in keystore

Signed-off-by: Alexis Sellier <self@cloudhead.io>
2022-12-27 13:43:16 +01:00
Alexis Sellier 9ec7a0a2ce
cli: Fix flaky tests
We were setting the CWD for the parent process, which wasn't such a good
idea.

Signed-off-by: Alexis Sellier <self@cloudhead.io>
2022-12-27 12:53:57 +01:00
Fintan Halpenny aa05f676f7
cli: add delegate cli
Adds a `rad delegate` CLI command.

The command consists of three subcommands:
* `add` -- add a new delegate to the set of delegates of a project
* `remove` -- remove an existing delegate from the set of delegates of a
  project
* `list` -- list the delegates of a project

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2022-12-27 12:25:24 +01:00
Slack Coder 946d6ac675
cli: assign and unassign issues
Allow assigning an issue to one or more people via a new subcommand.

    rad assign <issue> <peer>

To unassign:

    rad unassign <issue> <peer>

To support testing and documentation, create an example for maintaining
issues for a project.

Signed-off-by: Slack Coder <slackcoder@server.ky>
2022-12-26 15:38:39 +01:00
Alexis Sellier c33aa87589
Move CLI command tests to integration tests
Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
2022-12-06 10:01:41 +01:00
Renamed from radicle-cli/src/tests/cli.rs (Browse further)