kubo/test/cli
Andrew Gillis 77ed3dd0ef
Some checks failed
CodeQL / codeql (push) Has been cancelled
Docker Check / lint (push) Has been cancelled
Docker Check / build (push) Has been cancelled
Gateway Conformance / gateway-conformance (push) Has been cancelled
Gateway Conformance / gateway-conformance-libp2p-experiment (push) Has been cancelled
Go Build / go-build (push) Has been cancelled
Go Check / go-check (push) Has been cancelled
Go Lint / go-lint (push) Has been cancelled
Go Test / unit-tests (push) Has been cancelled
Go Test / cli-tests (push) Has been cancelled
Go Test / example-tests (push) Has been cancelled
Interop / interop-prep (push) Has been cancelled
Sharness / sharness-test (push) Has been cancelled
Spell Check / spellcheck (push) Has been cancelled
Interop / helia-interop (push) Has been cancelled
Interop / ipfs-webui (push) Has been cancelled
feat(rpc): Content-Type headers and IPNS record get/put (#11067)
* fix http header when compress enabled for get command

Closes #2376

* fix(rpc): set Content-Type for ipfs get based on output format

- set application/x-tar when outputting tar (default and --archive)
- set application/gzip when compression is enabled (--compress)
- update go-ipfs-cmds with Tar encoding type and RFC 6713 compliant
  MIME types (application/gzip instead of application/x-gzip)

* test(rpc): add Content-Type header tests for ipfs get

* feat(rpc): add Content-Type headers for binary responses

set proper Content-Type headers for RPC endpoints that return binary data:

- `dag export`: application/vnd.ipld.car
- `block get`: application/vnd.ipld.raw
- `diag profile`: application/zip
- `get`: application/x-tar or application/gzip (already worked, migrated to new API)

uses the new OctetStream encoding type and SetContentType() method
from go-ipfs-cmds to specify custom MIME types for binary responses.

refs: https://github.com/ipfs/kubo/issues/2376

* feat(rpc): add `ipfs name get` command for IPNS record retrieval

add dedicated command to retrieve raw signed IPNS records from the
routing system. returns protobuf-encoded IPNS record with Content-Type
`application/vnd.ipfs.ipns-record`.

this provides a more convenient alternative to `ipfs routing get /ipns/<name>`
which returns JSON with base64-encoded data. the raw output can be piped
directly to `ipfs name inspect`:

    ipfs name get <name> | ipfs name inspect

spec: https://specs.ipfs.tech/ipns/ipns-record/

* feat(rpc): add `ipfs name put` command for IPNS record storage

adds `ipfs name put` to complement `ipfs name get`, allowing users to
store IPNS records obtained from external sources without needing the
private key. useful for backup, restore, and debugging workflows.

the command validates records by default (signature, sequence number).
use `--force` to bypass validation for testing how routing handles
malformed or outdated records.

also reorganizes test/cli files:
- rename http_rpc_* -> rpc_* to match existing convention
- merge name_get_put_test.go into name_test.go
- add file header comments documenting test purposes

* chore(deps): update go-ipfs-cmds to latest master

includes SetContentType() for dynamic Content-Type headers

---------

Co-authored-by: Marcin Rataj <lidel@lidel.org>
2026-01-30 23:41:55 +01:00
..
autoconf refactor(config): migration 17-to-18 to unify Provider/Reprovider into Provide.DHT (#10951) 2025-09-18 22:17:43 +02:00
fixtures feat(cli): improve ipfs dag stat output UX (#11097) 2026-01-09 18:41:10 +01:00
harness feat(pubsub): persistent validation and diagnostic commands (#11110) 2026-01-16 00:27:09 +01:00
migrations fix: migrations for Windows (#11010) 2025-10-08 18:02:04 +02:00
testutils feat: support GetClosesPeers (IPIP-476) and ExposeRoutingAPI by default (#10954) 2025-11-19 10:51:56 +00:00
add_test.go feat: fast provide support in dag import (#11058) 2025-11-14 21:06:25 -08:00
agent_version_unicode_test.go fix(cmds): cleanup unicode identify strings (#9465) 2025-09-19 04:46:38 +02:00
api_file_test.go feat(p2p): add --foreground flag to listen and forward commands (#11099) 2026-01-09 19:22:43 +01:00
backup_bootstrap_test.go shutdown daemon after test (#11135) 2026-01-07 20:51:19 -08:00
basic_commands_test.go feat(config): AutoConf with "auto" placeholders (#10883) 2025-08-20 05:59:11 +02:00
bitswap_config_test.go shutdown daemon after test (#11135) 2026-01-07 20:51:19 -08:00
bootstrap_auto_test.go feat(config): AutoConf with "auto" placeholders (#10883) 2025-08-20 05:59:11 +02:00
cid_test.go fix(cmd): exit 1 on error (#10903) 2025-08-08 17:25:05 -07:00
cli_https_test.go fix(cli): support HTTPS in ipfs --api (#10659) 2025-01-10 22:34:56 +01:00
commands_without_repo_test.go fix: ipfs cid without repo (#10897) 2025-08-08 16:39:34 +02:00
completion_test.go feat: add zsh completions (#10040) 2023-08-17 16:43:27 +02:00
config_secrets_test.go test: add regression tests for config secrets protection (#11061) 2025-11-17 19:10:40 +01:00
content_blocking_test.go shutdown daemon after test (#11135) 2026-01-07 20:51:19 -08:00
content_routing_http_test.go chore: replace random test utils with equivalents in go-test/random (#10915) 2025-08-14 10:37:55 -07:00
daemon_test.go refactor: remove goprocess (#10872) 2025-08-06 00:33:45 +02:00
dag_test.go shutdown daemon after test (#11135) 2026-01-07 20:51:19 -08:00
delegated_routing_v1_http_client_test.go feat(gateway): expose /routing/v1 server (opt-in) (#9877) 2023-08-25 17:30:04 +02:00
delegated_routing_v1_http_proxy_test.go shutdown daemon after test (#11135) 2026-01-07 20:51:19 -08:00
delegated_routing_v1_http_server_test.go shutdown daemon after test (#11135) 2026-01-07 20:51:19 -08:00
dht_autoclient_test.go shutdown daemon after test (#11135) 2026-01-07 20:51:19 -08:00
dht_opt_prov_test.go shutdown daemon after test (#11135) 2026-01-07 20:51:19 -08:00
diag_datastore_test.go feat(pubsub): persistent validation and diagnostic commands (#11110) 2026-01-16 00:27:09 +01:00
dns_resolvers_multiaddr_test.go feat(dns): skip DNS lookups for AutoTLS hostnames (#11140) 2026-01-30 17:20:56 +01:00
files_test.go feat(mfs): chroot command to change the root (#8648) 2026-01-13 21:47:36 +01:00
fuse_test.go refactor: remove goprocess (#10872) 2025-08-06 00:33:45 +02:00
gateway_limits_test.go feat(config): add Gateway.MaxRequestDuration option (#11138) 2026-01-15 19:31:16 +01:00
gateway_range_test.go shutdown daemon after test (#11135) 2026-01-07 20:51:19 -08:00
gateway_test.go shutdown daemon after test (#11135) 2026-01-07 20:51:19 -08:00
http_gateway_over_libp2p_test.go shutdown daemon after test (#11135) 2026-01-07 20:51:19 -08:00
http_retrieval_client_test.go shutdown daemon after test (#11135) 2026-01-07 20:51:19 -08:00
identity_cid_test.go fix: enforce identity CID size limits (#10949) 2025-09-09 20:22:21 +02:00
init_test.go shutdown daemon after test (#11135) 2026-01-07 20:51:19 -08:00
ipfswatch_test.go test: fix flaky ipfswatch test (#11142) 2026-01-13 02:38:44 -08:00
log_level_test.go fix(go-log@2.9/go-libp2p@0.45): dynamic log level control and tail (#11039) 2025-11-06 16:00:56 +01:00
ls_test.go feat(cli): ls --long (#11103) 2026-01-16 02:27:32 +01:00
must.go test: port remote pinning tests to Go (#9720) 2023-03-30 07:46:35 -04:00
name_test.go feat(rpc): Content-Type headers and IPNS record get/put (#11067) 2026-01-30 23:41:55 +01:00
p2p_test.go feat(p2p): add --foreground flag to listen and forward commands (#11099) 2026-01-09 19:22:43 +01:00
peering_test.go shutdown daemon after test (#11135) 2026-01-07 20:51:19 -08:00
pin_ls_names_test.go shutdown daemon after test (#11135) 2026-01-07 20:51:19 -08:00
pin_name_validation_test.go feat: limit pin names to 255 bytes (#10981) 2025-09-25 23:54:04 +02:00
ping_test.go shutdown daemon after test (#11135) 2026-01-07 20:51:19 -08:00
pinning_remote_test.go shutdown daemon after test (#11135) 2026-01-07 20:51:19 -08:00
pins_test.go shutdown daemon after test (#11135) 2026-01-07 20:51:19 -08:00
provide_stats_test.go feat(provide): detailed ipfs provide stat (#11019) 2025-10-23 20:29:36 +02:00
provider_test.go fix(routing): use LegacyProvider for HTTP-only custom routing (#11112) 2026-01-09 18:23:31 +01:00
pubsub_test.go feat(pubsub): persistent validation and diagnostic commands (#11110) 2026-01-16 00:27:09 +01:00
rcmgr_test.go shutdown daemon after test (#11135) 2026-01-07 20:51:19 -08:00
repo_verify_test.go test: verifyWorkerRun and helptext (#11063) 2025-11-17 18:51:33 +01:00
routing_dht_test.go shutdown daemon after test (#11135) 2026-01-07 20:51:19 -08:00
rpc_auth_test.go test: add regression tests for API.Authorizations (#11060) 2025-11-17 18:52:05 +01:00
rpc_content_type_test.go feat(rpc): Content-Type headers and IPNS record get/put (#11067) 2026-01-30 23:41:55 +01:00
rpc_get_output_test.go feat(rpc): Content-Type headers and IPNS record get/put (#11067) 2026-01-30 23:41:55 +01:00
rpc_unixsocket_test.go Cleanup commented imports 2024-08-19 19:55:11 -07:00
stats_test.go shutdown daemon after test (#11135) 2026-01-07 20:51:19 -08:00
swarm_test.go shutdown daemon after test (#11135) 2026-01-07 20:51:19 -08:00
telemetry_test.go feat(telemetry): collect high level provide DHT sweep settings (#11056) 2025-11-13 01:28:15 +01:00
tracing_test.go shutdown daemon after test (#11135) 2026-01-07 20:51:19 -08:00
transports_test.go shutdown daemon after test (#11135) 2026-01-07 20:51:19 -08:00
webui_test.go feat: ipfs-webui v4.9.0 with retrieval diagnostics (#10969) 2025-09-19 04:16:21 +02:00