Skip to content

Instantly share code, notes, and snippets.

@hacdias
Created December 5, 2022 13:20
Show Gist options
  • Save hacdias/ae85536f8ad258c2c0605efee89173db to your computer and use it in GitHub Desktop.
Save hacdias/ae85536f8ad258c2c0605efee89173db to your computer and use it in GitHub Desktop.
js-kubo-rpc-client Kubo 0.17 tests
> kubo-rpc-client@1.0.3 test
> aegir test "--bail=false"
test node.js
Warning: Cannot find any files matching pattern "dist/test/node.{js,cjs,mjs}"
agent
✔ restricts the number of concurrent connections (1627ms)
.swarm.peers
✔ handles a peer response
✔ handles an ip6 quic peer
✔ handles an error response
'deal with HTTP weirdness' tests
✔ does not crash if no content-type header is provided (134ms)
trailer headers
- should deal with trailer x-stream-error correctly
error handling
✔ should handle plain text error response (138ms)
✔ should handle JSON error response (121ms)
✔ should handle JSON error response with invalid JSON (127ms)
custom headers
supported in the constructor
✔ regular API calls
✔ multipart API calls
supported as API call arguemnts
✔ regular API calls
✔ multipart API calls
.commands
✔ lists commands
js-kubo-rpc-client constructor tests
parameter permuations
✔ none
✔ opts
✔ opts with URL components from URL
✔ multiaddr dns4 string (implicit http)
✔ multiaddr dns4 string (explicit https)
✔ multiaddr ipv4 string (implicit http) (136ms)
✔ multiaddr ipv4 string (explicit https) (116ms)
✔ multiaddr instance
✔ host and port strings
✔ URL as string
✔ URL as URL
✔ host, port and api path
✔ options.url as URL string
✔ options.url as URL
✔ options.url as multiaddr (implicit http)
✔ options.url as multiaddr (explicit https)
✔ options.url as multiaddr string (implicit http)
✔ options.url as multiaddr string (explicit https)
integration
✔ can connect to an ipfs http api (46ms)
.dag
✔ should be able to put and get a DAG node with dag-pb codec
✔ should be able to put and get a DAG node with dag-cbor codec
✔ should be able to put and get a DAG node with raw codec
✔ should error when missing DAG resolver for multicodec from requested CID
✔ should error when putting node with esoteric codec
✔ should pass through raw bytes with inputCodec
✔ should attempt to load an unsupported codec
✔ should allow formats to be specified without overwriting others (40ms)
.diag
api API
- .diag.net
✔ .diag.sys
✔ .diag.cmds
.getEndpointConfig
✔ should return the endpoint configuration
exports
✔ should export the expected types and utilities
.add
✔ should ignore metadata until https://github.com/ipfs/go-ipfs/issues/6920 is implemented (58ms)
go-ipfs current
.add
- should add a File
- should add a File as tuple
✔ should add a Uint8Array (49ms)
✔ should add a BIG Uint8Array (85ms)
✔ should add a BIG Uint8Array with progress enabled
✔ should add an empty file with progress enabled (63ms)
✔ should receive file name from progress event (60ms)
✔ should add an empty file without progress enabled
✔ should add a Uint8Array as tuple
✔ should add a string (65ms)
✔ should add a TypedArray (61ms)
- should add readable stream
✔ should fail when passed invalid input
✔ should fail when passed undefined input
✔ should fail when passed null input
✔ should fail when passed multiple file objects
✔ should wrap content in a directory (41ms)
✔ should add with only-hash=true
✔ should add with sha2-256 by default (74ms)
✔ should add with a different hashing algorithm (63ms)
- should add with mode as string (TODO not implemented in kubo yet)
- should add with mode as number (TODO not implemented in kubo yet)
- should add with mtime as Date (TODO not implemented in kubo yet)
- should add with mtime as { nsecs, secs } (TODO not implemented in kubo yet)
- should add with mtime as timespec (TODO not implemented in kubo yet)
- should add with mtime as hrtime (TODO not implemented in kubo yet)
✔ should add from a HTTP URL (66ms)
✔ should add from a HTTP URL with redirection (77ms)
✔ should add from a URL with only-hash=true (512ms)
✔ should add from a URL with wrap-with-directory=true (71ms)
✔ should add from a URL with wrap-with-directory=true and URL-escaped file name (93ms)
✔ should not add from an invalid url
✔ should respect raw leaves when file is smaller than one block and no metadata is present (59ms)
- should override raw leaves when file is smaller than one block and metadata is present (TODO not implemented in kubo yet)
✔ should add a file with a v1 CID
✔ should be able to add dir without sharding (16466ms)
with sharding
✔ should be able to add dir with sharding (24271ms)
.addAll
- should add a File as array of tuples
✔ should add a Uint8Array as array of tuples (57ms)
✔ should add array of objects with readable stream content (62ms)
✔ should add a nested directory as array of tupples (244ms)
✔ should add a nested directory as array of tupples with progress
✔ should receive progress path as empty string when adding content without paths (130ms)
✔ should receive file name from progress event (93ms)
✔ should add files to a directory non sequentially (104ms)
✔ should fail when passed invalid input
✔ should fail when passed single file objects
✔ should fail when passed single strings
✔ should fail when passed single buffers
✔ should wrap content in a directory (45ms)
✔ should add a directory with only-hash=true
- should add with mode as string (TODO not implemented in kubo yet)
- should add with mode as number (TODO not implemented in kubo yet)
- should add with mtime as Date (TODO not implemented in kubo yet)
- should add with mtime as { nsecs, secs } (TODO not implemented in kubo yet)
- should add with mtime as timespec (TODO not implemented in kubo yet)
- should add with mtime as hrtime (TODO not implemented in kubo yet)
✔ should add a directory from the file system (434ms)
✔ should add a directory from the file system with an odd name (395ms)
✔ should ignore a directory from the file system (59ms)
✔ should add a file from the file system
✔ should add a hidden file in a directory from the file system (116ms)
✔ should add a file with only-hash=true
✔ should add all with sha2-256 by default (74ms)
✔ should add all with a different hashing algorithm (64ms)
✔ should respect raw leaves when file is smaller than one block and no metadata is present (72ms)
- should override raw leaves when file is smaller than one block and metadata is present (TODO not implemented in kubo yet)
- should add directories with metadata (TODO not implemented in kubo yet)
- should support bidirectional streaming (Not supported by http)
- should error during add-all stream (Not supported by http)
✔ should add big files (16895ms)
.cat
✔ should respect timeout option when catting files
✔ should cat with a base58 string encoded multihash
✔ should cat with a Uint8Array multihash
✔ should cat with a CID object
✔ should cat a file added as CIDv0 with a CIDv1
✔ should cat a file added as CIDv1 with a CIDv0
✔ should cat a BIG file (204ms)
✔ should cat with IPFS path
✔ should cat with IPFS path, nested value
✔ should cat with IPFS path, deeply nested value
✔ should error on invalid key
✔ should error on unknown path
✔ should error on dir path
- should export a chunk of a file (TODO not implemented in kubo yet)
.get
✔ should respect timeout option when getting files
✔ should get with a base58 encoded multihash
✔ should get a file added as CIDv0 with a CIDv1
✔ should get a file added as CIDv1 with a CIDv0
✔ should get a file added as CIDv1 with rawLeaves
✔ should get a BIG file (1436ms)
✔ should get a directory (168ms)
✔ should get a nested directory (63ms)
✔ should get with ipfs path, as object and nested value
✔ should compress a file directly
✔ should compress a file as a tarball
✔ should not compress a directory
✔ should compress a file with invalid compression level
✔ should compress a directory as a tarball
✔ should error on invalid key
✔ get path containing "+"s (66ms)
.ls
✔ should respect timeout option when listing files
✔ should ls with a base58 encoded CID (181ms)
✔ should ls files added as CIDv0 with a CIDv1 (79ms)
✔ should ls files added as CIDv1 with a CIDv0 (86ms)
✔ should correctly handle a non existing hash
✔ should correctly handle a non existing path
✔ should ls files by path (74ms)
- should ls with metadata (TODO not implemented in kubo yet)
✔ should ls files by subdir (87ms)
✔ should ls single file (77ms)
- should ls single file with metadata (TODO not implemented in kubo yet)
✔ should ls single file without containing directory (53ms)
- should ls single file without containing directory with metadata (TODO not implemented in kubo yet)
.refs
1) should print added files
2) should print files in edges format
3) should print files in custom format
4) should follow a path, <hash>/<subdir>
5) should follow a path, <hash>/<subdir>/<subdir>
6) should follow a path with recursion, <hash>/<subdir>
7) should recursively follows folders, -r
8) should get refs with recursive and unique option
9) should get refs with max depth of 1
10) should get refs with max depth of 2
11) should get refs with max depth of 3
✔ should get refs with max depth of 0
12) should follow a path with max depth 1, <hash>/<subdir>
13) should follow a path with max depth 2, <hash>/<subdir>
14) should print refs for multiple paths
✔ should not be able to specify edges and format
✔ should print nothing for non-existent hashes (2003ms)
✔ should respect timeout option when listing refs
15) should get refs with cbor links
.refs.local
✔ should get local refs (184ms)
.bitswap.stat
✔ should get bitswap stats
✔ should not get bitswap stats when offline (893ms)
.bitswap.wantlist
✔ should respect timeout option when getting bitswap wantlist
✔ should get the wantlist
✔ should not get the wantlist when offline (862ms)
✔ should remove blocks from the wantlist when requests are cancelled (105ms)
✔ should keep blocks in the wantlist when only one request is cancelled (1218ms)
.bitswap.wantlistForPeer
✔ should get the wantlist by peer ID for a different node
transfer blocks
transfer a block between
✔ 2 peers (1670ms)
✔ 3 peers (2741ms)
transfer a file between
✔ 2 peers (1684ms)
.bitswap.unwant (TODO not implemented in kubo yet)
- should throw error for invalid CID input
.block.get
✔ should respect timeout option when getting a block
✔ should get by CID
✔ should get an empty block
16) should get a block added as CIDv0 with a CIDv1
✔ should get a block added as CIDv1 with a CIDv0
✔ should get a block with an identity CID, without putting first
✔ should return an error for an invalid CID
.block.put
17) should put a buffer, using defaults
✔ should put a buffer, using options (39ms)
✔ should put a Block instance
.block.rm
✔ should respect timeout option when removing a block
✔ should remove by CID object
✔ should remove multiple CIDs (50ms)
18) should error when removing non-existent blocks
✔ should not error when force removing non-existent blocks
✔ should return empty output when removing blocks quietly
✔ should error when removing pinned blocks (39ms)
✔ should throw error for invalid CID input
.block.stat
✔ should respect timeout option when statting a block
✔ should stat by CID
✔ should return error for missing argument
✔ should return error for invalid argument
.bootstrap.add
✔ should return an error when called with an invalid arg
✔ should return a list containing the bootstrap peer when called with a valid arg (ip4)
✔ should prevent duplicate inserts of bootstrap peers
✔ add a peer to the bootstrap list
.bootstrap.clear
✔ should return a list containing the peer removed when called with a valid arg (ip4)
✔ should return a list of all peers removed when all option is passed
.bootstrap.list
✔ should return a list of peers
.bootstrap.reset
✔ should return a list of bootstrap peers when resetting the bootstrap nodes
✔ should return a list of all peers removed when all option is passed
.bootstrap.rm
✔ should return an error when called with an invalid arg
✔ should return a list containing the peer removed when called with a valid arg (ip4)
✔ removes a peer from the bootstrap list
.config.get
✔ should fail with error
✔ should retrieve a value through a key
✔ should retrieve a value through a nested key
✔ should fail on non valid key
✔ should fail on non existent key
.config.getAll
✔ should retrieve the whole config
✔ should retrieve the whole config with options
.config.set
✔ should set a new key
✔ should set an already existing key
✔ should set a number
✔ should set a boolean
✔ should set the other boolean
✔ should set a JSON object
✔ should fail on non valid key
✔ should fail on non valid value
.config.replace (FIXME Waiting for fix on kubo https://github.com/ipfs/js-ipfs-http-client/pull/307#discussion_r69281789 and https://github.com/ipfs/kubo/issues/2927)
- should replace the whole config
- should replace to empty config
.config.profiles.apply
✔ should apply a config profile
- should strip private key from diff output (TODO: Not implemented in kubo)
✔ should not apply a config profile in dry-run mode
.config.profiles.list
- should list config profiles (TODO: Not implemented in kubo)
.dag.export
✔ should export a car file (53ms)
✔ export of shuffled devnet export identical to canonical original (1364ms)
✔ export of shuffled testnet export identical to canonical original (8907ms)
.dag.get
✔ should respect timeout option when getting a DAG node
✔ should get a dag-pb node
✔ should get a dag-cbor node
✔ should get a dag-pb node with path
✔ should get a dag-pb node local value
- should get a dag-pb node value one level deep
- should get a dag-pb node value two levels deep
✔ should get a dag-cbor node with path
✔ should get a dag-cbor node local value
- should get dag-cbor node value one level deep
- should get dag-cbor node value two levels deep
- should get dag-cbor value via dag-pb node
- should get only a CID, due to resolving locally only (FIXME: kubo does not support localResolve option)
✔ should get dag-pb value via dag-cbor node
✔ should get by CID with path option
- should get only a CID, due to resolving locally only (FIXME: kubo does not support localResolve option)
✔ should get with options and no path
- should get a node added as CIDv0 with a CIDv1 (kubo doesn't use CIDv0 for DAG API anymore)
✔ should get a node added as CIDv1 with a CIDv0
✔ should be able to get part of a dag-cbor node
✔ should be able to traverse from one dag-cbor node to another
✔ should be able to get a DAG node with format raw
✔ should be able to get a dag-cbor node with the identity hash
✔ should throw error for invalid string CID input
✔ should throw error for invalid buffer CID input
✔ should return nested content when getting a CID with a path
✔ should not return nested content when getting a CID with a path and localResolve is true
✔ should get a dag-jose node
✔ should get a dag-jose node with path
✔ should get a dag-jose node local value
✔ should get dag-cbor value via dag-jose node
✔ should get dag-cbor cid via dag-jose node if local resolve
.dag.put
✔ should put dag-pb with default hash func (sha2-256)
✔ should put dag-pb with non-default hash func (sha2-512)
✔ should put dag-cbor with default hash func (sha2-256)
✔ should put dag-cbor with non-default hash func (sha2-512)
✔ should put dag-jose with default hash func (sha2-256)
✔ should put dag-jose with non-default hash func (sha2-512)
✔ should return the cid
✔ should not fail when calling put without options
✔ should set defaults when calling put without options
✔ should override hash algorithm default and resolve with it
- should put by passing the cid instead of format and hashAlg
.dag.import
✔ should import a car file (85ms)
✔ should import a car file without pinning the roots (65ms)
✔ should import multiple car files (165ms)
19) should import car with roots but no blocks
✔ should import lotus devnet genesis shuffled nulroot (1427ms)
.dag.resolve
✔ should respect timeout option when resolving a path within a DAG node
✔ should resolve a path inside a cbor node
✔ should resolve a path inside a cbor node by CID
✔ should resolve a multi-node path inside a cbor node
✔ should resolve a multi-node path inside a cbor node by CID
✔ should resolve a raw node
✔ should resolve a path inside a dag-pb node linked to from another dag-pb node
.dag (sharness-t0053-dag)
✔ sanity check
✔ can add an ipld object using defaults (dag-json to dag-cbor)
✔ can add an ipld object using dag-json to dag-json
✔ can add an ipld object using dag-json to dag-cbor
✔ can add an ipld object using cid-base=base58btc
✔ can add a dag-cbor input block stored as dag-cbor
✔ can add a dag-cbor input block stored as dag-pb
✔ can add a dag-cbor input block stored as dag-json
✔ can add a dag-json input block stored as dag-cbor
✔ can add a dag-json input block stored as dag-pb
✔ can add a dag-json input block stored as dag-json
✔ can add a dag-pb input block stored as dag-cbor
✔ can add a dag-pb input block stored as dag-pb
✔ can add a dag-pb input block stored as dag-json
✔ can get dag-cbor, dag-json, dag-pb blocks as dag-json
✔ resolving sub-objects works
.dht.put
✔ should put a value to the DHT (88ms)
.dht.get
✔ should respect timeout option when getting a value from the DHT (88ms)
✔ should error when getting a non-existent key from the DHT
✔ should get a value after it was put on another node
.dht.findPeer
✔ should respect timeout option when finding a peer on the DHT
✔ should find other peers
20) should fail to find other peer if peer does not exist
.dht.provide
✔ should provide local CID (76ms)
✔ should not provide if block not found locally
✔ should provide a CIDv1 (50ms)
✔ should error on non CID arg
.dht.findProvs
✔ should respect timeout option when finding providers on the DHT
✔ should be able to find providers
.dht.query
✔ should respect timeout option when querying the DHT
✔ should return the other node in the query
disabled
- should error when DHT not available (go returns a query error)
.files.chmod
- should update the mode for a file (TODO not implemented in kubo yet)
- should update the mode for a directory (TODO not implemented in kubo yet)
- should update the mode for a hamt-sharded-directory (TODO not implemented in kubo yet)
- should update modes with basic symbolic notation that adds bits (TODO not implemented in kubo yet)
- should update modes with basic symbolic notation that removes bits (TODO not implemented in kubo yet)
- should update modes with basic symbolic notation that overrides bits (TODO not implemented in kubo yet)
- should update modes with multiple symbolic notation (TODO not implemented in kubo yet)
- should update modes with special symbolic notation (TODO not implemented in kubo yet)
- should apply special execute permissions to world (TODO not implemented in kubo yet)
- should apply special execute permissions to user (TODO not implemented in kubo yet)
- should apply special execute permissions to user and group (TODO not implemented in kubo yet)
- should apply special execute permissions to sharded directories (TODO not implemented in kubo yet)
.files.cp
✔ refuses to copy files without a source
✔ refuses to copy files without a source, even with options
✔ refuses to copy files without a destination
✔ refuses to copy files without a destination, even with options
✔ refuses to copy a non-existent file
- refuses to copy multiple files to a non-existent child directory (TODO kubo does not support copying multiple files at once)
- refuses to copy files to an unreadable node (TODO kubo does not support identity format, maybe in 0.5.0?)
✔ refuses to copy files to an exsting file (120ms)
✔ refuses to copy a file to itself (54ms)
✔ copies a file to new location (80ms)
- copies a file to a pre-existing directory (TODO kubo does not copying files into existing directories if the directory is specify as the target path)
✔ copies directories (53ms)
✔ copies directories recursively (72ms)
- copies multiple files to new location (TODO kubo does not support copying multiple files at once)
✔ copies files from ipfs paths (81ms)
✔ copies files from deep ipfs paths (102ms)
- copies files to deep mfs paths and creates intermediate directories (TODO kubo does not support the parents flag in the cp command)
✔ fails to copy files to deep mfs paths when intermediate directories do not exist (72ms)
- should respect metadata when copying files (TODO not implemented in kubo yet)
- should respect metadata when copying directories (TODO not implemented in kubo yet)
- should respect metadata when copying from outside of mfs (TODO not implemented in kubo yet)
with sharding
- copies a sharded directory to a normal directory (TODO kubo does not copying files into existing directories if the directory is specify as the target path)
- copies a normal directory to a sharded directory (TODO kubo does not copying files into existing directories if the directory is specify as the target path)
✔ copies a file from a normal directory to a sharded directory (9763ms)
✔ copies a file from a sharded directory to a sharded directory (267ms)
✔ copies a file from a sharded directory to a normal directory (206ms)
.files.flush
✔ should not flush not found file/dir, expect error
✔ should require a path
✔ should flush root
✔ should flush specific dir
.files.ls
✔ should require a path
✔ lists the root directory (69ms)
✔ refuses to lists files with an empty path
✔ refuses to lists files with an invalid path
✔ lists files in a directory
✔ lists a file
✔ fails to list non-existent file
- lists a raw node (TODO kubo does not support ipfs paths for all mfs commands)
- lists a raw node in an mfs directory (TODO kubo does not support non-ipfs nodes in mfs)
with sharding
✔ lists a sharded directory contents (10091ms)
✔ lists a file inside a sharded directory directly (116ms)
✔ lists the contents of a directory inside a sharded directory (297ms)
.files.mkdir
✔ requires a directory
✔ refuses to create a directory without a leading slash
✔ refuses to recreate the root directory when -p is false
✔ refuses to create a nested directory when -p is false
✔ creates a directory
✔ refuses to create a directory that already exists (47ms)
✔ does not error when creating a directory that already exists and parents is true
✔ creates a nested directory when -p is true (52ms)
✔ creates nested directories
✔ creates a nested directory with a different CID version to the parent (51ms)
✔ creates a nested directory with a different hash function to the parent (76ms)
- should make directory and have default mode (TODO not implemented in kubo yet)
- should make directory and specify mode as string (TODO not implemented in kubo yet)
- should make directory and specify mode as number (TODO not implemented in kubo yet)
- should make directory and specify mtime as Date (TODO not implemented in kubo yet)
- should make directory and specify mtime as { nsecs, secs } (TODO not implemented in kubo yet)
- should make directory and specify mtime as timespec (TODO not implemented in kubo yet)
- should make directory and specify mtime as hrtime (TODO not implemented in kubo yet)
with sharding
✔ makes a directory inside a sharded directory (9120ms)
.files.mv
✔ refuses to move files without arguments
✔ refuses to move files without enough arguments
✔ moves a file (75ms)
✔ moves a directory (40ms)
✔ moves directories recursively (59ms)
with sharding
✔ moves a sharded directory to a normal directory (8333ms)
✔ moves a normal directory to a sharded directory (148ms)
✔ moves a sharded directory to a sharded directory (215ms)
✔ moves a file from a normal directory to a sharded directory (229ms)
✔ moves a file from a sharded directory to a normal directory (197ms)
✔ moves a file from a sharded directory to a sharded directory (225ms)
✔ moves a file from a sub-shard of a sharded directory to a sharded directory (223ms)
.files.read
✔ reads a small file (67ms)
✔ reads a file with an offset (48ms)
✔ reads a file with a length (50ms)
✔ reads a file with an offset and a length (52ms)
✔ refuses to read a directory
✔ refuses to read a non-existent file
- should read from outside of mfs (TODO not implemented in kubo yet)
with sharding
✔ reads file from inside a sharded directory (8885ms)
.files.rm
✔ should not remove not found file/dir, expect error
✔ refuses to remove files without arguments
✔ refuses to remove the root path
✔ refuses to remove a directory without the recursive flag
✔ refuses to remove a non-existent file
✔ removes a file (67ms)
- removes multiple files (TODO kubo does not support removing multiple files)
✔ removes a directory
✔ recursively removes a directory
✔ recursively removes a directory with files in (75ms)
- results in the same hash as a sharded directory created by the importer when removing a file (TODO kubo errors out with HTTPError: Could not convert value "85675" to type "bool" (for option "-size"))
- results in the same hash as a sharded directory created by the importer when removing a subshard (TODO kubo errors out with HTTPError: Could not convert value "2109" to type "bool" (for option "-size"))
- results in the same hash as a sharded directory created by the importer when removing a file from a subshard of a subshard (TODO kubo errors out with HTTPError: Could not convert value "170441" to type "bool" (for option "-size"))
- results in the same hash as a sharded directory created by the importer when removing a subshard of a subshard (TODO kubo errors out with HTTPError: Could not convert value "11463" to type "bool" (for option "-size"))
with sharding
✔ recursively removes a sharded directory inside a normal directory (9806ms)
✔ recursively removes a sharded directory inside a sharded directory (218ms)
.files.stat
✔ refuses to stat files with an empty path
✔ refuses to lists files with an invalid path
✔ fails to stat non-existent file
✔ stats an empty directory
- computes how much of the DAG is local
✔ stats a small file (82ms)
✔ stats a large file (89ms)
✔ stats a raw node (95ms)
✔ stats a raw node in an mfs directory (107ms)
- stats a dag-cbor node (TODO kubo does not support non-dag-pb nodes in mfs)
- stats an identity CID (TODO kubo does not support non-dag-pb nodes in mfs)
- should stat file with mode (TODO not implemented in kubo yet)
- should stat file with mtime (TODO not implemented in kubo yet)
✔ should stat dir (101ms)
- should stat dir with mode (TODO not implemented in kubo yet)
- should stat dir with mtime (TODO not implemented in kubo yet)
- should stat sharded dir with mode (TODO not implemented in kubo yet)
- should stat sharded dir with mtime (TODO not implemented in kubo yet)
- should stat withLocal file
- should stat withLocal dir
✔ should stat outside of mfs
with sharding
✔ stats a sharded directory (9705ms)
✔ stats a file inside a sharded directory (127ms)
.files.touch
- should have default mtime (TODO not implemented in kubo yet)
- should update file mtime (TODO not implemented in kubo yet)
- should update directory mtime (TODO not implemented in kubo yet)
- should update the mtime for a hamt-sharded-directory (TODO not implemented in kubo yet)
- should create an empty file (TODO not implemented in kubo yet)
- should set mtime as Date (TODO not implemented in kubo yet)
- should set mtime as { nsecs, secs } (TODO not implemented in kubo yet)
- should set mtime as timespec (TODO not implemented in kubo yet)
- should set mtime as hrtime (TODO not implemented in kubo yet)
.files.write
✔ explodes if it cannot convert content to a source
✔ explodes if given an invalid path
✔ explodes if given a negative offset
✔ explodes if given a negative length
✔ creates a zero length file when passed a zero length
✔ writes a small file using a buffer (53ms)
✔ writes a small file using a string (57ms)
✔ writes part of a small file using a string (50ms)
✔ writes a small file using a Node stream (Node only) (56ms)
- writes a small file using an HTML5 Blob (Browser only)
- writes a small file with an escaped slash in the title (TODO kubo does not support escapes in paths)
✔ writes a deeply nested small file (136ms)
✔ refuses to write to a file in a folder that does not exist
✔ refuses to write to a file that does not exist
✔ refuses to write to a path that has a file in it (58ms)
✔ limits how many bytes to write to a file (Small file) (71ms)
✔ limits how many bytes to write to a file (Large file) (86ms)
- limits how many bytes to write to a file (Really large file) (TODO kubo drops the connection)
✔ overwrites start of a file without truncating (Small file) (81ms)
✔ overwrites start of a file without truncating (Large file) (170ms)
✔ overwrites start of a file without truncating (Really large file) (326ms)
✔ pads the start of a new file when an offset is specified (Small file) (84ms)
✔ pads the start of a new file when an offset is specified (Large file) (55ms)
✔ pads the start of a new file when an offset is specified (Really large file) (71ms)
✔ expands a file when an offset is specified (Small file) (150ms)
✔ expands a file when an offset is specified (Large file) (118ms)
✔ expands a file when an offset is specified (Really large file) (139ms)
✔ expands a file when an offset is specified and the offset is longer than the file (Small file) (153ms)
✔ expands a file when an offset is specified and the offset is longer than the file (Large file) (121ms)
✔ expands a file when an offset is specified and the offset is longer than the file (Really large file) (153ms)
✔ truncates a file after writing (Small file) (82ms)
✔ truncates a file after writing (Large file)
✔ truncates a file after writing (Really large file) (38ms)
✔ writes a file with raw blocks for newly created leaf nodes (Small file) (54ms)
✔ writes a file with raw blocks for newly created leaf nodes (Large file) (70ms)
✔ writes a file with raw blocks for newly created leaf nodes (Really large file) (324ms)
✔ supports concurrent writes (649ms)
✔ rewrites really big files (255ms)
✔ writes a file with a different CID version to the parent (117ms)
- overwrites a file with a different CID version (TODO kubo does not support changing the CID version)
- partially overwrites a file with a different CID version (TODO kubo does not support changing the CID version)
✔ writes a file with a different hash function to the parent (137ms)
- should write file and specify mode as a string (TODO not implemented in kubo yet)
- should write file and specify mode as a number (TODO not implemented in kubo yet)
- should write file and specify mtime as Date (TODO not implemented in kubo yet)
- should write file and specify mtime as { nsecs, secs } (TODO not implemented in kubo yet)
- should write file and specify mtime as timespec (TODO not implemented in kubo yet)
- should write file and specify mtime as hrtime (TODO not implemented in kubo yet)
with sharding
✔ shards a large directory when writing too many links to it (580ms)
- results in the same hash as a sharded directory created by the importer when adding a new file (TODO kubo errors out with HTTPError: Could not convert value "5835" to type "bool" (for option "-size"))
- results in the same hash as a sharded directory created by the importer when creating a new subshard (TODO kubo errors out with HTTPError: Could not convert value "8038" to type "bool" (for option "-size"))
- results in the same hash as a sharded directory created by the importer when adding a file to a subshard (HTTPError: Could not convert value "6620" to type "bool" (for option "-size"))
- results in the same hash as a sharded directory created by the importer when adding a file to a subshard of a subshard (HTTPError: Could not convert value "170441" to type "bool" (for option "-size"))
✔ writes a file to an already sharded directory (10186ms)
✔ overwrites a file in a sharded directory when positions do not match (200ms)
✔ overwrites file in a sharded directory (185ms)
✔ overwrites a file in a subshard of a sharded directory (177ms)
✔ writes a file to a sub-shard of a shard that contains another sub-shard (1014ms)
.key.gen
- should generate a new rsa key
- should generate a new ed25519 key
- should generate a new default key
.key.list
✔ should list all the keys (192ms)
.key.rename
✔ should rename a key (102ms)
.key.rm
✔ should rm a key (148ms)
.key.import (TODO not implemented in kubo yet)
- should import an exported key
.id
✔ should get the node ID
- should have protocols property (TODO not implemented in kubo yet)
✔ should return swarm ports opened after startup
✔ should get the id of another node in the swarm (776ms)
✔ should get our own id when passed as an option
.version
✔ should get the node version
- should include the ipfs-http-client version (TODO not implemented in kubo yet)
- should include the interface-ipfs-core version (TODO not implemented in kubo yet)
.dns
✔ should non-recursively resolve ipfs.io
✔ should recursively resolve ipfs.io
✔ should resolve subdomain docs.ipfs.io
.stop
✔ should stop the node
.resolve
✔ should resolve an IPFS hash (48ms)
✔ should resolve an IPFS hash and return a base64url encoded CID in path (60ms)
✔ should resolve an IPFS path link (75ms)
✔ should resolve up to the last node
✔ should resolve up to the last node across multiple nodes
✔ should resolve an IPNS DNS link
✔ should resolve IPNS link recursively by default (1046ms)
✔ should resolve IPNS link non-recursively if recursive==false (1044ms)
.name.publish offline
✔ should publish an IPNS record with the default params
✔ should publish correctly with the lifetime option and resolve (67ms)
✔ should publish correctly when the file was not added but resolve is disabled
✔ should publish with a key received as param, instead of using the key of the node (149ms)
.name.resolve offline
✔ should resolve a record default options (174ms)
✔ should resolve a record from peerid as cidv1 in base32 (65ms)
✔ should resolve a record recursive === false (62ms)
✔ should resolve a record recursive === true (199ms)
✔ should resolve a record default options with remainder (160ms)
✔ should resolve a record recursive === false with remainder (68ms)
✔ should resolve a record recursive === true with remainder (217ms)
✔ should not get the entry if its validity time expired (576ms)
.name.resolve dns
✔ should resolve /ipns/ipfs.io
✔ should resolve /ipns/ipfs.io recursive === false
✔ should resolve /ipns/ipfs.io recursive === true
✔ should resolve /ipns/ipfs.io with remainder
✔ should resolve /ipns/ipfs.io with remainder recursive === false
✔ should resolve /ipns/ipfs.io with remainder recursive === true
✔ should fail to resolve /ipns/ipfs.a
✔ should resolve ipns path with hamt-shard recursive === true
.name.pubsub.cancel
✔ should return false when the name that is intended to cancel is not subscribed
- should cancel a subscription correctly returning true (kubo is really slow for publishing and resolving ipns records, unless in offline mode)
.name.pubsub.state
✔ should get the current state of pubsub
.name.pubsub.subs
✔ should get an empty array as a result of subscriptions before any resolve
- should get the list of subscriptions updated after a resolve (kubo is really slow for publishing and resolving ipns records, unless in offline mode)
.name.pubsub
- should publish and then resolve correctly (js-ipfs and kubo behaviour differs)
- should self resolve, publish and then resolve correctly (js-ipfs and kubo behaviour differs)
- should handle event on publish correctly (js-ipfs and kubo behaviour differs)
.object.new
✔ should create a new object with no template
✔ should create a new object with unixfs-dir template
.object.put
✔ should put an object
✔ should pin an object when putting (38ms)
✔ should not pin an object by default
✔ should put a Protobuf DAGNode
✔ should fail if a string is passed
✔ should put a Protobuf DAGNode with a link
.object.get
✔ should get object by multihash
✔ should get object with links by multihash string
- should get object by base58 encoded multihash (FIXME kubo throws invalid encoding: base58)
✔ should supply unaltered data (181ms)
✔ should error for request without argument
✔ returns error for request with invalid argument
.object.data
✔ should get data by CID
✔ returns error for request without argument
✔ returns error for request with invalid argument
.object.links
✔ should get empty links by multihash
✔ should get links by multihash
✔ should get links from CBOR object (138ms)
✔ returns error for request without argument
✔ returns error for request with invalid argument
.object.stat
✔ should get stats by multihash
✔ should get stats for object with links by multihash
✔ returns error for request without argument
✔ returns error for request with invalid argument
.object.patch.addLink
✔ should add a link to an existing node (46ms)
✔ returns error for request without arguments
✔ returns error for request with only one invalid argument
.object.patch.rmLink
✔ should remove a link from an existing node (49ms)
✔ returns error for request without arguments
✔ returns error for request only one invalid argument
✔ returns error for request with invalid first argument
.object.patch.appendData
✔ should append data to an existing node
✔ returns error for request without key & data
✔ returns error for request without data
.object.patch.setData
✔ should set data for an existing node
✔ returns error for request without key & data
✔ returns error for request without data
.pin.add
✔ should add a CID and return the added CID
✔ should add a pin with options and return the added CID
✔ should add recursively
✔ should add directly
✔ should recursively pin parent of direct pin (73ms)
✔ should fail to directly pin a recursive pin
✔ should fail to pin a hash not in datastore (2008ms)
✔ needs all children in datastore to pin recursively (2014ms)
✔ should pin dag-cbor (49ms)
✔ should pin raw (49ms)
✔ should pin dag-cbor with dag-pb child (71ms)
.pin.addAll
✔ should add an array of CIDs (49ms)
✔ should add a generator of CIDs (48ms)
✔ should add an async generator of CIDs (44ms)
✔ should add an array of pins with options (50ms)
✔ should add a generator of pins with options (64ms)
✔ should add an async generator of pins with options (52ms)
.pin.ls
✔ should list all recursive pins
✔ should list all indirect pins
✔ should list all types of pins
✔ should list all direct pins
✔ should list pins for a specific hash
✔ should throw an error on missing direct pins for existing path
✔ should throw an error on missing link for a specific path
✔ should list indirect pins for a specific path
✔ should list recursive pins for a specific hash
✔ should list pins for multiple CIDs
✔ should throw error for invalid non-string pin type option
✔ should throw error for invalid string pin type option
- should list pins with metadata (not implemented in kubo)
.pin.rm
✔ should remove a recursive pin (49ms)
✔ should remove a direct pin (54ms)
✔ should fail to remove an indirect pin
✔ should fail when an item is not pinned
.pin.rmAll
✔ should pipe the output of ls to rm (50ms)
.pin.remote.service
.pin.remote.service.add
✔ should add a service
✔ service add requires endpoint
✔ service add requires key
✔ add multiple services
✔ can not add service with existing name
.pin.remote.service.ls
✔ should list services
✔ should list added service
✔ should include service stats
✔ should report unreachable services
.pin.remote.service.rm
✔ should remove service
✔ should not fail if service does not registered
✔ expects service name
.pin.remote.add
✔ should add a CID and return the added CID (5343ms)
✔ should fail if service is not provided
✔ if name is not provided defaults to "" (5246ms)
✔ should default to blocking pin (5594ms)
✔ should pin dag-cbor (5441ms)
✔ should pin raw (5422ms)
.pin.remote.ls
✔ requires service option
✔ list no pins
list pins by status
✔ list only pinned pins by default (5771ms)
✔ should list "queued" pins (10791ms)
✔ should list "pinning" pins (5753ms)
✔ should list "failed" pins (5424ms)
✔ should list queued+pinned pins (5425ms)
✔ should list queued+pinned+pinning pins (5420ms)
✔ should list queued+pinned+pinning+failed pins (5434ms)
list pins by name
✔ should list no pins when names do not match (5244ms)
✔ should list only pins with matchin names (10784ms)
✔ should list only pins with matchin names & status (15596ms)
list pins by cid
✔ should list pins with matching cid (5488ms)
✔ should list pins with any matching cid (5448ms)
✔ should list pins with matching cid+status (5409ms)
✔ should list pins with matching cid+status+name (5465ms)
.pin.remote.rm
✔ .rm requires service option
✔ .rmAll requires service option
✔ noop if there is no match
✔ removes matching pin
✔ fails on multiple matches
.pin.remote.rmAll
✔ .rmAll requires service option
✔ noop if there is no match
✔ removes matching pin
✔ removes multiple matches
.ping
✔ should send the specified number of packets (3006ms)
- should fail when pinging a peer that is not available (FIXME kubo return success with text: Looking up peer <cid>)
✔ should fail when pinging an invalid peer Id
✔ can ping without options (10002ms)
.pubsub.publish
✔ should fail with undefined msg
✔ should publish message from buffer
✔ should publish 10 times within time limit
.pubsub.subscribe
single node
21) should subscribe to one topic
22) should subscribe to one topic with options
23) should subscribe to topic multiple times with different handlers
24) should allow discover option to be passed
multiple connected nodes
25) should receive messages from a different node with floodsub
26) should receive messages from a different node
27) should round trip a non-utf8 binary buffer
28) should receive multiple messages
29) should send/receive 100 messages
- should receive messages from a different node on lots of topics (HTTP clients cannot hold this many connections open)
30) should unsubscribe multiple handlers
31) should unsubscribe individual handlers
.pubsub.unsubscribe
✔ should subscribe and unsubscribe 10 times (4029ms)
✔ should subscribe 10 handlers and unsubscribe once with no reference to the handlers (4029ms)
.pubsub.peers
✔ should not error when not subscribed to a topic
✔ should not return extra peers
32) should return peers for a topic - one peer
33) should return peers for a topic - multiple peers
.pubsub.ls
✔ should return an empty list when no topics are subscribed
✔ should return a list with 1 subscribed topic
✔ should return a list with 3 subscribed topics
.repo.version
✔ should get the repo version
.repo.stat
✔ should get repo stats
.repo.gc
✔ should run garbage collection (74ms)
✔ should clean up unpinned data (79ms)
✔ should clean up removed MFS files (76ms)
✔ should clean up block only after unpinned and removed from MFS (190ms)
✔ should clean up indirectly pinned data after recursive pin removal (200ms)
.stats.bitswap
✔ should get bitswap stats
.stats.bw
✔ should get bandwidth stats
✔ should throw error for invalid interval option
.stats.repo
✔ should get repo stats
.swarm.connect
✔ should connect to a peer
.swarm.peers
✔ should list peers this node is connected to
✔ should list peers this node is connected to with verbose option
✔ should list peers only once (2601ms)
✔ should list peers only once even if they have multiple addresses (2755ms)
.swarm.addrs
✔ should get a list of node addresses
.swarm.localAddrs
✔ should list local addresses the node is listening on
.swarm.disconnect
✔ should disconnect from a peer
.key
.gen
✔ create a new rsa key (176ms)
✔ create a new ed25519 key
.list
✔ both keys show up + self
lib/error-handler
✔ should parse json error response
✔ should gracefully fail on parse json
✔ should gracefully fail on read text
.log
- .log.tail
✔ .log.ls
✔ .log.level
.ping
✔ .ping with default count (10012ms)
✔ .ping with count = 2 (2003ms)
.pubsub
.subscribe
✔ .onError when connection is closed
✔ does not call onError when aborted (230ms)
.repo
✔ .repo.gc
✔ .repo.stat
✔ .repo.version
stats
✔ .stats.bitswap
✔ .stats.bw
✔ .stats.repo
.pubsub
.subscribe
✔ .onError when connection is closed
✔ does not call onError when aborted (234ms)
613 passing (19m)
131 pending
33 failing
1) go-ipfs current
.refs
should print added files:
AssertionError: expected [] to deeply equal [ …(4) ]
+ expected - actual
-[]
+[
+ "QmRfqT4uTUgFXhWbfBZm6eZxi2FQ8pqYK5tcWRyTZ7RcgY"
+ "QmUXzZKa3xhTauLektUiK4GiogHskuz1c57CnnoP4TgYJD"
+ "QmYEJ7qQNZUvBnv4SZ3rEbksagaan3sGvnUq948vSG8Z34"
+ "QmYLvZrFn8KE2bcJ9UFhthScBVbbcXEgkJnnCBeKWYkpuQ"
+]
at Context.<anonymous> (file:///Users/hacdias/Code/ipfs/js-kubo-rpc-client/test/interface-tests/src/refs.js:73:48)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
2) go-ipfs current
.refs
should print files in edges format:
AssertionError: expected [] to deeply equal [ …(4) ]
+ expected - actual
-[]
+[
+ "Qmd5MhNjx3NSZm3L2QKG1TFvqkTRbtZwGJinqEfqpfHH7s -> QmRfqT4uTUgFXhWbfBZm6eZxi2FQ8pqYK5tcWRyTZ7RcgY"
+ "Qmd5MhNjx3NSZm3L2QKG1TFvqkTRbtZwGJinqEfqpfHH7s -> QmUXzZKa3xhTauLektUiK4GiogHskuz1c57CnnoP4TgYJD"
+ "Qmd5MhNjx3NSZm3L2QKG1TFvqkTRbtZwGJinqEfqpfHH7s -> QmYEJ7qQNZUvBnv4SZ3rEbksagaan3sGvnUq948vSG8Z34"
+ "Qmd5MhNjx3NSZm3L2QKG1TFvqkTRbtZwGJinqEfqpfHH7s -> QmYLvZrFn8KE2bcJ9UFhthScBVbbcXEgkJnnCBeKWYkpuQ"
+]
at Context.<anonymous> (file:///Users/hacdias/Code/ipfs/js-kubo-rpc-client/test/interface-tests/src/refs.js:73:48)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
3) go-ipfs current
.refs
should print files in custom format:
AssertionError: expected [] to deeply equal [ …(4) ]
+ expected - actual
-[]
+[
+ "animals: Qmd5MhNjx3NSZm3L2QKG1TFvqkTRbtZwGJinqEfqpfHH7s => QmYEJ7qQNZUvBnv4SZ3rEbksagaan3sGvnUq948vSG8Z34"
+ "atlantic-animals: Qmd5MhNjx3NSZm3L2QKG1TFvqkTRbtZwGJinqEfqpfHH7s => QmUXzZKa3xhTauLektUiK4GiogHskuz1c57CnnoP4TgYJD"
+ "fruits: Qmd5MhNjx3NSZm3L2QKG1TFvqkTRbtZwGJinqEfqpfHH7s => QmYLvZrFn8KE2bcJ9UFhthScBVbbcXEgkJnnCBeKWYkpuQ"
+ "mushroom.txt: Qmd5MhNjx3NSZm3L2QKG1TFvqkTRbtZwGJinqEfqpfHH7s => QmRfqT4uTUgFXhWbfBZm6eZxi2FQ8pqYK5tcWRyTZ7RcgY"
+]
at Context.<anonymous> (file:///Users/hacdias/Code/ipfs/js-kubo-rpc-client/test/interface-tests/src/refs.js:73:48)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
4) go-ipfs current
.refs
should follow a path, <hash>/<subdir>:
HTTPError: func called on wrong kind: "LookupBySegment" called on a bytes node (kind: bytes), but only makes sense on map or list
at Object.errorHandler [as handleError] (file:///Users/hacdias/Code/ipfs/js-kubo-rpc-client/src/lib/core.js:103:15)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at Client.fetch (node_modules/ipfs-utils/src/http.js:149:9)
at Object.refs (file:///Users/hacdias/Code/ipfs/js-kubo-rpc-client/src/refs/index.js:15:17)
at all (file:///Users/hacdias/Code/ipfs/js-kubo-rpc-client/node_modules/it-all/src/index.ts:8:20)
at Context.<anonymous> (file:///Users/hacdias/Code/ipfs/js-kubo-rpc-client/test/interface-tests/src/refs.js:70:22)
5) go-ipfs current
.refs
should follow a path, <hash>/<subdir>/<subdir>:
HTTPError: no link named "animals" under bafkreibqliqykyapxo235blsnpbncd77sioi3syt7sodsbikzaxibagply
at Object.errorHandler [as handleError] (file:///Users/hacdias/Code/ipfs/js-kubo-rpc-client/src/lib/core.js:103:15)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at Client.fetch (node_modules/ipfs-utils/src/http.js:149:9)
at Object.refs (file:///Users/hacdias/Code/ipfs/js-kubo-rpc-client/src/refs/index.js:15:17)
at all (file:///Users/hacdias/Code/ipfs/js-kubo-rpc-client/node_modules/it-all/src/index.ts:8:20)
at Context.<anonymous> (file:///Users/hacdias/Code/ipfs/js-kubo-rpc-client/test/interface-tests/src/refs.js:70:22)
6) go-ipfs current
.refs
should follow a path with recursion, <hash>/<subdir>:
HTTPError: func called on wrong kind: "LookupBySegment" called on a bytes node (kind: bytes), but only makes sense on map or list
at Object.errorHandler [as handleError] (file:///Users/hacdias/Code/ipfs/js-kubo-rpc-client/src/lib/core.js:103:15)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at Client.fetch (node_modules/ipfs-utils/src/http.js:149:9)
at Object.refs (file:///Users/hacdias/Code/ipfs/js-kubo-rpc-client/src/refs/index.js:15:17)
at all (file:///Users/hacdias/Code/ipfs/js-kubo-rpc-client/node_modules/it-all/src/index.ts:8:20)
at Context.<anonymous> (file:///Users/hacdias/Code/ipfs/js-kubo-rpc-client/test/interface-tests/src/refs.js:70:22)
7) go-ipfs current
.refs
should recursively follows folders, -r:
AssertionError: expected [] to deeply equal [ Array(12) ]
+ expected - actual
-[]
+[
+ "african.txt"
+ "americas.txt"
+ "animals"
+ "atlantic-animals"
+ "atlantic.txt"
+ "australian.txt"
+ "fruits"
+ "indian.txt"
+ "land"
+ "mushroom.txt"
+ "sea"
+ "tropical.txt"
+]
at Context.<anonymous> (file:///Users/hacdias/Code/ipfs/js-kubo-rpc-client/test/interface-tests/src/refs.js:73:48)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
8) go-ipfs current
.refs
should get refs with recursive and unique option:
AssertionError: expected [] to deeply equal [ …(11) ]
+ expected - actual
-[]
+[
+ "QmRfqT4uTUgFXhWbfBZm6eZxi2FQ8pqYK5tcWRyTZ7RcgY"
+ "QmUXzZKa3xhTauLektUiK4GiogHskuz1c57CnnoP4TgYJD"
+ "QmVX54jfjB8eRxLVxyQSod6b1FyDh7mR4mQie9j97i2Qk3"
+ "QmWEuXAjUGyndgr4MKqMBgzMW36XgPgvitt2jsXgtuc7JE"
+ "QmYEJ7qQNZUvBnv4SZ3rEbksagaan3sGvnUq948vSG8Z34"
+ "QmYLvZrFn8KE2bcJ9UFhthScBVbbcXEgkJnnCBeKWYkpuQ"
+ "Qma5z9bmwPcrWLJxX6Vj6BrcybaFg84c2riNbUKrSVf8h1"
+ "QmbrFTo4s6H23W6wmoZKQC2vSogGeQ4dYiceSqJddzrKVa"
+ "QmdHVR8M4zAdGctnTYq4fyPZjTwwzdcBpGWAfMAhAVfT9n"
+ "Qmf6MrqT2oAve9diagLTMCYFPEcSx7fnUdW3xAjhXm32vo"
+ "QmfP6D9bRV4FEYDL4EHZtZG58kDwDfnzmyjuyK5d1pvzbM"
+]
at Context.<anonymous> (file:///Users/hacdias/Code/ipfs/js-kubo-rpc-client/test/interface-tests/src/refs.js:73:48)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
9) go-ipfs current
.refs
should get refs with max depth of 1:
AssertionError: expected [] to deeply equal [ 'animals', 'atlantic-animals', …(2) ]
+ expected - actual
-[]
+[
+ "animals"
+ "atlantic-animals"
+ "fruits"
+ "mushroom.txt"
+]
at Context.<anonymous> (file:///Users/hacdias/Code/ipfs/js-kubo-rpc-client/test/interface-tests/src/refs.js:73:48)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
10) go-ipfs current
.refs
should get refs with max depth of 2:
AssertionError: expected [] to deeply equal [ 'animals', 'atlantic-animals', …(5) ]
+ expected - actual
-[]
+[
+ "animals"
+ "atlantic-animals"
+ "fruits"
+ "land"
+ "mushroom.txt"
+ "sea"
+ "tropical.txt"
+]
at Context.<anonymous> (file:///Users/hacdias/Code/ipfs/js-kubo-rpc-client/test/interface-tests/src/refs.js:73:48)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
11) go-ipfs current
.refs
should get refs with max depth of 3:
AssertionError: expected [] to deeply equal [ Array(12) ]
+ expected - actual
-[]
+[
+ "african.txt"
+ "americas.txt"
+ "animals"
+ "atlantic-animals"
+ "atlantic.txt"
+ "australian.txt"
+ "fruits"
+ "indian.txt"
+ "land"
+ "mushroom.txt"
+ "sea"
+ "tropical.txt"
+]
at Context.<anonymous> (file:///Users/hacdias/Code/ipfs/js-kubo-rpc-client/test/interface-tests/src/refs.js:73:48)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
12) go-ipfs current
.refs
should follow a path with max depth 1, <hash>/<subdir>:
HTTPError: func called on wrong kind: "LookupBySegment" called on a bytes node (kind: bytes), but only makes sense on map or list
at Object.errorHandler [as handleError] (file:///Users/hacdias/Code/ipfs/js-kubo-rpc-client/src/lib/core.js:103:15)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at Client.fetch (node_modules/ipfs-utils/src/http.js:149:9)
at Object.refs (file:///Users/hacdias/Code/ipfs/js-kubo-rpc-client/src/refs/index.js:15:17)
at all (file:///Users/hacdias/Code/ipfs/js-kubo-rpc-client/node_modules/it-all/src/index.ts:8:20)
at Context.<anonymous> (file:///Users/hacdias/Code/ipfs/js-kubo-rpc-client/test/interface-tests/src/refs.js:70:22)
13) go-ipfs current
.refs
should follow a path with max depth 2, <hash>/<subdir>:
HTTPError: func called on wrong kind: "LookupBySegment" called on a bytes node (kind: bytes), but only makes sense on map or list
at Object.errorHandler [as handleError] (file:///Users/hacdias/Code/ipfs/js-kubo-rpc-client/src/lib/core.js:103:15)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at Client.fetch (node_modules/ipfs-utils/src/http.js:149:9)
at Object.refs (file:///Users/hacdias/Code/ipfs/js-kubo-rpc-client/src/refs/index.js:15:17)
at all (file:///Users/hacdias/Code/ipfs/js-kubo-rpc-client/node_modules/it-all/src/index.ts:8:20)
at Context.<anonymous> (file:///Users/hacdias/Code/ipfs/js-kubo-rpc-client/test/interface-tests/src/refs.js:70:22)
14) go-ipfs current
.refs
should print refs for multiple paths:
HTTPError: func called on wrong kind: "LookupBySegment" called on a bytes node (kind: bytes), but only makes sense on map or list
at Object.errorHandler [as handleError] (file:///Users/hacdias/Code/ipfs/js-kubo-rpc-client/src/lib/core.js:103:15)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at Client.fetch (node_modules/ipfs-utils/src/http.js:149:9)
at Object.refs (file:///Users/hacdias/Code/ipfs/js-kubo-rpc-client/src/refs/index.js:15:17)
at all (file:///Users/hacdias/Code/ipfs/js-kubo-rpc-client/node_modules/it-all/src/index.ts:8:20)
at Context.<anonymous> (file:///Users/hacdias/Code/ipfs/js-kubo-rpc-client/test/interface-tests/src/refs.js:70:22)
15) go-ipfs current
.refs
should get refs with cbor links:
AssertionError: expected [ …(12) ] to deeply equal [ …(12) ]
+ expected - actual
[
- "bafkreiandvgy3rp75lu2pu3ygn2gw75suo5b53tsslzxugmf34zrho3a2u"
- "bafkreidrbesynsotufhovd3wectekngdkp3xegtrt63s6xyfmw7eokcl5e"
- "bafkreieetxauuss7djrcao5p77grssameerf6656cgbc3jzs77tzzefmia"
- "bafkreig4rzlftehx6svokgqeyx3i752hntpzqleihvmirqt7qgsxelw42y"
- "bafkreigrqlazhy7u22auvqwnnsq475sl5rqfoowee5ymktsoenhinxv5f4"
- "bafkreigrqlazhy7u22auvqwnnsq475sl5rqfoowee5ymktsoenhinxv5f4"
- "bafkreihqnltlgqm5ktthqmjpiyrewt5eoeonlr7kxh2sqg3pkcs5l33jjm"
- "bafkreihzoc7ro3zqctxm4sthtdlvyviworwothjn27tvfo475cwrowwx4u"
- "bafyreiaoiddqdbjjahkheiqh4eghnusdmezcdiy5fhnvjmxwpnbmllod5u"
- "bafyreifhj5j5noxq3grs6wfhrfhrxuu4weslyov4zrce75ttzld2vmfmdm"
- "bafyreifjhdylyzopj4nv7mxwwap5cohcbrmttcfeqcy52fuwmkjnxebxo4"
- "bafyreihg3s4c2saviuk3j3zb22tdtgowl42btoesyzrrqadphfuqfjiw5y"
+ "QmPDqvcuA4AkhBLBuh2y49yhUB98rCnxPxa3eVNC1kAbSC"
+ "QmVwtsLUHurA6wUirPSdGeEW5tfBEqenXpeRaqr8XN7bNY"
+ "QmXGL3ZdYV5rNLCfHe1QsFSQGekRFzgbBu1B3XGZ7DV9fd"
+ "QmcSVZRN5E814KkPy4EHnftNAR7htbFvVhRKKqFs4FBwDG"
+ "QmcSVZRN5E814KkPy4EHnftNAR7htbFvVhRKKqFs4FBwDG"
+ "QmdBcHbK7uDQav8YrHsfKju3EKn48knxjd96KRMFs3gtS9"
+ "QmeX96opBHZHLySMFoNiWS5msxjyX6rqtr3Rr1u7uxn7zJ"
+ "Qmf8MwTnY7VdcnF8WcoJ3GB24NmNd1HsGzuEWCtUYDP38x"
+ "bafyreiagelcmhfn33zuslkdo7fkes3dzcr2nju6meh75zm6vqklfqiojam"
+ "bafyreic2f6adq5tqnbrvwiqc3jkz2cf4tz3cz2rp6plpij2qaoufgsxwmi"
+ "bafyreidoqtyvflv5v4c3gd3izxvpq4flke55ayurbrnhsxh7z5wwjc6v6e"
+ "bafyreifs2ub2lnq6n2quqbi3zb5homs5iqlmm77b3am252cqzxiu7phwpy"
]
at Context.<anonymous> (file:///Users/hacdias/Code/ipfs/js-kubo-rpc-client/test/interface-tests/src/refs.js:90:46)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
16) go-ipfs current
.block.get
should get a block added as CIDv0 with a CIDv1:
AssertionError: expected 1 to equal +0
+ expected - actual
-1
+0
at Context.<anonymous> (file:///Users/hacdias/Code/ipfs/js-kubo-rpc-client/test/interface-tests/src/block/get.js:63:32)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
17) go-ipfs current
.block.put
should put a buffer, using defaults:
AssertionError: expected 'bafkreiaxnnnb7qz2focittuqq3ya25q7rcv3…' to equal 'QmPv52ekjS75L4JmHpXVeuJ5uX2ecSfSZo88N…'
+ expected - actual
-bafkreiaxnnnb7qz2focittuqq3ya25q7rcv3bqynnczfzako47346wosmu
+QmPv52ekjS75L4JmHpXVeuJ5uX2ecSfSZo88NSyxwA3rAQ
at Context.<anonymous> (file:///Users/hacdias/Code/ipfs/js-kubo-rpc-client/test/interface-tests/src/block/put.js:40:33)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
18) go-ipfs current
.block.rm
should error when removing non-existent blocks:
AssertionError: expected 'ipld: could not find bafkreidngpweaon…' to include 'block not found'
at Context.<anonymous> (file:///Users/hacdias/Code/ipfs/js-kubo-rpc-client/test/interface-tests/src/block/rm.js:100:72)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
19) go-ipfs current
.dag.import
should import car with roots but no blocks:
AssertionError: expected [ { root: { …(2) } }, …(1) ] to deep include { root: { …(2) } }
at Context.<anonymous> (file:///Users/hacdias/Code/ipfs/js-kubo-rpc-client/test/interface-tests/src/dag/import.js:131:31)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
20) go-ipfs current
.dht.findPeer
should fail to find other peer if peer does not exist:
AssertionError: expected [ { name: 'FINAL_PEER', …(2) } ] to be empty
at Context.<anonymous> (file:///Users/hacdias/Code/ipfs/js-kubo-rpc-client/test/interface-tests/src/dht/find-peer.js:69:73)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
21) go-ipfs current
.pubsub.subscribe
single node
should subscribe to one topic:
Error: Timeout of 80000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/Users/hacdias/Code/ipfs/js-kubo-rpc-client/test/interface-tests.spec.js)
at listOnTimeout (node:internal/timers:559:17)
at processTimers (node:internal/timers:502:7)
22) go-ipfs current
.pubsub.subscribe
single node
should subscribe to one topic with options:
Error: Timeout of 80000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/Users/hacdias/Code/ipfs/js-kubo-rpc-client/test/interface-tests.spec.js)
at listOnTimeout (node:internal/timers:559:17)
at processTimers (node:internal/timers:502:7)
23) go-ipfs current
.pubsub.subscribe
single node
should subscribe to topic multiple times with different handlers:
Error: Timeout of 80000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/Users/hacdias/Code/ipfs/js-kubo-rpc-client/test/interface-tests.spec.js)
at listOnTimeout (node:internal/timers:559:17)
at processTimers (node:internal/timers:502:7)
24) go-ipfs current
.pubsub.subscribe
single node
should allow discover option to be passed:
Error: Timeout of 80000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/Users/hacdias/Code/ipfs/js-kubo-rpc-client/test/interface-tests.spec.js)
at listOnTimeout (node:internal/timers:559:17)
at processTimers (node:internal/timers:502:7)
25) go-ipfs current
.pubsub.subscribe
multiple connected nodes
should receive messages from a different node with floodsub:
Error: Timed out waiting for peers to be subscribed to "floodsub-A9RQD0UEDvC2Nd6kUKSu-"
at waitForPeers (file:///Users/hacdias/Code/ipfs/js-kubo-rpc-client/test/interface-tests/src/pubsub/utils.js:23:13)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at Context.<anonymous> (file:///Users/hacdias/Code/ipfs/js-kubo-rpc-client/test/interface-tests/src/pubsub/subscribe.js:240:9)
26) go-ipfs current
.pubsub.subscribe
multiple connected nodes
should receive messages from a different node:
Error: Timed out waiting for peers to be subscribed to "pubsub-tests-tMenO-2NM8B7yfLhf4CD1"
at waitForPeers (file:///Users/hacdias/Code/ipfs/js-kubo-rpc-client/test/interface-tests/src/pubsub/utils.js:23:13)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at Context.<anonymous> (file:///Users/hacdias/Code/ipfs/js-kubo-rpc-client/test/interface-tests/src/pubsub/subscribe.js:276:9)
27) go-ipfs current
.pubsub.subscribe
multiple connected nodes
should round trip a non-utf8 binary buffer:
Error: Timed out waiting for peers to be subscribed to "pubsub-tests-Sga3S3Hz5AFcOLfg3m_tz"
at waitForPeers (file:///Users/hacdias/Code/ipfs/js-kubo-rpc-client/test/interface-tests/src/pubsub/utils.js:23:13)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at Context.<anonymous> (file:///Users/hacdias/Code/ipfs/js-kubo-rpc-client/test/interface-tests/src/pubsub/subscribe.js:312:9)
28) go-ipfs current
.pubsub.subscribe
multiple connected nodes
should receive multiple messages:
Error: Timed out waiting for peers to be subscribed to "pubsub-tests-kTTturWavhejkexIteMji"
at waitForPeers (file:///Users/hacdias/Code/ipfs/js-kubo-rpc-client/test/interface-tests/src/pubsub/utils.js:23:13)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at Context.<anonymous> (file:///Users/hacdias/Code/ipfs/js-kubo-rpc-client/test/interface-tests/src/pubsub/subscribe.js:352:9)
29) go-ipfs current
.pubsub.subscribe
multiple connected nodes
should send/receive 100 messages:
Error: Timed out waiting for peers to be subscribed to "pubsub-tests-Td3-u1JVUTEMLfyUIvdiA"
at waitForPeers (file:///Users/hacdias/Code/ipfs/js-kubo-rpc-client/test/interface-tests/src/pubsub/utils.js:23:13)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at Context.<anonymous> (file:///Users/hacdias/Code/ipfs/js-kubo-rpc-client/test/interface-tests/src/pubsub/subscribe.js:391:9)
30) go-ipfs current
.pubsub.subscribe
multiple connected nodes
should unsubscribe multiple handlers:
Error: Timed out waiting for peers to be subscribed to "topic-0.19692411216251848"
at waitForPeers (file:///Users/hacdias/Code/ipfs/js-kubo-rpc-client/test/interface-tests/src/pubsub/utils.js:23:13)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at Context.<anonymous> (file:///Users/hacdias/Code/ipfs/js-kubo-rpc-client/test/interface-tests/src/pubsub/subscribe.js:488:9)
31) go-ipfs current
.pubsub.subscribe
multiple connected nodes
should unsubscribe individual handlers:
Error: Timed out waiting for peers to be subscribed to "topic-0.5598717267888198"
at waitForPeers (file:///Users/hacdias/Code/ipfs/js-kubo-rpc-client/test/interface-tests/src/pubsub/utils.js:23:13)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at Context.<anonymous> (file:///Users/hacdias/Code/ipfs/js-kubo-rpc-client/test/interface-tests/src/pubsub/subscribe.js:525:9)
32) go-ipfs current
.pubsub.peers
should return peers for a topic - one peer:
Error: Timed out waiting for peers to be subscribed to "pubsub-tests-2A6UFSez6NJjP5LInBx-o"
at waitForPeers (file:///Users/hacdias/Code/ipfs/js-kubo-rpc-client/test/interface-tests/src/pubsub/utils.js:23:13)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at Context.<anonymous> (file:///Users/hacdias/Code/ipfs/js-kubo-rpc-client/test/interface-tests/src/pubsub/peers.js:115:7)
33) go-ipfs current
.pubsub.peers
should return peers for a topic - multiple peers:
Error: Timed out waiting for peers to be subscribed to "pubsub-tests-xlOV4Biub-JJe7NDWDkHe"
at waitForPeers (file:///Users/hacdias/Code/ipfs/js-kubo-rpc-client/test/interface-tests/src/pubsub/utils.js:23:13)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at Context.<anonymous> (file:///Users/hacdias/Code/ipfs/js-kubo-rpc-client/test/interface-tests/src/pubsub/peers.js:130:7)
Command failed with exit code 33: mocha test/node.{js,cjs,mjs} test/**/*.spec.{js,cjs,mjs} dist/test/node.{js,cjs,mjs} dist/test/**/*.spec.{js,cjs,mjs} --ui bdd --require source-map-support/register --timeout=60000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment