├── .editorconfig ├── .gitignore ├── .pre-commit-config.yaml ├── CONTRIBUTING.md ├── README.md ├── __init__.py ├── boltstub ├── README.md ├── __init__.py ├── __main__.py ├── addressing.py ├── bolt_protocol.py ├── channel.py ├── errors.py ├── grammar.lark ├── packstream.py ├── parsing.py ├── simple_jolt │ ├── __init__.py │ ├── common │ │ ├── __init__.py │ │ ├── errors.py │ │ └── types.py │ ├── v1 │ │ ├── __init__.py │ │ ├── codec.py │ │ ├── parse.py │ │ └── types.py │ └── v2 │ │ ├── __init__.py │ │ ├── codec.py │ │ ├── parse.py │ │ └── types.py ├── tests │ ├── __init__.py │ ├── _common.py │ ├── requirements.txt │ ├── simple_jolt │ │ ├── __init__.py │ │ ├── v1 │ │ │ ├── __init__.py │ │ │ ├── parse_data.py │ │ │ └── test_parse.py │ │ └── v2 │ │ │ ├── __init__.py │ │ │ ├── parse_data.py │ │ │ └── test_parse.py │ ├── test_integration.py │ ├── test_packstream.py │ ├── test_parsing.py │ ├── test_script_logic.py │ ├── test_script_parts.py │ └── test_wiring.py ├── util.py ├── watcher.py └── wiring.py ├── certgen └── main.go ├── diagrams ├── README ├── frontend-backend-retry.pu └── high-level-view.pu ├── docker.py ├── driver.py ├── driver ├── README ├── assert_conns_closed.py ├── bootstrap.py └── wait_for_port.py ├── driver_branches.json ├── main.py ├── neo4j.py ├── nutkit ├── __init__.py ├── backend │ ├── __init__.py │ └── backend.py ├── frontend │ ├── __init__.py │ ├── auth_token_manager.py │ ├── bookmark_manager.py │ ├── client_certificate_provider.py │ ├── driver.py │ ├── exceptions.py │ ├── fake_time.py │ ├── result.py │ ├── session.py │ └── transaction.py └── protocol │ ├── __init__.py │ ├── cypher.py │ ├── feature.py │ ├── requests.py │ └── responses.py ├── requirements.txt ├── run_all.py ├── runner.py ├── runner_image └── Dockerfile ├── settings.py ├── setup.cfg ├── stress.py ├── teamcity ├── __init__.py ├── env.py ├── messages.py └── testresult.py ├── tests ├── TESTINDEX.md ├── __init__.py ├── neo4j │ ├── README │ ├── __init__.py │ ├── datatypes │ │ ├── __init__.py │ │ ├── _base.py │ │ ├── _util.py │ │ ├── test_datatypes.py │ │ ├── test_spatial_types.py │ │ └── test_temporal_types.py │ ├── shared.py │ ├── suites.py │ ├── test_authentication.py │ ├── test_bookmarks.py │ ├── test_direct_driver.py │ ├── test_session_run.py │ ├── test_summary.py │ ├── test_tx_func_run.py │ └── test_tx_run.py ├── shared.py ├── stub │ ├── README │ ├── __init__.py │ ├── authorization │ │ ├── __init__.py │ │ ├── scripts │ │ │ ├── v3 │ │ │ │ ├── reader_tx.script │ │ │ │ ├── reader_tx_yielding_error_on_begin.script │ │ │ │ ├── reader_tx_yielding_error_on_commit.script │ │ │ │ ├── reader_tx_yielding_error_on_commit_with_pull_or_discard.script │ │ │ │ ├── reader_tx_yielding_error_on_pull.script │ │ │ │ ├── reader_tx_yielding_error_on_rollback_with_pull_or_discard.script │ │ │ │ ├── reader_tx_yielding_error_on_run.script │ │ │ │ ├── reader_yielding_error_on_pull.script │ │ │ │ └── router.script │ │ │ ├── v4x2 │ │ │ │ └── router.script │ │ │ ├── v4x3 │ │ │ │ ├── reader_tx.script │ │ │ │ ├── reader_tx_yielding_error_on_begin.script │ │ │ │ ├── reader_tx_yielding_error_on_commit.script │ │ │ │ ├── reader_tx_yielding_error_on_commit_with_pull_or_discard.script │ │ │ │ ├── reader_tx_yielding_error_on_pull.script │ │ │ │ ├── reader_tx_yielding_error_on_rollback_with_pull_or_discard.script │ │ │ │ ├── reader_tx_yielding_error_on_run.script │ │ │ │ ├── reader_yielding_error_on_pull.script │ │ │ │ └── router.script │ │ │ ├── v4x4 │ │ │ │ ├── reader_return_1_failure_return_2_3_4_and_5_succeed.script │ │ │ │ ├── scheme_basic.script │ │ │ │ ├── scheme_basic_minimal.script │ │ │ │ ├── scheme_basic_realm_foobar.script │ │ │ │ ├── scheme_basic_realm_foobar_minimal.script │ │ │ │ ├── scheme_bearer.script │ │ │ │ ├── scheme_bearer_minimal.script │ │ │ │ ├── scheme_custom.script │ │ │ │ ├── scheme_custom_empty.script │ │ │ │ ├── scheme_custom_empty_minimal.script │ │ │ │ ├── scheme_custom_minimal.script │ │ │ │ ├── scheme_kerberos.script │ │ │ │ └── scheme_kerberos_minimal.script │ │ │ ├── v5x0 │ │ │ │ ├── reader_no_reauth.script │ │ │ │ ├── reader_no_reauth_minimal.script │ │ │ │ ├── reader_reauth.script │ │ │ │ ├── reader_reauth_authorization_expired.script │ │ │ │ ├── reader_reauth_authorization_expired_minimal.script │ │ │ │ ├── reader_reauth_handled.script │ │ │ │ ├── reader_reauth_handled_minimal.script │ │ │ │ ├── reader_reauth_minimal.script │ │ │ │ ├── reader_reauth_unhandled.script │ │ │ │ ├── reader_tx.script │ │ │ │ ├── reader_tx_yielding_error_on_begin.script │ │ │ │ ├── reader_tx_yielding_error_on_commit.script │ │ │ │ ├── reader_tx_yielding_error_on_commit_with_pull_or_discard.script │ │ │ │ ├── reader_tx_yielding_error_on_pull.script │ │ │ │ ├── reader_tx_yielding_error_on_rollback_with_pull_or_discard.script │ │ │ │ ├── reader_tx_yielding_error_on_run.script │ │ │ │ ├── reader_user_switch.script │ │ │ │ ├── reader_yielding_error_on_pull.script │ │ │ │ ├── router.script │ │ │ │ ├── router_reauth.script │ │ │ │ ├── router_reauth_minimal.script │ │ │ │ ├── router_single_reader.script │ │ │ │ ├── router_user_switch.script │ │ │ │ ├── scheme_basic.script │ │ │ │ ├── scheme_basic_minimal.script │ │ │ │ ├── scheme_basic_realm_foobar.script │ │ │ │ ├── scheme_basic_realm_foobar_minimal.script │ │ │ │ ├── scheme_bearer.script │ │ │ │ ├── scheme_bearer_minimal.script │ │ │ │ ├── scheme_custom.script │ │ │ │ ├── scheme_custom_empty.script │ │ │ │ ├── scheme_custom_empty_minimal.script │ │ │ │ ├── scheme_custom_minimal.script │ │ │ │ ├── scheme_kerberos.script │ │ │ │ ├── scheme_kerberos_minimal.script │ │ │ │ ├── writer_reauth_authorization_expired.script │ │ │ │ ├── writer_reauth_authorization_expired_minimal.script │ │ │ │ ├── writer_reauth_handled.script │ │ │ │ ├── writer_reauth_handled_minimal.script │ │ │ │ └── writer_reauth_unhandled.script │ │ │ └── v5x1 │ │ │ │ ├── reader_no_reauth.script │ │ │ │ ├── reader_no_reauth_pipelined.script │ │ │ │ ├── reader_no_reauth_pipelined_minimal.script │ │ │ │ ├── reader_reauth.script │ │ │ │ ├── reader_reauth_authorization_expired.script │ │ │ │ ├── reader_reauth_authorization_expired_pipelined.script │ │ │ │ ├── reader_reauth_authorization_expired_pipelined_minimal.script │ │ │ │ ├── reader_reauth_handled.script │ │ │ │ ├── reader_reauth_handled_pipelined.script │ │ │ │ ├── reader_reauth_handled_pipelined_minimal.script │ │ │ │ ├── reader_reauth_pipelined.script │ │ │ │ ├── reader_reauth_pipelined_minimal.script │ │ │ │ ├── reader_reauth_unhandled.script │ │ │ │ ├── reader_tx.script │ │ │ │ ├── reader_tx_yielding_error_on_begin.script │ │ │ │ ├── reader_tx_yielding_error_on_commit.script │ │ │ │ ├── reader_tx_yielding_error_on_commit_with_pull_or_discard.script │ │ │ │ ├── reader_tx_yielding_error_on_pull.script │ │ │ │ ├── reader_tx_yielding_error_on_rollback_with_pull_or_discard.script │ │ │ │ ├── reader_tx_yielding_error_on_run.script │ │ │ │ ├── reader_user_switch.script │ │ │ │ ├── reader_user_switch_pipelined.script │ │ │ │ ├── reader_user_switch_pipelined_minimal.script │ │ │ │ ├── reader_yielding_error_on_pull.script │ │ │ │ ├── router.script │ │ │ │ ├── router_reauth.script │ │ │ │ ├── router_reauth_minimal.script │ │ │ │ ├── router_single_reader.script │ │ │ │ ├── router_user_switch.script │ │ │ │ ├── router_user_switch_pipelined.script │ │ │ │ ├── router_user_switch_pipelined_minimal.script │ │ │ │ ├── scheme_basic.script │ │ │ │ ├── scheme_basic_pipelined.script │ │ │ │ ├── scheme_basic_pipelined_minimal.script │ │ │ │ ├── scheme_basic_realm_foobar.script │ │ │ │ ├── scheme_basic_realm_foobar_pipelined.script │ │ │ │ ├── scheme_basic_realm_foobar_pipelined_minimal.script │ │ │ │ ├── scheme_bearer.script │ │ │ │ ├── scheme_bearer_pipelined.script │ │ │ │ ├── scheme_bearer_pipelined_minimal.script │ │ │ │ ├── scheme_custom.script │ │ │ │ ├── scheme_custom_empty.script │ │ │ │ ├── scheme_custom_empty_pipelined.script │ │ │ │ ├── scheme_custom_empty_pipelined_minimal.script │ │ │ │ ├── scheme_custom_pipelined.script │ │ │ │ ├── scheme_custom_pipelined_minimal.script │ │ │ │ ├── scheme_kerberos.script │ │ │ │ ├── scheme_kerberos_pipelined.script │ │ │ │ ├── scheme_kerberos_pipelined_minimal.script │ │ │ │ ├── writer_reauth_authorization_expired.script │ │ │ │ ├── writer_reauth_authorization_expired_pipelined.script │ │ │ │ ├── writer_reauth_authorization_expired_pipelined_minimal.script │ │ │ │ ├── writer_reauth_handled.script │ │ │ │ ├── writer_reauth_handled_pipelined.script │ │ │ │ ├── writer_reauth_handled_pipelined_minimal.script │ │ │ │ └── writer_reauth_unhandled.script │ │ ├── test_auth_token_manager.py │ │ ├── test_authorization.py │ │ ├── test_basic_auth_manager.py │ │ ├── test_bearer_auth_manager.py │ │ ├── test_user_switching.py │ │ ├── token_expired_retry │ │ │ ├── __init__.py │ │ │ ├── scripts │ │ │ │ ├── v5x0 │ │ │ │ │ ├── reader_no_retry.script │ │ │ │ │ ├── reader_retry.script │ │ │ │ │ └── router.script │ │ │ │ └── v5x1 │ │ │ │ │ ├── reader_no_retry.script │ │ │ │ │ ├── reader_retry.script │ │ │ │ │ └── router.script │ │ │ └── test_token_expired_retry.py │ │ └── verify_authentication │ │ │ ├── __init__.py │ │ │ ├── scripts │ │ │ ├── v5x0 │ │ │ │ ├── reader.script │ │ │ │ └── router.script │ │ │ └── v5x1 │ │ │ │ ├── reader.script │ │ │ │ ├── reader_error.script │ │ │ │ ├── reader_error_warm.script │ │ │ │ ├── reader_warm.script │ │ │ │ ├── router.script │ │ │ │ ├── router_error_logon.script │ │ │ │ ├── router_error_route.script │ │ │ │ ├── router_error_route_warm.script │ │ │ │ └── router_warm.script │ │ │ └── test_verify_authentication.py │ ├── basic_query │ │ ├── __init__.py │ │ ├── scripts │ │ │ └── single_result.script │ │ └── test_basic_query.py │ ├── bookmarks │ │ ├── __init__.py │ │ ├── scripts │ │ │ ├── v3 │ │ │ │ ├── bookmarks.script │ │ │ │ ├── bookmarks_tx.script │ │ │ │ └── send_and_receive_bookmark_two_write_tx.script │ │ │ ├── v4 │ │ │ │ ├── bookmarks.script │ │ │ │ ├── bookmarks_tx.script │ │ │ │ └── send_and_receive_bookmark_two_write_tx.script │ │ │ └── v5 │ │ │ │ ├── send_and_receive_bookmark_read_tx.script │ │ │ │ ├── send_and_receive_bookmark_two_write_tx.script │ │ │ │ ├── send_and_receive_bookmark_write_tx.script │ │ │ │ └── send_bookmark_write_tx.script │ │ ├── test_bookmarks_v3.py │ │ ├── test_bookmarks_v4.py │ │ └── test_bookmarks_v5.py │ ├── configuration_hints │ │ ├── __init__.py │ │ ├── scripts │ │ │ ├── 1_second_exceeds.script │ │ │ ├── 1_second_exceeds_tx.script │ │ │ ├── 1_second_exceeds_tx_retry.script │ │ │ ├── 2_seconds_in_time.script │ │ │ ├── 2_seconds_in_time_tx.script │ │ │ ├── 2_seconds_in_time_tx_retry.script │ │ │ └── router.script │ │ └── test_connection_recv_timeout_seconds.py │ ├── connectivity_check │ │ ├── __init__.py │ │ ├── scripts │ │ │ ├── handshake_only.script │ │ │ ├── hello_auth_error.script │ │ │ ├── hello_only.script │ │ │ ├── query_then_resets.script │ │ │ ├── router.script │ │ │ ├── router_5_readers.script │ │ │ ├── router_changing_home_db.script │ │ │ ├── router_multi.script │ │ │ └── router_no_readers.script │ │ ├── test_get_server_info.py │ │ └── test_verify_connectivity.py │ ├── disconnects │ │ ├── __init__.py │ │ ├── scripts │ │ │ ├── exit_after_hello.script │ │ │ ├── exit_after_hello_success.script │ │ │ ├── exit_after_pull.script │ │ │ ├── exit_after_record.script │ │ │ ├── exit_after_run.script │ │ │ ├── exit_after_tx_begin.script │ │ │ ├── exit_after_tx_commit.script │ │ │ ├── exit_after_tx_pull.script │ │ │ ├── exit_after_tx_record.script │ │ │ ├── exit_after_tx_run.script │ │ │ ├── explicit_goodbye_after_run.script │ │ │ └── failure_on_reset_after_success.script │ │ └── test_disconnects.py │ ├── driver_execute_query │ │ ├── __init__.py │ │ ├── scripts │ │ │ ├── router.script │ │ │ ├── router_invert_reader_and_writer_second_call.script │ │ │ ├── router_with_db_name.script │ │ │ ├── router_with_impersonation.script │ │ │ ├── transaction_chaining.script │ │ │ ├── transaction_chaining_custom_bmm.script │ │ │ ├── tx_return_1.script │ │ │ ├── tx_return_1_disconnect_on_pull.script │ │ │ ├── tx_return_1_transaction_terminated_on_pull.script │ │ │ ├── tx_return_1_with_auth.script │ │ │ ├── tx_return_1_with_impersonation.script │ │ │ ├── tx_return_1_with_params.script │ │ │ ├── tx_return_1_with_re_auth.script │ │ │ ├── tx_return_1_with_tx_meta.script │ │ │ └── tx_return_1_with_tx_timeout.script │ │ └── test_driver_execute_query.py │ ├── driver_parameters │ │ ├── __init__.py │ │ ├── scripts │ │ │ ├── v5x0 │ │ │ │ ├── router.script │ │ │ │ ├── router_hello_delay.script │ │ │ │ ├── router_route_delay.script │ │ │ │ ├── router_with_db_name.script │ │ │ │ ├── session_run.script │ │ │ │ ├── session_run_auth_delay.script │ │ │ │ ├── session_run_bolt_handshake_delay.script │ │ │ │ ├── session_run_chaining.script │ │ │ │ ├── transaction_chaining.script │ │ │ │ └── tx_without_commit_or_rollback.script │ │ │ ├── v5x2 │ │ │ │ ├── user_agent_custom.script │ │ │ │ └── user_agent_default.script │ │ │ ├── v5x3 │ │ │ │ ├── user_agent_custom.script │ │ │ │ └── user_agent_default.script │ │ │ └── v5x4 │ │ │ │ ├── liveness_check.script │ │ │ │ ├── liveness_check_recv_timeout.script │ │ │ │ └── liveness_check_router.script │ │ ├── telemetry │ │ │ ├── __init__.py │ │ │ ├── scripts │ │ │ │ ├── reader.script │ │ │ │ ├── reader_telemetry_retry.script │ │ │ │ └── router.script │ │ │ └── test_telemetry.py │ │ ├── test_bookmark_manager.py │ │ ├── test_client_agent_strings.py │ │ ├── test_connection_acquisition_timeout_ms.py │ │ ├── test_liveness_check.py │ │ └── test_max_connection_pool_size.py │ ├── errors │ │ ├── __init__.py │ │ ├── scripts │ │ │ └── error.script │ │ └── test_errors.py │ ├── homedb │ │ ├── __init__.py │ │ ├── scripts │ │ │ ├── cache │ │ │ │ ├── reader_misbehaving.script │ │ │ │ ├── reader_tx_homedb_cache.script │ │ │ │ ├── reader_whoami.script │ │ │ │ ├── reader_whoami_tx.script │ │ │ │ ├── router_db_moves.script │ │ │ │ ├── router_homedb_cache.script │ │ │ │ ├── router_single_server.script │ │ │ │ └── router_whoami.script │ │ │ ├── mixed │ │ │ │ ├── reader_5x7_keep_warm.script │ │ │ │ ├── reader_5x8_keep_warm.script │ │ │ │ ├── reader_5x8_no_ssr.script │ │ │ │ ├── reader_5x8_ssr.script │ │ │ │ ├── router.script │ │ │ │ ├── router_fallback.script │ │ │ │ ├── router_keep_warm.script │ │ │ │ ├── router_multi.script │ │ │ │ ├── writer_multi.script │ │ │ │ ├── writer_no_ssr.script │ │ │ │ └── writer_no_ssr_only_connect.script │ │ │ └── no_cache │ │ │ │ ├── reader_change_homedb.script │ │ │ │ ├── reader_tx_change_homedb.script │ │ │ │ ├── reader_tx_exits.script │ │ │ │ ├── reader_tx_homedb.script │ │ │ │ ├── router_change_homedb.script │ │ │ │ ├── router_explicit_homedb.script │ │ │ │ ├── router_homedb.script │ │ │ │ └── single_server.script │ │ └── test_homedb.py │ ├── iteration │ │ ├── __init__.py │ │ ├── _common.py │ │ ├── scripts │ │ │ ├── v3 │ │ │ │ ├── pull_all.script │ │ │ │ ├── pull_all_any_mode.script │ │ │ │ └── tx_pull_all.script │ │ │ └── v4x4 │ │ │ │ ├── disconnect_on_pull.script │ │ │ │ ├── error_on_pull.script │ │ │ │ ├── inf_results_until_end.script │ │ │ │ ├── pull_1_nested.script │ │ │ │ ├── pull_1_nested_list.script │ │ │ │ ├── pull_2_end_empty_batch.script │ │ │ │ ├── pull_2_end_error.script │ │ │ │ ├── pull_2_end_full_batch.script │ │ │ │ ├── pull_2_end_half_batch.script │ │ │ │ ├── pull_2_then_discard.script │ │ │ │ ├── pull_2_then_optimized_list.script │ │ │ │ ├── pull_all.script │ │ │ │ ├── pull_all_slow_connection.script │ │ │ │ ├── pull_list.script │ │ │ │ ├── pull_optimized_list.script │ │ │ │ ├── tx_error_on_pull.script │ │ │ │ ├── tx_inf_results_until_end.script │ │ │ │ ├── tx_pull_1_nested.script │ │ │ │ ├── tx_pull_1_nested_list.script │ │ │ │ ├── tx_pull_2.script │ │ │ │ ├── tx_pull_2_then_optimized_list.script │ │ │ │ ├── tx_pull_all.script │ │ │ │ ├── tx_pull_all_slow_connection.script │ │ │ │ ├── tx_pull_list.script │ │ │ │ ├── tx_pull_optimized_list.script │ │ │ │ ├── yield_0_records.script │ │ │ │ ├── yield_1_record.script │ │ │ │ └── yield_2_records.script │ │ ├── test_iteration_session_run.py │ │ ├── test_iteration_tx_run.py │ │ ├── test_result_list.py │ │ ├── test_result_optional_single.py │ │ ├── test_result_peek.py │ │ ├── test_result_scope.py │ │ └── test_result_single.py │ ├── notifications_config │ │ ├── __init__.py │ │ ├── notifications_base.py │ │ ├── scripts │ │ │ ├── notifications_config_driver.script │ │ │ ├── notifications_config_override_session_begin.script │ │ │ ├── notifications_config_override_session_run.script │ │ │ ├── notifications_config_session_begin.script │ │ │ ├── notifications_config_session_run.script │ │ │ └── notifications_mapping.script │ │ ├── test_driver_notifications_config.py │ │ ├── test_notification_mapping.py │ │ └── test_session_notifications_config.py │ ├── optimizations │ │ ├── __init__.py │ │ ├── scripts │ │ │ ├── v3 │ │ │ │ ├── failure_on_begin.script │ │ │ │ ├── failure_on_pull.script │ │ │ │ ├── failure_on_run.script │ │ │ │ ├── run_twice.script │ │ │ │ └── run_twice_tx.script │ │ │ ├── v4x3 │ │ │ │ ├── all_default.script │ │ │ │ ├── all_default_multi_query.script │ │ │ │ ├── all_default_multi_query_nested.script │ │ │ │ ├── all_default_router.script │ │ │ │ ├── all_default_routing.script │ │ │ │ ├── failure_on_begin.script │ │ │ │ ├── failure_on_pull.script │ │ │ │ ├── failure_on_run.script │ │ │ │ ├── pull_pipeline.script │ │ │ │ ├── pull_pipeline_tx.script │ │ │ │ ├── router.script │ │ │ │ ├── run_twice.script │ │ │ │ ├── run_twice_discard.script │ │ │ │ ├── run_twice_tx.script │ │ │ │ └── run_twice_tx_discard.script │ │ │ ├── v4x4 │ │ │ │ ├── all_default.script │ │ │ │ ├── all_default_multi_query.script │ │ │ │ ├── all_default_multi_query_nested.script │ │ │ │ ├── all_default_router.script │ │ │ │ └── all_default_routing.script │ │ │ └── v5x3 │ │ │ │ └── begin_pipeline.script │ │ └── test_optimizations.py │ ├── retry │ │ ├── __init__.py │ │ ├── scripts │ │ │ ├── clustering │ │ │ │ ├── router.script │ │ │ │ ├── router_no_retry.script │ │ │ │ └── router_swap_reader_and_writer.script │ │ │ ├── commit_disconnect.script │ │ │ ├── read.script │ │ │ ├── read_syntax_error.script │ │ │ ├── retry_with_fail_after_commit.script │ │ │ ├── retry_with_fail_after_pull.script │ │ │ ├── retry_with_fail_after_pull_server1.script │ │ │ ├── retry_with_fail_after_pull_server2.script │ │ │ ├── tx_pull_yielding_failure.script │ │ │ └── write_syntax_error.script │ │ ├── test_retry.py │ │ └── test_retry_clustering.py │ ├── routing │ │ ├── __init__.py │ │ ├── _routing.py │ │ ├── scripts │ │ │ ├── v3 │ │ │ │ ├── reader.script │ │ │ │ ├── reader_default_db.script │ │ │ │ ├── reader_tx.script │ │ │ │ ├── reader_tx_default_db.script │ │ │ │ ├── reader_tx_with_bookmarks.script │ │ │ │ ├── reader_tx_with_exit.script │ │ │ │ ├── reader_tx_with_unexpected_interruption_on_pipelined_pull.script │ │ │ │ ├── reader_tx_with_unexpected_interruption_on_pull.script │ │ │ │ ├── reader_tx_with_unexpected_interruption_on_run.script │ │ │ │ ├── reader_tx_with_unexpected_interruption_on_second_run.script │ │ │ │ ├── reader_with_bookmarks.script │ │ │ │ ├── reader_with_explicit_hello.script │ │ │ │ ├── reader_with_unexpected_interruption_on_pipelined_pull.script │ │ │ │ ├── reader_with_unexpected_interruption_on_run.script │ │ │ │ ├── router_adb.script │ │ │ │ ├── router_adb_multi_no_bookmarks.script │ │ │ │ ├── router_adb_then_bdb.script │ │ │ │ ├── router_and_reader.script │ │ │ │ ├── router_and_reader_with_empty_routing_context.script │ │ │ │ ├── router_and_writer_with_sequential_access_and_bookmark.script │ │ │ │ ├── router_connectivity_db.script │ │ │ │ ├── router_default_db.script │ │ │ │ ├── router_with_leader_change.script │ │ │ │ ├── router_yielding_any_security_failure.script │ │ │ │ ├── router_yielding_argument_error.script │ │ │ │ ├── router_yielding_authorization_expired_failure.script │ │ │ │ ├── router_yielding_database_unavailable_failure.script │ │ │ │ ├── router_yielding_db_not_found_failure.script │ │ │ │ ├── router_yielding_empty_response_then_shuts_down.script │ │ │ │ ├── router_yielding_forbidden_failure.script │ │ │ │ ├── router_yielding_invalid_bookmark_failure.script │ │ │ │ ├── router_yielding_invalid_bookmark_mixture_failure.script │ │ │ │ ├── router_yielding_invalid_request.script │ │ │ │ ├── router_yielding_no_readers_any_db.script │ │ │ │ ├── router_yielding_no_writers_adb.script │ │ │ │ ├── router_yielding_no_writers_adb_sequentially.script │ │ │ │ ├── router_yielding_no_writers_any_db.script │ │ │ │ ├── router_yielding_procedure_not_found_failure_connectivity_db.script │ │ │ │ ├── router_yielding_reader1_and_exit.script │ │ │ │ ├── router_yielding_reader2_adb.script │ │ │ │ ├── router_yielding_router2.script │ │ │ │ ├── router_yielding_router2_and_fake_reader.script │ │ │ │ ├── router_yielding_router2_and_non_existent_reader.script │ │ │ │ ├── router_yielding_type_error.script │ │ │ │ ├── router_yielding_unknown_failure.script │ │ │ │ ├── router_yielding_writer1.script │ │ │ │ ├── router_yielding_writer1_sequentially.script │ │ │ │ ├── router_yielding_writer2.script │ │ │ │ ├── writer.script │ │ │ │ ├── writer_and_reader_tx_with_bookmark.script │ │ │ │ ├── writer_tx.script │ │ │ │ ├── writer_tx_with_bookmarks.script │ │ │ │ ├── writer_tx_with_leader_switch_and_retry.script │ │ │ │ ├── writer_tx_with_multiple_bookmarks.script │ │ │ │ ├── writer_tx_with_unexpected_interruption_on_pipelined_pull.script │ │ │ │ ├── writer_tx_with_unexpected_interruption_on_pull.script │ │ │ │ ├── writer_tx_with_unexpected_interruption_on_run.script │ │ │ │ ├── writer_tx_with_unexpected_interruption_on_run_path.script │ │ │ │ ├── writer_tx_with_unexpected_interruption_on_status_check.script │ │ │ │ ├── writer_tx_yielding_database_unavailable_failure.script │ │ │ │ ├── writer_tx_yielding_database_unavailable_failure_on_commit.script │ │ │ │ ├── writer_tx_yielding_failure_on_2nd_run.script │ │ │ │ ├── writer_tx_yielding_failure_on_run.script │ │ │ │ ├── writer_with_bookmark.script │ │ │ │ ├── writer_with_sequential_access_and_bookmark.script │ │ │ │ ├── writer_with_unexpected_interruption_on_pipelined_pull.script │ │ │ │ ├── writer_with_unexpected_interruption_on_pull.script │ │ │ │ ├── writer_with_unexpected_interruption_on_run.script │ │ │ │ ├── writer_with_unexpected_interruption_on_second_run.script │ │ │ │ └── writer_yielding_failure_on_2nd_run.script │ │ │ ├── v3_no_routing │ │ │ │ ├── optional_hello.script │ │ │ │ ├── reader.script │ │ │ │ ├── reader_write_mode.script │ │ │ │ ├── writer_with_bookmark_yielding_error_on_run.script │ │ │ │ ├── writer_yielding_db_unavailable_error_on_commit.script │ │ │ │ ├── writer_yielding_db_unavailable_error_on_rollback.script │ │ │ │ ├── writer_yielding_db_unavailable_error_then_shut_down_on_commit.script │ │ │ │ ├── writer_yielding_multiple_records.script │ │ │ │ └── writer_yielding_multiple_records_with_noops.script │ │ │ ├── v4x2 │ │ │ │ ├── reader_default_db.script │ │ │ │ ├── reader_tx_default_db.script │ │ │ │ ├── router_adb.script │ │ │ │ ├── router_adb_multi_no_bookmarks.script │ │ │ │ ├── router_adb_then_bdb.script │ │ │ │ ├── router_and_reader.script │ │ │ │ ├── router_and_reader_with_empty_routing_context.script │ │ │ │ ├── router_and_writer_with_sequential_access_and_bookmark.script │ │ │ │ ├── router_connectivity_db.script │ │ │ │ ├── router_default_db.script │ │ │ │ ├── router_unreachable_db_then_adb.script │ │ │ │ ├── router_with_bookmarks.script │ │ │ │ ├── router_with_leader_change.script │ │ │ │ ├── router_yielding_any_security_failure.script │ │ │ │ ├── router_yielding_argument_error.script │ │ │ │ ├── router_yielding_authorization_expired_failure.script │ │ │ │ ├── router_yielding_database_unavailable_failure.script │ │ │ │ ├── router_yielding_db_not_found_failure.script │ │ │ │ ├── router_yielding_empty_response_then_shuts_down.script │ │ │ │ ├── router_yielding_forbidden_failure.script │ │ │ │ ├── router_yielding_invalid_bookmark_failure.script │ │ │ │ ├── router_yielding_invalid_bookmark_mixture_failure.script │ │ │ │ ├── router_yielding_invalid_request.script │ │ │ │ ├── router_yielding_no_readers_any_db.script │ │ │ │ ├── router_yielding_no_writers_adb.script │ │ │ │ ├── router_yielding_no_writers_adb_sequentially.script │ │ │ │ ├── router_yielding_no_writers_any_db.script │ │ │ │ ├── router_yielding_procedure_not_found_failure_connectivity_db.script │ │ │ │ ├── router_yielding_reader1_and_exit.script │ │ │ │ ├── router_yielding_reader2_adb.script │ │ │ │ ├── router_yielding_router2.script │ │ │ │ ├── router_yielding_router2_and_fake_reader.script │ │ │ │ ├── router_yielding_router2_and_non_existent_reader.script │ │ │ │ ├── router_yielding_type_error.script │ │ │ │ ├── router_yielding_unknown_failure.script │ │ │ │ ├── router_yielding_writer1.script │ │ │ │ ├── router_yielding_writer1_sequentially.script │ │ │ │ └── router_yielding_writer2.script │ │ │ ├── v4x2_no_routing │ │ │ │ ├── optional_hello.script │ │ │ │ ├── reader.script │ │ │ │ ├── reader_tx_yielding_multiple_records.script │ │ │ │ ├── reader_write_mode.script │ │ │ │ ├── reader_yielding_multiple_records.script │ │ │ │ ├── writer_with_bookmark_yielding_error_on_run.script │ │ │ │ ├── writer_with_custom_fetch_size.script │ │ │ │ ├── writer_with_custom_fetch_size_pull_all.script │ │ │ │ ├── writer_yielding_db_unavailable_error_on_commit.script │ │ │ │ ├── writer_yielding_db_unavailable_error_on_rollback.script │ │ │ │ ├── writer_yielding_db_unavailable_error_then_shut_down_on_commit.script │ │ │ │ ├── writer_yielding_multiple_records.script │ │ │ │ └── writer_yielding_multiple_records_with_noops.script │ │ │ ├── v4x3 │ │ │ │ ├── reader_default_db.script │ │ │ │ ├── reader_tx_default_db.script │ │ │ │ ├── router_adb.script │ │ │ │ ├── router_adb_multi_no_bookmarks.script │ │ │ │ ├── router_adb_then_bdb.script │ │ │ │ ├── router_and_reader.script │ │ │ │ ├── router_and_reader_with_empty_routing_context.script │ │ │ │ ├── router_and_writer_with_sequential_access_and_bookmark.script │ │ │ │ ├── router_connectivity_db.script │ │ │ │ ├── router_create_adb_with_bookmarks.script │ │ │ │ ├── router_default_db.script │ │ │ │ ├── router_system_then_adb_with_bookmarks.script │ │ │ │ ├── router_unreachable_db_then_adb.script │ │ │ │ ├── router_with_leader_change.script │ │ │ │ ├── router_yielding_any_security_failure.script │ │ │ │ ├── router_yielding_argument_error.script │ │ │ │ ├── router_yielding_authorization_expired_failure.script │ │ │ │ ├── router_yielding_database_unavailable_failure.script │ │ │ │ ├── router_yielding_db_not_found_failure.script │ │ │ │ ├── router_yielding_empty_response_then_shuts_down.script │ │ │ │ ├── router_yielding_forbidden_failure.script │ │ │ │ ├── router_yielding_invalid_bookmark_failure.script │ │ │ │ ├── router_yielding_invalid_bookmark_mixture_failure.script │ │ │ │ ├── router_yielding_invalid_request.script │ │ │ │ ├── router_yielding_no_readers_any_db.script │ │ │ │ ├── router_yielding_no_writers_adb.script │ │ │ │ ├── router_yielding_no_writers_adb_sequentially.script │ │ │ │ ├── router_yielding_no_writers_any_db.script │ │ │ │ ├── router_yielding_procedure_not_found_failure_connectivity_db.script │ │ │ │ ├── router_yielding_reader1_and_exit.script │ │ │ │ ├── router_yielding_reader2_adb.script │ │ │ │ ├── router_yielding_router2.script │ │ │ │ ├── router_yielding_router2_and_fake_reader.script │ │ │ │ ├── router_yielding_router2_and_non_existent_reader.script │ │ │ │ ├── router_yielding_type_error.script │ │ │ │ ├── router_yielding_unknown_failure.script │ │ │ │ ├── router_yielding_writer1.script │ │ │ │ ├── router_yielding_writer1_sequentially.script │ │ │ │ └── router_yielding_writer2.script │ │ │ ├── v4x4 │ │ │ │ ├── reader_with_explicit_hello.script │ │ │ │ ├── router_adb.script │ │ │ │ ├── router_adb_multi_no_bookmarks.script │ │ │ │ ├── router_adb_then_bdb.script │ │ │ │ ├── router_and_reader.script │ │ │ │ ├── router_and_reader_with_empty_routing_context.script │ │ │ │ ├── router_and_writer_with_sequential_access_and_bookmark.script │ │ │ │ ├── router_connectivity_db.script │ │ │ │ ├── router_create_adb_with_bookmarks.script │ │ │ │ ├── router_default_db.script │ │ │ │ ├── router_system_then_adb_with_bookmarks.script │ │ │ │ ├── router_unreachable_db_then_adb.script │ │ │ │ ├── router_yielding_any_security_failure.script │ │ │ │ ├── router_yielding_argument_error.script │ │ │ │ ├── router_yielding_authorization_expired_failure.script │ │ │ │ ├── router_yielding_database_unavailable_failure.script │ │ │ │ ├── router_yielding_db_not_found_failure.script │ │ │ │ ├── router_yielding_empty_response_then_shuts_down.script │ │ │ │ ├── router_yielding_forbidden_failure.script │ │ │ │ ├── router_yielding_invalid_bookmark_failure.script │ │ │ │ ├── router_yielding_invalid_bookmark_mixture_failure.script │ │ │ │ ├── router_yielding_invalid_request.script │ │ │ │ ├── router_yielding_no_writers_adb.script │ │ │ │ ├── router_yielding_no_writers_adb_sequentially.script │ │ │ │ ├── router_yielding_no_writers_any_db.script │ │ │ │ ├── router_yielding_procedure_not_found_failure_connectivity_db.script │ │ │ │ ├── router_yielding_reader1_and_exit.script │ │ │ │ ├── router_yielding_reader2_adb.script │ │ │ │ ├── router_yielding_router2.script │ │ │ │ ├── router_yielding_router2_and_fake_reader.script │ │ │ │ ├── router_yielding_router2_and_non_existent_reader.script │ │ │ │ ├── router_yielding_type_error.script │ │ │ │ ├── router_yielding_unknown_failure.script │ │ │ │ ├── router_yielding_writer1.script │ │ │ │ ├── router_yielding_writer1_sequentially.script │ │ │ │ └── router_yielding_writer2.script │ │ │ └── v5x0 │ │ │ │ ├── empty_reader.script │ │ │ │ ├── reader.script │ │ │ │ ├── reader_default_db.script │ │ │ │ ├── reader_tx.script │ │ │ │ ├── reader_tx_default_db.script │ │ │ │ ├── reader_tx_with_bookmarks.script │ │ │ │ ├── reader_tx_with_exit.script │ │ │ │ ├── reader_tx_with_unexpected_interruption_on_pipelined_pull.script │ │ │ │ ├── reader_tx_with_unexpected_interruption_on_pull.script │ │ │ │ ├── reader_tx_with_unexpected_interruption_on_run.script │ │ │ │ ├── reader_tx_with_unexpected_interruption_on_second_run.script │ │ │ │ ├── reader_with_bookmarks.script │ │ │ │ ├── reader_with_explicit_hello.script │ │ │ │ ├── reader_with_unexpected_interruption_on_pipelined_pull.script │ │ │ │ ├── reader_with_unexpected_interruption_on_run.script │ │ │ │ ├── router_adb.script │ │ │ │ ├── router_adb_multi_no_bookmarks.script │ │ │ │ ├── router_adb_then_bdb.script │ │ │ │ ├── router_and_reader.script │ │ │ │ ├── router_and_reader_with_empty_routing_context.script │ │ │ │ ├── router_and_writer_with_sequential_access_and_bookmark.script │ │ │ │ ├── router_connectivity_db.script │ │ │ │ ├── router_create_adb_with_bookmarks.script │ │ │ │ ├── router_default_db.script │ │ │ │ ├── router_system_then_adb_with_bookmarks.script │ │ │ │ ├── router_unreachable_db_then_adb.script │ │ │ │ ├── router_with_leader_change.script │ │ │ │ ├── router_yielding_any_security_failure.script │ │ │ │ ├── router_yielding_argument_error.script │ │ │ │ ├── router_yielding_authorization_expired_failure.script │ │ │ │ ├── router_yielding_database_unavailable_failure.script │ │ │ │ ├── router_yielding_db_not_found_failure.script │ │ │ │ ├── router_yielding_empty_response_then_shuts_down.script │ │ │ │ ├── router_yielding_forbidden_failure.script │ │ │ │ ├── router_yielding_invalid_bookmark_failure.script │ │ │ │ ├── router_yielding_invalid_bookmark_mixture_failure.script │ │ │ │ ├── router_yielding_invalid_request.script │ │ │ │ ├── router_yielding_no_readers_any_db.script │ │ │ │ ├── router_yielding_no_writers_adb.script │ │ │ │ ├── router_yielding_no_writers_adb_sequentially.script │ │ │ │ ├── router_yielding_no_writers_any_db.script │ │ │ │ ├── router_yielding_procedure_not_found_failure_connectivity_db.script │ │ │ │ ├── router_yielding_reader1_and_exit.script │ │ │ │ ├── router_yielding_reader2_adb.script │ │ │ │ ├── router_yielding_router2.script │ │ │ │ ├── router_yielding_router2_and_fake_reader.script │ │ │ │ ├── router_yielding_router2_and_non_existent_reader.script │ │ │ │ ├── router_yielding_type_error.script │ │ │ │ ├── router_yielding_unknown_failure.script │ │ │ │ ├── router_yielding_writer1.script │ │ │ │ ├── router_yielding_writer1_sequentially.script │ │ │ │ ├── router_yielding_writer2.script │ │ │ │ ├── writer.script │ │ │ │ ├── writer_and_reader_tx_with_bookmark.script │ │ │ │ ├── writer_tx.script │ │ │ │ ├── writer_tx_with_bookmarks.script │ │ │ │ ├── writer_tx_with_leader_switch_and_retry.script │ │ │ │ ├── writer_tx_with_multiple_bookmarks.script │ │ │ │ ├── writer_tx_with_unexpected_interruption_on_pipelined_pull.script │ │ │ │ ├── writer_tx_with_unexpected_interruption_on_pull.script │ │ │ │ ├── writer_tx_with_unexpected_interruption_on_run.script │ │ │ │ ├── writer_tx_with_unexpected_interruption_on_run_path.script │ │ │ │ ├── writer_tx_with_unexpected_interruption_on_status_check.script │ │ │ │ ├── writer_tx_yielding_database_unavailable_failure.script │ │ │ │ ├── writer_tx_yielding_database_unavailable_failure_on_commit.script │ │ │ │ ├── writer_tx_yielding_failure_on_2nd_run.script │ │ │ │ ├── writer_tx_yielding_failure_on_run.script │ │ │ │ ├── writer_with_bookmark.script │ │ │ │ ├── writer_with_sequential_access_and_bookmark.script │ │ │ │ ├── writer_with_unexpected_interruption_on_pipelined_pull.script │ │ │ │ ├── writer_with_unexpected_interruption_on_pull.script │ │ │ │ ├── writer_with_unexpected_interruption_on_run.script │ │ │ │ ├── writer_with_unexpected_interruption_on_second_run.script │ │ │ │ └── writer_yielding_failure_on_2nd_run.script │ │ ├── test_no_routing_v3.py │ │ ├── test_no_routing_v4x2.py │ │ ├── test_routing_v3.py │ │ ├── test_routing_v4x2.py │ │ ├── test_routing_v4x3.py │ │ ├── test_routing_v4x4.py │ │ └── test_routing_v5x0.py │ ├── server_side_routing │ │ ├── __init__.py │ │ ├── scripts │ │ │ └── direct_connection_without_routing_ssr.script │ │ └── test_server_side_routing.py │ ├── session_run │ │ ├── __init__.py │ │ ├── scripts │ │ │ ├── session_consume_result.script │ │ │ ├── session_discard_result.script │ │ │ └── session_error_on_run.script │ │ └── test_session_run.py │ ├── session_run_parameters │ │ ├── __init__.py │ │ ├── scripts │ │ │ ├── access_mode_read.script │ │ │ ├── access_mode_read_homedb.script │ │ │ ├── access_mode_write.script │ │ │ ├── access_mode_write_homedb.script │ │ │ ├── adb.script │ │ │ ├── bookmarks.script │ │ │ ├── bookmarks_homedb.script │ │ │ ├── combined.script │ │ │ ├── empty_query.script │ │ │ ├── empty_query_homedb.script │ │ │ ├── imp_user.script │ │ │ ├── imp_user_homedb.script │ │ │ ├── imp_user_v4x3.script │ │ │ ├── imp_user_v4x3_homedb.script │ │ │ ├── parameters.script │ │ │ ├── parameters_homedb.script │ │ │ ├── router_adb.script │ │ │ ├── router_adb_impersonation.script │ │ │ ├── router_default_db.script │ │ │ ├── router_default_db_impersonation.script │ │ │ ├── timeout_-1.script │ │ │ ├── timeout_0.script │ │ │ ├── timeout_17.script │ │ │ ├── timeout_17_homedb.script │ │ │ ├── timeout_null.script │ │ │ ├── tx_meta.script │ │ │ └── tx_meta_homedb.script │ │ └── test_session_run_parameters.py │ ├── shared.py │ ├── suites.py │ ├── summary │ │ ├── __init__.py │ │ ├── scripts │ │ │ ├── v4x4 │ │ │ │ ├── empty_summary_no_type.script │ │ │ │ ├── empty_summary_type_r.script │ │ │ │ ├── empty_summary_type_r_no_data.script │ │ │ │ ├── empty_summary_type_rw.script │ │ │ │ ├── empty_summary_type_s.script │ │ │ │ ├── empty_summary_type_w.script │ │ │ │ ├── empty_summary_type_wr.script │ │ │ │ ├── full_summary.script │ │ │ │ ├── no_summary.script │ │ │ │ ├── partial_summary_constraints_added.script │ │ │ │ ├── partial_summary_constraints_removed.script │ │ │ │ ├── partial_summary_contains_system_updates.script │ │ │ │ ├── partial_summary_contains_updates.script │ │ │ │ ├── partial_summary_indexes_added.script │ │ │ │ ├── partial_summary_indexes_removed.script │ │ │ │ ├── partial_summary_labels_added.script │ │ │ │ ├── partial_summary_labels_removed.script │ │ │ │ ├── partial_summary_nodes_created.script │ │ │ │ ├── partial_summary_nodes_deleted.script │ │ │ │ ├── partial_summary_not_contains_system_updates.script │ │ │ │ ├── partial_summary_not_contains_updates.script │ │ │ │ ├── partial_summary_properties_set.script │ │ │ │ ├── partial_summary_relationships_created.script │ │ │ │ ├── partial_summary_relationships_deleted.script │ │ │ │ ├── partial_summary_system_updates.script │ │ │ │ ├── summary_with_notifications.script │ │ │ │ ├── summary_with_notifications_no_data.script │ │ │ │ ├── summary_with_notifications_omitted_result.script │ │ │ │ ├── summary_with_plan.script │ │ │ │ └── summary_with_profile.script │ │ │ └── v5x6 │ │ │ │ ├── empty_summary_type_r.script │ │ │ │ ├── empty_summary_type_r_no_data.script │ │ │ │ ├── empty_summary_type_r_omitted_result.script │ │ │ │ └── summary_with_statuses.script │ │ └── test_summary.py │ ├── transport │ │ ├── __init__.py │ │ ├── scripts │ │ │ ├── handshake_manifest_v1_features.script │ │ │ ├── handshake_non_manifest_bolt_5_7.script │ │ │ ├── reader_with_noops.script │ │ │ └── test_parameterized_handshake_manifest.script │ │ ├── test_handshakes.py │ │ └── test_transport.py │ ├── tx_begin_parameters │ │ ├── __init__.py │ │ ├── scripts │ │ │ ├── access_mode_read.script │ │ │ ├── access_mode_read_homedb.script │ │ │ ├── access_mode_write.script │ │ │ ├── access_mode_write_homedb.script │ │ │ ├── adb.script │ │ │ ├── bookmarks.script │ │ │ ├── bookmarks_homedb.script │ │ │ ├── combined.script │ │ │ ├── imp_user.script │ │ │ ├── imp_user_homedb.script │ │ │ ├── imp_user_v4x3.script │ │ │ ├── imp_user_v4x3_homedb.script │ │ │ ├── parameters.script │ │ │ ├── parameters_homedb.script │ │ │ ├── router_adb.script │ │ │ ├── router_adb_impersonation.script │ │ │ ├── router_default_db.script │ │ │ ├── router_default_db_impersonation.script │ │ │ ├── timeout_-1.script │ │ │ ├── timeout_0.script │ │ │ ├── timeout_17.script │ │ │ ├── timeout_17_homedb.script │ │ │ ├── timeout_null.script │ │ │ ├── tx_meta.script │ │ │ └── tx_meta_homedb.script │ │ └── test_tx_begin_parameters.py │ ├── tx_lifetime │ │ ├── __init__.py │ │ ├── scripts │ │ │ └── v4x4 │ │ │ │ └── tx_inf_results_until_end.script │ │ └── test_tx_lifetime.py │ ├── tx_run │ │ ├── __init__.py │ │ ├── scripts │ │ │ ├── router_switch_server.script │ │ │ ├── tx_commit.script │ │ │ ├── tx_discard_then_rollback.script │ │ │ ├── tx_disconnect_on_begin.script │ │ │ ├── tx_error_on_begin.script │ │ │ ├── tx_error_on_pull.script │ │ │ ├── tx_error_on_run.script │ │ │ ├── tx_pull_then_rollback.script │ │ │ ├── tx_res0_success_res1_error_on_pull.script │ │ │ └── tx_res0_success_res1_error_on_run.script │ │ └── test_tx_run.py │ ├── types │ │ ├── __init__.py │ │ ├── scripts │ │ │ ├── v3x0 │ │ │ │ ├── echo_date_time.script │ │ │ │ └── echo_zoned_date_time.script │ │ │ ├── v4x1 │ │ │ │ ├── echo_date_time.script │ │ │ │ └── echo_zoned_date_time.script │ │ │ ├── v4x2 │ │ │ │ ├── echo_date_time.script │ │ │ │ └── echo_zoned_date_time.script │ │ │ ├── v4x3 │ │ │ │ ├── echo_date_time.script │ │ │ │ ├── echo_date_time_patched.script │ │ │ │ ├── echo_zoned_date_time.script │ │ │ │ └── echo_zoned_date_time_patched.script │ │ │ ├── v4x4 │ │ │ │ ├── echo_date_time.script │ │ │ │ ├── echo_date_time_patched.script │ │ │ │ ├── echo_unknown_then_known_zoned_date_time.script │ │ │ │ ├── echo_unknown_then_known_zoned_date_time_patched.script │ │ │ │ ├── echo_unknown_zoned_date_time.script │ │ │ │ ├── echo_unknown_zoned_date_time_patched.script │ │ │ │ ├── echo_zoned_date_time.script │ │ │ │ └── echo_zoned_date_time_patched.script │ │ │ └── v5x0 │ │ │ │ ├── echo_date_time.script │ │ │ │ ├── echo_unknown_then_known_zoned_date_time.script │ │ │ │ ├── echo_unknown_zoned_date_time.script │ │ │ │ └── echo_zoned_date_time.script │ │ └── test_temporal_types.py │ └── versions │ │ ├── __init__.py │ │ ├── scripts │ │ ├── foo.script │ │ ├── v3_and_up_optional_hello.script │ │ ├── v3_return_1.script │ │ ├── v4x2_return_1.script │ │ ├── v4x3_return_1.script │ │ ├── v4x4_return_1.script │ │ ├── v5x0_return_1.script │ │ ├── v5x1_and_up_optional_hello.script │ │ ├── v5x1_return_1.script │ │ ├── v5x2_return_1.script │ │ ├── v5x3_return_1.script │ │ ├── v5x4_return_1.script │ │ ├── v5x6_return_1.script │ │ └── v5x7_return_1.script │ │ └── test_versions.py ├── testenv.py └── tls │ ├── README │ ├── __init__.py │ ├── certs │ ├── customRoot.key │ ├── customRoot2.key │ ├── driver │ │ ├── certificate1.pem │ │ ├── certificate2.pem │ │ ├── custom │ │ │ ├── customRoot.crt │ │ │ └── customRoot2.crt │ │ ├── privatekey1.pem │ │ ├── privatekey1_with_thepassword1.pem │ │ ├── privatekey2.pem │ │ ├── privatekey2_with_thepassword2.pem │ │ └── trusted │ │ │ └── trustedRoot.crt │ ├── server │ │ ├── bolt │ │ │ └── trusted │ │ │ │ ├── client1.pem │ │ │ │ └── client2.pem │ │ ├── customRoot2_thehost.key │ │ ├── customRoot2_thehost.pem │ │ ├── customRoot_thehost.key │ │ ├── customRoot_thehost.pem │ │ ├── customRoot_thehost_expired.key │ │ ├── customRoot_thehost_expired.pem │ │ ├── trustedRoot_thehost.key │ │ ├── trustedRoot_thehost.pem │ │ ├── trustedRoot_thehost_expired.key │ │ ├── trustedRoot_thehost_expired.pem │ │ ├── untrustedRoot_thehost.key │ │ └── untrustedRoot_thehost.pem │ └── trustedRoot.key │ ├── shared.py │ ├── suites.py │ ├── test_client_certificate.py │ ├── test_explicit_options.py │ ├── test_secure_scheme.py │ ├── test_self_signed_scheme.py │ ├── test_tls_versions.py │ └── test_unsecure_scheme.py ├── tlsserver └── main.go ├── waiter.py └── waiter ├── .dockerignore ├── Dockerfile ├── bootstrap.py ├── requirements.txt └── wait_for_all_dbs.py /.editorconfig: -------------------------------------------------------------------------------- 1 | # top-most EditorConfig file 2 | root = true 3 | 4 | # Unix-style newlines with a newline ending every file 5 | [*] 6 | end_of_line = lf 7 | insert_final_newline = true 8 | 9 | [*.{py,script}] 10 | charset = utf-8 11 | indent_style = space 12 | indent_size = 4 13 | trim_trailing_whitespace = true 14 | 15 | [*.py] 16 | max_line_length = 79 17 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | artifacts 3 | diagrams/*.png 4 | driver/*/CAs/* 5 | certgen/certgen 6 | tlsserver/tlsserver 7 | .idea 8 | *.iml 9 | -------------------------------------------------------------------------------- /__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neo4j-drivers/testkit/cbc816c9dbfe039c74e5f7a8104e3323c4d7dbf1/__init__.py -------------------------------------------------------------------------------- /boltstub/tests/requirements.txt: -------------------------------------------------------------------------------- 1 | pytest 2 | pytest-mock 3 | -------------------------------------------------------------------------------- /diagrams/README: -------------------------------------------------------------------------------- 1 | PlantUML diagrams 2 | -------------------------------------------------------------------------------- /driver/bootstrap.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import time 3 | 4 | if __name__ == "__main__": 5 | # This notifies controller that we're up and running in the driver 6 | print("ok") 7 | sys.stdout.flush() 8 | # Just hang around here 9 | while True: 10 | time.sleep(100) 11 | -------------------------------------------------------------------------------- /nutkit/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neo4j-drivers/testkit/cbc816c9dbfe039c74e5f7a8104e3323c4d7dbf1/nutkit/__init__.py -------------------------------------------------------------------------------- /nutkit/backend/__init__.py: -------------------------------------------------------------------------------- 1 | from nutkit.backend.backend import Backend 2 | -------------------------------------------------------------------------------- /nutkit/frontend/__init__.py: -------------------------------------------------------------------------------- 1 | from .auth_token_manager import ( 2 | AuthTokenManager, 3 | BasicAuthTokenManager, 4 | BearerAuthTokenManager, 5 | ) 6 | from .bookmark_manager import ( 7 | BookmarkManager, 8 | Neo4jBookmarkManagerConfig, 9 | ) 10 | from .client_certificate_provider import ( 11 | ClientCertificateHolder, 12 | ClientCertificateProvider, 13 | ) 14 | from .driver import Driver 15 | from .exceptions import ApplicationCodeError 16 | from .fake_time import FakeTime 17 | from .session import Session 18 | -------------------------------------------------------------------------------- /nutkit/frontend/exceptions.py: -------------------------------------------------------------------------------- 1 | class ApplicationCodeError(Exception): 2 | pass 3 | -------------------------------------------------------------------------------- /nutkit/protocol/__init__.py: -------------------------------------------------------------------------------- 1 | from .cypher import * 2 | from .feature import * 3 | from .requests import * 4 | from .responses import * 5 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | ifaddr~=0.1.7 2 | lark~=1.0.0 3 | nose~=1.3.7 4 | pre-commit~=2.15.0 5 | pytz 6 | -------------------------------------------------------------------------------- /runner_image/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:20.04 2 | 3 | ARG DEBIAN_FRONTEND=noninteractive 4 | RUN apt-get update && \ 5 | apt-get install -y \ 6 | git \ 7 | tzdata \ 8 | python3 \ 9 | python3-pip \ 10 | golang \ 11 | && rm -rf /var/lib/apt/lists/* 12 | 13 | ENV PYTHON=python3 14 | -------------------------------------------------------------------------------- /teamcity/env.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | 4 | def evaluate_env_variable(): 5 | return (os.environ.get("TEST_IN_TEAMCITY", "").upper() 6 | in ("TRUE", "1", "Y", "YES", "ON")) 7 | 8 | 9 | in_teamcity = evaluate_env_variable() 10 | -------------------------------------------------------------------------------- /tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neo4j-drivers/testkit/cbc816c9dbfe039c74e5f7a8104e3323c4d7dbf1/tests/__init__.py -------------------------------------------------------------------------------- /tests/neo4j/README: -------------------------------------------------------------------------------- 1 | Contains tests that is intended to run against a real Neo4j server 2 | -------------------------------------------------------------------------------- /tests/neo4j/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neo4j-drivers/testkit/cbc816c9dbfe039c74e5f7a8104e3323c4d7dbf1/tests/neo4j/__init__.py -------------------------------------------------------------------------------- /tests/neo4j/datatypes/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neo4j-drivers/testkit/cbc816c9dbfe039c74e5f7a8104e3323c4d7dbf1/tests/neo4j/datatypes/__init__.py -------------------------------------------------------------------------------- /tests/stub/README: -------------------------------------------------------------------------------- 1 | Contains tests that is intended to run against stub server. 2 | -------------------------------------------------------------------------------- /tests/stub/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neo4j-drivers/testkit/cbc816c9dbfe039c74e5f7a8104e3323c4d7dbf1/tests/stub/__init__.py -------------------------------------------------------------------------------- /tests/stub/authorization/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neo4j-drivers/testkit/cbc816c9dbfe039c74e5f7a8104e3323c4d7dbf1/tests/stub/authorization/__init__.py -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v3/reader_tx.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {"mode": "r"} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 AS n" {} {} 8 | S: SUCCESS {"fields": ["n"]} 9 | C: PULL_ALL 10 | S: RECORD [1] 11 | SUCCESS {"type": "r"} 12 | C: COMMIT 13 | S: SUCCESS {} 14 | *: RESET 15 | ?: GOODBYE 16 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v3/reader_tx_yielding_error_on_begin.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {"mode": "r"} 6 | S: FAILURE #ERROR# 7 | 8 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v3/reader_tx_yielding_error_on_commit.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | C: BEGIN {"mode": "r"} 5 | S: SUCCESS {} 6 | C: RUN "RETURN 1 AS n" {} {} 7 | S: SUCCESS {"fields": ["n"]} 8 | C: PULL_ALL 9 | S: RECORD [1] 10 | SUCCESS {"type": "r"} 11 | C: COMMIT 12 | S: FAILURE #ERROR# 13 | 14 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v3/reader_tx_yielding_error_on_commit_with_pull_or_discard.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | C: BEGIN {"mode": "r"} 5 | S: SUCCESS {} 6 | C: RUN "RETURN 1 AS n" {} {} 7 | S: SUCCESS {"fields": ["n"]} 8 | {{ 9 | C: PULL_ALL 10 | S: RECORD [1] 11 | SUCCESS {"type": "r"} 12 | ---- 13 | C: DISCARD_ALL 14 | S: SUCCESS {} 15 | }} 16 | C: COMMIT 17 | S: FAILURE #ERROR# 18 | 19 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v3/reader_tx_yielding_error_on_pull.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | C: BEGIN {"mode": "r"} 5 | S: SUCCESS {} 6 | C: RUN "RETURN 1 AS n" {} {} 7 | S: SUCCESS {"fields": ["n"]} 8 | C: PULL_ALL 9 | S: FAILURE #ERROR# 10 | 11 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v3/reader_tx_yielding_error_on_rollback_with_pull_or_discard.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | C: BEGIN {"mode": "r"} 5 | S: SUCCESS {} 6 | C: RUN "RETURN 1 AS n" {} {} 7 | S: SUCCESS {"fields": ["n"]} 8 | {{ 9 | C: PULL_ALL 10 | S: RECORD [1] 11 | SUCCESS {"type": "r"} 12 | ---- 13 | C: DISCARD_ALL 14 | S: SUCCESS {} 15 | }} 16 | C: ROLLBACK 17 | S: FAILURE #ERROR# 18 | 19 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v3/reader_tx_yielding_error_on_run.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | C: BEGIN {"mode": "r"} 5 | S: SUCCESS {} 6 | C: RUN "RETURN 1 AS n" {} {} 7 | S: FAILURE #ERROR# 8 | 9 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v3/reader_yielding_error_on_pull.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | C: RUN "RETURN 1 AS n" {} {"mode": "r"} 5 | S: SUCCESS {"fields": ["n"]} 6 | C: PULL_ALL 7 | S: FAILURE #ERROR# 8 | 9 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v3/router.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": #ROUTINGCTX#} {"[mode]": "r"} 6 | PULL_ALL 7 | S: SUCCESS {"fields": ["ttl", "servers"]} 8 | RECORD [1000, [{"addresses": ["#HOST#:9000"], "role":"ROUTE"}, {"addresses": ["#HOST#:9010", "#HOST#:9011"], "role":"READ"}, {"addresses": ["#HOST#:9020", "#HOST#:9021"], "role":"WRITE"}]] 9 | SUCCESS {"type": "r"} 10 | *: RESET 11 | ?: GOODBYE 12 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v4x3/reader_tx.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {"mode": "r", "db": "adb"} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 AS n" {} {} 8 | S: SUCCESS {"fields": ["n"]} 9 | C: PULL {"n": 1000} 10 | S: RECORD [1] 11 | SUCCESS {"type": "r"} 12 | C: COMMIT 13 | S: SUCCESS {} 14 | *: RESET 15 | ?: GOODBYE 16 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v4x3/reader_tx_yielding_error_on_begin.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {"mode": "r", "db": "adb"} 6 | S: FAILURE #ERROR# 7 | S: 8 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v4x3/reader_tx_yielding_error_on_commit.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | C: BEGIN {"mode": "r", "db": "adb"} 5 | S: SUCCESS {} 6 | C: RUN "RETURN 1 AS n" {} {} 7 | S: SUCCESS {"fields": ["n"]} 8 | C: PULL {"n": 1000} 9 | S: RECORD [1] 10 | SUCCESS {"type": "r"} 11 | C: COMMIT 12 | S: FAILURE #ERROR# 13 | 14 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v4x3/reader_tx_yielding_error_on_commit_with_pull_or_discard.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | C: BEGIN {"mode": "r", "db": "adb"} 5 | S: SUCCESS {} 6 | C: RUN "RETURN 1 AS n" {} {} 7 | S: SUCCESS {"fields": ["n"]} 8 | {{ 9 | C: PULL {"n": 1000} 10 | S: RECORD [1] 11 | SUCCESS {"type": "r"} 12 | ---- 13 | C: DISCARD {"n": -1} 14 | S: SUCCESS {} 15 | }} 16 | C: COMMIT 17 | S: FAILURE #ERROR# 18 | 19 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v4x3/reader_tx_yielding_error_on_pull.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | C: BEGIN {"mode": "r", "db": "adb"} 5 | S: SUCCESS {} 6 | C: RUN "RETURN 1 AS n" {} {} 7 | S: SUCCESS {"fields": ["n"]} 8 | C: PULL {"n": 1000} 9 | S: FAILURE #ERROR# 10 | 11 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v4x3/reader_tx_yielding_error_on_rollback_with_pull_or_discard.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | C: BEGIN {"mode": "r", "db": "adb"} 5 | S: SUCCESS {} 6 | C: RUN "RETURN 1 AS n" {} {} 7 | S: SUCCESS {"fields": ["n"]} 8 | {{ 9 | C: PULL {"n": 1000} 10 | S: RECORD [1] 11 | SUCCESS {"type": "r"} 12 | ---- 13 | C: DISCARD {"n": -1} 14 | S: SUCCESS {} 15 | }} 16 | C: ROLLBACK 17 | S: FAILURE #ERROR# 18 | 19 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v4x3/reader_tx_yielding_error_on_run.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {"mode": "r", "db": "adb"} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 AS n" {} {} 8 | S: FAILURE #ERROR# 9 | 10 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v4x3/reader_yielding_error_on_pull.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN "RETURN 1 AS n" {} {"mode": "r", "db": "adb"} 6 | S: SUCCESS {"fields": ["n"]} 7 | C: PULL {"n": 1000} 8 | S: FAILURE #ERROR# 9 | 10 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v4x3/router.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | C: ROUTE #ROUTINGCTX# [] "adb" 5 | S: SUCCESS { "rt": { "ttl": 1000, "servers": [{"addresses": ["#HOST#:9000"], "role":"ROUTE"}, {"addresses": ["#HOST#:9010", "#HOST#:9011"], "role":"READ"}, {"addresses": ["#HOST#:9020"], "role":"WRITE"}]}} 6 | ?: RESET 7 | ?: GOODBYE 8 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v4x4/scheme_basic.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"user_agent": "*", "scheme": "basic", "principal": "neo4j", "credentials": "pass", "[routing]": null, "[realm]": "", "[patch_bolt]": "*"} 4 | *: RESET 5 | 6 | C: RUN "RETURN 1 AS n" "*" "*" 7 | S: SUCCESS {"fields": ["n"]} 8 | C: PULL "*" 9 | S: RECORD [1] 10 | SUCCESS {"type": "r"} 11 | 12 | *: RESET 13 | ?: GOODBYE 14 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v4x4/scheme_basic_minimal.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"user_agent": "*", "scheme": "basic", "principal": "neo4j", "credentials": "pass", "[patch_bolt]": "*"} 4 | *: RESET 5 | 6 | C: RUN "RETURN 1 AS n" "*" "*" 7 | S: SUCCESS {"fields": ["n"]} 8 | C: PULL "*" 9 | S: RECORD [1] 10 | SUCCESS {"type": "r"} 11 | 12 | *: RESET 13 | ?: GOODBYE 14 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v4x4/scheme_basic_realm_foobar.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"user_agent": "*", "scheme": "basic", "principal": "neo4j", "credentials": "pass", "realm": "foobar", "[routing]": null, "[patch_bolt]": "*"} 4 | *: RESET 5 | 6 | C: RUN "RETURN 1 AS n" "*" "*" 7 | S: SUCCESS {"fields": ["n"]} 8 | C: PULL "*" 9 | S: RECORD [1] 10 | SUCCESS {"type": "r"} 11 | 12 | *: RESET 13 | ?: GOODBYE 14 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v4x4/scheme_basic_realm_foobar_minimal.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"user_agent": "*", "scheme": "basic", "principal": "neo4j", "credentials": "pass", "realm": "foobar", "[patch_bolt]": "*"} 4 | *: RESET 5 | 6 | C: RUN "RETURN 1 AS n" "*" "*" 7 | S: SUCCESS {"fields": ["n"]} 8 | C: PULL "*" 9 | S: RECORD [1] 10 | SUCCESS {"type": "r"} 11 | 12 | *: RESET 13 | ?: GOODBYE 14 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v4x4/scheme_bearer.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"user_agent": "*", "scheme": "bearer", "credentials": "QmFuYW5hIQ==", "[principal]": "", "[routing]": null, "[realm]": "", "[patch_bolt]": "*"} 4 | *: RESET 5 | 6 | C: RUN "RETURN 1 AS n" "*" "*" 7 | S: SUCCESS {"fields": ["n"]} 8 | C: PULL "*" 9 | S: RECORD [1] 10 | SUCCESS {"type": "r"} 11 | 12 | *: RESET 13 | ?: GOODBYE 14 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v4x4/scheme_bearer_minimal.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"user_agent": "*", "scheme": "bearer", "credentials": "QmFuYW5hIQ==", "[patch_bolt]": "*"} 4 | *: RESET 5 | 6 | C: RUN "RETURN 1 AS n" "*" "*" 7 | S: SUCCESS {"fields": ["n"]} 8 | C: PULL "*" 9 | S: RECORD [1] 10 | SUCCESS {"type": "r"} 11 | 12 | *: RESET 13 | ?: GOODBYE 14 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v4x4/scheme_custom.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"user_agent": "*", "scheme": "wild-scheme", "principal": "I See Something", "credentials": "You Don't See!", "realm": "And it's blue.", "parameters": {"sky?": "no", "my eyes": 0.1, "da be dee da be daa?": true}, "[routing]": null, "[patch_bolt]": "*"} 4 | *: RESET 5 | 6 | C: RUN "RETURN 1 AS n" "*" "*" 7 | S: SUCCESS {"fields": ["n"]} 8 | C: PULL "*" 9 | S: RECORD [1] 10 | SUCCESS {"type": "r"} 11 | 12 | *: RESET 13 | ?: GOODBYE 14 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v4x4/scheme_custom_empty.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"user_agent": "*", "scheme": "minimal-scheme", "principal": "", "[credentials]": "", "[realm]": "", "[parameters]": {}, "[routing]": null, "[patch_bolt]": "*"} 4 | *: RESET 5 | 6 | C: RUN "RETURN 1 AS n" "*" "*" 7 | S: SUCCESS {"fields": ["n"]} 8 | C: PULL "*" 9 | S: RECORD [1] 10 | SUCCESS {"type": "r"} 11 | 12 | *: RESET 13 | ?: GOODBYE 14 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v4x4/scheme_custom_empty_minimal.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | # Server versions pre 4.4 require empty principal field. So for backwards compatibility, we expect the driver to send it. 4 | A: HELLO {"user_agent": "*", "scheme": "minimal-scheme", "principal": "", "[patch_bolt]": "*"} 5 | *: RESET 6 | 7 | C: RUN "RETURN 1 AS n" "*" "*" 8 | S: SUCCESS {"fields": ["n"]} 9 | C: PULL "*" 10 | S: RECORD [1] 11 | SUCCESS {"type": "r"} 12 | 13 | *: RESET 14 | ?: GOODBYE 15 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v4x4/scheme_custom_minimal.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"user_agent": "*", "scheme": "wild-scheme", "principal": "I See Something", "credentials": "You Don't See!", "realm": "And it's blue.", "parameters": {"sky?": "no", "my eyes": 0.1, "da be dee da be daa?": true}, "[patch_bolt]": "*"} 4 | *: RESET 5 | 6 | C: RUN "RETURN 1 AS n" "*" "*" 7 | S: SUCCESS {"fields": ["n"]} 8 | C: PULL "*" 9 | S: RECORD [1] 10 | SUCCESS {"type": "r"} 11 | 12 | *: RESET 13 | ?: GOODBYE 14 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v4x4/scheme_kerberos.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | # Server versions pre 4.4 require empty principal field. So for backwards compatibility, we expect the driver to send it. 4 | A: HELLO {"user_agent": "*", "scheme": "kerberos", "principal": "", "credentials": "QmFuYW5hIQ==", "[routing]": null, "[realm]": "", "[patch_bolt]": "*"} 5 | *: RESET 6 | 7 | C: RUN "RETURN 1 AS n" "*" "*" 8 | S: SUCCESS {"fields": ["n"]} 9 | C: PULL "*" 10 | S: RECORD [1] 11 | SUCCESS {"type": "r"} 12 | 13 | *: RESET 14 | ?: GOODBYE 15 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v4x4/scheme_kerberos_minimal.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | # Server versions pre 4.4 require empty principal field. So for backwards compatibility, we expect the driver to send it. 4 | A: HELLO {"user_agent": "*", "scheme": "kerberos", "principal": "", "credentials": "QmFuYW5hIQ==", "[patch_bolt]": "*"} 5 | *: RESET 6 | 7 | C: RUN "RETURN 1 AS n" "*" "*" 8 | S: SUCCESS {"fields": ["n"]} 9 | C: PULL "*" 10 | S: RECORD [1] 11 | SUCCESS {"type": "r"} 12 | 13 | *: RESET 14 | ?: GOODBYE 15 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v5x0/reader_no_reauth.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"user_agent": "*", "[routing]": "*", "scheme": "basic", "principal": "neo4j", "credentials": "pass", "[realm]": ""} 4 | 5 | *: RESET 6 | 7 | {+ 8 | C: RUN "RETURN 1 AS n" "*" "*" 9 | S: SUCCESS {"fields": ["n"]} 10 | C: PULL "*" 11 | S: RECORD [1] 12 | SUCCESS {"type": "r"} 13 | 14 | *: RESET 15 | +} 16 | 17 | ?: GOODBYE 18 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v5x0/reader_no_reauth_minimal.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"user_agent": "*", "[routing]": "*", "scheme": "basic", "principal": "neo4j", "credentials": "pass"} 4 | 5 | *: RESET 6 | 7 | {+ 8 | C: RUN "RETURN 1 AS n" "*" "*" 9 | S: SUCCESS {"fields": ["n"]} 10 | C: PULL "*" 11 | S: RECORD [1] 12 | SUCCESS {"type": "r"} 13 | 14 | *: RESET 15 | +} 16 | 17 | ?: GOODBYE 18 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v5x0/reader_tx.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {"mode": "r", "db": "adb"} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 AS n" {} {} 8 | S: SUCCESS {"fields": ["n"]} 9 | C: PULL {"n": 1000} 10 | S: RECORD [1] 11 | SUCCESS {"type": "r"} 12 | C: COMMIT 13 | S: SUCCESS {} 14 | *: RESET 15 | ?: GOODBYE 16 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v5x0/reader_tx_yielding_error_on_begin.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {"mode": "r", "db": "adb"} 6 | S: FAILURE #ERROR# 7 | S: 8 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v5x0/reader_tx_yielding_error_on_commit.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | C: BEGIN {"mode": "r", "db": "adb"} 5 | S: SUCCESS {} 6 | C: RUN "RETURN 1 AS n" {} {} 7 | S: SUCCESS {"fields": ["n"]} 8 | C: PULL {"n": 1000} 9 | S: RECORD [1] 10 | SUCCESS {"type": "r"} 11 | C: COMMIT 12 | S: FAILURE #ERROR# 13 | 14 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v5x0/reader_tx_yielding_error_on_commit_with_pull_or_discard.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | C: BEGIN {"mode": "r", "db": "adb"} 5 | S: SUCCESS {} 6 | C: RUN "RETURN 1 AS n" {} {} 7 | S: SUCCESS {"fields": ["n"]} 8 | {{ 9 | C: PULL {"n": 1000} 10 | S: RECORD [1] 11 | SUCCESS {"type": "r"} 12 | ---- 13 | C: DISCARD {"n": -1} 14 | S: SUCCESS {} 15 | }} 16 | C: COMMIT 17 | S: FAILURE #ERROR# 18 | 19 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v5x0/reader_tx_yielding_error_on_pull.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | C: BEGIN {"mode": "r", "db": "adb"} 5 | S: SUCCESS {} 6 | C: RUN "RETURN 1 AS n" {} {} 7 | S: SUCCESS {"fields": ["n"]} 8 | C: PULL {"n": 1000} 9 | S: FAILURE #ERROR# 10 | 11 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v5x0/reader_tx_yielding_error_on_rollback_with_pull_or_discard.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | C: BEGIN {"mode": "r", "db": "adb"} 5 | S: SUCCESS {} 6 | C: RUN "RETURN 1 AS n" {} {} 7 | S: SUCCESS {"fields": ["n"]} 8 | {{ 9 | C: PULL {"n": 1000} 10 | S: RECORD [1] 11 | SUCCESS {"type": "r"} 12 | ---- 13 | C: DISCARD {"n": -1} 14 | S: SUCCESS {} 15 | }} 16 | C: ROLLBACK 17 | S: FAILURE #ERROR# 18 | 19 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v5x0/reader_tx_yielding_error_on_run.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {"mode": "r", "db": "adb"} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 AS n" {} {} 8 | S: FAILURE #ERROR# 9 | 10 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v5x0/reader_yielding_error_on_pull.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN "RETURN 1 AS n" {} {"mode": "r", "db": "adb"} 6 | S: SUCCESS {"fields": ["n"]} 7 | C: PULL {"n": 1000} 8 | S: FAILURE #ERROR# 9 | 10 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v5x0/router.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | C: ROUTE #ROUTINGCTX# [] {"{}": {"db": "adb"}} 5 | S: SUCCESS { "rt": { "ttl": 1000, "db": "adb", "servers": [{"addresses": ["#HOST#:9000"], "role":"ROUTE"}, {"addresses": ["#HOST#:9010", "#HOST#:9011"], "role":"READ"}, {"addresses": ["#HOST#:9020"], "role":"WRITE"}]}} 6 | ?: RESET 7 | ?: GOODBYE 8 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v5x0/router_single_reader.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | 6 | C: ROUTE #ROUTINGCTX# [] {"{}": {"db": "adb"}} 7 | S: SUCCESS {"rt": {"ttl": 1000, "db": "adb", "servers": [{"addresses": ["#HOST#:9000"], "role":"ROUTE"}, {"addresses": ["#HOST#:9010"], "role":"READ"}, {"addresses": ["#HOST#:9020"], "role":"WRITE"}]}} 8 | 9 | *: RESET 10 | ?: GOODBYE 11 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v5x0/scheme_basic.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"user_agent": "*", "scheme": "basic", "principal": "neo4j", "credentials": "pass", "[routing]": null, "[realm]": ""} 4 | *: RESET 5 | 6 | C: RUN "RETURN 1 AS n" "*" "*" 7 | S: SUCCESS {"fields": ["n"]} 8 | C: PULL "*" 9 | S: RECORD [1] 10 | SUCCESS {"type": "r"} 11 | 12 | *: RESET 13 | ?: GOODBYE 14 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v5x0/scheme_basic_minimal.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"user_agent": "*", "scheme": "basic", "principal": "neo4j", "credentials": "pass"} 4 | *: RESET 5 | 6 | C: RUN "RETURN 1 AS n" "*" "*" 7 | S: SUCCESS {"fields": ["n"]} 8 | C: PULL "*" 9 | S: RECORD [1] 10 | SUCCESS {"type": "r"} 11 | 12 | *: RESET 13 | ?: GOODBYE 14 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v5x0/scheme_basic_realm_foobar.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"user_agent": "*", "scheme": "basic", "principal": "neo4j", "credentials": "pass", "realm": "foobar", "[routing]": null} 4 | *: RESET 5 | 6 | C: RUN "RETURN 1 AS n" "*" "*" 7 | S: SUCCESS {"fields": ["n"]} 8 | C: PULL "*" 9 | S: RECORD [1] 10 | SUCCESS {"type": "r"} 11 | 12 | *: RESET 13 | ?: GOODBYE 14 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v5x0/scheme_basic_realm_foobar_minimal.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"user_agent": "*", "scheme": "basic", "principal": "neo4j", "credentials": "pass", "realm": "foobar"} 4 | *: RESET 5 | 6 | C: RUN "RETURN 1 AS n" "*" "*" 7 | S: SUCCESS {"fields": ["n"]} 8 | C: PULL "*" 9 | S: RECORD [1] 10 | SUCCESS {"type": "r"} 11 | 12 | *: RESET 13 | ?: GOODBYE 14 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v5x0/scheme_bearer.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"user_agent": "*", "scheme": "bearer", "credentials": "QmFuYW5hIQ==", "[principal]": "", "[routing]": null, "[realm]": ""} 4 | *: RESET 5 | 6 | C: RUN "RETURN 1 AS n" "*" "*" 7 | S: SUCCESS {"fields": ["n"]} 8 | C: PULL "*" 9 | S: RECORD [1] 10 | SUCCESS {"type": "r"} 11 | 12 | *: RESET 13 | ?: GOODBYE 14 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v5x0/scheme_bearer_minimal.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"user_agent": "*", "scheme": "bearer", "credentials": "QmFuYW5hIQ=="} 4 | *: RESET 5 | 6 | C: RUN "RETURN 1 AS n" "*" "*" 7 | S: SUCCESS {"fields": ["n"]} 8 | C: PULL "*" 9 | S: RECORD [1] 10 | SUCCESS {"type": "r"} 11 | 12 | *: RESET 13 | ?: GOODBYE 14 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v5x0/scheme_custom.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"user_agent": "*", "scheme": "wild-scheme", "principal": "I See Something", "credentials": "You Don't See!", "realm": "And it's blue.", "parameters": {"sky?": "no", "my eyes": 0.1, "da be dee da be daa?": true}, "[routing]": null} 4 | *: RESET 5 | 6 | C: RUN "RETURN 1 AS n" "*" "*" 7 | S: SUCCESS {"fields": ["n"]} 8 | C: PULL "*" 9 | S: RECORD [1] 10 | SUCCESS {"type": "r"} 11 | 12 | *: RESET 13 | ?: GOODBYE 14 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v5x0/scheme_custom_empty.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"user_agent": "*", "scheme": "minimal-scheme", "principal": "", "[credentials]": "", "[realm]": "", "[parameters]": {}, "[routing]": null} 4 | *: RESET 5 | 6 | C: RUN "RETURN 1 AS n" "*" "*" 7 | S: SUCCESS {"fields": ["n"]} 8 | C: PULL "*" 9 | S: RECORD [1] 10 | SUCCESS {"type": "r"} 11 | 12 | *: RESET 13 | ?: GOODBYE 14 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v5x0/scheme_custom_empty_minimal.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | # Server versions pre 4.4 require empty principal field. So for backwards compatibility, we expect the driver to send it. 4 | A: HELLO {"user_agent": "*", "scheme": "minimal-scheme", "principal": ""} 5 | *: RESET 6 | 7 | C: RUN "RETURN 1 AS n" "*" "*" 8 | S: SUCCESS {"fields": ["n"]} 9 | C: PULL "*" 10 | S: RECORD [1] 11 | SUCCESS {"type": "r"} 12 | 13 | *: RESET 14 | ?: GOODBYE 15 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v5x0/scheme_custom_minimal.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"user_agent": "*", "scheme": "wild-scheme", "principal": "I See Something", "credentials": "You Don't See!", "realm": "And it's blue.", "parameters": {"sky?": "no", "my eyes": 0.1, "da be dee da be daa?": true}} 4 | *: RESET 5 | 6 | C: RUN "RETURN 1 AS n" "*" "*" 7 | S: SUCCESS {"fields": ["n"]} 8 | C: PULL "*" 9 | S: RECORD [1] 10 | SUCCESS {"type": "r"} 11 | 12 | *: RESET 13 | ?: GOODBYE 14 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v5x0/scheme_kerberos.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | # Server versions pre 4.4 require empty principal field. So for backwards compatibility, we expect the driver to send it. 4 | A: HELLO {"user_agent": "*", "scheme": "kerberos", "principal": "", "credentials": "QmFuYW5hIQ==", "[routing]": null, "[realm]": ""} 5 | *: RESET 6 | 7 | C: RUN "RETURN 1 AS n" "*" "*" 8 | S: SUCCESS {"fields": ["n"]} 9 | C: PULL "*" 10 | S: RECORD [1] 11 | SUCCESS {"type": "r"} 12 | 13 | *: RESET 14 | ?: GOODBYE 15 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v5x0/scheme_kerberos_minimal.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | # Server versions pre 4.4 require empty principal field. So for backwards compatibility, we expect the driver to send it. 4 | A: HELLO {"user_agent": "*", "scheme": "kerberos", "principal": "", "credentials": "QmFuYW5hIQ=="} 5 | *: RESET 6 | 7 | C: RUN "RETURN 1 AS n" "*" "*" 8 | S: SUCCESS {"fields": ["n"]} 9 | C: PULL "*" 10 | S: RECORD [1] 11 | SUCCESS {"type": "r"} 12 | 13 | *: RESET 14 | ?: GOODBYE 15 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v5x1/reader_no_reauth.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"user_agent": "*", "[routing]": "*"} 4 | A: LOGON {"scheme": "basic", "principal": "neo4j", "credentials": "pass", "[realm]": ""} 5 | 6 | *: RESET 7 | 8 | {+ 9 | C: RUN "RETURN 1 AS n" "*" "*" 10 | S: SUCCESS {"fields": ["n"]} 11 | C: PULL "*" 12 | S: RECORD [1] 13 | SUCCESS {"type": "r"} 14 | 15 | *: RESET 16 | +} 17 | 18 | ?: GOODBYE 19 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v5x1/reader_tx.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | A: LOGON {"{}": "*"} 5 | *: RESET 6 | C: BEGIN {"mode": "r", "db": "adb"} 7 | S: SUCCESS {} 8 | C: RUN "RETURN 1 AS n" {} {} 9 | S: SUCCESS {"fields": ["n"]} 10 | C: PULL {"n": 1000} 11 | S: RECORD [1] 12 | SUCCESS {"type": "r"} 13 | C: COMMIT 14 | S: SUCCESS {} 15 | *: RESET 16 | ?: GOODBYE 17 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v5x1/reader_tx_yielding_error_on_begin.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | A: LOGON {"{}": "*"} 5 | *: RESET 6 | C: BEGIN {"mode": "r", "db": "adb"} 7 | S: FAILURE #ERROR# 8 | S: 9 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v5x1/reader_tx_yielding_error_on_commit.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | A: LOGON {"{}": "*"} 5 | C: BEGIN {"mode": "r", "db": "adb"} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 AS n" {} {} 8 | S: SUCCESS {"fields": ["n"]} 9 | C: PULL {"n": 1000} 10 | S: RECORD [1] 11 | SUCCESS {"type": "r"} 12 | C: COMMIT 13 | S: FAILURE #ERROR# 14 | 15 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v5x1/reader_tx_yielding_error_on_commit_with_pull_or_discard.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | A: LOGON {"{}": "*"} 5 | C: BEGIN {"mode": "r", "db": "adb"} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 AS n" {} {} 8 | S: SUCCESS {"fields": ["n"]} 9 | {{ 10 | C: PULL {"n": 1000} 11 | S: RECORD [1] 12 | SUCCESS {"type": "r"} 13 | ---- 14 | C: DISCARD {"n": -1} 15 | S: SUCCESS {} 16 | }} 17 | C: COMMIT 18 | S: FAILURE #ERROR# 19 | 20 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v5x1/reader_tx_yielding_error_on_pull.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | A: LOGON {"{}": "*"} 5 | C: BEGIN {"mode": "r", "db": "adb"} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 AS n" {} {} 8 | S: SUCCESS {"fields": ["n"]} 9 | C: PULL {"n": 1000} 10 | S: FAILURE #ERROR# 11 | 12 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v5x1/reader_tx_yielding_error_on_rollback_with_pull_or_discard.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | A: LOGON {"{}": "*"} 5 | C: BEGIN {"mode": "r", "db": "adb"} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 AS n" {} {} 8 | S: SUCCESS {"fields": ["n"]} 9 | {{ 10 | C: PULL {"n": 1000} 11 | S: RECORD [1] 12 | SUCCESS {"type": "r"} 13 | ---- 14 | C: DISCARD {"n": -1} 15 | S: SUCCESS {} 16 | }} 17 | C: ROLLBACK 18 | S: FAILURE #ERROR# 19 | 20 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v5x1/reader_tx_yielding_error_on_run.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | A: LOGON {"{}": "*"} 5 | *: RESET 6 | C: BEGIN {"mode": "r", "db": "adb"} 7 | S: SUCCESS {} 8 | C: RUN "RETURN 1 AS n" {} {} 9 | S: FAILURE #ERROR# 10 | 11 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v5x1/reader_yielding_error_on_pull.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | A: LOGON {"{}": "*"} 5 | *: RESET 6 | C: RUN "RETURN 1 AS n" {} {"mode": "r", "db": "adb"} 7 | S: SUCCESS {"fields": ["n"]} 8 | C: PULL {"n": 1000} 9 | S: FAILURE #ERROR# 10 | 11 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v5x1/router.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | A: LOGON {"{}": "*"} 5 | *: RESET 6 | 7 | C: ROUTE #ROUTINGCTX# [] {"{}": {"db": "adb"}} 8 | S: SUCCESS {"rt": {"ttl": 1000, "db": "adb", "servers": [{"addresses": ["#HOST#:9000"], "role":"ROUTE"}, {"addresses": ["#HOST#:9010", "#HOST#:9011"], "role":"READ"}, {"addresses": ["#HOST#:9020"], "role":"WRITE"}]}} 9 | 10 | *: RESET 11 | ?: GOODBYE 12 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v5x1/router_single_reader.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | A: LOGON {"{}": "*"} 5 | *: RESET 6 | 7 | C: ROUTE #ROUTINGCTX# [] {"{}": {"db": "adb"}} 8 | S: SUCCESS {"rt": {"ttl": 1000, "db": "adb", "servers": [{"addresses": ["#HOST#:9000"], "role":"ROUTE"}, {"addresses": ["#HOST#:9010"], "role":"READ"}, {"addresses": ["#HOST#:9020"], "role":"WRITE"}]}} 9 | 10 | *: RESET 11 | ?: GOODBYE 12 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v5x1/scheme_basic.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"user_agent": "*", "[routing]": null} 4 | A: LOGON {"scheme": "basic", "principal": "neo4j", "credentials": "pass", "[realm]": ""} 5 | *: RESET 6 | 7 | C: RUN "RETURN 1 AS n" "*" "*" 8 | S: SUCCESS {"fields": ["n"]} 9 | C: PULL "*" 10 | S: RECORD [1] 11 | SUCCESS {"type": "r"} 12 | 13 | *: RESET 14 | ?: GOODBYE 15 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v5x1/scheme_basic_pipelined.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | C: HELLO {"user_agent": "*", "[routing]": null} 4 | C: LOGON {"scheme": "basic", "principal": "neo4j", "credentials": "pass", "[realm]": ""} 5 | S: SUCCESS {"connection_id": "bolt-0", "server": "Neo4j/#VERSION#.0", "routing": null} 6 | S: SUCCESS {} 7 | *: RESET 8 | 9 | C: RUN "RETURN 1 AS n" "*" "*" 10 | S: SUCCESS {"fields": ["n"]} 11 | C: PULL "*" 12 | S: RECORD [1] 13 | SUCCESS {"type": "r"} 14 | 15 | *: RESET 16 | ?: GOODBYE 17 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v5x1/scheme_basic_pipelined_minimal.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | C: HELLO {"user_agent": "*"} 4 | C: LOGON {"scheme": "basic", "principal": "neo4j", "credentials": "pass"} 5 | S: SUCCESS {"connection_id": "bolt-0", "server": "Neo4j/#VERSION#.0", "routing": null} 6 | S: SUCCESS {} 7 | *: RESET 8 | 9 | C: RUN "RETURN 1 AS n" "*" "*" 10 | S: SUCCESS {"fields": ["n"]} 11 | C: PULL "*" 12 | S: RECORD [1] 13 | SUCCESS {"type": "r"} 14 | 15 | *: RESET 16 | ?: GOODBYE 17 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v5x1/scheme_basic_realm_foobar.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"user_agent": "*", "[routing]": null} 4 | A: LOGON {"scheme": "basic", "principal": "neo4j", "credentials": "pass", "realm": "foobar"} 5 | *: RESET 6 | 7 | C: RUN "RETURN 1 AS n" "*" "*" 8 | S: SUCCESS {"fields": ["n"]} 9 | C: PULL "*" 10 | S: RECORD [1] 11 | SUCCESS {"type": "r"} 12 | 13 | *: RESET 14 | ?: GOODBYE 15 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v5x1/scheme_basic_realm_foobar_pipelined.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | C: HELLO {"user_agent": "*", "[routing]": null} 4 | C: LOGON {"scheme": "basic", "principal": "neo4j", "credentials": "pass", "realm": "foobar"} 5 | S: SUCCESS {"connection_id": "bolt-0", "server": "Neo4j/#VERSION#.0", "routing": null} 6 | S: SUCCESS {} 7 | *: RESET 8 | 9 | C: RUN "RETURN 1 AS n" "*" "*" 10 | S: SUCCESS {"fields": ["n"]} 11 | C: PULL "*" 12 | S: RECORD [1] 13 | SUCCESS {"type": "r"} 14 | 15 | *: RESET 16 | ?: GOODBYE 17 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v5x1/scheme_basic_realm_foobar_pipelined_minimal.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | C: HELLO {"user_agent": "*"} 4 | C: LOGON {"scheme": "basic", "principal": "neo4j", "credentials": "pass", "realm": "foobar"} 5 | S: SUCCESS {"connection_id": "bolt-0", "server": "Neo4j/#VERSION#.0", "routing": null} 6 | S: SUCCESS {} 7 | *: RESET 8 | 9 | C: RUN "RETURN 1 AS n" "*" "*" 10 | S: SUCCESS {"fields": ["n"]} 11 | C: PULL "*" 12 | S: RECORD [1] 13 | SUCCESS {"type": "r"} 14 | 15 | *: RESET 16 | ?: GOODBYE 17 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v5x1/scheme_bearer.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"user_agent": "*", "[routing]": null} 4 | A: LOGON {"scheme": "bearer", "credentials": "QmFuYW5hIQ==", "[principal]": "", "[realm]": ""} 5 | *: RESET 6 | 7 | C: RUN "RETURN 1 AS n" "*" "*" 8 | S: SUCCESS {"fields": ["n"]} 9 | C: PULL "*" 10 | S: RECORD [1] 11 | SUCCESS {"type": "r"} 12 | 13 | *: RESET 14 | ?: GOODBYE 15 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v5x1/scheme_bearer_pipelined.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | C: HELLO {"user_agent": "*", "[routing]": null} 4 | C: LOGON {"scheme": "bearer", "credentials": "QmFuYW5hIQ==", "[principal]": "", "[realm]": ""} 5 | S: SUCCESS {"connection_id": "bolt-0", "server": "Neo4j/#VERSION#.0", "routing": null} 6 | S: SUCCESS {} 7 | *: RESET 8 | 9 | C: RUN "RETURN 1 AS n" "*" "*" 10 | S: SUCCESS {"fields": ["n"]} 11 | C: PULL "*" 12 | S: RECORD [1] 13 | SUCCESS {"type": "r"} 14 | 15 | *: RESET 16 | ?: GOODBYE 17 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v5x1/scheme_bearer_pipelined_minimal.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | C: HELLO {"user_agent": "*"} 4 | C: LOGON {"scheme": "bearer", "credentials": "QmFuYW5hIQ=="} 5 | S: SUCCESS {"connection_id": "bolt-0", "server": "Neo4j/#VERSION#.0", "routing": null} 6 | S: SUCCESS {} 7 | *: RESET 8 | 9 | C: RUN "RETURN 1 AS n" "*" "*" 10 | S: SUCCESS {"fields": ["n"]} 11 | C: PULL "*" 12 | S: RECORD [1] 13 | SUCCESS {"type": "r"} 14 | 15 | *: RESET 16 | ?: GOODBYE 17 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v5x1/scheme_custom.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"user_agent": "*", "[routing]": null} 4 | A: LOGON {"scheme": "wild-scheme", "principal": "I See Something", "credentials": "You Don't See!", "realm": "And it's blue.", "parameters": {"sky?": "no", "my eyes": 0.1, "da be dee da be daa?": true}} 5 | *: RESET 6 | 7 | C: RUN "RETURN 1 AS n" "*" "*" 8 | S: SUCCESS {"fields": ["n"]} 9 | C: PULL "*" 10 | S: RECORD [1] 11 | SUCCESS {"type": "r"} 12 | 13 | *: RESET 14 | ?: GOODBYE 15 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v5x1/scheme_custom_empty.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"user_agent": "*", "[routing]": null} 4 | A: LOGON {"scheme": "minimal-scheme", "principal": "", "[credentials]": "", "[realm]": "", "[parameters]": {}} 5 | *: RESET 6 | 7 | C: RUN "RETURN 1 AS n" "*" "*" 8 | S: SUCCESS {"fields": ["n"]} 9 | C: PULL "*" 10 | S: RECORD [1] 11 | SUCCESS {"type": "r"} 12 | 13 | *: RESET 14 | ?: GOODBYE 15 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v5x1/scheme_custom_empty_pipelined_minimal.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | C: HELLO {"user_agent": "*"} 4 | C: LOGON {"scheme": "minimal-scheme", "principal": ""} 5 | S: SUCCESS {"connection_id": "bolt-0", "server": "Neo4j/#VERSION#.0", "routing": null} 6 | S: SUCCESS {} 7 | *: RESET 8 | 9 | C: RUN "RETURN 1 AS n" "*" "*" 10 | S: SUCCESS {"fields": ["n"]} 11 | C: PULL "*" 12 | S: RECORD [1] 13 | SUCCESS {"type": "r"} 14 | 15 | *: RESET 16 | ?: GOODBYE 17 | -------------------------------------------------------------------------------- /tests/stub/authorization/scripts/v5x1/scheme_kerberos.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | # Server versions pre 4.4 require empty principal field. So for backwards compatibility, we expect the driver to send it. 4 | A: HELLO {"user_agent": "*", "[routing]": null} 5 | A: LOGON {"scheme": "kerberos", "principal": "", "credentials": "QmFuYW5hIQ==", "[realm]": ""} 6 | *: RESET 7 | 8 | C: RUN "RETURN 1 AS n" "*" "*" 9 | S: SUCCESS {"fields": ["n"]} 10 | C: PULL "*" 11 | S: RECORD [1] 12 | SUCCESS {"type": "r"} 13 | 14 | *: RESET 15 | ?: GOODBYE 16 | -------------------------------------------------------------------------------- /tests/stub/authorization/token_expired_retry/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neo4j-drivers/testkit/cbc816c9dbfe039c74e5f7a8104e3323c4d7dbf1/tests/stub/authorization/token_expired_retry/__init__.py -------------------------------------------------------------------------------- /tests/stub/authorization/token_expired_retry/scripts/v5x0/reader_no_retry.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"user_agent": "*", "[routing]": "*", "scheme": "basic", "principal": "neo4j", "credentials": "pass", "[realm]": ""} 4 | *: RESET 5 | 6 | C: BEGIN {"mode": "r", "db": "adb"} 7 | S: SUCCESS {} 8 | C: RUN "RETURN 1 AS n" {} {} 9 | S: FAILURE {"code": "Neo.ClientError.Security.TokenExpired", "message": "Token expired."} 10 | S: 11 | -------------------------------------------------------------------------------- /tests/stub/authorization/token_expired_retry/scripts/v5x0/router.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"user_agent": "*", "[routing]": {"{}": "*"}, "scheme": "basic", "principal": "neo4j", "credentials": "pass", "[realm]": ""} 4 | *: RESET 5 | 6 | C: ROUTE {"{}": "*"} [] {"{}": {"db": "adb"}} 7 | S: SUCCESS {"rt": {"ttl": 1000, "db": "adb", "servers": [{"addresses": ["#HOST#:9000"], "role":"ROUTE"}, {"addresses": ["#HOST#:9010"], "role":"READ"}, {"addresses": ["#HOST#:9020"], "role":"WRITE"}]}} 8 | 9 | *: RESET 10 | ?: GOODBYE 11 | -------------------------------------------------------------------------------- /tests/stub/authorization/token_expired_retry/scripts/v5x1/reader_no_retry.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | A: LOGON {"scheme": "basic", "principal": "neo4j", "credentials": "pass", "[realm]": ""} 5 | *: RESET 6 | 7 | C: BEGIN {"mode": "r", "db": "adb"} 8 | S: SUCCESS {} 9 | C: RUN "RETURN 1 AS n" {} {} 10 | S: FAILURE {"code": "Neo.ClientError.Security.TokenExpired", "message": "Token expired."} 11 | S: 12 | -------------------------------------------------------------------------------- /tests/stub/authorization/token_expired_retry/scripts/v5x1/router.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | A: LOGON {"scheme": "basic", "principal": "neo4j", "credentials": "pass", "[realm]": ""} 5 | *: RESET 6 | 7 | C: ROUTE {"{}": "*"} [] {"{}": {"db": "adb"}} 8 | S: SUCCESS {"rt": {"ttl": 1000, "db": "adb", "servers": [{"addresses": ["#HOST#:9000"], "role":"ROUTE"}, {"addresses": ["#HOST#:9010"], "role":"READ"}, {"addresses": ["#HOST#:9020"], "role":"WRITE"}]}} 9 | 10 | *: RESET 11 | ?: GOODBYE 12 | -------------------------------------------------------------------------------- /tests/stub/authorization/verify_authentication/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neo4j-drivers/testkit/cbc816c9dbfe039c74e5f7a8104e3323c4d7dbf1/tests/stub/authorization/verify_authentication/__init__.py -------------------------------------------------------------------------------- /tests/stub/authorization/verify_authentication/scripts/v5x0/reader.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | !: ALLOW RESTART 3 | 4 | A: HELLO {"user_agent": "*", "[routing]": "*", "scheme": "basic", "principal": {"U": "*"}, "credentials": {"U": "*"}, "[realm]": ""} 5 | *: RESET 6 | 7 | # optionally, run dummy queries 8 | {* 9 | C: RUN {"U": "*"} "*" "*" 10 | S: SUCCESS {"fields": ["n"]} 11 | C: PULL {"n": {"Z": "*"}} 12 | S: RECORD [1] 13 | SUCCESS {"type": "r"} 14 | 15 | *: RESET 16 | *} 17 | 18 | ?: GOODBYE 19 | -------------------------------------------------------------------------------- /tests/stub/authorization/verify_authentication/scripts/v5x1/reader_error.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | C: LOGON {"scheme": "basic", #VERIFY_AUTH#, "[realm]": ""} 5 | S: FAILURE {"code": "#ERROR#", "message": "These are not the credentials you're looking for."} 6 | 7 | -------------------------------------------------------------------------------- /tests/stub/authorization/verify_authentication/scripts/v5x1/router.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | A: LOGON {"scheme": "basic", #VERIFY_AUTH#, "[realm]": ""} 5 | *: RESET 6 | 7 | C: ROUTE {"{}": "*"} [] {"{}": {"db": "system"}} 8 | S: SUCCESS {"rt": {"ttl": 1000, "db": "system", "servers": [{"addresses": ["#HOST#:9000"], "role":"ROUTE"}, {"addresses": ["#HOST#:9010"], "role":"READ"}, {"addresses": ["#HOST#:9020"], "role":"WRITE"}]}} 9 | 10 | *: RESET 11 | ?: GOODBYE 12 | -------------------------------------------------------------------------------- /tests/stub/authorization/verify_authentication/scripts/v5x1/router_error_logon.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | C: LOGON {"scheme": "basic", #VERIFY_AUTH#, "[realm]": ""} 5 | S: FAILURE {"code": "#ERROR#", "message": "These are not the credentials you're looking for."} 6 | 7 | -------------------------------------------------------------------------------- /tests/stub/authorization/verify_authentication/scripts/v5x1/router_error_route.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | A: LOGON {"scheme": "basic", #VERIFY_AUTH#, "[realm]": ""} 5 | *: RESET 6 | 7 | C: ROUTE {"{}": "*"} [] {"{}": {"db": "system"}} 8 | S: FAILURE {"code": "#ERROR#", "message": "These are not the credentials you're looking for."} 9 | 10 | -------------------------------------------------------------------------------- /tests/stub/authorization/verify_authentication/scripts/v5x1/router_warm.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | A: LOGON {"scheme": "basic", #DRIVER_AUTH#, "[realm]": ""} 5 | *: RESET 6 | 7 | C: ROUTE {"{}": "*"} [] {"{}": {"db": "system"}} 8 | S: SUCCESS {"rt": {"ttl": 1000, "db": "system", "servers": [{"addresses": ["#HOST#:9000"], "role":"ROUTE"}, {"addresses": ["#HOST#:9010"], "role":"READ"}, {"addresses": ["#HOST#:9020"], "role":"WRITE"}]}} 9 | 10 | *: RESET 11 | ?: GOODBYE 12 | -------------------------------------------------------------------------------- /tests/stub/basic_query/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neo4j-drivers/testkit/cbc816c9dbfe039c74e5f7a8104e3323c4d7dbf1/tests/stub/basic_query/__init__.py -------------------------------------------------------------------------------- /tests/stub/basic_query/scripts/single_result.script: -------------------------------------------------------------------------------- 1 | !: BOLT #BOLT_PROTOCOL# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN {"U": "*"} {"{}": "*"} {"{}": "*"} 6 | S: SUCCESS {"fields": ["n"]} 7 | {* 8 | C: PULL {"n": {"Z": "*"}, "[qid]": -1} 9 | S: RECORD [#RESULT#] 10 | SUCCESS {"type": "r", "has_more": false} 11 | *} 12 | *: RESET 13 | ?: GOODBYE 14 | -------------------------------------------------------------------------------- /tests/stub/bookmarks/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neo4j-drivers/testkit/cbc816c9dbfe039c74e5f7a8104e3323c4d7dbf1/tests/stub/bookmarks/__init__.py -------------------------------------------------------------------------------- /tests/stub/bookmarks/scripts/v5/send_and_receive_bookmark_read_tx.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {"bookmarks": ["neo4j:bookmark:v1:tx42"], "mode": "r"} 6 | S: SUCCESS {} 7 | C: RUN "MATCH (n) RETURN n.name AS name" {} {} 8 | S: SUCCESS {"fields": ["name"]} 9 | C: PULL {"n": 1000} 10 | S: SUCCESS {} 11 | C: COMMIT 12 | S: SUCCESS {"bookmark": "neo4j:bookmark:v1:tx4242"} 13 | *: RESET 14 | ?: GOODBYE 15 | -------------------------------------------------------------------------------- /tests/stub/bookmarks/scripts/v5/send_and_receive_bookmark_write_tx.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {"bookmarks{}": #BOOKMARKS# } 6 | S: SUCCESS {} 7 | C: RUN "MATCH (n) RETURN n.name AS name" {} {} 8 | S: SUCCESS {"fields": ["name"]} 9 | C: PULL {"n": 1000} 10 | S: SUCCESS {} 11 | C: COMMIT 12 | S: SUCCESS {"bookmark": "neo4j:bookmark:v1:tx4242"} 13 | *: RESET 14 | ?: GOODBYE 15 | -------------------------------------------------------------------------------- /tests/stub/bookmarks/scripts/v5/send_bookmark_write_tx.script: -------------------------------------------------------------------------------- 1 | !: BOLT 5.0 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 as n" {} {} 8 | S: SUCCESS {"fields": ["n"]} 9 | C: PULL {"n": 1000} 10 | S: SUCCESS {"type": "w"} 11 | C: COMMIT 12 | S: SUCCESS {"bookmark": "bm"} 13 | *: RESET 14 | ?: GOODBYE 15 | -------------------------------------------------------------------------------- /tests/stub/bookmarks/test_bookmarks_v3.py: -------------------------------------------------------------------------------- 1 | from nutkit import protocol as types 2 | from tests.stub.bookmarks.test_bookmarks_v4 import TestBookmarksV4 3 | 4 | 5 | class TestBookmarksV3(TestBookmarksV4): 6 | 7 | required_features = types.Feature.BOLT_3_0, 8 | 9 | version_dir = "v3" 10 | -------------------------------------------------------------------------------- /tests/stub/configuration_hints/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neo4j-drivers/testkit/cbc816c9dbfe039c74e5f7a8104e3323c4d7dbf1/tests/stub/configuration_hints/__init__.py -------------------------------------------------------------------------------- /tests/stub/configuration_hints/scripts/router.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | !: AUTO RESET 3 | !: ALLOW RESTART 4 | 5 | A: HELLO {"{}": "*"} 6 | {+ 7 | C: ROUTE "*" "*" "*" 8 | S: SUCCESS { "rt": { "ttl": 1000, "servers": [{"addresses": ["#HOST#:9000"], "role":"ROUTE"}, {"addresses": ["#HOST#:9010"], "role":"READ"}, {"addresses": ["#HOST#:9010"], "role":"WRITE"}]}} 9 | +} 10 | ?: GOODBYE 11 | -------------------------------------------------------------------------------- /tests/stub/connectivity_check/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neo4j-drivers/testkit/cbc816c9dbfe039c74e5f7a8104e3323c4d7dbf1/tests/stub/connectivity_check/__init__.py -------------------------------------------------------------------------------- /tests/stub/connectivity_check/scripts/handshake_only.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | !: AUTO RESET 3 | 4 | S: 5 | -------------------------------------------------------------------------------- /tests/stub/connectivity_check/scripts/hello_auth_error.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | !: AUTO RESET 3 | 4 | C: HELLO {"{}": "*"} 5 | S: FAILURE {"code": "Neo.ClientError.Security.Unauthorized", "message": "The client is unauthorized due to authentication failure."} 6 | 7 | -------------------------------------------------------------------------------- /tests/stub/connectivity_check/scripts/hello_only.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | !: AUTO RESET 3 | 4 | A: HELLO {"{}": "*"} 5 | ?: GOODBYE 6 | -------------------------------------------------------------------------------- /tests/stub/connectivity_check/scripts/query_then_resets.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | !: AUTO RESET 3 | 4 | A: HELLO {"{}": "*"} 5 | C: RUN {"U": "*"} {} {"[mode]": {"U": "*"}, "[db]": "*"} 6 | S: SUCCESS {"fields": ["n"]} 7 | C: PULL {"n": {"Z": "*"}} 8 | S: RECORD [1] 9 | SUCCESS {"type": "r"} 10 | *: RESET 11 | ?: GOODBYE 12 | -------------------------------------------------------------------------------- /tests/stub/connectivity_check/scripts/router.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | {{ 6 | C: ROUTE {"{}": "*"} null {"[db]": null, "[imp_user]": null} 7 | ---- 8 | C: ROUTE {"{}": "*"} [] {"[db]": null, "[imp_user]": null} 9 | }} 10 | S: SUCCESS {"rt": {"ttl": 1000, "db": "homedb", "servers": [{"addresses": ["#HOST#:9000"], "role":"ROUTE"}, {"addresses": ["#HOST#:9010"], "role":"READ"}, {"addresses": ["#HOST#:9020"], "role":"WRITE"}]}} 11 | *: RESET 12 | ?: GOODBYE 13 | -------------------------------------------------------------------------------- /tests/stub/connectivity_check/scripts/router_no_readers.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | {{ 6 | C: ROUTE {"{}": "*"} null {"[db]": null, "[imp_user]": null} 7 | ---- 8 | C: ROUTE {"{}": "*"} [] {"[db]": null, "[imp_user]": null} 9 | }} 10 | S: SUCCESS {"rt": {"ttl": 1000, "db": "homedb", "servers": [{"addresses": ["#HOST#:9000"], "role":"ROUTE"}, {"addresses": [], "role":"READ"}, {"addresses": ["#HOST#:9020"], "role":"WRITE"}]}} 11 | *: RESET 12 | ?: GOODBYE 13 | -------------------------------------------------------------------------------- /tests/stub/disconnects/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neo4j-drivers/testkit/cbc816c9dbfe039c74e5f7a8104e3323c4d7dbf1/tests/stub/disconnects/__init__.py -------------------------------------------------------------------------------- /tests/stub/disconnects/scripts/exit_after_hello.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | C: HELLO {"user_agent": "Modesty", "scheme": "basic", "principal": "neo4j", "credentials": "pass" #EXTRA_HELLO_PARAMS#, "[patch_bolt]": "*" } 4 | S: 5 | -------------------------------------------------------------------------------- /tests/stub/disconnects/scripts/exit_after_hello_success.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | C: HELLO {"user_agent": "Modesty", "scheme": "basic", "principal": "neo4j", "credentials": "pass" #EXTRA_HELLO_PARAMS#, "[patch_bolt]": "*" } 4 | S: SUCCESS {"server": "Neo4j/4.3.0", "connection_id": "bolt-0"} 5 | S: 6 | -------------------------------------------------------------------------------- /tests/stub/disconnects/scripts/exit_after_pull.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN "RETURN 1 as n" {} {} 6 | S: SUCCESS {} 7 | C: PULL {"n": 1000} 8 | S: 9 | -------------------------------------------------------------------------------- /tests/stub/disconnects/scripts/exit_after_record.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN "*" "*" "*" 6 | S: SUCCESS {"fields": ["n"]} 7 | C: PULL "*" 8 | S: RECORD [1] 9 | S: 10 | -------------------------------------------------------------------------------- /tests/stub/disconnects/scripts/exit_after_run.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | !: AUTO RESET 3 | 4 | A: HELLO {"{}": "*"} 5 | C: RUN "RETURN 1 as n" {} {} 6 | S: 7 | -------------------------------------------------------------------------------- /tests/stub/disconnects/scripts/exit_after_tx_begin.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | !: AUTO RESET 3 | 4 | A: HELLO {"{}": "*"} 5 | C: BEGIN "*" 6 | S: 7 | -------------------------------------------------------------------------------- /tests/stub/disconnects/scripts/exit_after_tx_commit.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN "*" 6 | S: SUCCESS {} 7 | C: RUN "*" "*" "*" 8 | S: SUCCESS {"fields": ["n"]} 9 | C: PULL "*" 10 | S: RECORD [1] 11 | RECORD [1] 12 | SUCCESS {} 13 | C: COMMIT 14 | S: 15 | -------------------------------------------------------------------------------- /tests/stub/disconnects/scripts/exit_after_tx_pull.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN "*" 6 | S: SUCCESS {} 7 | C: RUN "*" "*" "*" 8 | S: SUCCESS {"fields": ["n"]} 9 | C: PULL "*" 10 | S: 11 | -------------------------------------------------------------------------------- /tests/stub/disconnects/scripts/exit_after_tx_record.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN "*" 6 | S: SUCCESS {} 7 | C: RUN "*" "*" "*" 8 | S: SUCCESS {"fields": ["n"]} 9 | C: PULL "*" 10 | S: RECORD [1] 11 | 12 | -------------------------------------------------------------------------------- /tests/stub/disconnects/scripts/exit_after_tx_run.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN "*" 6 | S: SUCCESS {} 7 | C: RUN "*" "*" "*" 8 | S: 9 | -------------------------------------------------------------------------------- /tests/stub/disconnects/scripts/explicit_goodbye_after_run.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN "*" "*" "*" 6 | S: SUCCESS {"fields": ["n.name"]} 7 | C: PULL {"n": "*"} 8 | S: SUCCESS {"type": "w"} 9 | *: RESET 10 | C: GOODBYE 11 | S: 12 | -------------------------------------------------------------------------------- /tests/stub/disconnects/scripts/failure_on_reset_after_success.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | !: AUTO RESET 3 | 4 | A: HELLO {"{}": "*"} 5 | C: RUN "RETURN 1 as n" {} {} 6 | S: SUCCESS {"fields": ["n"]} 7 | C: PULL {"n": 1000} 8 | S: RECORD [1] 9 | SUCCESS {} 10 | C: RESET 11 | S: FAILURE {"code": "Neo.TransientError.General.DatabaseUnavailable", "message": "Unable to reset"} 12 | ?: GOODBYE 13 | -------------------------------------------------------------------------------- /tests/stub/driver_execute_query/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neo4j-drivers/testkit/cbc816c9dbfe039c74e5f7a8104e3323c4d7dbf1/tests/stub/driver_execute_query/__init__.py -------------------------------------------------------------------------------- /tests/stub/driver_execute_query/scripts/router.script: -------------------------------------------------------------------------------- 1 | !: BOLT 5.0 2 | !: ALLOW RESTART 3 | 4 | A: HELLO {"{}": "*"} 5 | {+ 6 | C: ROUTE "*" "*" "*" 7 | S: SUCCESS {"rt": {"ttl": 1000, "db": "adb", "servers": [{"addresses": ["#HOST#:9000"], "role":"ROUTE"}, {"addresses": ["#HOST#:9010"], "role":"READ"}, {"addresses": ["#HOST#:9020"], "role":"WRITE"}]}} 8 | ?: RESET 9 | +} 10 | ?: GOODBYE 11 | -------------------------------------------------------------------------------- /tests/stub/driver_execute_query/scripts/router_with_db_name.script: -------------------------------------------------------------------------------- 1 | !: BOLT 5.0 2 | !: ALLOW RESTART 3 | 4 | A: HELLO {"{}": "*"} 5 | C: ROUTE "*" "*" {"db":"neo4j"} 6 | S: SUCCESS {"rt": {"ttl": 1000, "db": "neo4j", "servers": [{"addresses": ["#HOST#:9000"], "role":"ROUTE"}, {"addresses": ["#HOST#:9010"], "role":"READ"}, {"addresses": ["#HOST#:9020"], "role":"WRITE"}]}} 7 | *: RESET 8 | ?: GOODBYE 9 | -------------------------------------------------------------------------------- /tests/stub/driver_execute_query/scripts/router_with_impersonation.script: -------------------------------------------------------------------------------- 1 | !: BOLT 5.0 2 | !: ALLOW RESTART 3 | 4 | A: HELLO {"{}": "*"} 5 | C: ROUTE "*" "*" {"imp_user": "that-other-dude"} 6 | S: SUCCESS {"rt": {"ttl": 1000, "db": "adb", "servers": [{"addresses": ["#HOST#:9000"], "role":"ROUTE"}, {"addresses": ["#HOST#:9010"], "role":"READ"}, {"addresses": ["#HOST#:9020"], "role":"WRITE"}]}} 7 | *: RESET 8 | ?: GOODBYE 9 | -------------------------------------------------------------------------------- /tests/stub/driver_execute_query/scripts/tx_return_1.script: -------------------------------------------------------------------------------- 1 | !: BOLT 5.0 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {"{}": "*"} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 AS n" {} {} 8 | S: SUCCESS {"fields": ["n"], "qid": 1} 9 | C: PULL {"n": 1000} 10 | S: RECORD [1] 11 | SUCCESS {"type": "r"} 12 | C: COMMIT 13 | S: SUCCESS {"bookmark": "neo4j:bookmark:v1:tx424242"} 14 | *: RESET 15 | ?: GOODBYE 16 | -------------------------------------------------------------------------------- /tests/stub/driver_execute_query/scripts/tx_return_1_disconnect_on_pull.script: -------------------------------------------------------------------------------- 1 | !: BOLT 5.0 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {"{}": "*"} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 AS n" {} {} 8 | S: SUCCESS {"fields": ["n"], "qid": 1} 9 | C: PULL {"n": 1000} 10 | S: 11 | -------------------------------------------------------------------------------- /tests/stub/driver_execute_query/scripts/tx_return_1_transaction_terminated_on_pull.script: -------------------------------------------------------------------------------- 1 | !: BOLT 5.0 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {"{}": "*"} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 AS n" {} {} 8 | S: SUCCESS {"fields": ["n"], "qid": 1} 9 | C: PULL {"n": 1000} 10 | S: FAILURE {"code": "Neo.ClientError.Transaction.Terminated", "message": "message"} 11 | *: RESET 12 | ?: GOODBYE 13 | -------------------------------------------------------------------------------- /tests/stub/driver_execute_query/scripts/tx_return_1_with_auth.script: -------------------------------------------------------------------------------- 1 | !: BOLT 5.1 2 | 3 | A: HELLO {"{}": "*"} 4 | A: LOGON {"scheme": "basic", "principal": "neo5j", "credentials": "pass++", "[realm]": ""} 5 | 6 | *: RESET 7 | 8 | C: BEGIN {"db": "adb"} 9 | S: SUCCESS {} 10 | C: RUN "RETURN 1 AS n" {} {} 11 | S: SUCCESS {"fields": ["n"], "qid": 1} 12 | C: PULL {"n": 1000} 13 | S: RECORD [1] 14 | SUCCESS {"type": "r"} 15 | C: COMMIT 16 | S: SUCCESS {"bookmark": "neo4j:bookmark:v1:tx424242"} 17 | *: RESET 18 | ?: GOODBYE 19 | -------------------------------------------------------------------------------- /tests/stub/driver_execute_query/scripts/tx_return_1_with_impersonation.script: -------------------------------------------------------------------------------- 1 | !: BOLT 5.0 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {"imp_user": "that-other-dude", "db": "adb"} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 AS n" {} {} 8 | S: SUCCESS {"fields": ["n"], "qid": 1} 9 | C: PULL {"n": 1000} 10 | S: RECORD [1] 11 | SUCCESS {"type": "r"} 12 | C: COMMIT 13 | S: SUCCESS {"bookmark": "neo4j:bookmark:v1:tx424242"} 14 | *: RESET 15 | ?: GOODBYE 16 | -------------------------------------------------------------------------------- /tests/stub/driver_execute_query/scripts/tx_return_1_with_params.script: -------------------------------------------------------------------------------- 1 | !: BOLT 5.0 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {"{}": "*"} 6 | S: SUCCESS {} 7 | C: RUN "RETURN $a AS n" { "a": 1 } {} 8 | S: SUCCESS {"fields": ["n"], "qid": 1} 9 | C: PULL {"n": 1000} 10 | S: RECORD [1] 11 | SUCCESS {"type": "r", "db": "#DB#"} 12 | C: COMMIT 13 | S: SUCCESS {"bookmark": "neo4j:bookmark:v1:tx424242"} 14 | *: RESET 15 | ?: GOODBYE 16 | -------------------------------------------------------------------------------- /tests/stub/driver_execute_query/scripts/tx_return_1_with_tx_meta.script: -------------------------------------------------------------------------------- 1 | !: BOLT 5.0 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {"tx_metadata": {"foo": "bar"}, "db": "adb"} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 AS n" {} {} 8 | S: SUCCESS {"fields": ["n"], "qid": 1} 9 | C: PULL {"n": 1000} 10 | S: RECORD [1] 11 | SUCCESS {"type": "r"} 12 | C: COMMIT 13 | S: SUCCESS {"bookmark": "neo4j:bookmark:v1:tx424242"} 14 | *: RESET 15 | ?: GOODBYE 16 | -------------------------------------------------------------------------------- /tests/stub/driver_execute_query/scripts/tx_return_1_with_tx_timeout.script: -------------------------------------------------------------------------------- 1 | !: BOLT 5.0 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {"tx_timeout": 1234, "db": "adb"} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 AS n" {} {} 8 | S: SUCCESS {"fields": ["n"], "qid": 1} 9 | C: PULL {"n": 1000} 10 | S: RECORD [1] 11 | SUCCESS {"type": "r"} 12 | C: COMMIT 13 | S: SUCCESS {"bookmark": "neo4j:bookmark:v1:tx424242"} 14 | *: RESET 15 | ?: GOODBYE 16 | -------------------------------------------------------------------------------- /tests/stub/driver_parameters/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neo4j-drivers/testkit/cbc816c9dbfe039c74e5f7a8104e3323c4d7dbf1/tests/stub/driver_parameters/__init__.py -------------------------------------------------------------------------------- /tests/stub/driver_parameters/scripts/v5x0/router.script: -------------------------------------------------------------------------------- 1 | !: BOLT 5.0 2 | !: AUTO RESET 3 | !: ALLOW RESTART 4 | 5 | A: HELLO {"{}": "*"} 6 | *: RESET 7 | {+ 8 | C: ROUTE "*" "*" "*" 9 | S: SUCCESS { "rt": { "ttl": 1000, "servers": [{"addresses": ["#HOST#:9000"], "role":"ROUTE"}, {"addresses": ["#HOST#:9010"], "role":"READ"}, {"addresses": ["#HOST#:9010"], "role":"WRITE"}]}} 10 | *: RESET 11 | +} 12 | ?: GOODBYE 13 | -------------------------------------------------------------------------------- /tests/stub/driver_parameters/scripts/v5x0/router_route_delay.script: -------------------------------------------------------------------------------- 1 | !: BOLT 5.0 2 | !: AUTO RESET 3 | !: ALLOW RESTART 4 | 5 | A: HELLO {"{}": "*"} 6 | *: RESET 7 | {+ 8 | C: ROUTE "*" "*" "*" 9 | S: 2 10 | 11 | 2 12 | SUCCESS { "rt": { "ttl": 1000, "servers": [{"addresses": ["#HOST#:9000"], "role":"ROUTE"}, {"addresses": ["#HOST#:9010"], "role":"READ"}, {"addresses": ["#HOST#:9010"], "role":"WRITE"}]}} 13 | *: RESET 14 | +} 15 | ?: GOODBYE 16 | -------------------------------------------------------------------------------- /tests/stub/driver_parameters/scripts/v5x0/session_run.script: -------------------------------------------------------------------------------- 1 | !: BOLT 5.0 2 | !: ALLOW CONCURRENT 3 | 4 | A: HELLO {"{}": "*"} 5 | *: RESET 6 | C: RUN "*" "*" "*" 7 | S: SUCCESS {"fields": ["n"]} 8 | C: PULL {"n": "*"} 9 | S: RECORD [1] 10 | SUCCESS {"type": "r"} 11 | *: RESET 12 | ?: GOODBYE 13 | -------------------------------------------------------------------------------- /tests/stub/driver_parameters/scripts/v5x0/session_run_auth_delay.script: -------------------------------------------------------------------------------- 1 | !: BOLT 5.0 2 | !: ALLOW CONCURRENT 3 | 4 | C: HELLO {"{}": "*"} 5 | S: 2 6 | 7 | 2 8 | SUCCESS {"server": "Neo4j/5.0.0", "connection_id": "bolt-123456789"} 9 | *: RESET 10 | C: RUN "*" "*" "*" 11 | S: SUCCESS {"fields": ["n"]} 12 | C: PULL {"n": "*"} 13 | S: RECORD [1] 14 | SUCCESS {"type": "r"} 15 | *: RESET 16 | ?: GOODBYE 17 | -------------------------------------------------------------------------------- /tests/stub/driver_parameters/scripts/v5x0/session_run_bolt_handshake_delay.script: -------------------------------------------------------------------------------- 1 | !: BOLT 5.0 2 | !: ALLOW CONCURRENT 3 | !: HANDSHAKE_DELAY #DELAY# 4 | 5 | A: HELLO {"{}": "*"} 6 | *: RESET 7 | C: RUN "*" "*" "*" 8 | S: SUCCESS {"fields": ["n"]} 9 | C: PULL {"n": "*"} 10 | S: RECORD [1] 11 | SUCCESS {"type": "r"} 12 | *: RESET 13 | ?: GOODBYE 14 | -------------------------------------------------------------------------------- /tests/stub/driver_parameters/scripts/v5x0/tx_without_commit_or_rollback.script: -------------------------------------------------------------------------------- 1 | !: BOLT 5.0 2 | !: ALLOW CONCURRENT 3 | 4 | A: HELLO {"{}": "*"} 5 | *: RESET 6 | 7 | C: BEGIN {"[mode]": "*"} 8 | S: SUCCESS {} 9 | C: RUN "*" "*" "*" 10 | S: SUCCESS {"fields": ["n"]} 11 | C: PULL {"n": "*"} 12 | S: RECORD [1] 13 | SUCCESS {"type": "r"} 14 | ?: GOODBYE 15 | -------------------------------------------------------------------------------- /tests/stub/driver_parameters/scripts/v5x2/user_agent_custom.script: -------------------------------------------------------------------------------- 1 | !: BOLT 5.2 2 | 3 | C: HELLO {"[routing]": null, "user_agent": "Hello, I'm a banana 🍌!"} 4 | S: SUCCESS {"server": "Neo4j/5.5.0", "connection_id": "bolt-1"} 5 | C: LOGON {"{}": "*"} 6 | S: SUCCESS {} 7 | *: RESET 8 | C: RUN "*" "*" "*" 9 | S: SUCCESS {"fields": ["n"]} 10 | C: PULL {"n": "*"} 11 | S: RECORD [1] 12 | SUCCESS {"type": "r"} 13 | *: RESET 14 | ?: GOODBYE 15 | -------------------------------------------------------------------------------- /tests/stub/driver_parameters/scripts/v5x2/user_agent_default.script: -------------------------------------------------------------------------------- 1 | !: BOLT 5.2 2 | 3 | C: HELLO {"[routing]": null, "user_agent": {"U": "*"}} 4 | S: SUCCESS {"server": "Neo4j/5.5.0", "connection_id": "bolt-1"} 5 | C: LOGON {"{}": "*"} 6 | S: SUCCESS {} 7 | *: RESET 8 | C: RUN "*" "*" "*" 9 | S: SUCCESS {"fields": ["n"]} 10 | C: PULL {"n": "*"} 11 | S: RECORD [1] 12 | SUCCESS {"type": "r"} 13 | *: RESET 14 | ?: GOODBYE 15 | -------------------------------------------------------------------------------- /tests/stub/driver_parameters/scripts/v5x3/user_agent_default.script: -------------------------------------------------------------------------------- 1 | !: BOLT 5.3 2 | 3 | C: HELLO {"[routing]": null, "user_agent": {"U": "*"}, "bolt_agent": {"product": {"U": "*"}, "[platform]": {"U": "*"}, "[language]": {"U": "*"}, "[language_details]": {"U": "*"}}} 4 | S: SUCCESS {"server": "Neo4j/5.9.0", "connection_id": "bolt-1"} 5 | C: LOGON {"{}": "*"} 6 | S: SUCCESS {} 7 | *: RESET 8 | C: RUN "*" "*" "*" 9 | S: SUCCESS {"fields": ["n"]} 10 | C: PULL {"n": "*"} 11 | S: RECORD [1] 12 | SUCCESS {"type": "r"} 13 | *: RESET 14 | ?: GOODBYE 15 | -------------------------------------------------------------------------------- /tests/stub/driver_parameters/telemetry/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neo4j-drivers/testkit/cbc816c9dbfe039c74e5f7a8104e3323c4d7dbf1/tests/stub/driver_parameters/telemetry/__init__.py -------------------------------------------------------------------------------- /tests/stub/errors/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neo4j-drivers/testkit/cbc816c9dbfe039c74e5f7a8104e3323c4d7dbf1/tests/stub/errors/__init__.py -------------------------------------------------------------------------------- /tests/stub/errors/scripts/error.script: -------------------------------------------------------------------------------- 1 | !: BOLT #BOLT_VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | A: LOGON {"{}": "*"} 5 | *: RESET 6 | C: RUN {"U": "*"} {"{}": "*"} {"{}": "*"} 7 | S: FAILURE #ERROR# 8 | # Allow driver to pipeline a PULL or DISCARD after RUN 9 | {? 10 | {{ 11 | C: PULL {"[n]": {"Z": "*"}} 12 | S: IGNORED 13 | ---- 14 | C: DISCARD {"[n]": {"Z": "*"}} 15 | S: IGNORED 16 | }} 17 | ?} 18 | +: RESET 19 | A: GOODBYE 20 | -------------------------------------------------------------------------------- /tests/stub/homedb/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neo4j-drivers/testkit/cbc816c9dbfe039c74e5f7a8104e3323c4d7dbf1/tests/stub/homedb/__init__.py -------------------------------------------------------------------------------- /tests/stub/homedb/scripts/cache/router_single_server.script: -------------------------------------------------------------------------------- 1 | !: BOLT 5.8 2 | !: ALLOW CONCURRENT 3 | 4 | A: HELLO {"{}": "*"} 5 | A: LOGON {"{}": "*"} 6 | 7 | *: RESET 8 | 9 | {* 10 | C: ROUTE "*" "*" "*" 11 | S: SUCCESS { "rt": { "ttl": 1000000, "db": "db1", "servers": [{"addresses": ["#HOST#:9000"], "role":"ROUTE"}, {"addresses": ["#HOST#:9010"], "role":"READ"}, {"addresses": ["#HOST#:9010"], "role":"WRITE"}]}} 12 | 13 | *: RESET 14 | *} 15 | 16 | ?: GOODBYE 17 | -------------------------------------------------------------------------------- /tests/stub/homedb/scripts/mixed/reader_5x7_keep_warm.script: -------------------------------------------------------------------------------- 1 | !: BOLT 5.7 2 | 3 | A: HELLO {"{}": "*"} 4 | A: LOGON {"{}": "*"} 5 | *: RESET 6 | 7 | C: RUN {"U": "*"} {} {"db": "homedb1", "[bookmarks]": {"[]": "*"}, "mode": "r"} 8 | S: SUCCESS {"fields": ["n"]} 9 | {{ 10 | C: PULL {"n": {"Z": "*"}, "[qid]": -1} 11 | S: RECORD [1] 12 | ---- 13 | C: DISCARD {"n": {"Z": "*"}, "[qid]": -1} 14 | }} 15 | S: SUCCESS {} 16 | *: RESET 17 | 18 | 19 | ?: GOODBYE 20 | -------------------------------------------------------------------------------- /tests/stub/homedb/scripts/mixed/router_keep_warm.script: -------------------------------------------------------------------------------- 1 | !: BOLT #BOLT_VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | A: LOGON {"{}": "*"} 5 | *: RESET 6 | 7 | C: ROUTE {"{}": "*"} [] {"[db]": null#IMPERSONATED_USER#} 8 | S: SUCCESS { "rt": { "ttl": 1000000, "db": "homedb1", "servers": [{"addresses": ["#HOST#:9000"], "role": "ROUTE"}, {"addresses": ["#HOST#:9010"], "role": "READ"}, {"addresses": [], "role": "WRITE"}]}} 9 | *: RESET 10 | -------------------------------------------------------------------------------- /tests/stub/homedb/scripts/mixed/writer_no_ssr.script: -------------------------------------------------------------------------------- 1 | !: BOLT #BOLT_VERSION# 2 | #EXTRA_BANG_LINES# 3 | 4 | #HELLO_MESSAGE# 5 | A: LOGON {"{}": "*"} 6 | *: RESET 7 | 8 | C: RUN {"U": "*"} {} {"db": "homedb2", "[bookmarks]": {"[]": "*"}, "[mode]": "w"} 9 | S: SUCCESS {"fields": ["n"]} 10 | {{ 11 | C: PULL {"n": {"Z": "*"}, "[qid]": -1} 12 | S: RECORD [1] 13 | ---- 14 | C: DISCARD {"n": {"Z": "*"}, "[qid]": -1} 15 | }} 16 | S: SUCCESS {} 17 | *: RESET 18 | 19 | ?: GOODBYE 20 | -------------------------------------------------------------------------------- /tests/stub/homedb/scripts/mixed/writer_no_ssr_only_connect.script: -------------------------------------------------------------------------------- 1 | !: BOLT #BOLT_VERSION# 2 | #EXTRA_BANG_LINES# 3 | 4 | #HELLO_MESSAGE# 5 | A: LOGON {"{}": "*"} 6 | *: RESET 7 | 8 | ?: GOODBYE 9 | -------------------------------------------------------------------------------- /tests/stub/homedb/scripts/no_cache/reader_tx_exits.script: -------------------------------------------------------------------------------- 1 | !: BOLT #BOLT_PROTOCOL# 2 | !: ALLOW CONCURRENT 3 | 4 | #CONVERSTAION_START# 5 | *: RESET 6 | C: BEGIN {"[bookmarks]": "*", "[tx_metadata]": "*", "mode": "r", "[imp_user]": "the-imposter", "db": "homedb"} 7 | S: SUCCESS {} 8 | C: RUN "RETURN 1" {} {} 9 | S: 10 | -------------------------------------------------------------------------------- /tests/stub/homedb/scripts/no_cache/router_explicit_homedb.script: -------------------------------------------------------------------------------- 1 | !: BOLT #BOLT_PROTOCOL# 2 | !: ALLOW CONCURRENT 3 | 4 | #CONVERSTAION_START# 5 | *: RESET 6 | {+ 7 | C: ROUTE "*" [] {"[imp_user]": "the-imposter", "db": "homedb"} 8 | S: SUCCESS { "rt": { "ttl": 1000000, "db": "homedb", "servers": [{"addresses": ["#HOST#:9000"], "role":"ROUTE"}, {"addresses": ["#HOST#:9011"], "role":"READ"}, {"addresses": ["#HOST#:9011"], "role":"WRITE"}]}} 9 | *: RESET 10 | +} 11 | ?: GOODBYE 12 | -------------------------------------------------------------------------------- /tests/stub/homedb/scripts/no_cache/router_homedb.script: -------------------------------------------------------------------------------- 1 | !: BOLT #BOLT_PROTOCOL# 2 | !: ALLOW CONCURRENT 3 | 4 | #CONVERSTAION_START# 5 | *: RESET 6 | {+ 7 | C: ROUTE "*" [] {"[imp_user]": "the-imposter"} 8 | S: SUCCESS { "rt": { "ttl": 1000000, "db": "homedb", "servers": [{"addresses": ["#HOST#:9000"], "role":"ROUTE"}, {"addresses": ["#HOST#:9010"], "role":"READ"}, {"addresses": ["#HOST#:9010"], "role":"WRITE"}]}} 9 | *: RESET 10 | +} 11 | ?: GOODBYE 12 | -------------------------------------------------------------------------------- /tests/stub/iteration/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neo4j-drivers/testkit/cbc816c9dbfe039c74e5f7a8104e3323c4d7dbf1/tests/stub/iteration/__init__.py -------------------------------------------------------------------------------- /tests/stub/iteration/scripts/v3/pull_all.script: -------------------------------------------------------------------------------- 1 | !: BOLT 3 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN "RETURN 1 AS n" {} {} 6 | PULL_ALL 7 | S: SUCCESS {"fields": ["n.name"]} 8 | RECORD ["1"] 9 | RECORD ["2"] 10 | RECORD ["3"] 11 | RECORD ["4"] 12 | RECORD ["5"] 13 | RECORD ["6"] 14 | SUCCESS {"type": "w"} 15 | *: RESET 16 | ?: GOODBYE 17 | -------------------------------------------------------------------------------- /tests/stub/iteration/scripts/v3/pull_all_any_mode.script: -------------------------------------------------------------------------------- 1 | !: BOLT 3 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN "RETURN 1 AS n" {} {"[mode]": "*"} 6 | PULL_ALL 7 | S: SUCCESS {"fields": ["n.name"]} 8 | RECORD ["1"] 9 | RECORD ["2"] 10 | RECORD ["3"] 11 | RECORD ["4"] 12 | RECORD ["5"] 13 | RECORD ["6"] 14 | SUCCESS {"type": "#MODE#"} 15 | *: RESET 16 | ?: GOODBYE 17 | -------------------------------------------------------------------------------- /tests/stub/iteration/scripts/v3/tx_pull_all.script: -------------------------------------------------------------------------------- 1 | !: BOLT 3 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {} 6 | S: SUCCESS {} 7 | C: RUN "CYPHER" {} {} 8 | S: SUCCESS {"fields": ["x"]} 9 | C: PULL_ALL 10 | S: RECORD [1] 11 | RECORD [2] 12 | RECORD [3] 13 | SUCCESS {} 14 | C: COMMIT 15 | S: SUCCESS {"bookmark": "bm"} 16 | *: RESET 17 | ?: GOODBYE 18 | -------------------------------------------------------------------------------- /tests/stub/iteration/scripts/v4x4/disconnect_on_pull.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN "RETURN 1 AS n" {} {} 6 | S: SUCCESS {"fields": ["1"]} 7 | C: PULL {"n": {"Z": "*"}} 8 | S: 9 | -------------------------------------------------------------------------------- /tests/stub/iteration/scripts/v4x4/error_on_pull.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN "RETURN 1 AS n" {} {} 6 | S: SUCCESS {"fields": ["1"]} 7 | C: PULL {"n": {"Z": "*"}} 8 | S: FAILURE {"code": "#ERROR#", "message": ""} 9 | +: RESET 10 | ?: GOODBYE 11 | -------------------------------------------------------------------------------- /tests/stub/iteration/scripts/v4x4/inf_results_until_end.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN {"U": "*"} {"{}": "*"} {"{}": "*"} 6 | S: SUCCESS {"fields": ["n"]} 7 | {* 8 | C: PULL {"n": {"Z": "*"}, "[qid]": -1} 9 | S: RECORD [1] 10 | RECORD [2] 11 | SUCCESS {"has_more": true} 12 | *} 13 | {{ 14 | C: DISCARD {"n": -1, "[qid]": -1} 15 | S: SUCCESS {"type": "r"} 16 | ---- 17 | A: RESET 18 | }} 19 | *: RESET 20 | ?: GOODBYE 21 | -------------------------------------------------------------------------------- /tests/stub/iteration/scripts/v4x4/pull_2_end_empty_batch.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN "RETURN 1 AS n" {} {} 6 | S: SUCCESS {"fields": ["n.name"]} 7 | C: PULL { "n": 2 } 8 | S: RECORD ["1"] 9 | RECORD ["2"] 10 | SUCCESS {"has_more": true} 11 | C: PULL { "n": 2 } 12 | S: RECORD ["3"] 13 | RECORD ["4"] 14 | SUCCESS {"has_more": true} 15 | C: PULL { "n": 2 } 16 | S: SUCCESS {"type": "w"} 17 | *: RESET 18 | ?: GOODBYE 19 | -------------------------------------------------------------------------------- /tests/stub/iteration/scripts/v4x4/pull_2_end_full_batch.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN "RETURN 1 AS n" {} {} 6 | S: SUCCESS {"fields": ["n.name"]} 7 | C: PULL { "n": 2 } 8 | S: RECORD ["1"] 9 | RECORD ["2"] 10 | SUCCESS {"has_more": true} 11 | C: PULL { "n": 2 } 12 | S: RECORD ["3"] 13 | RECORD ["4"] 14 | SUCCESS {"has_more": true} 15 | C: PULL { "n": 2 } 16 | S: RECORD ["5"] 17 | RECORD ["6"] 18 | SUCCESS {"type": "w"} 19 | *: RESET 20 | ?: GOODBYE 21 | -------------------------------------------------------------------------------- /tests/stub/iteration/scripts/v4x4/pull_2_end_half_batch.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN "RETURN 1 AS n" {} {} 6 | S: SUCCESS {"fields": ["n.name"]} 7 | C: PULL { "n": 2 } 8 | S: RECORD ["1"] 9 | RECORD ["2"] 10 | SUCCESS {"has_more": true} 11 | C: PULL { "n": 2 } 12 | S: RECORD ["3"] 13 | RECORD ["4"] 14 | SUCCESS {"has_more": true} 15 | C: PULL { "n": 2 } 16 | S: RECORD ["5"] 17 | SUCCESS {"type": "w"} 18 | *: RESET 19 | ?: GOODBYE 20 | -------------------------------------------------------------------------------- /tests/stub/iteration/scripts/v4x4/pull_all.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN "RETURN 1 AS n" {} {} 6 | S: SUCCESS {"fields": ["n.name"]} 7 | C: PULL { "n": -1 } 8 | S: RECORD ["1"] 9 | RECORD ["2"] 10 | RECORD ["3"] 11 | RECORD ["4"] 12 | RECORD ["5"] 13 | RECORD ["6"] 14 | SUCCESS {"type": "w"} 15 | *: RESET 16 | ?: GOODBYE 17 | -------------------------------------------------------------------------------- /tests/stub/iteration/scripts/v4x4/pull_all_slow_connection.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN "RETURN 1 AS n" {} {} 6 | S: SUCCESS {"fields": ["n.name"]} 7 | C: PULL { "n": -1 } 8 | S: 1 9 | RECORD ["1"] 10 | RECORD ["2"] 11 | RECORD ["3"] 12 | RECORD ["4"] 13 | RECORD ["5"] 14 | RECORD ["6"] 15 | SUCCESS {"type": "w"} 16 | *: RESET 17 | ?: GOODBYE 18 | -------------------------------------------------------------------------------- /tests/stub/iteration/scripts/v4x4/pull_list.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | 6 | C: RUN "*" "*" "*" 7 | S: SUCCESS {"fields": ["n"]} 8 | C: PULL {"n": 2} 9 | S: RECORD [1] 10 | RECORD [2] 11 | SUCCESS {"has_more": true} 12 | C: PULL {"n": 2} 13 | S: RECORD [3] 14 | RECORD [4] 15 | SUCCESS {"has_more": true} 16 | C: PULL {"n": 2} 17 | S: RECORD [5] 18 | S: SUCCESS {"type": "w"} 19 | 20 | *: RESET 21 | ?: GOODBYE 22 | -------------------------------------------------------------------------------- /tests/stub/iteration/scripts/v4x4/tx_pull_2.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {} 6 | S: SUCCESS {} 7 | C: RUN "CYPHER" {} {} 8 | S: SUCCESS {"fields": ["x"], "qid": 7} 9 | C: PULL {"n": 2, "[qid]": 7} 10 | S: RECORD [1] 11 | RECORD [2] 12 | SUCCESS {"has_more": true} 13 | C: PULL {"n": 2, "[qid]": 7} 14 | S: RECORD [3] 15 | SUCCESS {} 16 | C: COMMIT 17 | S: SUCCESS {"bookmark": "bm"} 18 | *: RESET 19 | ?: GOODBYE 20 | -------------------------------------------------------------------------------- /tests/stub/iteration/scripts/v4x4/tx_pull_all.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {} 6 | S: SUCCESS {} 7 | C: RUN "CYPHER" {} {} 8 | S: SUCCESS {"fields": ["x"], "qid": 7} 9 | C: PULL {"n": -1, "[qid]": 7} 10 | S: RECORD [1] 11 | RECORD [2] 12 | RECORD [3] 13 | SUCCESS {} 14 | C: COMMIT 15 | S: SUCCESS {"bookmark": "bm"} 16 | *: RESET 17 | ?: GOODBYE 18 | -------------------------------------------------------------------------------- /tests/stub/iteration/scripts/v4x4/tx_pull_all_slow_connection.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {} 6 | S: SUCCESS {} 7 | C: RUN "CYPHER" {} {} 8 | S: SUCCESS {"fields": ["x"], "qid": 7} 9 | C: PULL {"n": -1, "[qid]": 7} 10 | S: 1 11 | RECORD [1] 12 | RECORD [2] 13 | RECORD [3] 14 | SUCCESS {} 15 | C: COMMIT 16 | S: SUCCESS {"bookmark": "bm"} 17 | *: RESET 18 | ?: GOODBYE 19 | -------------------------------------------------------------------------------- /tests/stub/iteration/scripts/v4x4/tx_pull_list.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | 6 | C: BEGIN {"{}": "*"} 7 | S: SUCCESS {} 8 | C: RUN "*" "*" "*" 9 | S: SUCCESS {"fields": ["n"]} 10 | C: PULL {"n": 2} 11 | S: RECORD [1] 12 | RECORD [2] 13 | SUCCESS {"has_more": true} 14 | C: PULL {"n": 2} 15 | S: RECORD [3] 16 | RECORD [4] 17 | SUCCESS {"has_more": true} 18 | C: PULL {"n": 2} 19 | S: RECORD [5] 20 | S: SUCCESS {} 21 | C: COMMIT 22 | S: SUCCESS {"bookmark": "bm"} 23 | 24 | *: RESET 25 | ?: GOODBYE 26 | -------------------------------------------------------------------------------- /tests/stub/iteration/scripts/v4x4/yield_0_records.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN "RETURN 1 AS n" {} {} 6 | S: SUCCESS {"fields": ["1"]} 7 | C: PULL {"n": {"Z": "*"}} 8 | S: SUCCESS {"type": "r"} 9 | *: RESET 10 | ?: GOODBYE 11 | -------------------------------------------------------------------------------- /tests/stub/iteration/scripts/v4x4/yield_1_record.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN "RETURN 1 AS n" {} {} 6 | S: SUCCESS {"fields": ["1"]} 7 | C: PULL {"n": {"Z": "*"}} 8 | S: RECORD [1] 9 | SUCCESS {"type": "r"} 10 | *: RESET 11 | ?: GOODBYE 12 | -------------------------------------------------------------------------------- /tests/stub/notifications_config/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neo4j-drivers/testkit/cbc816c9dbfe039c74e5f7a8104e3323c4d7dbf1/tests/stub/notifications_config/__init__.py -------------------------------------------------------------------------------- /tests/stub/notifications_config/scripts/notifications_config_driver.script: -------------------------------------------------------------------------------- 1 | !: BOLT 5.2 2 | 3 | A: HELLO {#NOTIS#"[user_agent]": "*", "[routing]": "*"} 4 | A: LOGON {"{}": "*"} 5 | *: RESET 6 | C: RUN "*" "*" {"[db]": "*"} 7 | S: SUCCESS {"fields": ["t"]} 8 | {{ 9 | C: PULL "*" 10 | ---- 11 | C: DISCARD "*" 12 | }} 13 | S: SUCCESS {"type": "w"} 14 | *: RESET 15 | ?: GOODBYE 16 | -------------------------------------------------------------------------------- /tests/stub/notifications_config/scripts/notifications_config_session_begin.script: -------------------------------------------------------------------------------- 1 | !: BOLT 5.2 2 | 3 | A: HELLO {"{}": "*"} 4 | A: LOGON {"{}": "*"} 5 | *: RESET 6 | C: BEGIN {#NOTIS#"[mode]": "*", "[db]": "*"} 7 | S: SUCCESS {} 8 | C: RUN "RETURN 1 as n" {} {} 9 | S: SUCCESS {"fields": ["n"]} 10 | {{ 11 | C: PULL "*" 12 | ---- 13 | C: DISCARD "*" 14 | }} 15 | S: SUCCESS {"type": "r"} 16 | C: COMMIT 17 | S: SUCCESS {} 18 | *: RESET 19 | ?: GOODBYE 20 | -------------------------------------------------------------------------------- /tests/stub/notifications_config/scripts/notifications_config_session_run.script: -------------------------------------------------------------------------------- 1 | !: BOLT 5.2 2 | 3 | A: HELLO {"{}": "*"} 4 | A: LOGON {"{}": "*"} 5 | *: RESET 6 | C: RUN "RETURN 1 as n" {} {#NOTIS#"[mode]": "*", "[db]": "*"} 7 | S: SUCCESS {"fields": ["n"]} 8 | {{ 9 | C: PULL "*" 10 | S: RECORD [1] 11 | ---- 12 | C: DISCARD "*" 13 | }} 14 | S: SUCCESS {"type": "r"} 15 | *: RESET 16 | ?: GOODBYE 17 | -------------------------------------------------------------------------------- /tests/stub/notifications_config/scripts/notifications_mapping.script: -------------------------------------------------------------------------------- 1 | !: BOLT 5.2 2 | 3 | A: HELLO {"[user_agent]": "*", "[routing]": "*"} 4 | A: LOGON {"{}": "*"} 5 | *: RESET 6 | C: RUN "*" "*" "*" 7 | S: SUCCESS {"fields": ["t"]} 8 | {{ 9 | C: PULL "*" 10 | ---- 11 | C: DISCARD "*" 12 | }} 13 | S: SUCCESS {"type": "w", "notifications": #EMIT#} 14 | *: RESET 15 | ?: GOODBYE 16 | -------------------------------------------------------------------------------- /tests/stub/optimizations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neo4j-drivers/testkit/cbc816c9dbfe039c74e5f7a8104e3323c4d7dbf1/tests/stub/optimizations/__init__.py -------------------------------------------------------------------------------- /tests/stub/optimizations/scripts/v3/failure_on_begin.script: -------------------------------------------------------------------------------- 1 | !: BOLT 3 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN "*" 6 | S: FAILURE {"code": "Neo.ClientError.MadeUp.Code", "message": "Something went wrong..."} 7 | {? 8 | # for pipelining driver 9 | C: RUN "*" "*" "*" 10 | S: IGNORED 11 | {? 12 | C: PULL_ALL 13 | S: IGNORED 14 | ?} 15 | ?} 16 | +: RESET 17 | ?: GOODBYE 18 | -------------------------------------------------------------------------------- /tests/stub/optimizations/scripts/v3/failure_on_pull.script: -------------------------------------------------------------------------------- 1 | !: BOLT 3 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | {? 6 | C: BEGIN "*" 7 | S: SUCCESS {} 8 | ?} 9 | C: RUN "*" "*" "*" 10 | S: SUCCESS {"fields": ["n"]} 11 | C: PULL_ALL 12 | S: FAILURE {"code": "Neo.ClientError.MadeUp.Code", "message": "Something went wrong..."} 13 | +: RESET 14 | ?: GOODBYE 15 | -------------------------------------------------------------------------------- /tests/stub/optimizations/scripts/v3/failure_on_run.script: -------------------------------------------------------------------------------- 1 | !: BOLT 3 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | {? 6 | C: BEGIN "*" 7 | S: SUCCESS {} 8 | ?} 9 | C: RUN "*" "*" "*" 10 | S: FAILURE {"code": "Neo.ClientError.Statement.SyntaxError", "message": "Git gud!"} 11 | {? 12 | # for pipelining driver 13 | C: PULL_ALL 14 | S: IGNORED 15 | ?} 16 | +: RESET 17 | ?: GOODBYE 18 | -------------------------------------------------------------------------------- /tests/stub/optimizations/scripts/v3/run_twice.script: -------------------------------------------------------------------------------- 1 | !: BOLT 3 2 | !: ALLOW RESTART 3 | 4 | A: HELLO {"{}": "*"} 5 | *: RESET 6 | 7 | {? 8 | C: RUN "QUERY 1" "*" "*" 9 | S: SUCCESS {"fields": ["1"]} 10 | C: PULL_ALL 11 | S: RECORD [1] 12 | SUCCESS {"type": "#TYPE#"} 13 | 14 | *: RESET 15 | ?} 16 | 17 | C: RUN "QUERY 2" "*" "*" 18 | S: SUCCESS {"fields": ["1"]} 19 | C: PULL_ALL 20 | S: RECORD [2] 21 | SUCCESS {"type": "#TYPE#"} 22 | 23 | *: RESET 24 | ?: GOODBYE 25 | -------------------------------------------------------------------------------- /tests/stub/optimizations/scripts/v4x3/failure_on_begin.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.3 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN "*" 6 | S: FAILURE {"code": "Neo.ClientError.MadeUp.Code", "message": "Something went wrong..."} 7 | {? 8 | # for pipelining driver 9 | C: RUN "*" "*" "*" 10 | S: IGNORED 11 | {? 12 | C: PULL "*" 13 | S: IGNORED 14 | ?} 15 | ?} 16 | +: RESET 17 | ?: GOODBYE 18 | -------------------------------------------------------------------------------- /tests/stub/optimizations/scripts/v4x3/failure_on_pull.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.3 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | {? 6 | C: BEGIN "*" 7 | S: SUCCESS {} 8 | ?} 9 | C: RUN "*" "*" "*" 10 | S: SUCCESS {"fields": ["n"]} 11 | C: PULL "*" 12 | S: FAILURE {"code": "Neo.ClientError.MadeUp.Code", "message": "Something went wrong..."} 13 | +: RESET 14 | ?: GOODBYE 15 | -------------------------------------------------------------------------------- /tests/stub/optimizations/scripts/v4x3/failure_on_run.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.3 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | {? 6 | C: BEGIN "*" 7 | S: SUCCESS {} 8 | ?} 9 | C: RUN "*" "*" "*" 10 | S: FAILURE {"code": "Neo.ClientError.Statement.SyntaxError", "message": "Git gud!"} 11 | {? 12 | # for pipelining driver 13 | C: PULL "*" 14 | S: IGNORED 15 | ?} 16 | +: RESET 17 | ?: GOODBYE 18 | -------------------------------------------------------------------------------- /tests/stub/optimizations/scripts/v4x3/pull_pipeline.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.3 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN "*" "*" "*" 6 | PULL "*" 7 | S: SUCCESS {"fields": ["n"]} 8 | RECORD [1] 9 | SUCCESS {"type": "#TYPE#"} 10 | *: RESET 11 | ?: GOODBYE 12 | -------------------------------------------------------------------------------- /tests/stub/optimizations/scripts/v4x3/pull_pipeline_tx.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.3 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN "*" 6 | S: SUCCESS {} 7 | C: RUN "*" "*" "*" 8 | PULL "*" 9 | S: SUCCESS {"fields": ["n"]} 10 | RECORD [1] 11 | SUCCESS {"type": "#TYPE#"} 12 | C: COMMIT 13 | S: SUCCESS {} 14 | *: RESET 15 | ?: GOODBYE 16 | -------------------------------------------------------------------------------- /tests/stub/optimizations/scripts/v4x3/router.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.3 2 | !: ALLOW CONCURRENT 3 | 4 | A: HELLO {"{}": "*"} 5 | *: RESET 6 | {* 7 | C: ROUTE "*" "*" "*" 8 | S: SUCCESS { "rt": { "ttl": 1000, "servers": [{"addresses": ["#HOST#:9000"], "role":"ROUTE"}, {"addresses": ["#HOST#:9001"], "role":"READ"}, {"addresses": ["#HOST#:9001"], "role":"WRITE"}]}} 9 | *: RESET 10 | *} 11 | ?: GOODBYE 12 | -------------------------------------------------------------------------------- /tests/stub/optimizations/scripts/v4x3/run_twice.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.3 2 | !: ALLOW RESTART 3 | 4 | A: HELLO {"{}": "*"} 5 | *: RESET 6 | 7 | {? 8 | C: RUN "QUERY 1" "*" "*" 9 | S: SUCCESS {"fields": ["1"]} 10 | C: PULL "*" 11 | S: RECORD [1] 12 | SUCCESS {"type": "#TYPE#"} 13 | 14 | *: RESET 15 | ?} 16 | 17 | C: RUN "QUERY 2" "*" "*" 18 | S: SUCCESS {"fields": ["1"]} 19 | C: PULL "*" 20 | S: RECORD [2] 21 | SUCCESS {"type": "#TYPE#"} 22 | 23 | *: RESET 24 | ?: GOODBYE 25 | -------------------------------------------------------------------------------- /tests/stub/optimizations/scripts/v5x3/begin_pipeline.script: -------------------------------------------------------------------------------- 1 | !: BOLT 5.3 2 | 3 | A: HELLO {"{}": "*"} 4 | A: LOGON {"{}": "*"} 5 | 6 | *: RESET 7 | 8 | C: BEGIN {"{}": "*"} 9 | RUN {"U": "*"} {"{}": "*"} {"{}": "*"} 10 | PULL {"[n]": {"Z": "*"}} 11 | S: SUCCESS {} 12 | SUCCESS {"fields": ["n"]} 13 | RECORD [1] 14 | 1 15 | SUCCESS {"has_more": false} 16 | C: COMMIT 17 | S: SUCCESS {} 18 | 19 | *: RESET 20 | ?: GOODBYE 21 | -------------------------------------------------------------------------------- /tests/stub/retry/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neo4j-drivers/testkit/cbc816c9dbfe039c74e5f7a8104e3323c4d7dbf1/tests/stub/retry/__init__.py -------------------------------------------------------------------------------- /tests/stub/retry/scripts/clustering/router_no_retry.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | !: AUTO RESET 3 | 4 | C: HELLO {"scheme": "basic", "credentials": "c", "principal": "p", "user_agent": "007", "routing": #HELLO_ROUTINGCTX#, "[patch_bolt]": "*"} 5 | S: SUCCESS {"server": "Neo4j/4.0.0", "connection_id": "bolt-123456789"} 6 | C: ROUTE #ROUTINGCTX# [] null 7 | S: SUCCESS { "rt": { "ttl": 1000, "servers": [{"addresses": ["#HOST#:9001"], "role":"ROUTE"}, {"addresses": ["#HOST#:9002"], "role":"READ"}, {"addresses": ["#HOST#:9003"], "role":"WRITE"}]}} 8 | ?: GOODBYE 9 | -------------------------------------------------------------------------------- /tests/stub/retry/scripts/commit_disconnect.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.3 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1" {} {} 8 | S: SUCCESS {"fields": ["n"]} 9 | C: PULL {"n": 1000} 10 | S: SUCCESS {"type": "w"} 11 | C: COMMIT 12 | S: 13 | -------------------------------------------------------------------------------- /tests/stub/retry/scripts/read.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.3 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {"mode": "r"} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1" {} {} 8 | S: SUCCESS {"fields": ["n"]} 9 | C: PULL {"n": 1000} 10 | S: RECORD [1] 11 | SUCCESS {"type": "r"} 12 | C: COMMIT 13 | S: SUCCESS {} 14 | *: RESET 15 | ?: GOODBYE 16 | -------------------------------------------------------------------------------- /tests/stub/retry/scripts/read_syntax_error.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.3 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {"mode": "r"} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1" {} {} 8 | S: FAILURE {"code": "Neo.ClientError.Statement.SyntaxError", "message": "X"} 9 | {? 10 | C: PULL {"n": "*"} 11 | S: IGNORED 12 | ?} 13 | C: RESET 14 | S: SUCCESS {} 15 | *: RESET 16 | ?: GOODBYE 17 | -------------------------------------------------------------------------------- /tests/stub/retry/scripts/retry_with_fail_after_pull_server1.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.3 2 | 3 | A: HELLO {"{}": "*"} 4 | C: BEGIN {} 5 | S: SUCCESS {} 6 | C: RUN "RETURN 1" {} {} 7 | S: SUCCESS {} 8 | C: PULL {"n": 1000} 9 | S: FAILURE {"code": "#ERROR#", "message": ""} 10 | C: RESET 11 | S: SUCCESS {} 12 | #EXTRA_RESET_1# 13 | ?: GOODBYE 14 | -------------------------------------------------------------------------------- /tests/stub/retry/scripts/retry_with_fail_after_pull_server2.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.3 2 | 3 | A: HELLO {"{}": "*"} 4 | C: BEGIN {} 5 | S: SUCCESS {} 6 | C: RUN "RETURN 1" {} {} 7 | S: SUCCESS {"fields": ["n"]} 8 | C: PULL {"n": 1000} 9 | S: RECORD [1] 10 | SUCCESS {"type": "r"} 11 | C: COMMIT 12 | S: SUCCESS {} 13 | #EXTRA_RESET_2# 14 | {? 15 | C: GOODBYE 16 | S: 17 | ?} 18 | -------------------------------------------------------------------------------- /tests/stub/retry/scripts/tx_pull_yielding_failure.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.3 2 | 3 | A: HELLO {"{}": "*"} 4 | C: BEGIN {} 5 | S: SUCCESS {} 6 | C: RUN "RETURN 1 as n" {} {} 7 | S: SUCCESS {"fields": ["n"]} 8 | C: PULL {"n": 1000} 9 | S: FAILURE #FAILURE# 10 | *: RESET 11 | ?: GOODBYE 12 | -------------------------------------------------------------------------------- /tests/stub/retry/scripts/write_syntax_error.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.3 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1" {} {} 8 | S: FAILURE {"code": "Neo.ClientError.Statement.SyntaxError", "message": "X"} 9 | {? 10 | C: PULL {"n": "*"} 11 | S: IGNORED 12 | ?} 13 | C: RESET 14 | S: SUCCESS {} 15 | *: RESET 16 | ?: GOODBYE 17 | -------------------------------------------------------------------------------- /tests/stub/routing/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neo4j-drivers/testkit/cbc816c9dbfe039c74e5f7a8104e3323c4d7dbf1/tests/stub/routing/__init__.py -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v3/reader.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN "RETURN 1 as n" {} {"mode": "r"} 6 | S: SUCCESS {"fields": ["n"]} 7 | C: PULL_ALL 8 | S: RECORD [1] 9 | SUCCESS {"type": "r"} 10 | *: RESET 11 | ?: GOODBYE 12 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v3/reader_default_db.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN "RETURN 1 as n" {} {"mode": "r"} 6 | S: SUCCESS {"fields": ["n"]} 7 | C: PULL_ALL 8 | S: RECORD [1] 9 | SUCCESS {"type": "r"} 10 | *: RESET 11 | ?: GOODBYE 12 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v3/reader_tx.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {"mode": "r"} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 as n" {} {} 8 | S: SUCCESS {"fields": ["n"]} 9 | C: PULL_ALL 10 | S: RECORD [1] 11 | SUCCESS {"type": "r"} 12 | C: COMMIT 13 | S: SUCCESS {} 14 | *: RESET 15 | ?: GOODBYE 16 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v3/reader_tx_default_db.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {"mode": "r"} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 as n" {} {} 8 | S: SUCCESS {"fields": ["n"]} 9 | C: PULL_ALL 10 | S: RECORD [1] 11 | SUCCESS {"type": "r"} 12 | C: COMMIT 13 | S: SUCCESS {} 14 | *: RESET 15 | ?: GOODBYE 16 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v3/reader_tx_with_bookmarks.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {"mode": "r", "bookmarks": ["OldBookmark"]} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 as n" {} {} 8 | S: SUCCESS {"fields": ["n"]} 9 | C: PULL_ALL 10 | S: RECORD [1] 11 | SUCCESS {"type": "r"} 12 | C: COMMIT 13 | S: SUCCESS {"bookmark": "NewBookmark"} 14 | *: RESET 15 | ?: GOODBYE 16 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v3/reader_tx_with_exit.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {"mode": "r"} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 as n" {} {} 8 | S: SUCCESS {"fields": ["n"]} 9 | C: PULL_ALL 10 | S: RECORD [1] 11 | SUCCESS {"type": "r"} 12 | C: COMMIT 13 | S: SUCCESS {} 14 | 15 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v3/reader_tx_with_unexpected_interruption_on_pipelined_pull.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {"mode": "r"} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 as n" {} {} 8 | PULL_ALL 9 | S: 10 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v3/reader_tx_with_unexpected_interruption_on_pull.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {"mode": "r"} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 as n" {} {} 8 | S: SUCCESS {} 9 | C: PULL_ALL 10 | S: 11 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v3/reader_tx_with_unexpected_interruption_on_run.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {"mode": "r"} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 as n" {} {} 8 | S: 9 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v3/reader_tx_with_unexpected_interruption_on_second_run.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {"mode": "r"} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 as n" {} {} 8 | S: SUCCESS {"fields": ["n"]} 9 | C: PULL_ALL 10 | S: RECORD [1] 11 | SUCCESS {"type": "r"} 12 | C: COMMIT 13 | S: SUCCESS {} 14 | *: RESET 15 | C: BEGIN {"mode": "r"} 16 | S: SUCCESS {} 17 | C: RUN "RETURN 1 as n" {} {} 18 | S: 19 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v3/reader_with_bookmarks.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN "RETURN 1 as n" {} {"mode": "r", "bookmarks{}": ["sys:1234", "foo:5678"]} 6 | S: SUCCESS {"fields": ["n"]} 7 | C: PULL_ALL 8 | S: RECORD [1] 9 | SUCCESS {"type": "r", "bookmark": "foo:6678"} 10 | *: RESET 11 | ?: GOODBYE 12 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v3/reader_with_explicit_hello.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | C: HELLO {"scheme": "basic", "credentials": "c", "principal": "p", "user_agent": "007"#EXTR_HELLO_ROUTING_PROPS#} 4 | S: SUCCESS {"server": "#SERVER_AGENT#", "connection_id": "bolt-123456789"} 5 | *: RESET 6 | C: RUN "RETURN 1 as n" {} {"mode": "r"} 7 | S: SUCCESS {"fields": ["n"]} 8 | C: PULL_ALL 9 | S: RECORD [1] 10 | SUCCESS {"type": "r"} 11 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v3/reader_with_unexpected_interruption_on_pipelined_pull.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN "RETURN 1 as n" {} {"mode": "r"} 6 | PULL_ALL 7 | S: 8 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v3/reader_with_unexpected_interruption_on_run.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN "RETURN 1 as n" {} {"mode": "r"} 6 | S: 7 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v3/router_yielding_database_unavailable_failure.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | C: HELLO {"scheme": "basic", "credentials": "c", "principal": "p", "user_agent": "007"#EXTR_HELLO_ROUTING_PROPS#} 4 | S: SUCCESS {"server": "#SERVER_AGENT#", "connection_id": "bolt-123456789"} 5 | *: RESET 6 | C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": #ROUTINGCTX#} {"[mode]": "r"} 7 | PULL_ALL 8 | S: FAILURE {"code": "Neo.TransientError.General.DatabaseUnavailable", "message": "wut!"} 9 | 10 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v3/router_yielding_db_not_found_failure.script: -------------------------------------------------------------------------------- 1 | # Empty script that will cause an error if loaded! 2 | # Reason: No multi db support in Bolt v3 3 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v3/router_yielding_no_readers_any_db.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": #ROUTINGCTX#} {"[mode]": "r"} 6 | S: SUCCESS {"fields": ["ttl", "servers"]} 7 | C: PULL_ALL 8 | S: RECORD [1000, [{"addresses": ["#HOST#:9000"], "role":"ROUTE"}, {"addresses": [], "role":"READ"}, {"addresses": ["#HOST#:9000"], "role":"WRITE"}]] 9 | SUCCESS {"type": "r"} 10 | *: RESET 11 | ?: GOODBYE 12 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v3/router_yielding_unknown_failure.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | C: HELLO {"scheme": "basic", "credentials": "c", "principal": "p", "user_agent": "007"#EXTR_HELLO_ROUTING_PROPS#} 4 | S: SUCCESS {"server": "#SERVER_AGENT#", "connection_id": "bolt-123456789"} 5 | *: RESET 6 | C: RUN "CALL dbms.cluster.routing.getRoutingTable($context)" {"context": #ROUTINGCTX#} {"[mode]": "r"} 7 | PULL_ALL 8 | S: FAILURE {"code": "Neo.ClientError.General.Unknown", "message": "wut!"} 9 | 10 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v3/writer.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN "RETURN 1 as n" {} {} 6 | S: SUCCESS {"fields": ["n"]} 7 | C: PULL_ALL 8 | S: RECORD [1] 9 | SUCCESS {"type": "w"} 10 | *: RESET 11 | ?: GOODBYE 12 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v3/writer_tx.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 as n" {} {} 8 | S: SUCCESS {"fields": ["n"]} 9 | C: PULL_ALL 10 | S: SUCCESS {"type": "w"} 11 | C: COMMIT 12 | S: SUCCESS {} 13 | *: RESET 14 | ?: GOODBYE 15 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v3/writer_tx_with_bookmarks.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {"bookmarks": ["OldBookmark"]} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 as n" {} {} 8 | S: SUCCESS {"fields": ["n"]} 9 | C: PULL_ALL 10 | S: SUCCESS {"type": "w"} 11 | C: COMMIT 12 | S: SUCCESS {"bookmark": "NewBookmark"} 13 | *: RESET 14 | ?: GOODBYE 15 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v3/writer_tx_with_multiple_bookmarks.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {"bookmarks{}": ["neo4j:bookmark:v1:tx5", "neo4j:bookmark:v1:tx29", "neo4j:bookmark:v1:tx94", "neo4j:bookmark:v1:tx56", "neo4j:bookmark:v1:tx16", "neo4j:bookmark:v1:tx68"]} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 as n" {} {} 8 | S: SUCCESS {"fields": ["n"]} 9 | C: PULL_ALL 10 | S: SUCCESS {"type": "w"} 11 | C: COMMIT 12 | S: SUCCESS {"bookmark": "neo4j:bookmark:v1:tx95"} 13 | *: RESET 14 | ?: GOODBYE 15 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v3/writer_tx_with_unexpected_interruption_on_pipelined_pull.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 as n" {} {} 8 | PULL_ALL 9 | S: 10 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v3/writer_tx_with_unexpected_interruption_on_pull.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 as n" {} {} 8 | S: SUCCESS {} 9 | C: PULL_ALL 10 | S: 11 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v3/writer_tx_with_unexpected_interruption_on_run.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 as n" {} {} 8 | S: 9 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v3/writer_tx_yielding_database_unavailable_failure.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 as n" {} {} 8 | S: FAILURE {"code": "Neo.TransientError.General.DatabaseUnavailable", "message": "Database is busy doing store copy"} 9 | {? 10 | C: PULL_ALL 11 | S: IGNORED 12 | ?} 13 | *: RESET 14 | ?: GOODBYE 15 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v3/writer_tx_yielding_database_unavailable_failure_on_commit.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 as n" {} {} 8 | S: SUCCESS {"fields": ["n"]} 9 | C: PULL_ALL 10 | S: SUCCESS {"type": "w"} 11 | C: COMMIT 12 | S: FAILURE {"code": "Neo.TransientError.General.DatabaseUnavailable", "message": "Database shut down."} 13 | 14 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v3/writer_tx_yielding_failure_on_2nd_run.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | 6 | C: RUN "RETURN 1 AS n" {} {} 7 | S: SUCCESS {"fields": ["n"]} 8 | C: PULL_ALL 9 | S: RECORD [1] 10 | SUCCESS {"type": "r"} 11 | 12 | *: RESET 13 | 14 | C: BEGIN {} 15 | S: SUCCESS {} 16 | C: RUN "RETURN 1 AS n" {} {} 17 | S: FAILURE #FAILURE# 18 | {? 19 | C: PULL_ALL 20 | S: IGNORED 21 | ?} 22 | C: RESET 23 | S: SUCCESS {} 24 | 25 | *: RESET 26 | ?: GOODBYE 27 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v3/writer_tx_yielding_failure_on_run.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 as n" {} {} 8 | S: FAILURE #FAILURE# 9 | {? 10 | C: PULL_ALL 11 | S: IGNORED 12 | ?} 13 | C: RESET 14 | S: SUCCESS {} 15 | *: RESET 16 | ?: GOODBYE 17 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v3/writer_with_bookmark.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN "RETURN 1 as n" {} {"bookmarks": ["NewBookmark"]} 6 | S: SUCCESS {"fields": ["n"]} 7 | C: PULL_ALL 8 | S: RECORD [1] 9 | SUCCESS {"type": "w"} 10 | *: RESET 11 | ?: GOODBYE 12 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v3/writer_with_unexpected_interruption_on_pipelined_pull.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN "RETURN 1 as n" {} {} 6 | PULL_ALL 7 | S: 8 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v3/writer_with_unexpected_interruption_on_pull.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN "RETURN 1 as n" {} {} 6 | S: SUCCESS {} 7 | C: PULL_ALL 8 | S: 9 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v3/writer_with_unexpected_interruption_on_run.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN "RETURN 1 as n" {} {} 6 | S: 7 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v3/writer_with_unexpected_interruption_on_second_run.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN "RETURN 1 as n" {} {} 6 | S: SUCCESS {"fields": ["n"]} 7 | C: PULL_ALL 8 | S: SUCCESS {"type": "w"} 9 | *: RESET 10 | C: RUN "RETURN 1 as n" {} {} 11 | S: 12 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v3/writer_yielding_failure_on_2nd_run.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | 6 | C: RUN "RETURN 1 AS n" {} {} 7 | S: SUCCESS {"fields": ["n"]} 8 | C: PULL_ALL 9 | S: RECORD [1] 10 | SUCCESS {"type": "r"} 11 | 12 | *: RESET 13 | 14 | C: RUN "RETURN 1 AS n" {} {} 15 | S: FAILURE #FAILURE# 16 | {? 17 | C: PULL_ALL 18 | S: IGNORED 19 | ?} 20 | C: RESET 21 | S: SUCCESS {} 22 | 23 | *: RESET 24 | ?: GOODBYE 25 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v3_no_routing/optional_hello.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | {? 4 | C: HELLO {"scheme": "basic", "credentials": "c", "principal": "p", "user_agent": "#USER_AGENT#" #ROUTING#} 5 | S: SUCCESS {"server": "#SERVER_AGENT#", "connection_id": "bolt-123456789"} 6 | ?} 7 | *: RESET 8 | ?: GOODBYE 9 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v3_no_routing/reader.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | C: HELLO {"scheme": "basic", "credentials": "c", "principal": "p", "user_agent": "#USER_AGENT#" #ROUTING#} 4 | S: SUCCESS {"server": "#SERVER_AGENT#", "connection_id": "bolt-123456789"} 5 | *: RESET 6 | 7 | C: RUN "RETURN 1 as n" {} {"mode": "r"} 8 | S: SUCCESS {"fields": ["n"]} 9 | C: PULL_ALL 10 | S: RECORD [1] 11 | SUCCESS {"type": "r"} 12 | 13 | *: RESET 14 | ?: GOODBYE 15 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v3_no_routing/reader_write_mode.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | C: HELLO {"scheme": "basic", "credentials": "c", "principal": "p", "user_agent": "#USER_AGENT#" #ROUTING#} 4 | S: SUCCESS {"server": "#SERVER_AGENT#", "connection_id": "bolt-123456789"} 5 | *: RESET 6 | 7 | C: RUN "RETURN 1 as n" {} {"[mode]": "w"} 8 | S: SUCCESS {"fields": ["n"]} 9 | C: PULL_ALL 10 | S: RECORD [1] 11 | SUCCESS {"type": "r"} 12 | 13 | *: RESET 14 | ?: GOODBYE 15 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v3_no_routing/writer_with_bookmark_yielding_error_on_run.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | C: HELLO {"scheme": "basic", "credentials": "c", "principal": "p", "user_agent": "#USER_AGENT#" #ROUTING#} 4 | S: SUCCESS {"server": "#SERVER_AGENT#", "connection_id": "bolt-123456789"} 5 | C: BEGIN {"bookmarks": ["neo4j:bookmark:v1:tx0"]} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 as n" {} {} 8 | S: FAILURE {"code": "Neo.TransientError.General.DatabaseUnavailable", "message": "Database shut down."} 9 | 10 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v3_no_routing/writer_yielding_multiple_records.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | C: HELLO {"scheme": "basic", "credentials": "c", "principal": "p", "user_agent": "#USER_AGENT#" #ROUTING#} 4 | S: SUCCESS {"server": "#SERVER_AGENT#", "connection_id": "bolt-123456789"} 5 | *: RESET 6 | 7 | C: RUN "RETURN 1 as n" {} {} 8 | S: SUCCESS {"fields": ["n"]} 9 | C: PULL_ALL 10 | S: RECORD [1] 11 | RECORD [5] 12 | RECORD [7] 13 | SUCCESS {} 14 | 15 | *: RESET 16 | ?: GOODBYE 17 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v4x2/reader_default_db.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN "RETURN 1 as n" {} {"mode": "r"} 6 | S: SUCCESS {"fields": ["n"]} 7 | C: PULL {"n": 1000} 8 | S: RECORD [1] 9 | SUCCESS {"type": "r"} 10 | *: RESET 11 | ?: GOODBYE 12 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v4x2/reader_tx_default_db.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {"mode": "r"} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 as n" {} {} 8 | S: SUCCESS {"fields": ["n"]} 9 | C: PULL {"n": 1000} 10 | S: RECORD [1] 11 | SUCCESS {"type": "r"} 12 | C: COMMIT 13 | S: SUCCESS {} 14 | *: RESET 15 | ?: GOODBYE 16 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v4x2_no_routing/optional_hello.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | {? 4 | C: HELLO {"scheme": "basic", "credentials": "c", "principal": "p", "user_agent": "#USER_AGENT#" #ROUTING#} 5 | S: SUCCESS {"server": "#SERVER_AGENT#", "connection_id": "bolt-123456789"} 6 | ?} 7 | *: RESET 8 | ?: GOODBYE 9 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v4x2_no_routing/reader.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | C: HELLO {"scheme": "basic", "credentials": "c", "principal": "p", "user_agent": "#USER_AGENT#" #ROUTING#} 4 | S: SUCCESS {"server": "#SERVER_AGENT#", "connection_id": "bolt-123456789"} 5 | *: RESET 6 | C: RUN "RETURN 1 as n" {} {"mode": "r", "db": "adb"} 7 | S: SUCCESS {"fields": ["n"]} 8 | C: PULL {"n": 1000} 9 | S: RECORD [1] 10 | SUCCESS {"type": "r"} 11 | *: RESET 12 | ?: GOODBYE 13 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v4x2_no_routing/reader_write_mode.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | C: HELLO {"scheme": "basic", "credentials": "c", "principal": "p", "user_agent": "#USER_AGENT#" #ROUTING#} 4 | S: SUCCESS {"server": "#SERVER_AGENT#", "connection_id": "bolt-123456789"} 5 | *: RESET 6 | C: RUN "RETURN 1 as n" {} {"[mode]": "w", "db": "adb"} 7 | S: SUCCESS {"fields": ["n"]} 8 | C: PULL {"n": 1000} 9 | S: RECORD [1] 10 | SUCCESS {"type": "r"} 11 | *: RESET 12 | ?: GOODBYE 13 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v4x2_no_routing/reader_yielding_multiple_records.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | C: HELLO {"scheme": "basic", "credentials": "c", "principal": "p", "user_agent": "#USER_AGENT#" #ROUTING#} 4 | S: SUCCESS {"server": "#SERVER_AGENT#", "connection_id": "bolt-123456789"} 5 | *: RESET 6 | C: RUN "RETURN 1 as n" {} {"mode": "r", "db": "adb"} 7 | S: SUCCESS {"fields": ["n"]} 8 | C: PULL { "n": 1000 } 9 | S: RECORD [1] 10 | RECORD [5] 11 | RECORD [7] 12 | SUCCESS {"type": "r"} 13 | *: RESET 14 | ?: GOODBYE 15 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v4x2_no_routing/writer_with_bookmark_yielding_error_on_run.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | C: HELLO {"scheme": "basic", "credentials": "c", "principal": "p", "user_agent": "#USER_AGENT#" #ROUTING#} 4 | S: SUCCESS {"server": "#SERVER_AGENT#", "connection_id": "bolt-123456789"} 5 | C: BEGIN {"db": "adb", "bookmarks": ["neo4j:bookmark:v1:tx0"]} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 as n" {} {} 8 | S: FAILURE {"code": "Neo.TransientError.General.DatabaseUnavailable", "message": "Database shut down."} 9 | 10 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v4x2_no_routing/writer_yielding_multiple_records.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | C: HELLO {"scheme": "basic", "credentials": "c", "principal": "p", "user_agent": "#USER_AGENT#" #ROUTING#} 4 | S: SUCCESS {"server": "#SERVER_AGENT#", "connection_id": "bolt-123456789"} 5 | *: RESET 6 | 7 | C: RUN "RETURN 1 as n" {} {"db": "adb"} 8 | S: SUCCESS {"fields": ["n"]} 9 | C: PULL { "n": -1 } 10 | S: RECORD [1] 11 | RECORD [5] 12 | RECORD [7] 13 | SUCCESS {} 14 | 15 | *: RESET 16 | ?: GOODBYE 17 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v4x3/reader_default_db.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN "RETURN 1 as n" {} {"mode": "r"} 6 | S: SUCCESS {"fields": ["n"]} 7 | C: PULL {"n": 1000} 8 | S: RECORD [1] 9 | SUCCESS {"type": "r"} 10 | *: RESET 11 | ?: GOODBYE 12 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v4x3/reader_tx_default_db.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {"mode": "r"} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 as n" {} {} 8 | S: SUCCESS {"fields": ["n"]} 9 | C: PULL {"n": 1000} 10 | S: RECORD [1] 11 | SUCCESS {"type": "r"} 12 | C: COMMIT 13 | S: SUCCESS {} 14 | *: RESET 15 | ?: GOODBYE 16 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v4x3/router_yielding_any_security_failure.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | C: HELLO {"scheme": "basic", "credentials": "c", "principal": "p", "user_agent": "007", "routing": #ROUTINGCTX# , "[patch_bolt]": "*"} 4 | S: SUCCESS {"server": "#SERVER_AGENT#", "connection_id": "bolt-123456789"} 5 | *: RESET 6 | C: ROUTE #ROUTINGCTX# ["foobar"] "*" 7 | S: FAILURE {"code": "Neo.ClientError.Security.MadeUpSecurityError", "message": "I don't know what happened; it's classified as top secret :/"} 8 | *: RESET 9 | ?: GOODBYE 10 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v4x3/router_yielding_argument_error.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | C: HELLO {"scheme": "basic", "credentials": "c", "principal": "p", "user_agent": "007", "routing": #ROUTINGCTX# , "[patch_bolt]": "*"} 4 | S: SUCCESS {"server": "#SERVER_AGENT#", "connection_id": "bolt-123456789"} 5 | *: RESET 6 | C: ROUTE #ROUTINGCTX# ["foobar"] "*" 7 | S: FAILURE {"code": "Neo.ClientError.Statement.ArgumentError", "message": "Kaboooom!"} 8 | *: RESET 9 | ?: GOODBYE 10 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v4x3/router_yielding_authorization_expired_failure.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | C: HELLO {"scheme": "basic", "credentials": "c", "principal": "p", "user_agent": "007", "routing": #ROUTINGCTX# , "[patch_bolt]": "*"} 4 | S: SUCCESS {"server": "#SERVER_AGENT#", "connection_id": "bolt-123456789"} 5 | *: RESET 6 | C: ROUTE #ROUTINGCTX# [] "*" 7 | S: FAILURE {"code": "Neo.ClientError.Security.AuthorizationExpired", "message": "Authorization expired"} 8 | *: RESET 9 | ?: GOODBYE 10 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v4x3/router_yielding_database_unavailable_failure.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | !: AUTO RESET 3 | 4 | C: HELLO {"scheme": "basic", "credentials": "c", "principal": "p", "user_agent": "007", "routing": #ROUTINGCTX#, "[patch_bolt]": "*"} 5 | S: SUCCESS {"server": "#SERVER_AGENT#", "connection_id": "bolt-123456789"} 6 | C: ROUTE #ROUTINGCTX# [] "adb" 7 | S: FAILURE {"code": "Neo.TransientError.General.DatabaseUnavailable", "message": "wut!"} 8 | 9 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v4x3/router_yielding_db_not_found_failure.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | C: HELLO {"scheme": "basic", "credentials": "c", "principal": "p", "user_agent": "007", "routing": #ROUTINGCTX# , "[patch_bolt]": "*"} 4 | S: SUCCESS {"server": "#SERVER_AGENT#", "connection_id": "bolt-123456789"} 5 | *: RESET 6 | C: ROUTE #ROUTINGCTX# [] "adb" 7 | S: FAILURE {"code": "Neo.ClientError.Database.DatabaseNotFound", "message": "wut!"} 8 | *: RESET 9 | ?: GOODBYE 10 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v4x3/router_yielding_empty_response_then_shuts_down.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | !: AUTO RESET 3 | 4 | C: HELLO {"scheme": "basic", "credentials": "c", "principal": "p", "user_agent": "007", "routing": #ROUTINGCTX# , "[patch_bolt]": "*"} 5 | S: SUCCESS {"server": "#SERVER_AGENT#", "connection_id": "bolt-123456789"} 6 | C: ROUTE #ROUTINGCTX# [] "adb" 7 | S: SUCCESS { "rt": { "ttl": 1000, "servers": []}} 8 | 9 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v4x3/router_yielding_forbidden_failure.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | C: HELLO {"scheme": "basic", "credentials": "c", "principal": "p", "user_agent": "007", "routing": #ROUTINGCTX# , "[patch_bolt]": "*"} 4 | S: SUCCESS {"server": "#SERVER_AGENT#", "connection_id": "bolt-123456789"} 5 | *: RESET 6 | C: ROUTE #ROUTINGCTX# ["foobar"] "*" 7 | S: FAILURE {"code": "Neo.ClientError.Security.Forbidden", "message": "Thou shalt not pass!"} 8 | *: RESET 9 | ?: GOODBYE 10 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v4x3/router_yielding_invalid_bookmark_mixture_failure.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | C: HELLO {"scheme": "basic", "credentials": "c", "principal": "p", "user_agent": "007", "routing": #ROUTINGCTX# , "[patch_bolt]": "*"} 4 | S: SUCCESS {"server": "#SERVER_AGENT#", "connection_id": "bolt-123456789"} 5 | *: RESET 6 | C: ROUTE #ROUTINGCTX# ["foobar"] "*" 7 | S: FAILURE {"code": "Neo.ClientError.Transaction.InvalidBookmarkMixture", "message": "Kaboooom."} 8 | *: RESET 9 | ?: GOODBYE 10 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v4x3/router_yielding_invalid_request.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | C: HELLO {"scheme": "basic", "credentials": "c", "principal": "p", "user_agent": "007", "routing": #ROUTINGCTX# , "[patch_bolt]": "*"} 4 | S: SUCCESS {"server": "#SERVER_AGENT#", "connection_id": "bolt-123456789"} 5 | *: RESET 6 | C: ROUTE #ROUTINGCTX# ["foobar"] "*" 7 | S: FAILURE {"code": "Neo.ClientError.Request.Invalid", "message": "Kaboooom!"} 8 | *: RESET 9 | ?: GOODBYE 10 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v4x3/router_yielding_no_readers_any_db.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | !: AUTO RESET 3 | 4 | A: HELLO {"{}": "*"} 5 | C: ROUTE #ROUTINGCTX# [] "*" 6 | S: SUCCESS { "rt": { "ttl": 1000, "servers": [{"addresses": ["#HOST#:9000"], "role":"ROUTE"}, {"addresses": [], "role":"READ"}, {"addresses": ["#HOST#:9000"], "role":"WRITE"}]}} 7 | ?: GOODBYE 8 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v4x3/router_yielding_no_writers_any_db.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | !: AUTO RESET 3 | 4 | C: HELLO {"scheme": "basic", "credentials": "c", "principal": "p", "user_agent": "007", "routing": #ROUTINGCTX# , "[patch_bolt]": "*"} 5 | S: SUCCESS {"server": "#SERVER_AGENT#", "connection_id": "bolt-123456789"} 6 | C: ROUTE #ROUTINGCTX# "*" "*" 7 | S: SUCCESS { "rt": { "ttl": 1000, "servers": [{"addresses": ["#HOST#:9001"], "role":"ROUTE"}, {"addresses": ["#HOST#:9010"], "role":"READ"}, {"addresses": [], "role":"WRITE"}]}} 8 | ?: GOODBYE 9 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v4x3/router_yielding_type_error.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | C: HELLO {"scheme": "basic", "credentials": "c", "principal": "p", "user_agent": "007", "routing": #ROUTINGCTX# , "[patch_bolt]": "*"} 4 | S: SUCCESS {"server": "#SERVER_AGENT#", "connection_id": "bolt-123456789"} 5 | *: RESET 6 | C: ROUTE #ROUTINGCTX# ["foobar"] "*" 7 | S: FAILURE {"code": "Neo.ClientError.Statement.TypeError", "message": "Kaboooom!"} 8 | *: RESET 9 | ?: GOODBYE 10 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v4x3/router_yielding_unknown_failure.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | !: AUTO RESET 3 | 4 | C: HELLO {"scheme": "basic", "credentials": "c", "principal": "p", "user_agent": "007", "routing": #ROUTINGCTX# , "[patch_bolt]": "*"} 5 | S: SUCCESS {"server": "#SERVER_AGENT#", "connection_id": "bolt-123456789"} 6 | C: ROUTE #ROUTINGCTX# [] "*" 7 | S: FAILURE {"code": "Neo.ClientError.General.Unknown", "message": "wut!"} 8 | 9 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v4x4/reader_with_explicit_hello.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | C: HELLO {"scheme": "basic", "credentials": "c", "principal": "p", "user_agent": "007", "routing": #ROUTINGCTX#, "[patch_bolt]": "*"} 4 | S: SUCCESS {"server": "#SERVER_AGENT#", "connection_id": "bolt-123456789"} 5 | *: RESET 6 | C: RUN "RETURN 1 as n" {} {"mode": "r", "db": "adb"} 7 | S: SUCCESS {"fields": ["n"]} 8 | C: PULL {"n": 1000} 9 | S: RECORD [1] 10 | SUCCESS {"type": "r"} 11 | *: RESET 12 | ?: GOODBYE 13 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v4x4/router_yielding_any_security_failure.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | C: HELLO {"scheme": "basic", "credentials": "c", "principal": "p", "user_agent": "007", "routing": #ROUTINGCTX#, "[patch_bolt]": "*"} 4 | S: SUCCESS {"server": "#SERVER_AGENT#", "connection_id": "bolt-123456789"} 5 | *: RESET 6 | C: ROUTE #ROUTINGCTX# ["foobar"] {"[db]": "*"} 7 | S: FAILURE {"code": "Neo.ClientError.Security.MadeUpSecurityError", "message": "I don't know what happened; it's classified as top secret :/"} 8 | *: RESET 9 | ?: GOODBYE 10 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v4x4/router_yielding_argument_error.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | C: HELLO {"scheme": "basic", "credentials": "c", "principal": "p", "user_agent": "007", "routing": #ROUTINGCTX#, "[patch_bolt]": "*"} 4 | S: SUCCESS {"server": "#SERVER_AGENT#", "connection_id": "bolt-123456789"} 5 | *: RESET 6 | C: ROUTE #ROUTINGCTX# ["foobar"] {"[db]": "*"} 7 | S: FAILURE {"code": "Neo.ClientError.Statement.ArgumentError", "message": "Kaboooom."} 8 | *: RESET 9 | ?: GOODBYE 10 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v4x4/router_yielding_authorization_expired_failure.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | C: HELLO {"scheme": "basic", "credentials": "c", "principal": "p", "user_agent": "007", "routing": #ROUTINGCTX#, "[patch_bolt]": "*"} 4 | S: SUCCESS {"server": "#SERVER_AGENT#", "connection_id": "bolt-123456789"} 5 | *: RESET 6 | C: ROUTE #ROUTINGCTX# [] {"[db]": {"U": "*"}} 7 | S: FAILURE {"code": "Neo.ClientError.Security.AuthorizationExpired", "message": "Authorization expired"} 8 | *: RESET 9 | ?: GOODBYE 10 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v4x4/router_yielding_database_unavailable_failure.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | !: AUTO RESET 3 | 4 | C: HELLO {"scheme": "basic", "credentials": "c", "principal": "p", "user_agent": "007", "routing": #ROUTINGCTX#, "[patch_bolt]": "*"} 5 | S: SUCCESS {"server": "#SERVER_AGENT#", "connection_id": "bolt-123456789"} 6 | C: ROUTE #ROUTINGCTX# [] {"[db]": {"U": "*"}} 7 | S: FAILURE {"code": "Neo.TransientError.General.DatabaseUnavailable", "message": "wut!"} 8 | 9 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v4x4/router_yielding_db_not_found_failure.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | C: HELLO {"scheme": "basic", "credentials": "c", "principal": "p", "user_agent": "007", "routing": #ROUTINGCTX#, "[patch_bolt]": "*"} 4 | S: SUCCESS {"server": "#SERVER_AGENT#", "connection_id": "bolt-123456789"} 5 | *: RESET 6 | C: ROUTE #ROUTINGCTX# [] {"db": "adb"} 7 | S: FAILURE {"code": "Neo.ClientError.Database.DatabaseNotFound", "message": "wut!"} 8 | *: RESET 9 | ?: GOODBYE 10 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v4x4/router_yielding_empty_response_then_shuts_down.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | !: AUTO RESET 3 | 4 | C: HELLO {"scheme": "basic", "credentials": "c", "principal": "p", "user_agent": "007", "routing": #ROUTINGCTX#, "[patch_bolt]": "*"} 5 | S: SUCCESS {"server": "#SERVER_AGENT#", "connection_id": "bolt-123456789"} 6 | C: ROUTE #ROUTINGCTX# [] {"db": "adb"} 7 | S: SUCCESS { "rt": { "ttl": 1000, "db": "adb", "servers": []}} 8 | 9 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v4x4/router_yielding_forbidden_failure.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | C: HELLO {"scheme": "basic", "credentials": "c", "principal": "p", "user_agent": "007", "routing": #ROUTINGCTX#, "[patch_bolt]": "*"} 4 | S: SUCCESS {"server": "#SERVER_AGENT#", "connection_id": "bolt-123456789"} 5 | *: RESET 6 | C: ROUTE #ROUTINGCTX# ["foobar"] {"[db]": "*"} 7 | S: FAILURE {"code": "Neo.ClientError.Security.Forbidden", "message": "Thou shalt not pass!"} 8 | *: RESET 9 | ?: GOODBYE 10 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v4x4/router_yielding_invalid_bookmark_mixture_failure.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | C: HELLO {"scheme": "basic", "credentials": "c", "principal": "p", "user_agent": "007", "routing": #ROUTINGCTX#, "[patch_bolt]": "*"} 4 | S: SUCCESS {"server": "#SERVER_AGENT#", "connection_id": "bolt-123456789"} 5 | *: RESET 6 | C: ROUTE #ROUTINGCTX# ["foobar"] {"[db]": "*"} 7 | S: FAILURE {"code": "Neo.ClientError.Transaction.InvalidBookmarkMixture", "message": "Kaboooom."} 8 | *: RESET 9 | ?: GOODBYE 10 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v4x4/router_yielding_invalid_request.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | C: HELLO {"scheme": "basic", "credentials": "c", "principal": "p", "user_agent": "007", "routing": #ROUTINGCTX#, "[patch_bolt]": "*"} 4 | S: SUCCESS {"server": "#SERVER_AGENT#", "connection_id": "bolt-123456789"} 5 | *: RESET 6 | C: ROUTE #ROUTINGCTX# ["foobar"] {"[db]": "*"} 7 | S: FAILURE {"code": "Neo.ClientError.Request.Invalid", "message": "Kaboooom."} 8 | *: RESET 9 | ?: GOODBYE 10 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v4x4/router_yielding_type_error.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | C: HELLO {"scheme": "basic", "credentials": "c", "principal": "p", "user_agent": "007", "routing": #ROUTINGCTX#, "[patch_bolt]": "*"} 4 | S: SUCCESS {"server": "#SERVER_AGENT#", "connection_id": "bolt-123456789"} 5 | *: RESET 6 | C: ROUTE #ROUTINGCTX# ["foobar"] {"[db]": "*"} 7 | S: FAILURE {"code": "Neo.ClientError.Statement.TypeError", "message": "Kaboooom."} 8 | *: RESET 9 | ?: GOODBYE 10 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v4x4/router_yielding_unknown_failure.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | !: AUTO RESET 3 | 4 | C: HELLO {"scheme": "basic", "credentials": "c", "principal": "p", "user_agent": "007", "routing": #ROUTINGCTX#, "[patch_bolt]": "*"} 5 | S: SUCCESS {"server": "#SERVER_AGENT#", "connection_id": "bolt-123456789"} 6 | C: ROUTE #ROUTINGCTX# [] {"[db]": {"U": "*"}} 7 | S: FAILURE {"code": "Neo.ClientError.General.Unknown", "message": "wut!"} 8 | 9 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v5x0/empty_reader.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | ?: GOODBYE 6 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v5x0/reader.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN "RETURN 1 as n" {} {"mode": "r", "db": "adb"} 6 | S: SUCCESS {"fields": ["n"]} 7 | C: PULL {"n": 1000} 8 | S: RECORD [1] 9 | SUCCESS {"type": "r"} 10 | *: RESET 11 | ?: GOODBYE 12 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v5x0/reader_default_db.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN "RETURN 1 as n" {} {"mode": "r", "db": "homedb"} 6 | S: SUCCESS {"fields": ["n"]} 7 | C: PULL {"n": 1000} 8 | S: RECORD [1] 9 | SUCCESS {"type": "r"} 10 | *: RESET 11 | ?: GOODBYE 12 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v5x0/reader_tx.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {"mode": "r", "db": "adb"} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 as n" {} {} 8 | S: SUCCESS {"fields": ["n"]} 9 | C: PULL {"n": 1000} 10 | S: RECORD [1] 11 | SUCCESS {"type": "r"} 12 | C: COMMIT 13 | S: SUCCESS {} 14 | *: RESET 15 | ?: GOODBYE 16 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v5x0/reader_tx_default_db.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {"mode": "r", "db": "homedb"} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 as n" {} {} 8 | S: SUCCESS {"fields": ["n"]} 9 | C: PULL {"n": 1000} 10 | S: RECORD [1] 11 | SUCCESS {"type": "r"} 12 | C: COMMIT 13 | S: SUCCESS {} 14 | *: RESET 15 | ?: GOODBYE 16 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v5x0/reader_tx_with_bookmarks.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {"mode": "r", "db": "adb", "bookmarks": ["OldBookmark"]} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 as n" {} {} 8 | S: SUCCESS {"fields": ["n"]} 9 | C: PULL {"n": 1000} 10 | S: RECORD [1] 11 | SUCCESS {"type": "r"} 12 | C: COMMIT 13 | S: SUCCESS {"bookmark": "NewBookmark"} 14 | *: RESET 15 | ?: GOODBYE 16 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v5x0/reader_tx_with_exit.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {"mode": "r", "db": "adb"} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 as n" {} {} 8 | S: SUCCESS {"fields": ["n"]} 9 | C: PULL {"n": 1000} 10 | S: RECORD [1] 11 | SUCCESS {"type": "r"} 12 | C: COMMIT 13 | S: SUCCESS {} 14 | 15 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v5x0/reader_tx_with_unexpected_interruption_on_pipelined_pull.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {"mode": "r", "db": "adb"} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 as n" {} {} 8 | PULL {"n": 1000} 9 | S: 10 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v5x0/reader_tx_with_unexpected_interruption_on_pull.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {"mode": "r", "db": "adb"} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 as n" {} {} 8 | S: SUCCESS {} 9 | C: PULL {"n": 1000} 10 | S: 11 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v5x0/reader_tx_with_unexpected_interruption_on_run.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {"mode": "r", "db": "adb"} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 as n" {} {} 8 | S: 9 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v5x0/reader_tx_with_unexpected_interruption_on_second_run.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {"mode": "r", "db": "adb"} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 as n" {} {} 8 | S: SUCCESS {"fields": ["n"]} 9 | C: PULL {"n": 1000} 10 | S: RECORD [1] 11 | SUCCESS {"type": "r"} 12 | C: COMMIT 13 | S: SUCCESS {} 14 | *: RESET 15 | C: BEGIN {"mode": "r", "db": "adb"} 16 | S: SUCCESS {} 17 | C: RUN "RETURN 1 as n" {} {} 18 | S: 19 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v5x0/reader_with_bookmarks.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN "RETURN 1 as n" {} {"mode": "r", "db": "adb", "bookmarks{}": ["sys:1234", "foo:5678"]} 6 | S: SUCCESS {"fields": ["n"]} 7 | C: PULL {"n": 1000} 8 | S: RECORD [1] 9 | SUCCESS {"type": "r", "bookmark": "foo:6678"} 10 | *: RESET 11 | ?: GOODBYE 12 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v5x0/reader_with_explicit_hello.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | C: HELLO {"scheme": "basic", "credentials": "c", "principal": "p", "user_agent": "007", "routing": #ROUTINGCTX#} 4 | S: SUCCESS {"server": "#SERVER_AGENT#", "connection_id": "bolt-123456789"} 5 | *: RESET 6 | C: RUN "RETURN 1 as n" {} {"mode": "r", "db": "adb"} 7 | S: SUCCESS {"fields": ["n"]} 8 | C: PULL {"n": 1000} 9 | S: RECORD [1] 10 | SUCCESS {"type": "r"} 11 | *: RESET 12 | ?: GOODBYE 13 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v5x0/reader_with_unexpected_interruption_on_pipelined_pull.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN "RETURN 1 as n" {} {"mode": "r", "db": "adb"} 6 | PULL {"n": 1000} 7 | S: 8 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v5x0/reader_with_unexpected_interruption_on_run.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN "RETURN 1 as n" {} {"mode": "r", "db": "adb"} 6 | S: 7 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v5x0/router_yielding_any_security_failure.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | C: HELLO {"scheme": "basic", "credentials": "c", "principal": "p", "user_agent": "007", "routing": #ROUTINGCTX#} 4 | S: SUCCESS {"server": "#SERVER_AGENT#", "connection_id": "bolt-123456789"} 5 | *: RESET 6 | C: ROUTE #ROUTINGCTX# ["foobar"] {"[db]": "*"} 7 | S: FAILURE {"code": "Neo.ClientError.Security.MadeUpSecurityError", "message": "I don't know what happened; it's classified as top secret :/"} 8 | *: RESET 9 | ?: GOODBYE 10 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v5x0/router_yielding_argument_error.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | C: HELLO {"scheme": "basic", "credentials": "c", "principal": "p", "user_agent": "007", "routing": #ROUTINGCTX#} 4 | S: SUCCESS {"server": "#SERVER_AGENT#", "connection_id": "bolt-123456789"} 5 | *: RESET 6 | C: ROUTE #ROUTINGCTX# ["foobar"] {"[db]": "*"} 7 | S: FAILURE {"code": "Neo.ClientError.Statement.ArgumentError", "message": "Kaboooom."} 8 | *: RESET 9 | ?: GOODBYE 10 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v5x0/router_yielding_authorization_expired_failure.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | C: HELLO {"scheme": "basic", "credentials": "c", "principal": "p", "user_agent": "007", "routing": #ROUTINGCTX#} 4 | S: SUCCESS {"server": "#SERVER_AGENT#", "connection_id": "bolt-123456789"} 5 | *: RESET 6 | C: ROUTE #ROUTINGCTX# [] {"[db]": {"U": "*"}} 7 | S: FAILURE {"code": "Neo.ClientError.Security.AuthorizationExpired", "message": "Authorization expired"} 8 | *: RESET 9 | ?: GOODBYE 10 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v5x0/router_yielding_database_unavailable_failure.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | !: AUTO RESET 3 | 4 | C: HELLO {"scheme": "basic", "credentials": "c", "principal": "p", "user_agent": "007", "routing": #ROUTINGCTX#, "[patch_bolt]": "*"} 5 | S: SUCCESS {"server": "#SERVER_AGENT#", "connection_id": "bolt-123456789"} 6 | C: ROUTE #ROUTINGCTX# [] {"[db]": {"U": "*"}} 7 | S: FAILURE {"code": "Neo.TransientError.General.DatabaseUnavailable", "message": "wut!"} 8 | 9 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v5x0/router_yielding_db_not_found_failure.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | C: HELLO {"scheme": "basic", "credentials": "c", "principal": "p", "user_agent": "007", "routing": #ROUTINGCTX#} 4 | S: SUCCESS {"server": "#SERVER_AGENT#", "connection_id": "bolt-123456789"} 5 | *: RESET 6 | C: ROUTE #ROUTINGCTX# [] {"db": "adb"} 7 | S: FAILURE {"code": "Neo.ClientError.Database.DatabaseNotFound", "message": "wut!"} 8 | *: RESET 9 | ?: GOODBYE 10 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v5x0/router_yielding_empty_response_then_shuts_down.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | !: AUTO RESET 3 | 4 | C: HELLO {"scheme": "basic", "credentials": "c", "principal": "p", "user_agent": "007", "routing": #ROUTINGCTX#} 5 | S: SUCCESS {"server": "#SERVER_AGENT#", "connection_id": "bolt-123456789"} 6 | C: ROUTE #ROUTINGCTX# [] {"db": "adb"} 7 | S: SUCCESS { "rt": { "ttl": 1000, "db": "adb", "servers": []}} 8 | 9 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v5x0/router_yielding_forbidden_failure.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | C: HELLO {"scheme": "basic", "credentials": "c", "principal": "p", "user_agent": "007", "routing": #ROUTINGCTX#} 4 | S: SUCCESS {"server": "#SERVER_AGENT#", "connection_id": "bolt-123456789"} 5 | *: RESET 6 | C: ROUTE #ROUTINGCTX# ["foobar"] {"[db]": "*"} 7 | S: FAILURE {"code": "Neo.ClientError.Security.Forbidden", "message": "Thou shalt not pass!"} 8 | *: RESET 9 | ?: GOODBYE 10 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v5x0/router_yielding_invalid_bookmark_failure.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | C: HELLO {"scheme": "basic", "credentials": "c", "principal": "p", "user_agent": "007", "routing": #ROUTINGCTX#} 4 | S: SUCCESS {"server": "#SERVER_AGENT#", "connection_id": "bolt-123456789"} 5 | *: RESET 6 | C: ROUTE #ROUTINGCTX# ["foobar"] {"[db]": "*"} 7 | S: FAILURE {"code": "Neo.ClientError.Transaction.InvalidBookmark", "message": "Supplied bookmarks 'foobar' does not conform to pattern {database_id}:{tx_id}."} 8 | *: RESET 9 | ?: GOODBYE 10 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v5x0/router_yielding_invalid_bookmark_mixture_failure.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | C: HELLO {"scheme": "basic", "credentials": "c", "principal": "p", "user_agent": "007", "routing": #ROUTINGCTX#} 4 | S: SUCCESS {"server": "#SERVER_AGENT#", "connection_id": "bolt-123456789"} 5 | *: RESET 6 | C: ROUTE #ROUTINGCTX# ["foobar"] {"[db]": "*"} 7 | S: FAILURE {"code": "Neo.ClientError.Transaction.InvalidBookmarkMixture", "message": "Kaboooom."} 8 | *: RESET 9 | ?: GOODBYE 10 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v5x0/router_yielding_invalid_request.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | C: HELLO {"scheme": "basic", "credentials": "c", "principal": "p", "user_agent": "007", "routing": #ROUTINGCTX#} 4 | S: SUCCESS {"server": "#SERVER_AGENT#", "connection_id": "bolt-123456789"} 5 | *: RESET 6 | C: ROUTE #ROUTINGCTX# ["foobar"] {"[db]": "*"} 7 | S: FAILURE {"code": "Neo.ClientError.Request.Invalid", "message": "Kaboooom."} 8 | *: RESET 9 | ?: GOODBYE 10 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v5x0/router_yielding_no_readers_any_db.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | !: AUTO RESET 3 | 4 | A: HELLO {"{}": "*"} 5 | C: ROUTE #ROUTINGCTX# [] {"[db]": {"U": "*"}} 6 | S: SUCCESS { "rt": { "ttl": 1000, "db": "any-db", "servers": [{"addresses": ["#HOST#:9000"], "role":"ROUTE"}, {"addresses": [], "role":"READ"}, {"addresses": ["#HOST#:9000"], "role":"WRITE"}]}} 7 | ?: GOODBYE 8 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v5x0/router_yielding_type_error.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | C: HELLO {"scheme": "basic", "credentials": "c", "principal": "p", "user_agent": "007", "routing": #ROUTINGCTX#} 4 | S: SUCCESS {"server": "#SERVER_AGENT#", "connection_id": "bolt-123456789"} 5 | *: RESET 6 | C: ROUTE #ROUTINGCTX# ["foobar"] {"[db]": "*"} 7 | S: FAILURE {"code": "Neo.ClientError.Statement.TypeError", "message": "Kaboooom."} 8 | *: RESET 9 | ?: GOODBYE 10 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v5x0/router_yielding_unknown_failure.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | !: AUTO RESET 3 | 4 | C: HELLO {"scheme": "basic", "credentials": "c", "principal": "p", "user_agent": "007", "routing": #ROUTINGCTX#} 5 | S: SUCCESS {"server": "#SERVER_AGENT#", "connection_id": "bolt-123456789"} 6 | C: ROUTE #ROUTINGCTX# [] {"[db]": {"U": "*"}} 7 | S: FAILURE {"code": "Neo.ClientError.General.Unknown", "message": "wut!"} 8 | 9 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v5x0/writer.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN "RETURN 1 as n" {} {"db": "adb"} 6 | S: SUCCESS {"fields": ["n"]} 7 | C: PULL {"n": 1000} 8 | S: RECORD [1] 9 | SUCCESS {"type": "w"} 10 | *: RESET 11 | ?: GOODBYE 12 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v5x0/writer_tx.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {"db": "adb"} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 as n" {} {} 8 | S: SUCCESS {"fields": ["n"]} 9 | C: PULL {"n": 1000} 10 | S: SUCCESS {"type": "r"} 11 | C: COMMIT 12 | S: SUCCESS {} 13 | *: RESET 14 | ?: GOODBYE 15 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v5x0/writer_tx_with_bookmarks.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {"db": "adb", "bookmarks": ["OldBookmark"]} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 as n" {} {} 8 | S: SUCCESS {"fields": ["n"]} 9 | C: PULL {"n": 1000} 10 | S: SUCCESS {"type": "r"} 11 | C: COMMIT 12 | S: SUCCESS {"bookmark": "NewBookmark"} 13 | *: RESET 14 | ?: GOODBYE 15 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v5x0/writer_tx_with_unexpected_interruption_on_pipelined_pull.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {"db": "adb"} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 as n" {} {} 8 | PULL {"n": 1000} 9 | S: 10 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v5x0/writer_tx_with_unexpected_interruption_on_pull.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {"db": "adb"} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 as n" {} {} 8 | S: SUCCESS {} 9 | C: PULL {"n": 1000} 10 | S: 11 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v5x0/writer_tx_with_unexpected_interruption_on_run.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {"db": "adb"} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 as n" {} {} 8 | S: 9 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v5x0/writer_tx_yielding_database_unavailable_failure.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {"db": "adb"} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 as n" {} {} 8 | S: SUCCESS {} 9 | C: PULL {"n": 1000} 10 | S: FAILURE {"code": "Neo.TransientError.General.DatabaseUnavailable", "message": "Database is busy doing store copy"} 11 | C: RESET 12 | S: SUCCESS {} 13 | *: RESET 14 | ?: GOODBYE 15 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v5x0/writer_tx_yielding_database_unavailable_failure_on_commit.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {"db": "adb"} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 as n" {} {} 8 | S: SUCCESS {"fields": ["n"]} 9 | C: PULL {"n": 1000} 10 | S: SUCCESS {"type": "r"} 11 | C: COMMIT 12 | S: FAILURE {"code": "Neo.TransientError.General.DatabaseUnavailable", "message": "Database shut down."} 13 | 14 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v5x0/writer_tx_yielding_failure_on_run.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {"db": "adb"} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 as n" {} {} 8 | S: FAILURE #FAILURE# 9 | {? 10 | C: PULL {"n": 1000} 11 | S: IGNORED 12 | ?} 13 | C: RESET 14 | S: SUCCESS {} 15 | *: RESET 16 | ?: GOODBYE 17 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v5x0/writer_with_bookmark.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN "RETURN 1 as n" {} {"db": "adb", "bookmarks": ["NewBookmark"]} 6 | S: SUCCESS {"fields": ["n"]} 7 | C: PULL {"n": 1000} 8 | S: RECORD [1] 9 | SUCCESS {"type": "w"} 10 | *: RESET 11 | ?: GOODBYE 12 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v5x0/writer_with_unexpected_interruption_on_pipelined_pull.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN "RETURN 1 as n" {} {"db": "adb"} 6 | PULL {"n": 1000} 7 | S: 8 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v5x0/writer_with_unexpected_interruption_on_pull.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN "RETURN 1 as n" {} {"db": "adb"} 6 | S: SUCCESS {} 7 | C: PULL {"n": 1000} 8 | S: 9 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v5x0/writer_with_unexpected_interruption_on_run.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN "RETURN 1 as n" {} {"db": "adb"} 6 | S: 7 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v5x0/writer_with_unexpected_interruption_on_second_run.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN "RETURN 1 as n" {} {"db": "adb"} 6 | S: SUCCESS {"fields": ["n"]} 7 | C: PULL {"n": 1000} 8 | S: RECORD [1] 9 | SUCCESS {"type": "w"} 10 | *: RESET 11 | C: RUN "RETURN 1 as n" {} {"db": "adb"} 12 | S: 13 | -------------------------------------------------------------------------------- /tests/stub/routing/scripts/v5x0/writer_yielding_failure_on_2nd_run.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | 6 | C: RUN "RETURN 1 AS n" {} {"db": "adb"} 7 | S: SUCCESS {"fields": ["n"]} 8 | C: PULL {"n": 1000} 9 | S: RECORD [1] 10 | SUCCESS {"type": "r"} 11 | 12 | *: RESET 13 | 14 | C: RUN "RETURN 1 AS n" {} {"db": "bdb"} 15 | S: FAILURE #FAILURE# 16 | {? 17 | # Drivers might pipeline RUN and PULL 18 | C: PULL {"n": 1000} 19 | S: IGNORED 20 | ?} 21 | 22 | *: RESET 23 | ?: GOODBYE 24 | -------------------------------------------------------------------------------- /tests/stub/server_side_routing/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neo4j-drivers/testkit/cbc816c9dbfe039c74e5f7a8104e3323c4d7dbf1/tests/stub/server_side_routing/__init__.py -------------------------------------------------------------------------------- /tests/stub/server_side_routing/scripts/direct_connection_without_routing_ssr.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | C: HELLO {"scheme": "basic", "credentials": "c", "principal": "p", "user_agent": "007", "[routing]": null, "[realm]": "", "[patch_bolt]": "*"} 4 | S: SUCCESS {"server": "Neo4j/4.0.0", "connection_id": "bolt-123456789"} 5 | *: RESET 6 | C: RUN "RETURN 1 AS n" {} {} 7 | S: SUCCESS {"fields": ["n"]} 8 | C: PULL {"n": 1000} 9 | S: SUCCESS {"type": "w"} 10 | *: RESET 11 | ?: GOODBYE 12 | -------------------------------------------------------------------------------- /tests/stub/session_run/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neo4j-drivers/testkit/cbc816c9dbfe039c74e5f7a8104e3323c4d7dbf1/tests/stub/session_run/__init__.py -------------------------------------------------------------------------------- /tests/stub/session_run/scripts/session_discard_result.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN {"U": "*"} {"{}": "*"} {"{}": "*"} 6 | S: SUCCESS {"fields": ["n"]} 7 | {* 8 | C: PULL {"n": {"Z": "*"}, "[qid]": -1} 9 | S: RECORD [1] 10 | RECORD [2] 11 | SUCCESS {"type": "r", "has_more": true} 12 | *} 13 | C: DISCARD {"n": -1, "[qid]": -1} 14 | S: SUCCESS {} 15 | *: RESET 16 | ?: GOODBYE 17 | -------------------------------------------------------------------------------- /tests/stub/session_run/scripts/session_error_on_run.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN {"U": "*"} {"{}": "*"} {"{}": "*"} 6 | S: FAILURE {"code": "Neo.ClientError.MadeUp.Code", "message": "Something went wrong..."} 7 | {? 8 | # For drivers that pipeline a PULL after RUN 9 | C: PULL {"n": {"Z": "*"}} 10 | S: IGNORED 11 | ?} 12 | +: RESET 13 | ?: GOODBYE 14 | -------------------------------------------------------------------------------- /tests/stub/session_run_parameters/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neo4j-drivers/testkit/cbc816c9dbfe039c74e5f7a8104e3323c4d7dbf1/tests/stub/session_run_parameters/__init__.py -------------------------------------------------------------------------------- /tests/stub/session_run_parameters/scripts/access_mode_read.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN "RETURN 1 as n" {} {"mode": "r"} 6 | S: SUCCESS {"fields": ["n"]} 7 | C: PULL {"n": 1000} 8 | S: RECORD [1] 9 | SUCCESS {"type": "r"} 10 | *: RESET 11 | ?: GOODBYE 12 | -------------------------------------------------------------------------------- /tests/stub/session_run_parameters/scripts/access_mode_read_homedb.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN "RETURN 1 as n" {} {"mode": "r", "db": "homedb"} 6 | S: SUCCESS {"fields": ["n"]} 7 | C: PULL {"n": 1000} 8 | S: RECORD [1] 9 | SUCCESS {"type": "r"} 10 | *: RESET 11 | ?: GOODBYE 12 | -------------------------------------------------------------------------------- /tests/stub/session_run_parameters/scripts/access_mode_write.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN "RETURN 1 as n" {} {} 6 | S: SUCCESS {"fields": ["n"]} 7 | C: PULL {"n": 1000} 8 | S: RECORD [1] 9 | SUCCESS {"type": "w"} 10 | *: RESET 11 | ?: GOODBYE 12 | -------------------------------------------------------------------------------- /tests/stub/session_run_parameters/scripts/access_mode_write_homedb.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN "RETURN 1 as n" {} {"db": "homedb"} 6 | S: SUCCESS {"fields": ["n"]} 7 | C: PULL {"n": 1000} 8 | S: RECORD [1] 9 | SUCCESS {"type": "w"} 10 | *: RESET 11 | ?: GOODBYE 12 | -------------------------------------------------------------------------------- /tests/stub/session_run_parameters/scripts/adb.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN "RETURN 1 as n" {} {"db": "adb"} 6 | S: SUCCESS {"fields": ["n"]} 7 | C: PULL {"n": 1000} 8 | S: RECORD [1] 9 | SUCCESS {"type": "w"} 10 | *: RESET 11 | ?: GOODBYE 12 | -------------------------------------------------------------------------------- /tests/stub/session_run_parameters/scripts/bookmarks.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN "RETURN 1 as n" {} {"bookmarks{}": ["b1", "b2"]} 6 | S: SUCCESS {"fields": ["n"]} 7 | C: PULL {"n": 1000} 8 | S: RECORD [1] 9 | SUCCESS {"type": "w"} 10 | *: RESET 11 | ?: GOODBYE 12 | -------------------------------------------------------------------------------- /tests/stub/session_run_parameters/scripts/bookmarks_homedb.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN "RETURN 1 as n" {} {"bookmarks{}": ["b1", "b2"], "db": "homedb"} 6 | S: SUCCESS {"fields": ["n"]} 7 | C: PULL {"n": 1000} 8 | S: RECORD [1] 9 | SUCCESS {"type": "w"} 10 | *: RESET 11 | ?: GOODBYE 12 | -------------------------------------------------------------------------------- /tests/stub/session_run_parameters/scripts/combined.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN "RETURN 1 as n" {"p": 1} {"bookmarks": ["b0"], "tx_metadata": {"k": "v"}, "mode": "r", "tx_timeout": 11, "imp_user": "that-other-dude", "db": "adb"} 6 | S: SUCCESS {"fields": ["n"]} 7 | C: PULL {"n": 1000} 8 | S: RECORD [1] 9 | SUCCESS {"type": "w"} 10 | *: RESET 11 | ?: GOODBYE 12 | -------------------------------------------------------------------------------- /tests/stub/session_run_parameters/scripts/empty_query.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN "" "*" "*" 6 | S: SUCCESS {"fields": ["n"]} 7 | C: PULL "*" 8 | S: SUCCESS {"type": "w"} 9 | *: RESET 10 | ?: GOODBYE 11 | -------------------------------------------------------------------------------- /tests/stub/session_run_parameters/scripts/empty_query_homedb.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN "" "*" "*" 6 | S: SUCCESS {"fields": ["n"]} 7 | C: PULL "*" 8 | S: SUCCESS {"type": "w"} 9 | *: RESET 10 | ?: GOODBYE 11 | -------------------------------------------------------------------------------- /tests/stub/session_run_parameters/scripts/imp_user.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN "RETURN 1 as n" {} {"imp_user": "that-other-dude"} 6 | S: SUCCESS {"fields": ["n"]} 7 | C: PULL {"n": 1000} 8 | S: RECORD [1] 9 | SUCCESS {"type": "w"} 10 | *: RESET 11 | ?: GOODBYE 12 | -------------------------------------------------------------------------------- /tests/stub/session_run_parameters/scripts/imp_user_homedb.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN "RETURN 1 as n" {} {"imp_user": "that-other-dude", "db": "homedb"} 6 | S: SUCCESS {"fields": ["n"]} 7 | C: PULL {"n": 1000} 8 | S: RECORD [1] 9 | SUCCESS {"type": "w"} 10 | *: RESET 11 | ?: GOODBYE 12 | -------------------------------------------------------------------------------- /tests/stub/session_run_parameters/scripts/imp_user_v4x3.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.3 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | # Impersonation is not a feature that bolt 4.3 supports. However, this server 6 | # understands it anyway. This way, we can check that the driver raises the 7 | # problem even before contacting the server. 8 | C: RUN "RETURN 1 as n" {} {"imp_user": "that-other-dude"} 9 | S: SUCCESS {"fields": ["n"]} 10 | C: PULL {"n": 1000} 11 | S: RECORD [1] 12 | SUCCESS {"type": "w"} 13 | *: RESET 14 | ?: GOODBYE 15 | -------------------------------------------------------------------------------- /tests/stub/session_run_parameters/scripts/imp_user_v4x3_homedb.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.3 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | # Impersonation is not a feature that bolt 4.3 supports. However, this server 6 | # understands it anyway. This way, we can check that the driver raises the 7 | # problem even before contacting the server. 8 | C: RUN "RETURN 1 as n" {} {"imp_user": "that-other-dude", "db": "homedb"} 9 | S: SUCCESS {"fields": ["n"]} 10 | C: PULL {"n": 1000} 11 | S: RECORD [1] 12 | SUCCESS {"type": "w"} 13 | *: RESET 14 | ?: GOODBYE 15 | -------------------------------------------------------------------------------- /tests/stub/session_run_parameters/scripts/parameters.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN "RETURN 1 as n" {"p": 1} {"[mode]": "w"} 6 | S: SUCCESS {"fields": ["n"]} 7 | C: PULL {"n": 1000} 8 | S: RECORD [1] 9 | SUCCESS {"type": "w"} 10 | *: RESET 11 | ?: GOODBYE 12 | -------------------------------------------------------------------------------- /tests/stub/session_run_parameters/scripts/parameters_homedb.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN "RETURN 1 as n" {"p": 1} {"[mode]": "w", "db": "homedb"} 6 | S: SUCCESS {"fields": ["n"]} 7 | C: PULL {"n": 1000} 8 | S: RECORD [1] 9 | SUCCESS {"type": "w"} 10 | *: RESET 11 | ?: GOODBYE 12 | -------------------------------------------------------------------------------- /tests/stub/session_run_parameters/scripts/router_adb.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | !: AUTO RESET 3 | !: AUTO GOODBYE 4 | !: ALLOW CONCURRENT 5 | 6 | A: HELLO {"{}": "*"} 7 | {* 8 | C: ROUTE {"{}": "*"} {"[]": "*"} {"db": "adb"} 9 | S: SUCCESS { "rt": { "ttl": 1000, "db": "adb", "servers": [{"addresses": ["#HOST#:9000"], "role":"ROUTE"}, {"addresses": ["#HOST#:9001"], "role":"READ"}, {"addresses": ["#HOST#:9001"], "role":"WRITE"}]}} 10 | *} 11 | -------------------------------------------------------------------------------- /tests/stub/session_run_parameters/scripts/router_adb_impersonation.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | !: AUTO RESET 3 | !: AUTO GOODBYE 4 | !: ALLOW CONCURRENT 5 | 6 | A: HELLO {"{}": "*"} 7 | {* 8 | C: ROUTE {"{}": "*"} {"[]": "*"} {"db": "adb", "[imp_user]": "that-other-dude"} 9 | S: SUCCESS { "rt": { "ttl": 1000, "db": "adb", "servers": [{"addresses": ["#HOST#:9000"], "role":"ROUTE"}, {"addresses": ["#HOST#:9001"], "role":"READ"}, {"addresses": ["#HOST#:9001"], "role":"WRITE"}]}} 10 | *} 11 | -------------------------------------------------------------------------------- /tests/stub/session_run_parameters/scripts/router_default_db.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | !: AUTO RESET 3 | !: AUTO GOODBYE 4 | !: ALLOW CONCURRENT 5 | 6 | A: HELLO {"{}": "*"} 7 | {* 8 | C: ROUTE {"{}": "*"} {"[]": "*"} {} 9 | S: SUCCESS { "rt": { "ttl": 1000, "db": "homedb", "servers": [{"addresses": ["#HOST#:9000"], "role":"ROUTE"}, {"addresses": ["#HOST#:9001"], "role":"READ"}, {"addresses": ["#HOST#:9001"], "role":"WRITE"}]}} 10 | *} 11 | -------------------------------------------------------------------------------- /tests/stub/session_run_parameters/scripts/router_default_db_impersonation.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | !: AUTO RESET 3 | !: AUTO GOODBYE 4 | !: ALLOW CONCURRENT 5 | 6 | A: HELLO {"{}": "*"} 7 | {* 8 | C: ROUTE {"{}": "*"} {"[]": "*"} {"imp_user": "that-other-dude"} 9 | S: SUCCESS { "rt": { "ttl": 1000, "db": "homedb", "servers": [{"addresses": ["#HOST#:9000"], "role":"ROUTE"}, {"addresses": ["#HOST#:9001"], "role":"READ"}, {"addresses": ["#HOST#:9001"], "role":"WRITE"}]}} 10 | *} 11 | -------------------------------------------------------------------------------- /tests/stub/session_run_parameters/scripts/timeout_-1.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | # We expect the driver to not even try this. So should it do so nonetheless, 6 | # we will let is pass to not cause any error. The error should be generated 7 | # inside the driver. 8 | C: BEGIN {"[tx_timeout]": "*"} 9 | S: SUCCESS {"fields": ["n"]} 10 | C: PULL {"n": 1000} 11 | S: RECORD [1] 12 | SUCCESS {"type": "w"} 13 | *: RESET 14 | ?: GOODBYE 15 | -------------------------------------------------------------------------------- /tests/stub/session_run_parameters/scripts/timeout_0.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN "RETURN 1 as n" {} {"tx_timeout": 0} 6 | S: SUCCESS {"fields": ["n"]} 7 | C: PULL {"n": 1000} 8 | S: RECORD [1] 9 | SUCCESS {"type": "w"} 10 | *: RESET 11 | ?: GOODBYE 12 | -------------------------------------------------------------------------------- /tests/stub/session_run_parameters/scripts/timeout_17.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN "RETURN 1 as n" {} {"tx_timeout": 17} 6 | S: SUCCESS {"fields": ["n"]} 7 | C: PULL {"n": 1000} 8 | S: RECORD [1] 9 | SUCCESS {"type": "w"} 10 | *: RESET 11 | ?: GOODBYE 12 | -------------------------------------------------------------------------------- /tests/stub/session_run_parameters/scripts/timeout_17_homedb.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN "RETURN 1 as n" {} {"tx_timeout": 17, "db": "homedb"} 6 | S: SUCCESS {"fields": ["n"]} 7 | C: PULL {"n": 1000} 8 | S: RECORD [1] 9 | SUCCESS {"type": "w"} 10 | *: RESET 11 | ?: GOODBYE 12 | -------------------------------------------------------------------------------- /tests/stub/session_run_parameters/scripts/timeout_null.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN "RETURN 1 as n" {} {"[tx_timeout]": null} 6 | S: SUCCESS {"fields": ["n"]} 7 | C: PULL {"n": 1000} 8 | S: RECORD [1] 9 | SUCCESS {"type": "w"} 10 | *: RESET 11 | ?: GOODBYE 12 | -------------------------------------------------------------------------------- /tests/stub/session_run_parameters/scripts/tx_meta.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN "RETURN 1 as n" {} {"tx_metadata": {"akey": "aval"}} 6 | S: SUCCESS {"fields": ["n"]} 7 | C: PULL {"n": 1000} 8 | S: RECORD [1] 9 | SUCCESS {"type": "w"} 10 | *: RESET 11 | ?: GOODBYE 12 | -------------------------------------------------------------------------------- /tests/stub/session_run_parameters/scripts/tx_meta_homedb.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN "RETURN 1 as n" {} {"tx_metadata": {"akey": "aval"}, "db": "homedb"} 6 | S: SUCCESS {"fields": ["n"]} 7 | C: PULL {"n": 1000} 8 | S: RECORD [1] 9 | SUCCESS {"type": "w"} 10 | *: RESET 11 | ?: GOODBYE 12 | -------------------------------------------------------------------------------- /tests/stub/summary/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neo4j-drivers/testkit/cbc816c9dbfe039c74e5f7a8104e3323c4d7dbf1/tests/stub/summary/__init__.py -------------------------------------------------------------------------------- /tests/stub/summary/scripts/v4x4/empty_summary_no_type.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN "*" "*" "*" 6 | S: SUCCESS {"t_first": 2001, "fields": ["n"]} 7 | {{ 8 | {+ 9 | C: PULL {"n": 1} 10 | S: RECORD [1] 11 | S: SUCCESS {"has_more": true} 12 | +} 13 | C: DISCARD {"n": -1} 14 | ---- 15 | C: PULL {"n": "*"} 16 | S: RECORD [1] 17 | ---- 18 | C: DISCARD {"n": -1} 19 | }} 20 | S: SUCCESS {"db": "apple", "t_last": 2002, "stats": {}} 21 | *: RESET 22 | ?: GOODBYE 23 | -------------------------------------------------------------------------------- /tests/stub/summary/scripts/v4x4/empty_summary_type_r_no_data.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN "*" "*" "*" 6 | S: SUCCESS {"t_first": 2001, "fields": ["n"]} 7 | {{ 8 | C: PULL {"n": "*"} 9 | ---- 10 | C: DISCARD {"n": -1} 11 | }} 12 | S: SUCCESS {"type": "r", "db": "apple", "t_last": 2002, "stats": {}} 13 | *: RESET 14 | ?: GOODBYE 15 | -------------------------------------------------------------------------------- /tests/stub/summary/scripts/v4x4/no_summary.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN "*" "*" "*" 6 | S: SUCCESS {"fields": ["n"]} 7 | {{ 8 | {+ 9 | C: PULL {"n": 1} 10 | S: RECORD [1] 11 | S: SUCCESS {"has_more": true} 12 | +} 13 | C: DISCARD {"n": -1} 14 | ---- 15 | C: PULL {"n": "*"} 16 | S: RECORD [1] 17 | ---- 18 | C: DISCARD {"n": -1} 19 | }} 20 | S: SUCCESS {"type": "r", "db": "apple"} 21 | *: RESET 22 | ?: GOODBYE 23 | -------------------------------------------------------------------------------- /tests/stub/summary/scripts/v4x4/summary_with_notifications_no_data.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN "*" "*" "*" 6 | S: SUCCESS {"t_first": 2001, "fields": ["n"]} 7 | {{ 8 | C: PULL {"n": "*"} 9 | ---- 10 | C: DISCARD {"n": -1} 11 | }} 12 | S: SUCCESS {"type": "r", "db": "apple", "t_last": 2002, "notifications": #NOTIFICATIONS#} 13 | *: RESET 14 | ?: GOODBYE 15 | -------------------------------------------------------------------------------- /tests/stub/summary/scripts/v4x4/summary_with_notifications_omitted_result.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN "*" "*" "*" 6 | S: SUCCESS {"t_first": 2001, "fields": []} 7 | {{ 8 | C: PULL {"n": "*"} 9 | ---- 10 | C: DISCARD {"n": -1} 11 | }} 12 | S: SUCCESS {"type": "r", "db": "apple", "t_last": 2002, "notifications": #NOTIFICATIONS#} 13 | *: RESET 14 | ?: GOODBYE 15 | -------------------------------------------------------------------------------- /tests/stub/summary/scripts/v5x6/empty_summary_type_r_no_data.script: -------------------------------------------------------------------------------- 1 | !: BOLT 5.6 2 | 3 | A: HELLO {"{}": "*"} 4 | A: LOGON {"{}": "*"} 5 | *: RESET 6 | C: RUN "*" "*" "*" 7 | S: SUCCESS {"t_first": 2001, "fields": ["n"]} 8 | {{ 9 | C: PULL {"n": "*"} 10 | ---- 11 | C: DISCARD {"n": -1} 12 | }} 13 | S: SUCCESS {"type": "r", "db": "apple", "t_last": 2002, "stats": {}, "statuses": [{"gql_status": "02000", "status_description": "note: no data"}]} 14 | *: RESET 15 | ?: GOODBYE 16 | -------------------------------------------------------------------------------- /tests/stub/summary/scripts/v5x6/empty_summary_type_r_omitted_result.script: -------------------------------------------------------------------------------- 1 | !: BOLT 5.6 2 | 3 | A: HELLO {"{}": "*"} 4 | A: LOGON {"{}": "*"} 5 | *: RESET 6 | C: RUN "*" "*" "*" 7 | S: SUCCESS {"t_first": 2001, "fields": []} 8 | {{ 9 | C: PULL {"n": "*"} 10 | ---- 11 | C: DISCARD {"n": -1} 12 | }} 13 | S: SUCCESS {"type": "r", "db": "apple", "t_last": 2002, "stats": {}, "statuses": [{"gql_status": "00001", "status_description": "note: successful completion - omitted result"}]} 14 | *: RESET 15 | ?: GOODBYE 16 | -------------------------------------------------------------------------------- /tests/stub/transport/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neo4j-drivers/testkit/cbc816c9dbfe039c74e5f7a8104e3323c4d7dbf1/tests/stub/transport/__init__.py -------------------------------------------------------------------------------- /tests/stub/transport/scripts/handshake_manifest_v1_features.script: -------------------------------------------------------------------------------- 1 | !: BOLT 5.7 2 | !: HANDSHAKE 00 00 01 FF 01 00 00 07 05 FF FF FF FF FF FF FF 7F 3 | !: HANDSHAKE_RESPONSE 00 00 07 05 00 4 | 5 | A: HELLO {"{}": "*"} 6 | A: LOGON {"{}": "*"} 7 | S: 8 | -------------------------------------------------------------------------------- /tests/stub/transport/scripts/handshake_non_manifest_bolt_5_7.script: -------------------------------------------------------------------------------- 1 | !: BOLT 5.7 2 | !: HANDSHAKE_MANIFEST 0 3 | 4 | A: HELLO {"{}": "*"} 5 | A: LOGON {"{}": "*"} 6 | S: 7 | -------------------------------------------------------------------------------- /tests/stub/transport/scripts/reader_with_noops.script: -------------------------------------------------------------------------------- 1 | !: BOLT #BOLT_VERSION# 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN "RETURN 1 AS n" {} {} 6 | S: SUCCESS {"fields": ["n"]} 7 | C: PULL {"n": 1000} 8 | S: 9 | 10 | RECORD [1] 11 | 12 | 13 | 14 | SUCCESS {"type": "w"} 15 | *: RESET 16 | ?: GOODBYE 17 | -------------------------------------------------------------------------------- /tests/stub/tx_begin_parameters/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neo4j-drivers/testkit/cbc816c9dbfe039c74e5f7a8104e3323c4d7dbf1/tests/stub/tx_begin_parameters/__init__.py -------------------------------------------------------------------------------- /tests/stub/tx_begin_parameters/scripts/access_mode_read.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {"mode": "r"} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 as n" {} {} 8 | S: SUCCESS {"fields": ["n"]} 9 | C: PULL {"n": 1000} 10 | S: SUCCESS {"type": "r"} 11 | C: COMMIT 12 | S: SUCCESS {} 13 | *: RESET 14 | ?: GOODBYE 15 | -------------------------------------------------------------------------------- /tests/stub/tx_begin_parameters/scripts/access_mode_read_homedb.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {"mode": "r", "db": "homedb"} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 as n" {} {} 8 | S: SUCCESS {"fields": ["n"]} 9 | C: PULL {"n": 1000} 10 | S: SUCCESS {"type": "r"} 11 | C: COMMIT 12 | S: SUCCESS {} 13 | *: RESET 14 | ?: GOODBYE 15 | -------------------------------------------------------------------------------- /tests/stub/tx_begin_parameters/scripts/access_mode_write.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 as n" {} {} 8 | S: SUCCESS {"fields": ["n"]} 9 | C: PULL {"n": 1000} 10 | S: SUCCESS {"type": "r"} 11 | C: COMMIT 12 | S: SUCCESS {} 13 | *: RESET 14 | ?: GOODBYE 15 | -------------------------------------------------------------------------------- /tests/stub/tx_begin_parameters/scripts/access_mode_write_homedb.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {"db": "homedb"} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 as n" {} {} 8 | S: SUCCESS {"fields": ["n"]} 9 | C: PULL {"n": 1000} 10 | S: SUCCESS {"type": "r"} 11 | C: COMMIT 12 | S: SUCCESS {} 13 | *: RESET 14 | ?: GOODBYE 15 | -------------------------------------------------------------------------------- /tests/stub/tx_begin_parameters/scripts/adb.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {"db": "adb"} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 as n" {} {} 8 | S: SUCCESS {"fields": ["n"]} 9 | C: PULL {"n": 1000} 10 | S: SUCCESS {"type": "r"} 11 | C: COMMIT 12 | S: SUCCESS {} 13 | *: RESET 14 | ?: GOODBYE 15 | -------------------------------------------------------------------------------- /tests/stub/tx_begin_parameters/scripts/bookmarks.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {"bookmarks{}": ["b1", "b2"]} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 as n" {} {} 8 | S: SUCCESS {"fields": ["n"]} 9 | C: PULL {"n": 1000} 10 | S: SUCCESS {"type": "r"} 11 | C: COMMIT 12 | S: SUCCESS {} 13 | *: RESET 14 | ?: GOODBYE 15 | -------------------------------------------------------------------------------- /tests/stub/tx_begin_parameters/scripts/bookmarks_homedb.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {"bookmarks{}": ["b1", "b2"], "db": "homedb"} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 as n" {} {} 8 | S: SUCCESS {"fields": ["n"]} 9 | C: PULL {"n": 1000} 10 | S: SUCCESS {"type": "r"} 11 | C: COMMIT 12 | S: SUCCESS {} 13 | *: RESET 14 | ?: GOODBYE 15 | -------------------------------------------------------------------------------- /tests/stub/tx_begin_parameters/scripts/combined.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {"bookmarks": ["b0"], "tx_metadata": {"k": "v"}, "mode": "r", "tx_timeout": 11, "imp_user": "that-other-dude", "db": "adb"} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 as n" {"p": 1} {} 8 | S: SUCCESS {"fields": ["n"]} 9 | C: PULL {"n": 1000} 10 | S: SUCCESS {"type": "r"} 11 | C: COMMIT 12 | S: SUCCESS {} 13 | *: RESET 14 | ?: GOODBYE 15 | -------------------------------------------------------------------------------- /tests/stub/tx_begin_parameters/scripts/imp_user.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {"imp_user": "that-other-dude"} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 as n" {} {} 8 | S: SUCCESS {"fields": ["n"]} 9 | C: PULL {"n": 1000} 10 | S: SUCCESS {"type": "r"} 11 | C: COMMIT 12 | S: SUCCESS {} 13 | *: RESET 14 | ?: GOODBYE 15 | -------------------------------------------------------------------------------- /tests/stub/tx_begin_parameters/scripts/imp_user_homedb.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {"imp_user": "that-other-dude", "db": "homedb"} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 as n" {} {} 8 | S: SUCCESS {"fields": ["n"]} 9 | C: PULL {"n": 1000} 10 | S: SUCCESS {"type": "r"} 11 | C: COMMIT 12 | S: SUCCESS {} 13 | *: RESET 14 | ?: GOODBYE 15 | -------------------------------------------------------------------------------- /tests/stub/tx_begin_parameters/scripts/parameters.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {"[mode]": "w"} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 as n" {"p": 1} {} 8 | S: SUCCESS {"fields": ["n"]} 9 | C: PULL {"n": 1000} 10 | S: SUCCESS {"type": "r"} 11 | C: COMMIT 12 | S: SUCCESS {} 13 | *: RESET 14 | ?: GOODBYE 15 | -------------------------------------------------------------------------------- /tests/stub/tx_begin_parameters/scripts/parameters_homedb.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {"[mode]": "w", "db": "homedb"} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 as n" {"p": 1} {} 8 | S: SUCCESS {"fields": ["n"]} 9 | C: PULL {"n": 1000} 10 | S: SUCCESS {"type": "r"} 11 | C: COMMIT 12 | S: SUCCESS {} 13 | *: RESET 14 | ?: GOODBYE 15 | -------------------------------------------------------------------------------- /tests/stub/tx_begin_parameters/scripts/router_adb.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | !: AUTO RESET 3 | !: AUTO GOODBYE 4 | !: ALLOW CONCURRENT 5 | 6 | A: HELLO {"{}": "*"} 7 | {* 8 | C: ROUTE {"{}": "*"} {"[]": "*"} {"db": "adb"} 9 | S: SUCCESS { "rt": { "ttl": 1000, "db": "adb", "servers": [{"addresses": ["#HOST#:9000"], "role":"ROUTE"}, {"addresses": ["#HOST#:9001"], "role":"READ"}, {"addresses": ["#HOST#:9001"], "role":"WRITE"}]}} 10 | *} 11 | -------------------------------------------------------------------------------- /tests/stub/tx_begin_parameters/scripts/router_adb_impersonation.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | !: AUTO RESET 3 | !: AUTO GOODBYE 4 | !: ALLOW CONCURRENT 5 | 6 | A: HELLO {"{}": "*"} 7 | {* 8 | C: ROUTE {"{}": "*"} {"[]": "*"} {"db": "adb", "[imp_user]": "that-other-dude"} 9 | S: SUCCESS { "rt": { "ttl": 1000, "db": "adb", "servers": [{"addresses": ["#HOST#:9000"], "role":"ROUTE"}, {"addresses": ["#HOST#:9001"], "role":"READ"}, {"addresses": ["#HOST#:9001"], "role":"WRITE"}]}} 10 | *} 11 | -------------------------------------------------------------------------------- /tests/stub/tx_begin_parameters/scripts/router_default_db.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | !: AUTO RESET 3 | !: AUTO GOODBYE 4 | !: ALLOW CONCURRENT 5 | 6 | A: HELLO {"{}": "*"} 7 | {* 8 | C: ROUTE {"{}": "*"} {"[]": "*"} {} 9 | S: SUCCESS { "rt": { "ttl": 1000, "db": "homedb", "servers": [{"addresses": ["#HOST#:9000"], "role":"ROUTE"}, {"addresses": ["#HOST#:9001"], "role":"READ"}, {"addresses": ["#HOST#:9001"], "role":"WRITE"}]}} 10 | *} 11 | -------------------------------------------------------------------------------- /tests/stub/tx_begin_parameters/scripts/router_default_db_impersonation.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | !: AUTO RESET 3 | !: AUTO GOODBYE 4 | !: ALLOW CONCURRENT 5 | 6 | A: HELLO {"{}": "*"} 7 | {* 8 | C: ROUTE {"{}": "*"} {"[]": "*"} {"imp_user": "that-other-dude"} 9 | S: SUCCESS { "rt": { "ttl": 1000, "db": "homedb", "servers": [{"addresses": ["#HOST#:9000"], "role":"ROUTE"}, {"addresses": ["#HOST#:9001"], "role":"READ"}, {"addresses": ["#HOST#:9001"], "role":"WRITE"}]}} 10 | *} 11 | -------------------------------------------------------------------------------- /tests/stub/tx_begin_parameters/scripts/timeout_-1.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | # We expect the driver to not even try this. So should it do so nonetheless, 6 | # we will let is pass to not cause any error. The error should be generated 7 | # inside the driver. 8 | C: BEGIN {"[tx_timeout]": "*"} 9 | S: SUCCESS {} 10 | C: RUN "RETURN 1 as n" {} {} 11 | S: SUCCESS {"fields": ["n"]} 12 | C: PULL {"n": 1000} 13 | S: SUCCESS {"type": "r"} 14 | C: COMMIT 15 | S: SUCCESS {} 16 | *: RESET 17 | ?: GOODBYE 18 | -------------------------------------------------------------------------------- /tests/stub/tx_begin_parameters/scripts/timeout_0.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {"tx_timeout": 0} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 as n" {} {} 8 | S: SUCCESS {"fields": ["n"]} 9 | C: PULL {"n": 1000} 10 | S: SUCCESS {"type": "r"} 11 | C: COMMIT 12 | S: SUCCESS {} 13 | *: RESET 14 | ?: GOODBYE 15 | -------------------------------------------------------------------------------- /tests/stub/tx_begin_parameters/scripts/timeout_17.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {"tx_timeout": 17} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 as n" {} {} 8 | S: SUCCESS {"fields": ["n"]} 9 | C: PULL {"n": 1000} 10 | S: SUCCESS {"type": "r"} 11 | C: COMMIT 12 | S: SUCCESS {} 13 | *: RESET 14 | ?: GOODBYE 15 | -------------------------------------------------------------------------------- /tests/stub/tx_begin_parameters/scripts/timeout_17_homedb.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {"tx_timeout": 17, "db": "homedb"} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 as n" {} {} 8 | S: SUCCESS {"fields": ["n"]} 9 | C: PULL {"n": 1000} 10 | S: SUCCESS {"type": "r"} 11 | C: COMMIT 12 | S: SUCCESS {} 13 | *: RESET 14 | ?: GOODBYE 15 | -------------------------------------------------------------------------------- /tests/stub/tx_begin_parameters/scripts/timeout_null.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {"[tx_timeout]": null} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 as n" {} {} 8 | S: SUCCESS {"fields": ["n"]} 9 | C: PULL {"n": 1000} 10 | S: SUCCESS {"type": "r"} 11 | C: COMMIT 12 | S: SUCCESS {} 13 | *: RESET 14 | ?: GOODBYE 15 | -------------------------------------------------------------------------------- /tests/stub/tx_begin_parameters/scripts/tx_meta.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {"tx_metadata": {"akey": "aval"}} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 as n" {} {} 8 | S: SUCCESS {"fields": ["n"]} 9 | C: PULL {"n": 1000} 10 | S: SUCCESS {"type": "r"} 11 | C: COMMIT 12 | S: SUCCESS {} 13 | *: RESET 14 | ?: GOODBYE 15 | -------------------------------------------------------------------------------- /tests/stub/tx_begin_parameters/scripts/tx_meta_homedb.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {"tx_metadata": {"akey": "aval"}, "db": "homedb"} 6 | S: SUCCESS {} 7 | C: RUN "RETURN 1 as n" {} {} 8 | S: SUCCESS {"fields": ["n"]} 9 | C: PULL {"n": 1000} 10 | S: SUCCESS {"type": "r"} 11 | C: COMMIT 12 | S: SUCCESS {} 13 | *: RESET 14 | ?: GOODBYE 15 | -------------------------------------------------------------------------------- /tests/stub/tx_lifetime/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neo4j-drivers/testkit/cbc816c9dbfe039c74e5f7a8104e3323c4d7dbf1/tests/stub/tx_lifetime/__init__.py -------------------------------------------------------------------------------- /tests/stub/tx_run/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neo4j-drivers/testkit/cbc816c9dbfe039c74e5f7a8104e3323c4d7dbf1/tests/stub/tx_run/__init__.py -------------------------------------------------------------------------------- /tests/stub/tx_run/scripts/tx_commit.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {"{}": "*"} 6 | S: SUCCESS {} 7 | C: RUN {"U": "*"} {"{}": "*"} {"{}": "*"} 8 | S: SUCCESS {"fields": ["n"], "qid": 1} 9 | {{ 10 | C: PULL {"n": {"Z": "*"}, "[qid]": -1} 11 | ---- 12 | C: PULL {"n": {"Z": "*"}, "qid": 1} 13 | }} 14 | S: RECORD [1] 15 | RECORD [2] 16 | SUCCESS {"type": "r"} 17 | C: COMMIT 18 | S: SUCCESS {"bookmark": "neo4j:bookmark:v1:tx424242"} 19 | *: RESET 20 | ?: GOODBYE 21 | -------------------------------------------------------------------------------- /tests/stub/tx_run/scripts/tx_discard_then_rollback.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {"{}": "*"} 6 | S: SUCCESS {} 7 | C: RUN {"U": "*"} {"{}": "*"} {"{}": "*"} 8 | S: SUCCESS {"fields": ["n"]} 9 | {* 10 | C: PULL {"n": {"Z": "*"}, "[qid]": -1} 11 | S: RECORD [1] 12 | RECORD [2] 13 | SUCCESS {"type": "r", "has_more": true} 14 | *} 15 | C: DISCARD {"n": -1, "[qid]": -1} 16 | S: SUCCESS {} 17 | C: ROLLBACK 18 | S: SUCCESS {} 19 | *: RESET 20 | ?: GOODBYE 21 | -------------------------------------------------------------------------------- /tests/stub/tx_run/scripts/tx_disconnect_on_begin.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {"{}": "*"} 6 | S: 7 | -------------------------------------------------------------------------------- /tests/stub/tx_run/scripts/tx_error_on_begin.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {"{}": "*"} 6 | S: FAILURE {"code": "Neo.ClientError.MadeUp.Code", "message": "Something went wrong..."} 7 | +: RESET 8 | ?: GOODBYE 9 | -------------------------------------------------------------------------------- /tests/stub/tx_run/scripts/tx_error_on_pull.script: -------------------------------------------------------------------------------- 1 | !: BOLT 5.3 2 | 3 | A: HELLO {"{}": "*"} 4 | A: LOGON {"{}": "*"} 5 | *: RESET 6 | C: BEGIN {"{}": "*"} 7 | S: SUCCESS {} 8 | C: RUN {"U": "*"} {"{}": "*"} {"{}": "*"} 9 | S: SUCCESS {"fields": ["n"], "qid": 1} 10 | {{ 11 | C: PULL {"n": {"Z": "*"}, "[qid]": -1} 12 | ---- 13 | C: PULL {"n": {"Z": "*"}, "qid": 1} 14 | }} 15 | S: RECORD [1] 16 | RECORD [2] 17 | FAILURE {"code": "Neo.ClientError.MadeUp.Code", "message": "message"} 18 | +: RESET 19 | ?: GOODBYE 20 | -------------------------------------------------------------------------------- /tests/stub/tx_run/scripts/tx_error_on_run.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {"{}": "*"} 6 | S: SUCCESS {} 7 | C: RUN {"U": "*"} {"{}": "*"} {"{}": "*"} 8 | S: FAILURE {"code": "Neo.ClientError.MadeUp.Code", "message": "Something went wrong..."} 9 | {? 10 | # For drivers that pipeline a PULL after RUN 11 | C: PULL {"n": {"Z": "*"}, "[qid]": -1} 12 | S: IGNORED 13 | ?} 14 | +: RESET 15 | ?: GOODBYE 16 | -------------------------------------------------------------------------------- /tests/stub/tx_run/scripts/tx_pull_then_rollback.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: BEGIN {"{}": "*"} 6 | S: SUCCESS {} 7 | C: RUN {"U": "*"} {"{}": "*"} {"{}": "*"} 8 | S: SUCCESS {"fields": ["n"]} 9 | C: PULL {"n": {"Z": "*"}, "[qid]": -1} 10 | S: RECORD [1] 11 | RECORD [2] 12 | SUCCESS {"type": "r"} 13 | C: ROLLBACK 14 | S: SUCCESS {} 15 | *: RESET 16 | ?: GOODBYE 17 | -------------------------------------------------------------------------------- /tests/stub/types/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neo4j-drivers/testkit/cbc816c9dbfe039c74e5f7a8104e3323c4d7dbf1/tests/stub/types/__init__.py -------------------------------------------------------------------------------- /tests/stub/types/scripts/v3x0/echo_date_time.script: -------------------------------------------------------------------------------- 1 | !: BOLT 3 2 | 3 | C: HELLO {"[scheme]": "*", "[credentials]": "*", "[principal]": "*", "[user_agent]": "*", "[routing]": "*"} 4 | S: SUCCESS {"connection_id": "bolt-0", "server": "Neo4j/4.4.0", "routing": null} 5 | *: RESET 6 | C: RUN {"U": "RETURN $dt AS dt"} {"dt": {"T": "2022-06-07T11:52:05+02:00"}} {"{}": "*"} 7 | S: SUCCESS {"fields": ["dt"]} 8 | C: PULL_ALL 9 | S: RECORD [{"T": "2022-06-07T11:52:05+02:00"}] 10 | SUCCESS {"type": "r"} 11 | *: RESET 12 | ?: GOODBYE 13 | -------------------------------------------------------------------------------- /tests/stub/types/scripts/v4x3/echo_date_time.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.3 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN {"U": "RETURN $dt AS dt"} {"dt": {"T": "2022-06-07T11:52:05+02:00"}} {"{}": "*"} 6 | S: SUCCESS {"fields": ["dt"], "qid": 1} 7 | {{ 8 | C: PULL {"n": {"Z": "*"}, "[qid]": -1} 9 | ---- 10 | C: PULL {"n": {"Z": "*"}, "qid": 1} 11 | }} 12 | S: RECORD [{"T": "2022-06-07T11:52:05+02:00"}] 13 | SUCCESS {"type": "r"} 14 | *: RESET 15 | ?: GOODBYE 16 | -------------------------------------------------------------------------------- /tests/stub/types/scripts/v4x3/echo_zoned_date_time.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.3 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN {"U": "RETURN $dt AS dt"} {"dt": {"T": "2022-06-07T11:52:05+02:00[Europe/Stockholm]"}} {"{}": "*"} 6 | S: SUCCESS {"fields": ["dt"], "qid": 1} 7 | {{ 8 | C: PULL {"n": {"Z": "*"}, "[qid]": -1} 9 | ---- 10 | C: PULL {"n": {"Z": "*"}, "qid": 1} 11 | }} 12 | S: RECORD [{"T": "2022-06-07T11:52:05+02:00[Europe/Stockholm]"}] 13 | SUCCESS {"type": "r"} 14 | *: RESET 15 | ?: GOODBYE 16 | -------------------------------------------------------------------------------- /tests/stub/types/scripts/v4x4/echo_date_time.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN {"U": "RETURN $dt AS dt"} {"dt": {"T": "2022-06-07T11:52:05+02:00"}} {"{}": "*"} 6 | S: SUCCESS {"fields": ["dt"], "qid": 1} 7 | {{ 8 | C: PULL {"n": {"Z": "*"}, "[qid]": -1} 9 | ---- 10 | C: PULL {"n": {"Z": "*"}, "qid": 1} 11 | }} 12 | S: RECORD [{"T": "2022-06-07T11:52:05+02:00"}] 13 | SUCCESS {"type": "r"} 14 | *: RESET 15 | ?: GOODBYE 16 | -------------------------------------------------------------------------------- /tests/stub/types/scripts/v4x4/echo_zoned_date_time.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | A: HELLO {"{}": "*"} 4 | *: RESET 5 | C: RUN {"U": "RETURN $dt AS dt"} {"dt": {"T": "2022-06-07T11:52:05+02:00[Europe/Stockholm]"}} {"{}": "*"} 6 | S: SUCCESS {"fields": ["dt"], "qid": 1} 7 | {{ 8 | C: PULL {"n": {"Z": "*"}, "[qid]": -1} 9 | ---- 10 | C: PULL {"n": {"Z": "*"}, "qid": 1} 11 | }} 12 | S: RECORD [{"T": "2022-06-07T11:52:05+02:00[Europe/Stockholm]"}] 13 | SUCCESS {"type": "r"} 14 | *: RESET 15 | ?: GOODBYE 16 | -------------------------------------------------------------------------------- /tests/stub/versions/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neo4j-drivers/testkit/cbc816c9dbfe039c74e5f7a8104e3323c4d7dbf1/tests/stub/versions/__init__.py -------------------------------------------------------------------------------- /tests/stub/versions/scripts/v3_and_up_optional_hello.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | ?: GOODBYE 4 | C: HELLO {"{}": "*"} 5 | S: SUCCESS {"server": "#SERVER_AGENT#", "connection_id": "bolt-123456789"} 6 | *: RESET 7 | ?: GOODBYE 8 | -------------------------------------------------------------------------------- /tests/stub/versions/scripts/v3_return_1.script: -------------------------------------------------------------------------------- 1 | !: BOLT 3 2 | 3 | C: HELLO {"{}": "*"} 4 | S: SUCCESS {"server": "#SERVER_AGENT#", "connection_id": "bolt-123456789"} 5 | *: RESET 6 | {? 7 | C: RUN {"U": "*"} {"{}": "*"} {"{}": "*"} 8 | S: SUCCESS {"fields": ["n.name"]} 9 | {{ 10 | C: PULL_ALL 11 | ---- 12 | C: DISCARD_ALL 13 | }} 14 | S: SUCCESS {"type": "w"} 15 | ?} 16 | *: RESET 17 | ?: GOODBYE 18 | -------------------------------------------------------------------------------- /tests/stub/versions/scripts/v4x2_return_1.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.2 2 | 3 | C: HELLO {"{}": "*"} 4 | S: SUCCESS {"server": "#SERVER_AGENT#", "connection_id": "bolt-123456789"} 5 | *: RESET 6 | {? 7 | C: RUN {"U": "*"} {"{}": "*"} {"{}": "*"} 8 | S: SUCCESS {"fields": ["n.name"]} 9 | {{ 10 | C: PULL {"n": {"Z": "*"}} 11 | ---- 12 | C: DISCARD {"n": {"Z": "*"}} 13 | }} 14 | S: SUCCESS {"type": "w"} 15 | ?} 16 | *: RESET 17 | ?: GOODBYE 18 | -------------------------------------------------------------------------------- /tests/stub/versions/scripts/v4x3_return_1.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.3 2 | 3 | C: HELLO {"{}": "*"} 4 | S: SUCCESS {"server": "#SERVER_AGENT#", "connection_id": "bolt-123456789"} 5 | *: RESET 6 | {? 7 | C: RUN {"U": "*"} {"{}": "*"} {"{}": "*"} 8 | S: SUCCESS {"fields": ["n.name"]} 9 | {{ 10 | C: PULL {"n": {"Z": "*"}} 11 | ---- 12 | C: DISCARD {"n": {"Z": "*"}} 13 | }} 14 | S: SUCCESS {"type": "w"} 15 | ?} 16 | *: RESET 17 | ?: GOODBYE 18 | -------------------------------------------------------------------------------- /tests/stub/versions/scripts/v4x4_return_1.script: -------------------------------------------------------------------------------- 1 | !: BOLT 4.4 2 | 3 | C: HELLO {"{}": "*"} 4 | S: SUCCESS {"server": "#SERVER_AGENT#", "connection_id": "bolt-123456789"} 5 | *: RESET 6 | {? 7 | C: RUN {"U": "*"} {"{}": "*"} {"{}": "*"} 8 | S: SUCCESS {"fields": ["n.name"]} 9 | {{ 10 | C: PULL {"n": {"Z": "*"}} 11 | ---- 12 | C: DISCARD {"n": {"Z": "*"}} 13 | }} 14 | S: SUCCESS {"type": "w"} 15 | ?} 16 | *: RESET 17 | ?: GOODBYE 18 | -------------------------------------------------------------------------------- /tests/stub/versions/scripts/v5x0_return_1.script: -------------------------------------------------------------------------------- 1 | !: BOLT 5.0 2 | 3 | C: HELLO {"{}": "*"} 4 | S: SUCCESS {"server": "#SERVER_AGENT#", "connection_id": "bolt-123456789"} 5 | *: RESET 6 | {? 7 | C: RUN {"U": "*"} {"{}": "*"} {"{}": "*"} 8 | S: SUCCESS {"fields": ["n.name"]} 9 | {{ 10 | C: PULL {"n": {"Z": "*"}} 11 | ---- 12 | C: DISCARD {"n": {"Z": "*"}} 13 | }} 14 | S: SUCCESS {"type": "w"} 15 | ?} 16 | *: RESET 17 | ?: GOODBYE 18 | -------------------------------------------------------------------------------- /tests/stub/versions/scripts/v5x1_and_up_optional_hello.script: -------------------------------------------------------------------------------- 1 | !: BOLT #VERSION# 2 | 3 | ?: GOODBYE 4 | C: HELLO {"{}": "*"} 5 | S: SUCCESS {"server": "#SERVER_AGENT#", "connection_id": "bolt-123456789"} 6 | A: LOGON {"{}": "*"} 7 | *: RESET 8 | ?: GOODBYE 9 | -------------------------------------------------------------------------------- /tests/stub/versions/scripts/v5x1_return_1.script: -------------------------------------------------------------------------------- 1 | !: BOLT 5.1 2 | 3 | C: HELLO {"{}": "*"} 4 | S: SUCCESS {"server": "#SERVER_AGENT#", "connection_id": "bolt-123456789"} 5 | A: LOGON {"{}": "*"} 6 | *: RESET 7 | {? 8 | C: RUN {"U": "*"} {"{}": "*"} {"{}": "*"} 9 | S: SUCCESS {"fields": ["n.name"]} 10 | {{ 11 | C: PULL {"n": {"Z": "*"}} 12 | ---- 13 | C: DISCARD {"n": {"Z": "*"}} 14 | }} 15 | S: SUCCESS {"type": "w"} 16 | ?} 17 | *: RESET 18 | ?: GOODBYE 19 | -------------------------------------------------------------------------------- /tests/stub/versions/scripts/v5x2_return_1.script: -------------------------------------------------------------------------------- 1 | !: BOLT 5.2 2 | 3 | C: HELLO {"{}": "*"} 4 | S: SUCCESS {"server": "#SERVER_AGENT#", "connection_id": "bolt-123456789"} 5 | A: LOGON {"{}": "*"} 6 | *: RESET 7 | {? 8 | C: RUN {"U": "*"} {"{}": "*"} {"{}": "*"} 9 | S: SUCCESS {"fields": ["n.name"]} 10 | {{ 11 | C: PULL {"n": {"Z": "*"}} 12 | ---- 13 | C: DISCARD {"n": {"Z": "*"}} 14 | }} 15 | S: SUCCESS {"type": "w"} 16 | ?} 17 | *: RESET 18 | ?: GOODBYE 19 | -------------------------------------------------------------------------------- /tests/stub/versions/scripts/v5x3_return_1.script: -------------------------------------------------------------------------------- 1 | !: BOLT 5.3 2 | 3 | C: HELLO {"{}": "*"} 4 | S: SUCCESS {"server": "#SERVER_AGENT#", "connection_id": "bolt-123456789"} 5 | A: LOGON {"{}": "*"} 6 | *: RESET 7 | {? 8 | C: RUN {"U": "*"} {"{}": "*"} {"{}": "*"} 9 | S: SUCCESS {"fields": ["n.name"]} 10 | {{ 11 | C: PULL {"n": {"Z": "*"}} 12 | ---- 13 | C: DISCARD {"n": {"Z": "*"}} 14 | }} 15 | S: SUCCESS {"type": "w"} 16 | ?} 17 | *: RESET 18 | ?: GOODBYE 19 | -------------------------------------------------------------------------------- /tests/stub/versions/scripts/v5x4_return_1.script: -------------------------------------------------------------------------------- 1 | !: BOLT 5.4 2 | 3 | C: HELLO {"{}": "*"} 4 | S: SUCCESS {"server": "#SERVER_AGENT#", "connection_id": "bolt-123456789"} 5 | A: LOGON {"{}": "*"} 6 | *: RESET 7 | {? 8 | ?: TELEMETRY {"{}": "*"} 9 | C: RUN {"U": "*"} {"{}": "*"} {"{}": "*"} 10 | S: SUCCESS {"fields": ["n.name"]} 11 | {{ 12 | C: PULL {"n": {"Z": "*"}} 13 | ---- 14 | C: DISCARD {"n": {"Z": "*"}} 15 | }} 16 | S: SUCCESS {"type": "w"} 17 | ?} 18 | *: RESET 19 | ?: GOODBYE 20 | -------------------------------------------------------------------------------- /tests/stub/versions/scripts/v5x6_return_1.script: -------------------------------------------------------------------------------- 1 | !: BOLT 5.6 2 | 3 | C: HELLO {"{}": "*"} 4 | S: SUCCESS {"server": "#SERVER_AGENT#", "connection_id": "bolt-123456789"} 5 | A: LOGON {"{}": "*"} 6 | *: RESET 7 | {? 8 | ?: TELEMETRY {"{}": "*"} 9 | C: RUN {"U": "*"} {"{}": "*"} {"{}": "*"} 10 | S: SUCCESS {"fields": ["n.name"]} 11 | {{ 12 | C: PULL {"n": {"Z": "*"}} 13 | ---- 14 | C: DISCARD {"n": {"Z": "*"}} 15 | }} 16 | S: SUCCESS {"type": "w"} 17 | ?} 18 | *: RESET 19 | ?: GOODBYE 20 | -------------------------------------------------------------------------------- /tests/testenv.py: -------------------------------------------------------------------------------- 1 | from teamcity import ( 2 | in_teamcity, 3 | team_city_test_result, 4 | test_kit_basic_test_result, 5 | ) 6 | 7 | 8 | def get_test_result_class(name): 9 | if not in_teamcity: 10 | return test_kit_basic_test_result(name) 11 | return team_city_test_result(name) 12 | -------------------------------------------------------------------------------- /tests/tls/README: -------------------------------------------------------------------------------- 1 | Contains tests that runs against tlsserver 2 | -------------------------------------------------------------------------------- /tests/tls/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/neo4j-drivers/testkit/cbc816c9dbfe039c74e5f7a8104e3323c4d7dbf1/tests/tls/__init__.py -------------------------------------------------------------------------------- /tests/tls/certs/customRoot.key: -------------------------------------------------------------------------------- 1 | -----BEGIN EC PRIVATE KEY----- 2 | MHcCAQEEIKYmthXXA++8kXENGIy2EcTMTu+ps8IcbhgumpNuQQlKoAoGCCqGSM49 3 | AwEHoUQDQgAEX7D1pD4WK2M3oPKd9CmeU7A57Oy8WyvS2vOizJDyW1h2XZTvvj89 4 | vS8WooXFSXX+TayDDaEZB/rk19B5OJfZjg== 5 | -----END EC PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /tests/tls/certs/customRoot2.key: -------------------------------------------------------------------------------- 1 | -----BEGIN EC PRIVATE KEY----- 2 | MHcCAQEEIDzNIm96f6QsnVvzSaGVkj47d5lNeMYmDCOaTj6Gj5UyoAoGCCqGSM49 3 | AwEHoUQDQgAEimpbDnttGQAe2W4EbkYGnFztHe95YXI9ZBG2vpNpRFOCr8oEop3U 4 | mLDUtXOGqj8hTENgj6qz2oC/7mAGVp58Bg== 5 | -----END EC PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /tests/tls/certs/server/customRoot2_thehost.key: -------------------------------------------------------------------------------- 1 | -----BEGIN EC PRIVATE KEY----- 2 | MHcCAQEEIJ0YvrZmyjxCRAMdYRyds29vgGSd6py/qCjyQ04fMHpXoAoGCCqGSM49 3 | AwEHoUQDQgAE4jM2JNSS4qSzZnSQbjIQn/mj52PXbCHZz9333r7FzW7Onc+kFrf1 4 | Njbx8eBKuIoo+QEgXaqGDv1/cjh/e/oQsA== 5 | -----END EC PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /tests/tls/certs/server/customRoot_thehost.key: -------------------------------------------------------------------------------- 1 | -----BEGIN EC PRIVATE KEY----- 2 | MHcCAQEEIKeFQxzQXPv0JkLM+Ggjrxy8tdyr4ko3AZjGzB0tueQXoAoGCCqGSM49 3 | AwEHoUQDQgAEPQkm3WYHHYNM8fUYAKyHqtCJlO6cgWcLl8IfsSAYSA8avLPRShsM 4 | JwEUR34WHey4rf/X3Wz2HyB5bRLz/8d7FQ== 5 | -----END EC PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /tests/tls/certs/server/customRoot_thehost_expired.key: -------------------------------------------------------------------------------- 1 | -----BEGIN EC PRIVATE KEY----- 2 | MHcCAQEEIPjcFpMSFZMiEcDEa/k+kmJI8QeUvnPrM79DFMYJxrg8oAoGCCqGSM49 3 | AwEHoUQDQgAEx0XZRCnStHoYC2jeC/DGc+dKU5rPe7bJlF6MM/BTzcsQaqZVwdyV 4 | qG1m+MTx/8G3jjztQm0nYzAWt9ZENhLdww== 5 | -----END EC PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /tests/tls/certs/server/trustedRoot_thehost.key: -------------------------------------------------------------------------------- 1 | -----BEGIN EC PRIVATE KEY----- 2 | MHcCAQEEIEodc4qmubFEZsPn7zQo3zgrDGf4A7Xy+k3iFNso5YnGoAoGCCqGSM49 3 | AwEHoUQDQgAEzx/LH+yRW0V4+d5MiZacABJYLsQlxEp0ib7qft0sl1BYeddomuOb 4 | lD6MSMK272kkRqE1IGAMOzKAaMzdXFBV7g== 5 | -----END EC PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /tests/tls/certs/server/trustedRoot_thehost_expired.key: -------------------------------------------------------------------------------- 1 | -----BEGIN EC PRIVATE KEY----- 2 | MHcCAQEEIMA2QKrVZWaa3EEsr8k/TFnvGVDJV4X9M5s8wNFY34OyoAoGCCqGSM49 3 | AwEHoUQDQgAEvAzChdoOgPB/A7fezyyb5Nc+zmnz+Vd23ZTJRSpq0h6Bt4R6zEQu 4 | TXxYhsxQL+tV3MNfU6zMW3RzY7qGfRcLqQ== 5 | -----END EC PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /tests/tls/certs/server/untrustedRoot_thehost.key: -------------------------------------------------------------------------------- 1 | -----BEGIN EC PRIVATE KEY----- 2 | MHcCAQEEIBbyHNN9WiJDNd97jV05CMe2XA9U5o2j9LYuosUJXz6soAoGCCqGSM49 3 | AwEHoUQDQgAEMNTIbFDXTBScCnzEPpHMOajeM9R+r0XccGLSzVge7ZycxeprZ/im 4 | YlMfwj5L0mnsD3bLe6mTNrvsmnAwLYeSow== 5 | -----END EC PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /tests/tls/certs/trustedRoot.key: -------------------------------------------------------------------------------- 1 | -----BEGIN EC PRIVATE KEY----- 2 | MHcCAQEEIFIS2NB01ris13TohCWQkw2u120lijceMo9ZUpQMHmYLoAoGCCqGSM49 3 | AwEHoUQDQgAEUkiJaMVzO8CqVGQjN5GF73Hvsv13t9m0iTcsjqhioaC98FBYEU4t 4 | w1kepJIXiPIooWpVAjag9qhg0b1qD38dqw== 5 | -----END EC PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /waiter/.dockerignore: -------------------------------------------------------------------------------- 1 | * 2 | !*.py 3 | !requirements.txt 4 | -------------------------------------------------------------------------------- /waiter/bootstrap.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import time 3 | 4 | if __name__ == "__main__": 5 | # This notifies controller that we're up and running in the driver 6 | print("ok") 7 | sys.stdout.flush() 8 | # Just hang around here 9 | while True: 10 | time.sleep(100) 11 | -------------------------------------------------------------------------------- /waiter/requirements.txt: -------------------------------------------------------------------------------- 1 | neo4j==5.24.0 2 | neo4j-rust-ext 3 | --------------------------------------------------------------------------------