---
# System prepended metadata

title: Testing

---

# Testing

## Objectives
- Display test coverage prominently for developers.
- Establish clear testing standards.
- Extract more insightful data from end-to-end tests.
- Highlight areas of the code with insufficient tests and prioritize them.


## CI integration
As one of the first steps, we should integrate CI tool for measuring test coverage and provide detailed report on how each PR effects it.
Very good tool for that seems to be https://about.codecov.io/

## Custom test coverage config
As currently go check for coverage on all files, we need to create custom one that will not check on:
- types
- mocks
- metrics
- configs
- other very specific files 

## Testing Guidelines 
We should use Yosher's version
https://hackmd.io/@muBVAoBMQ82d4GROJ8VPKg/SJQTy2ka3

## Integrate test coverage to E2E/Integration test
Here is very nice example how we can get test coverage from running actuall binary. This was introduce in go 1.20 https://go.dev/blog/integration-test-coverage

## Priorities
- API - done
- Beacon client
- Exporter
- Networking 
    - Discovery - in progress
    - Peer 
- Eth
- Storage
- Simcontract

## Degredation tests
TODO
- check tool for it
- measure cpu operations - like go benchmark
- keep in mind graceful shutdown


## Current coverage (stage 29.1.2024)
Total 40.8%

github.com/bloxapp/ssv/api/errors.go (0.0%)
github.com/bloxapp/ssv/api/handlers/node.go (0.0%)
github.com/bloxapp/ssv/api/handling.go (0.0%)
github.com/bloxapp/ssv/api/server/server.go (0.0%)
github.com/bloxapp/ssv/api/types.go (0.0%)
github.com/bloxapp/ssv/beacon/goclient/aggregator.go (0.0%)
github.com/bloxapp/ssv/beacon/goclient/attest.go (0.0%)
github.com/bloxapp/ssv/beacon/goclient/attest_protect.go (0.0%)
github.com/bloxapp/ssv/beacon/goclient/committee_subscribe.go (0.0%)
github.com/bloxapp/ssv/beacon/goclient/proposer.go (0.0%)
github.com/bloxapp/ssv/beacon/goclient/signing.go (0.0%)
github.com/bloxapp/ssv/beacon/goclient/sync_committee.go (0.0%)
github.com/bloxapp/ssv/beacon/goclient/sync_committee_contribution.go (0.0%)
github.com/bloxapp/ssv/beacon/goclient/validator.go (0.0%)
github.com/bloxapp/ssv/beacon/goclient/voluntary_exit.go (0.0%)
github.com/bloxapp/ssv/cli/operator/generate_doc.go (0.0%)
github.com/bloxapp/ssv/eth/contract/operator_public_key.go (0.0%)
github.com/bloxapp/ssv/eth/eventhandler/metrics.go (0.0%)
github.com/bloxapp/ssv/eth/eventsyncer/metrics.go (0.0%)
github.com/bloxapp/ssv/eth/executionclient/metrics.go (0.0%)
github.com/bloxapp/ssv/exporter/api/decided/stream.go (0.0%)
github.com/bloxapp/ssv/migrations/migration_0_example.go (0.0%)
github.com/bloxapp/ssv/migrations/migration_1_example.go (0.0%)
github.com/bloxapp/ssv/migrations/migration_2_encrypt_shares.go (0.0%)
github.com/bloxapp/ssv/migrations/migration_3_truncate_registry.go (0.0%)
github.com/bloxapp/ssv/monitoring/metrics/handler.go (0.0%)
github.com/bloxapp/ssv/monitoring/metrics/reporter.go (0.0%)
github.com/bloxapp/ssv/network/discovery/dv5_bootnode.go (0.0%)
github.com/bloxapp/ssv/network/discovery/dv5_logger.go (0.0%)
github.com/bloxapp/ssv/network/discovery/dv5_routing.go (0.0%)
github.com/bloxapp/ssv/network/discovery/node_record.go (0.0%)
github.com/bloxapp/ssv/network/discovery/options.go (0.0%)
github.com/bloxapp/ssv/network/p2p/p2p_reporter.go (0.0%)
github.com/bloxapp/ssv/network/p2p/p2p_sync.go (0.0%)
github.com/bloxapp/ssv/network/peers/connections/mock/mock_id_service.go (0.0%)
github.com/bloxapp/ssv/network/peers/connections/mock/mock_peerstore.go (0.0%)
github.com/bloxapp/ssv/network/topics/tracer.go (0.0%)
github.com/bloxapp/ssv/operator/metrics.go (0.0%)
github.com/bloxapp/ssv/operator/node.go (0.0%)
github.com/bloxapp/ssv/operator/validator/mocks/validator_map.go (0.0%)
github.com/bloxapp/ssv/protocol/v2/blockchain/beacon/duty_data.go (0.0%)
github.com/bloxapp/ssv/protocol/v2/message/sync.go (0.0%)
github.com/bloxapp/ssv/protocol/v2/p2p/network.go (0.0%)
github.com/bloxapp/ssv/protocol/v2/qbft/controller/decided.go (0.0%)
github.com/bloxapp/ssv/protocol/v2/qbft/controller/highest_instance.go (0.0%)
github.com/bloxapp/ssv/protocol/v2/qbft/instance/commit.go (0.0%)
github.com/bloxapp/ssv/protocol/v2/qbft/instance/prepare.go (0.0%)
github.com/bloxapp/ssv/protocol/v2/ssv/runner/compact.go (0.0%)
github.com/bloxapp/ssv/protocol/v2/ssv/runner/duty_runners.go (0.0%)
github.com/bloxapp/ssv/protocol/v2/ssv/runner/pre_consensus_justification.go (0.0%)
github.com/bloxapp/ssv/protocol/v2/ssv/runner/runner.go (0.0%)
github.com/bloxapp/ssv/protocol/v2/ssv/runner/runner_signatures.go (0.0%)
github.com/bloxapp/ssv/protocol/v2/ssv/runner/runner_state.go (0.0%)
github.com/bloxapp/ssv/protocol/v2/ssv/runner/runner_state_helpers.go (0.0%)
github.com/bloxapp/ssv/protocol/v2/ssv/runner/runner_validations.go (0.0%)
github.com/bloxapp/ssv/protocol/v2/ssv/runner/timer.go (0.0%)
github.com/bloxapp/ssv/protocol/v2/ssv/validator/duty_executer.go (0.0%)
github.com/bloxapp/ssv/protocol/v2/ssv/validator/events.go (0.0%)
github.com/bloxapp/ssv/protocol/v2/ssv/validator/metrics.go (0.0%)
github.com/bloxapp/ssv/protocol/v2/ssv/validator/msgqueue_consumer.go (0.0%)
github.com/bloxapp/ssv/protocol/v2/ssv/validator/non_committee_validator.go (0.0%)
github.com/bloxapp/ssv/protocol/v2/ssv/validator/timer.go (0.0%)
github.com/bloxapp/ssv/storage/kv/gc.go (0.0%)
github.com/bloxapp/ssv/protocol/v2/ssv/runner/proposer.go (1.1%)
github.com/bloxapp/ssv/protocol/v2/ssv/runner/sync_committee_aggregator.go (1.1%)
github.com/bloxapp/ssv/protocol/v2/ssv/runner/aggregator.go (1.8%)
github.com/bloxapp/ssv/protocol/v2/ssv/runner/attester.go (2.1%)
github.com/bloxapp/ssv/eth/contract/contract.go (2.2%)
github.com/bloxapp/ssv/protocol/v2/ssv/runner/sync_committee.go (2.4%)
github.com/bloxapp/ssv/eth/simulator/simcontract/simcontract.go (2.8%)
github.com/bloxapp/ssv/protocol/v2/ssv/runner/validator_registration.go (3.2%)
github.com/bloxapp/ssv/protocol/v2/ssv/runner/voluntary_exit.go (3.2%)
github.com/bloxapp/ssv/protocol/v2/ssv/validator/startup.go (3.2%)
github.com/bloxapp/ssv/cli/operator/node.go (3.4%)
github.com/bloxapp/ssv/protocol/v2/qbft/instance/proposal.go (5.1%)
github.com/bloxapp/ssv/network/peers/connections/mock/mock_net.go (5.9%)
github.com/bloxapp/ssv/protocol/v2/blockchain/beacon/mock_client.go (6.4%)
github.com/bloxapp/ssv/network/peers/connections/mock/mock_conn.go (7.1%)
github.com/bloxapp/ssv/protocol/v2/types/crypto.go (7.7%)
github.com/bloxapp/ssv/beacon/goclient/goclient.go (8.3%)
github.com/bloxapp/ssv/protocol/v2/qbft/instance/round_change.go (8.3%)
github.com/bloxapp/ssv/network/discovery/dv5_service.go (9.6%)
github.com/bloxapp/ssv/message/validation/qbft_config.go (11.1%)
github.com/bloxapp/ssv/protocol/v2/qbft/controller/controller.go (12.0%)
github.com/bloxapp/ssv/protocol/v2/ssv/runner/metrics/metrics.go (14.6%)
github.com/bloxapp/ssv/network/p2p/metrics.go (17.3%)
github.com/bloxapp/ssv/networkconfig/config.go (18.2%)
github.com/bloxapp/ssv/protocol/v2/ssv/validator/validator.go (18.4%)
github.com/bloxapp/ssv/api/handlers/validators.go (19.0%)
github.com/bloxapp/ssv/monitoring/metricsreporter/metrics_reporter.go (19.7%)
github.com/bloxapp/ssv/protocol/v2/qbft/instance/instance.go (20.3%)
github.com/bloxapp/ssv/operator/validator/metrics.go (20.8%)
github.com/bloxapp/ssv/network/peers/connections/mock/mock_storage.go (21.2%)
github.com/bloxapp/ssv/network/peers/connections/mock/mock_connection_index.go (25.0%)
github.com/bloxapp/ssv/operator/duties/validatorregistration.go (31.8%)
github.com/bloxapp/ssv/network/discovery/dv5_filters.go (32.0%)
github.com/bloxapp/ssv/protocol/v2/qbft/config.go (33.3%)
github.com/bloxapp/ssv/network/p2p/p2p.go (34.3%)
github.com/bloxapp/ssv/operator/validator/mocks/controller.go (34.9%)
github.com/bloxapp/ssv/protocol/v2/testing/test_utils.go (35.0%)
github.com/bloxapp/ssv/protocol/v2/types/messages.go (35.7%)
github.com/bloxapp/ssv/eth/simulator/simulator.go (36.4%)
github.com/bloxapp/ssv/protocol/v2/message/msg.go (36.4%)
github.com/bloxapp/ssv/network/peers/peers_index.go (42.3%)
github.com/bloxapp/ssv/eth/executionclient/options.go (42.9%)
github.com/bloxapp/ssv/exporter/api/msg.go (42.9%)
github.com/bloxapp/ssv/utils/tasks/retry.go (42.9%)
github.com/bloxapp/ssv/exporter/api/conn.go (44.3%)
github.com/bloxapp/ssv/network/p2p/config.go (45.8%)
github.com/bloxapp/ssv/network/p2p/p2p_pubsub.go (46.6%)
github.com/bloxapp/ssv/network/testing/keys.go (47.1%)
github.com/bloxapp/ssv/eth/localevents/local_events.go (47.8%)
github.com/bloxapp/ssv/logging/global.go (48.7%)
github.com/bloxapp/ssv/logging/testing.go (50.0%)
github.com/bloxapp/ssv/network/peers/connections/mock/mock_node_info_idx.go (50.0%)
github.com/bloxapp/ssv/operator/slotticker/mocks/slotticker.go (50.0%)
github.com/bloxapp/ssv/protocol/v2/qbft/instance/metrics.go (50.0%)
github.com/bloxapp/ssv/protocol/v2/types/domain.go (50.0%)
github.com/bloxapp/ssv/utils/commons/build_data.go (50.0%)
github.com/bloxapp/ssv/eth/eventsyncer/event_syncer.go (51.4%)
github.com/bloxapp/ssv/protocol/v2/blockchain/beacon/network.go (51.6%)
github.com/bloxapp/ssv/ekm/eth_key_manager_signer.go (55.2%)
github.com/bloxapp/ssv/eth/eventhandler/event_handler.go (55.8%)
github.com/bloxapp/ssv/operator/validator/controller.go (56.2%)
github.com/bloxapp/ssv/network/discovery/enode.go (56.6%)
github.com/bloxapp/ssv/network/commons/addr_utils.go (57.9%)
github.com/bloxapp/ssv/api/bind.go (59.1%)
github.com/bloxapp/ssv/ibft/storage/stores.go (60.0%)
github.com/bloxapp/ssv/operator/validator/router.go (60.0%)
github.com/bloxapp/ssv/storage/kv/logger.go (60.0%)
github.com/bloxapp/ssv/logging/fields/fields.go (62.3%)
github.com/bloxapp/ssv/protocol/v2/queue/worker/message_worker.go (62.5%)
github.com/bloxapp/ssv/network/peers/conn_manager.go (62.7%)
github.com/bloxapp/ssv/network/discovery/local_service.go (63.0%)
github.com/bloxapp/ssv/network/p2p/test_utils.go (63.4%)
github.com/bloxapp/ssv/protocol/v2/blockchain/beacon/mocks/network.go (64.6%)
github.com/bloxapp/ssv/network/topics/controller.go (65.3%)
github.com/bloxapp/ssv/message/validation/rsa.go (65.5%)
github.com/bloxapp/ssv/eth/executionclient/execution_client.go (65.7%)
github.com/bloxapp/ssv/eth/eventhandler/options.go (66.7%)
github.com/bloxapp/ssv/eth/eventsyncer/options.go (66.7%)
github.com/bloxapp/ssv/exporter/api/interfaces.go (66.7%)
github.com/bloxapp/ssv/exporter/api/metrics.go (66.7%)
github.com/bloxapp/ssv/logging/fields/stringer/stringer.go (66.7%)
github.com/bloxapp/ssv/network/discovery/service.go (66.7%)
github.com/bloxapp/ssv/protocol/v2/qbft/roundtimer/mocks/timer.go (66.7%)
github.com/bloxapp/ssv/utils/format/operator_id.go (66.7%)
github.com/bloxapp/ssv/operator/duties/dutystore/sync_committee.go (67.9%)
github.com/bloxapp/ssv/migrations/migrations.go (68.0%)
github.com/bloxapp/ssv/nodeprobe/nodeprobe.go (68.2%)
github.com/bloxapp/ssv/network/topics/container.go (69.0%)
github.com/bloxapp/ssv/network/topics/msg_id.go (69.0%)
github.com/bloxapp/ssv/network/commons/keys.go (71.0%)
github.com/bloxapp/ssv/message/validation/message_counts.go (72.2%)
github.com/bloxapp/ssv/network/streams/stream.go (72.7%)
github.com/bloxapp/ssv/protocol/v2/qbft/instance/marshalutils.go (72.7%)
github.com/bloxapp/ssv/network/topics/scoring.go (73.2%)
github.com/bloxapp/ssv/eth/eventparser/event_parser.go (73.3%)
github.com/bloxapp/ssv/network/records/subnets.go (73.6%)
github.com/bloxapp/ssv/network/peers/connections/conn_gater.go (73.7%)
github.com/bloxapp/ssv/operator/validator/task_executor.go (73.8%)
github.com/bloxapp/ssv/identity/store.go (74.1%)
github.com/bloxapp/ssv/network/discovery/kad_dht.go (75.0%)
github.com/bloxapp/ssv/network/peers/connections/mock/mock_stream_controller.go (75.0%)
github.com/bloxapp/ssv/protocol/v2/qbft/controller/timer.go (75.0%)
github.com/bloxapp/ssv/utils/keys.go (75.0%)
github.com/bloxapp/ssv/network/p2p/p2p_setup.go (75.2%)
github.com/bloxapp/ssv/storage/kv/badger.go (75.7%)
github.com/bloxapp/ssv/exporter/api/server.go (75.8%)
github.com/bloxapp/ssv/network/peers/connections/conn_handler.go (76.0%)
github.com/bloxapp/ssv/exporter/api/test_utils.go (76.1%)
github.com/bloxapp/ssv/operator/duties/mocks/scheduler.go (76.1%)
github.com/bloxapp/ssv/storage/kv/txn.go (76.9%)
github.com/bloxapp/ssv/protocol/v2/qbft/roundtimer/timer.go (77.5%)
github.com/bloxapp/ssv/network/testing/net.go (77.8%)
github.com/bloxapp/ssv/network/topics/params/helpers.go (77.8%)
github.com/bloxapp/ssv/operator/storage/storage.go (77.8%)
github.com/bloxapp/ssv/utils/format/domain_type.go (77.8%)
github.com/bloxapp/ssv/registry/storage/shares.go (78.5%)
github.com/bloxapp/ssv/utils/rsaencryption/rsa_encryption.go (79.3%)
github.com/bloxapp/ssv/network/records/node_info.go (80.0%)
github.com/bloxapp/ssv/network/records/signed_node_info.go (80.0%)
github.com/bloxapp/ssv/protocol/v2/message/consensus.go (80.0%)
github.com/bloxapp/ssv/protocol/v2/qbft/instance/timeout.go (80.0%)
github.com/bloxapp/ssv/utils/format/identifier.go (80.0%)
github.com/bloxapp/ssv/eth/eventhandler/handlers.go (80.1%)
github.com/bloxapp/ssv/ekm/signer_storage.go (80.2%)
github.com/bloxapp/ssv/message/validation/partial_validation.go (80.5%)
github.com/bloxapp/ssv/network/peers/peer_info.go (80.6%)
github.com/bloxapp/ssv/protocol/v2/qbft/controller/types.go (80.8%)
github.com/bloxapp/ssv/message/validation/validation.go (82.1%)
github.com/bloxapp/ssv/network/streams/controller.go (82.1%)
github.com/bloxapp/ssv/network/commons/common.go (82.7%)
github.com/bloxapp/ssv/eth/eventhandler/task.go (83.3%)
github.com/bloxapp/ssv/exporter/api/broadcaster.go (83.8%)
github.com/bloxapp/ssv/ibft/storage/store.go (84.2%)
github.com/bloxapp/ssv/utils/tasks/exec_queue.go (84.9%)
github.com/bloxapp/ssv/operator/duties/voluntary_exit.go (85.4%)
github.com/bloxapp/ssv/registry/storage/recipients.go (85.5%)
github.com/bloxapp/ssv/network/testing/local.go (85.7%)
github.com/bloxapp/ssv/utils/format/regexp_pool.go (85.7%)
github.com/bloxapp/ssv/protocol/v2/blockchain/beacon/validator_metadata.go (87.2%)
github.com/bloxapp/ssv/utils/threshold/reconstruct.go (87.5%)
github.com/bloxapp/ssv/utils/threshold/threshold.go (87.5%)
github.com/bloxapp/ssv/network/topics/pubsub.go (87.8%)
github.com/bloxapp/ssv/network/topics/sub_filter.go (88.2%)
github.com/bloxapp/ssv/operator/duties/attester.go (88.3%)
github.com/bloxapp/ssv/network/peers/connections/filters.go (88.4%)
github.com/bloxapp/ssv/protocol/v2/ssv/queue/messages.go (88.5%)
github.com/bloxapp/ssv/operator/duties/proposer.go (88.8%)
github.com/bloxapp/ssv/protocol/v2/types/ssvshare.go (88.9%)
github.com/bloxapp/ssv/network/peers/connections/handshaker.go (89.1%)
github.com/bloxapp/ssv/registry/storage/operators.go (89.6%)
github.com/bloxapp/ssv/eth/eventhandler/validation.go (89.7%)
github.com/bloxapp/ssv/protocol/v2/ssv/queue/queue.go (89.8%)
github.com/bloxapp/ssv/operator/duties/sync_committee.go (89.9%)
github.com/bloxapp/ssv/network/records/test_utils.go (90.0%)
github.com/bloxapp/ssv/network/topics/params/peer_score.go (90.0%)
github.com/bloxapp/ssv/operator/duties/base_handler.go (90.0%)
github.com/bloxapp/ssv/utils/tasks/exec_interval.go (90.0%)
github.com/bloxapp/ssv/message/validation/consensus_validation.go (90.2%)
github.com/bloxapp/ssv/network/records/entries.go (90.6%)
github.com/bloxapp/ssv/protocol/v2/ssv/queue/message_prioritizer.go (90.9%)
github.com/bloxapp/ssv/protocol/v2/types/bls.go (91.7%)
github.com/bloxapp/ssv/operator/fee_recipient/controller.go (92.2%)
github.com/bloxapp/ssv/network/peers/scores.go (92.5%)
github.com/bloxapp/ssv/network/peers/subnets.go (93.0%)
github.com/bloxapp/ssv/network/topics/params/topic_score.go (93.4%)
github.com/bloxapp/ssv/utils/tasks/exec_timeout.go (93.8%)
github.com/bloxapp/ssv/operator/validatorsmap/validators_map.go (94.1%)
github.com/bloxapp/ssv/operator/duties/dutystore/duties.go (94.4%)
github.com/bloxapp/ssv/operator/duties/scheduler.go (95.2%)
github.com/bloxapp/ssv/exporter/api/query_handlers.go (95.7%)
github.com/bloxapp/ssv/cli/config/config.go (100.0%)
github.com/bloxapp/ssv/eth/executionclient/logs.go (100.0%)
github.com/bloxapp/ssv/logging/context.go (100.0%)
github.com/bloxapp/ssv/message/validation/consensus_state.go (100.0%)
github.com/bloxapp/ssv/message/validation/errors.go (100.0%)
github.com/bloxapp/ssv/message/validation/signer_state.go (100.0%)
github.com/bloxapp/ssv/monitoring/metricsreporter/nop_metrics_reporter.go (100.0%)
github.com/bloxapp/ssv/monitoring/metricsreporter/options.go (100.0%)
github.com/bloxapp/ssv/network/discovery/metrics.go (100.0%)
github.com/bloxapp/ssv/network/discovery/subnets.go (100.0%)
github.com/bloxapp/ssv/network/peers/connections/metrics.go (100.0%)
github.com/bloxapp/ssv/network/peers/metrics.go (100.0%)
github.com/bloxapp/ssv/network/records/handshake_signature.go (100.0%)
github.com/bloxapp/ssv/network/records/metadata.go (100.0%)
github.com/bloxapp/ssv/network/records/serializable.go (100.0%)
github.com/bloxapp/ssv/network/streams/metrics.go (100.0%)
github.com/bloxapp/ssv/network/topics/metrics.go (100.0%)
github.com/bloxapp/ssv/network/topics/params/gossipsub.go (100.0%)
github.com/bloxapp/ssv/operator/duties/base_handler_mock.go (100.0%)
github.com/bloxapp/ssv/operator/duties/dutystore/store.go (100.0%)
github.com/bloxapp/ssv/operator/slotticker/slotticker.go (100.0%)
github.com/bloxapp/ssv/operator/slotticker/timer.go (100.0%)
github.com/bloxapp/ssv/operator/storage/config_lock.go (100.0%)
github.com/bloxapp/ssv/protocol/v2/blockchain/beacon/mock_validator_metadata.go (100.0%)
github.com/bloxapp/ssv/protocol/v2/qbft/instance/compact.go (100.0%)
github.com/bloxapp/ssv/protocol/v2/qbft/roundtimer/testing_timer.go (100.0%)
github.com/bloxapp/ssv/protocol/v2/qbft/storage/ibft_store.go (100.0%)
github.com/bloxapp/ssv/protocol/v2/qbft/testing_utils.go (100.0%)
github.com/bloxapp/ssv/protocol/v2/ssv/queue/metrics.go (100.0%)
github.com/bloxapp/ssv/protocol/v2/ssv/validator/opts.go (100.0%)
github.com/bloxapp/ssv/utils/async/interval.go (100.0%)
github.com/bloxapp/ssv/utils/blskeygen/blskeygen.go (100.0%)
github.com/bloxapp/ssv/utils/tasks/stopper.go (100.0%)
github.com/bloxapp/ssv/utils/testutils.go (100.0%)


## Test coverage update 23rd of Feb
- Storage sections of different packages:
    - `ssv/registry/storage` https://app.codecov.io/gh/bloxapp/ssv/pull/1324/tree/registry/storage
    - `ssv/identity` https://app.codecov.io/gh/bloxapp/ssv/pull/1324/tree/identity
    - `ssv/operator/storage` https://app.codecov.io/gh/bloxapp/ssv/pull/1324/tree/operator/storage
    - `ssv/ibft/storage` https://app.codecov.io/gh/bloxapp/ssv/pull/1324/tree/ibft/storage
- Signatures and EKM
    - `ekm/eth_key_manager_signer.go` https://app.codecov.io/gh/bloxapp/ssv/pull/1324/blob/ekm/eth_key_manager_signer.go
    - `utils/rsaencryption/rsa_encryption.go` https://app.codecov.io/gh/bloxapp/ssv/pull/1324/blob/utils/rsaencryption/rsa_encryption.go
- cli package
    - we have a lot of functions in node.go, but it won't be easy to cover those
