aboutsummaryrefslogtreecommitdiff
path: root/crates/arti/tests
Commit message (Collapse)AuthorAgeFilesLines
* arti: Gate the "arti keys" tests behind onion-service-serviceGabriela Moldovan2026-06-171-2/+6
| | | | | | | | Now that these test more than just the help output, we need to gate them behind the `onion-service-service` feature: the tests involve some C Tor keystores, and require at least one onion service to be configured, because onion services (and clients) are the only thing these keystores are used for.
* arti: Remove no longer used test helperGabriela Moldovan2026-06-171-13/+1
|
* arti: Remove now-obsolete keys test moduleGabriela Moldovan2026-06-173-581/+0
| | | | | | | | | | | | | | | | | | | | | | | | | We now have `trycmd` tests that cover most cases, so I am removing this module. The reason this was introduced in the first place is in the module level docs ```rust //! The `assert_cmd` crate is used here instead of the preferred `trycmd` (see //! [`README`](../README.md)) because the output of `keys list` is not deterministic across //! different machines. The design choices of some components are workarounds for this limitation. ``` But this is no longer an issue now that the `keys list` output is sorted. Ideally, all tests would be written this way (we have a few more modules in `cli_tests` that we should probably port to `trycmd` sometime). Note: some of the tests I'm removing here don't have a `trycmd` counterpart in `arti/tests/testcases/keys`. In my opinion, this is perfectly fine, because the old tests were unnecessarily testing all the possible configurations involving 1-2 keystores (one arti, and one C Tor): it is not the responsibility of the CLI tests to cover all these permutations (they should be tested in `tor-keymgr`).
* arti: Add a trycmd-based test for arti keys list error handlingGabriela Moldovan2026-06-173-0/+5
| | | | | This is a `trycmd`-based replacement for the `list_unregistered_keystore_fails()` test, which will be removed soon.
* doc/keys.md: Un-ignore some of the example snippetsGabriela Moldovan2026-06-172-1/+16
| | | | | | | | | This un-ignores some of the output snippets from the `doc/keys.md` file, so that our `trycmd` test runner will actually run them. This will force us to keep the snippet in sync with the code. This involved adding some extra config for the test C Tor keystore, and tweaking the output to match what the commands actually print out.
* arti, keymgr: s/IDEA/TODOGabriela Moldovan2026-06-171-1/+1
| | | | | | It's better to use "TODO" like we do in the rest of Arti, because otherwise this has a chance of being forgotten (because nobody really greps for "IDEA").
* arti: Don't mention entry validity in the help messageGabriela Moldovan2026-06-171-1/+1
| | | | | | This actually applies to unrecognized entries too, and besides, most users aren't going to think in terms of "valid" vs "invalid" entries, so it's best to omit this qualifier.
* arti: subcommands: keys: Rework output of keys listhjrgrn2026-06-173-70/+274
|
* arti: tests: Add regression test for `arti -h`hjrgrn2026-04-085-0/+13
| | | | | - Add regression test - Update README
* arti: test: rename unrecognized-entry to hs_unrecognized_entry to fix the CIhjrgrn2026-03-304-3/+3
| | | | This changes save us from adding a new entry in .editorconfig
* arti: test: correct typo in hss.rshjrgrn2026-03-301-2/+2
|
* arti: test: Add description of the test file structure of the keys test suitehjrgrn2026-03-301-0/+43
|
* arti: tests: Rename some keys test files using more intuitive nameshjrgrn2026-03-304-5/+5
|
* arti: test: Update tests README.mdhjrgrn2026-03-301-5/+18
|
* arti: test: Remove unused test data hsc-common/hsc.inhjrgrn2026-03-305-37/+0
| | | | | These test files were previously used by hsc-common/hsc.md but are now ignored
* Fix typosTobias Stoeckmann2026-03-242-2/+2
| | | | Typos found with codespell
* Fix word duplicate typosTobias Stoeckmann2026-03-151-1/+1
|
* arti: test: hsc: add test get_fails_if_no_gen_and_no_keyhjrgrn2026-02-173-92/+151
| | | | | | - remove build_hsc_key_cmd in favor of KeyCmd - use KeyCmdBuilder in CTorMigrateCmd::keystore_contains_client_key to remove duplication - adapt hsc.rs to the changes
* arti: test: rescope entities form util.rs fileshjrgrn2026-02-033-31/+33
|
* cli_tests: Rename tests for clarity and consistencyGabriela Moldovan2026-02-021-3/+3
|
* cli_tests: Insert spacing between top-level itemsGabriela Moldovan2026-02-021-0/+8
| | | | For readability.
* cli_tests: Fix typo in test nameGabriela Moldovan2026-02-021-2/+2
|
* cli_tests: Clarify a comment in ctor-migrate testGabriela Moldovan2026-02-021-1/+1
|
* cli_tests: Rename test closure for clarityGabriela Moldovan2026-02-021-3/+3
| | | | | The previous name was misleading (the closure asserts the exact opposite).
* Add integration test suite for `hsc ctor-migrate` subcommandhjrgrn2026-02-0218-91/+485
|
* keymgr: Update expected output in integration testsGabriela Moldovan2026-01-061-6/+6
| | | | | C Tor keystore entries now use the same output format as the non-C Tor entries.
* Add `hsc key ctor-migrate` subcommandhjrgrn2025-11-2419-7/+33
|
* arti: fix deprecation warnings in assert_cmd libSteven Engler2025-10-313-7/+8
| | | | | | | | | | | | ```text warning: use of deprecated associated function `assert_cmd::Command::cargo_bin`: incompatible with a custom cargo build-dir, see instead `cargo::cargo_bin_cmd!` --> crates/arti/tests/cli_tests/hsc.rs:26:28 | 26 | let mut cmd = Command::cargo_bin("arti").unwrap(); | ^^^^^^^^^ | = note: `#[warn(deprecated)]` on by default ```
* arti: test: Add integration test for `hss ctor-migrate`hjrgrn2025-09-1023-30/+636
|
* arti: keys: Add `keys check-integrity` CLI toolhjrgrn2025-09-045-4/+44
|
* arti: test: Fix `keys` integration testhjrgrn2025-08-282-2/+2
| | | | The `keys` integration test now accounts for case-insensitive filesystems
* Merge branch 'toml' into 'main'David Goulet2025-08-261-18/+7
|\ | | | | | | | | arti: Simplify the `create_state_dir_entry` test helper See merge request tpo/core/arti!3178
| * arti: simplify the `create_state_dir_entry` test helperSteven Engler2025-08-251-18/+7
| |
* | tor-hscrypto: change redacted `HsId` from "???" to "[…]"Steven Engler2025-08-251-1/+1
|/ | | | | | | | | | | | | | Before: ```text INFO tor_hsservice: Generated a new identity for service bar: ???mad.onion ``` After: ```text INFO tor_hsservice: Generated a new identity for service foo: […]2qd.onion ```
* arti: test: Add note in `KeysListCmd::create_state_dir_entry`hjrgrn2025-08-251-0/+2
|
* arti: test: Add integration test suite for `arti keys`hjrgrn2025-08-2512-1/+384
| | | | | | | | | - Add `cli_tests/keys/util.rs` and `cli_tests/keys.rs` - Update `cli_tests/main.rs` and `testcases/keys/conf/keys.toml` - Add `ctor-keystore` directory to `keys` `local` directory - Restructure `keys` `local` directory layout - .editorconfig: Add exception for `ctor-keystore`s
* Switch Cargo.toml files to edition 2024.Nick Mathewson2025-08-071-6/+10
| | | | | | | | | | | | | | First, run ``` git grep -l "^edition =" | xargs perl -i -pe 's/^edition *=.*/edition = "2024"/;' ``` Second, manually verify that all Cargo.toml files have changed, and nothing else has changed. Third, run cargo fmt again.
* arti: hss: Add `arti hss ctor-migrate`hjrgrn2025-07-317-1/+57
|
* arti: raw: Rename `arti keys-raw remove-by-path`hjrgrn2025-07-152-4/+4
| | | | | * arti: raw: `remove-by-path` is now `remove-by-id` * arti: raw: Adjust integration tests
* arti: keys: Add arti keys-rawhjrgrn2025-07-147-7/+57
| | | | | | | | | | | | | | | | | | | * CLI: Add `keys-raw` and subcommand `remove-by-path` * arti: Add `arti::subcommand::raw` for the CLI `keys-raw` * tor-keymgr: Add `ArtiNativeKeystoreError::UnexpectedRawEntry`, `ArtiEphemeralKeystoreError::NotSupported` * tor-keymgr: Add `tor-keymgr::raw` module * tor-keymgr: Add `Keystore::remove_unchecked` * tor-keymgr: Change `Keystore::list` to return `KeystoreEntry` * tor-keymgr: Add field `KeystoreEntry::raw_id` * doc: Update keys.md * doc: Add raw.md * tor-keymgr: BREAKING: `UnrecognizedEntryError::new` associated function is now only accessible within the crate `tor-keymgr` * tor-keymgr: BREAKING: `UnrecognizedEntryId` is renamed to `UnrecognizedEntry` * tor-keymgr: BREAKING: `KeyMgr::list()` and `Keystore::list()` now return `Result<Vec<KeystoreEntryResult<KeystoreEntry>>>`
* arti: keys: Fix arti keys help messagehjrgrn2025-06-231-1/+1
|
* arti: Add keys list and keys list-keystoreshjrgrn2025-06-1215-1/+106
|
* arti: test: Refactor arti integration testhjrgrn2025-05-124-2/+156
| | | | | | | * arti: test: Restructure tests directory * arti: dep: Add assert_cmd dev-dependency * arti: test: Update README * doc: Fix hsc documentation
* Remove hsc quiet and force flags in favor of batchhjrgrn2025-04-141-1/+1
|
* test: Fix get-key-error testcase for hschjrgrn2025-03-192-3/+3
|
* test: Fix get-key-error testcase for hschjrgrn2025-03-182-2/+3
|
* test: Update testcase get-key-error for hschjrgrn2025-03-141-2/+2
|
* Deprecate --onion-name; introduce --onion-addressdisha2025-03-124-11/+11
|
* arti: Remove incorrect deprecation warning in hschjrgrn2025-03-101-1/+1
|
* arti: Gate the arti hsc subcommand behind a new "hsc" feature.Gabriela Moldovan2024-09-191-1/+1
| | | | This new feature is experimental.