Documentation
¶
Overview ¶
Package fixture provides compiled helper processes for .ci scenarios.
Design: docs/guide/bfd.md -- the operator surface this fixture drives Related: plugin_fixture_03_bgp.go -- the non-strict bgp-bfd-opt-in fixture
The driver behind test/plugin/bgp-bfd-strict.ci. It starts ze with a peer whose bfd container carries `strict true`, and waits for the two log lines that say the whole path worked: the BFD plugin published its Service, and the BGP peer opened its BFD session with strict recorded on it.
The peer's remote address never completes a TCP handshake, so BGP never reaches Established. That is the point: draft-ietf-idr-bgp-bfd-strict-mode Section 7 says the BFD session opens "prior to the BGP FSM starting", so a strict peer that never connects must still open one, and a log line proving it could not be produced by the old on-Established path.
Design: docs/architecture/testing/ci-format.md -- independent OPEN sender facts Related: test/plugin/paths-limit-live.ci -- ordered wire assertions Related: ui_fixture_send_bgp.go -- the ephemeral SSH operator-CLI lifecycle
Design: docs/architecture/config/apply-ordering.md -- the ordered apply path Detail: ../../component/config/transaction/solver.go -- TopologicalSort, the order the swap driver observes Related: misc_fixture_shellports.go -- ifaceAddressSwapDriver, the single-interface renumber driver
The two drivers behind test/reload/config-apply-ordering-address-swap.ci and test/reload/config-apply-ordering-mixed-root.ci.
Both read the kernel's own netlink event stream through `ip monitor`. The order a transaction applied is not recoverable from the final state, and no function on the apply path writes one line per operation, so the event stream is the only place the order survives. It is what makes the applied ORDER a measurement instead of an inference from "the change landed at all".
Design: docs/architecture/config/apply-ordering.md -- a root with no decomposer Related: misc_fixture_shellports.go -- reloadSignalDriver, the shared rewrite-and-SIGHUP trigger Related: ../../component/config/transaction/orchestrator.go -- operationNodes, the coarse node this observes
The observer behind test/reload/config-apply-ordering-coarse-root.ci. It declares a config root no component decomposes, so the transaction represents it with one coarse node and applies it through the section apply. The line it prints on config-apply is what the test asserts: a participant the operation path leaves out receives no apply at all, and prints nothing.
Design: docs/architecture/config/apply-ordering.md -- the coarse node and its rollback Detail: ../../component/config/transaction/executor.go -- rollbackApplied, which skips a coarse node on purpose Related: register_config_apply_ordering_coarse_root.go -- the observer that proves a coarse node is applied at all
The two observers behind test/reload/config-apply-ordering-mixed-rollback.ci.
One refuses its section apply, which is how the test makes a transaction fail after a decomposed operation has already been applied. The other prints the line the test asserts on: a coarse node's participant is rolled back through the transaction-wide `config-rollback`, never through the per-operation rollback its SDK has no handler for.
Design: docs/architecture/api/architecture.md -- the initial-sync End-of-RIB barrier Related: plugin_fixture_09.go -- announceWithdraw09, the announce/withdraw observers for the same peer shape Related: plugin_fixture_01.go -- plugin01PeerCounter, plugin01RequireDone, the dispatch helpers used here
The fixture behind test/plugin/initial-sync-barrier-raw.ci. Registration lives in this file rather than beside the other bgp scenarios so the change touches no file another session is editing.
Design: docs/architecture/testing/interop.md -- a functional fixture drives the product's own dispatcher, so the .ci beside it asserts what an operator gets. Related: test/plugin/prefixsid-announce-rail-boundary.ci -- the frames this announce must produce for two eBGP peers that differ in one leaf. Related: internal/component/bgp/reactor/reactor_api_batch.go -- the announce rail the command reaches, buildBatchAnnounceUpdate.
Design: docs/architecture/rsvpte/mpls-rsvp-te.md -- RSVP-TE config reload (spec-mpls-10-rsvp-te-reload-completeness, closed 2026-09-05) Related: routing_fixture.go -- routingObserver, routingRows, the other rsvp-te scenarios Related: misc_fixture_shellports.go -- reloadSignalDriver, the shared rewrite-and-SIGHUP trigger
The two fixtures behind test/reload/rsvpte-reload.ci: the observer that reads `show rsvp-te interface` before and after the commit, and the trigger that rewrites the config and sends the SIGHUP.
Design: docs/architecture/config/transaction-protocol.md -- the participant protocol across a process boundary Related: register_config_apply_ordering_coarse_root.go -- the same shape for a root nothing decomposes
The observer behind test/reload/tx-protocol-external-plugin.ci.
It runs as its own process and declares the `bgp` root, which the iface and bgp decomposers do decompose. So one transaction carries both kinds of node: the decomposed peer operations the bgp root produces, and this plugin's coarse node. The line it prints is what proves the second kind crossed the process boundary, through `config-apply` rather than through the `config-operation-apply` its SDK has no default handler for.
Index ¶
- func Dispatch(ctx context.Context, plugin *sdk.Plugin, command string, value any) (string, error)
- func Names() []string
- func Observe(ctx context.Context, name string, registration sdk.Registration, ...) error
- func Poll(ctx context.Context, attempts int, delay time.Duration, predicate func() bool) bool
- func Register(name string, driver Driver)
- func ReportFailure(err error)
- func Run(args []string) int
- type Driver
- type ObserverScenario
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Observe ¶
func Observe(ctx context.Context, name string, registration sdk.Registration, scenario ObserverScenario) error
Observe connects as a plugin, completes the five startup stages, runs the scenario when every daemon plugin is ready, and requests a clean shutdown.
func Poll ¶
Poll retries predicate until it succeeds, the attempt count is exhausted, or the context is canceled.
func ReportFailure ¶
func ReportFailure(err error)
ReportFailure emits the sentinel the .ci runner treats as an authoritative observer failure. Quoting with %q matches slog's text format.
The FIRST failure is the one emitted, and a later call is dropped. An observer scenario reports where it fails, while the daemon is still alive to relay the line, and the process then exits through Run, which holds the same error.
Types ¶
Source Files
¶
- bfd_fixture.go
- bfd_fixture_pktinfo.go
- connected_distance_fixture.go
- constants.go
- fib_withhold_controller_fixture.go
- fib_withhold_fixture.go
- fixture.go
- install_fixture.go
- lg_pki_fixture.go
- misc_fixture_drivers.go
- misc_fixture_managed.go
- misc_fixture_managed_ca_trust.go
- misc_fixture_managed_legacy.go
- misc_fixture_observers.go
- misc_fixture_runner.go
- misc_fixture_runner_derived.go
- misc_fixture_runner_reds.go
- misc_fixture_runner_rfcledger.go
- misc_fixture_runner_scope.go
- misc_fixture_shellports.go
- misc_fixture_vpp.go
- netfilter_fixture.go
- netfilter_fixture_domain_group.go
- netfilter_fixture_firewall.go
- netfilter_fixture_flow_export.go
- netfilter_fixture_policy.go
- netfilter_fixture_static.go
- netfilter_fixture_traffic.go
- plugin_fixture_01.go
- plugin_fixture_01_adj_rib.go
- plugin_fixture_01_answer.go
- plugin_fixture_01_api.go
- plugin_fixture_01_save.go
- plugin_fixture_02.go
- plugin_fixture_02_bfd.go
- plugin_fixture_02_events.go
- plugin_fixture_02_network.go
- plugin_fixture_03.go
- plugin_fixture_03_bfd.go
- plugin_fixture_03_bgp.go
- plugin_fixture_03_bgp_bfd_strict.go
- plugin_fixture_03_route_server.go
- plugin_fixture_04.go
- plugin_fixture_04_bmp.go
- plugin_fixture_04_cli.go
- plugin_fixture_04_community.go
- plugin_fixture_04_route_server.go
- plugin_fixture_05.go
- plugin_fixture_05_ddos.go
- plugin_fixture_06.go
- plugin_fixture_06_ddos_linux.go
- plugin_fixture_06_decoder.go
- plugin_fixture_06_events.go
- plugin_fixture_06_exec.go
- plugin_fixture_06_fib.go
- plugin_fixture_06_shell.go
- plugin_fixture_07.go
- plugin_fixture_07_fib.go
- plugin_fixture_07_firewall.go
- plugin_fixture_07_flowspec.go
- plugin_fixture_07_irr.go
- plugin_fixture_07_reload.go
- plugin_fixture_08.go
- plugin_fixture_08_drivers.go
- plugin_fixture_08_flap.go
- plugin_fixture_08_iface.go
- plugin_fixture_08_ra.go
- plugin_fixture_08_tunnel_ttl_linux.go
- plugin_fixture_09.go
- plugin_fixture_09_bgp.go
- plugin_fixture_09_l2tp.go
- plugin_fixture_09_shell.go
- plugin_fixture_10.go
- plugin_fixture_10_process.go
- plugin_fixture_11.go
- plugin_fixture_11_alias.go
- plugin_fixture_11_shell.go
- plugin_fixture_12.go
- plugin_fixture_12_filters.go
- plugin_fixture_12_prefix.go
- plugin_fixture_12_rbac.go
- plugin_fixture_12_redistribute.go
- plugin_fixture_12_redistribute_chain.go
- plugin_fixture_12_reload.go
- plugin_fixture_13.go
- plugin_fixture_13_rest.go
- plugin_fixture_13_rib.go
- plugin_fixture_14.go
- plugin_fixture_15.go
- plugin_fixture_15_rpki.go
- plugin_fixture_15_show.go
- plugin_fixture_15_standalone.go
- plugin_fixture_15_stream.go
- plugin_fixture_15_system.go
- plugin_fixture_16.go
- plugin_fixture_16_l2tp.go
- plugin_fixture_16_network.go
- plugin_fixture_16_vpp.go
- plugin_fixture_command_catalog.go
- plugin_fixture_dial_no_anchor.go
- plugin_fixture_dns_stub.go
- plugin_fixture_failure_policy.go
- plugin_fixture_filter_origin.go
- plugin_fixture_filter_subject.go
- plugin_fixture_gr_sender_facts.go
- plugin_fixture_paths_limit.go
- plugin_fixture_resolve_rir.go
- plugin_fixture_support_archive.go
- plugin_fixture_traceroute_source_af.go
- plugin_fixture_version_header_suppress.go
- plugin_shell_extra_1.go
- plugin_shell_extra_1_as112.go
- plugin_shell_extra_1_audit.go
- plugin_shell_extra_1_auth.go
- plugin_shell_extra_1_authz.go
- plugin_shell_extra_2.go
- plugin_shell_extra_3.go
- plugin_shell_extra_4.go
- register_bfd.go
- register_command_catalog.go
- register_config_apply_ordering.go
- register_config_apply_ordering_coarse_root.go
- register_config_apply_ordering_rollback.go
- register_connected_distance.go
- register_dial_no_anchor.go
- register_domain_group.go
- register_failure_policy.go
- register_fib_withhold.go
- register_filter_origin.go
- register_gr_sender_facts.go
- register_initial_sync_barrier.go
- register_l2tp_failing_socket.go
- register_le_derived_artifact_lifecycle.go
- register_le_namespace_dispatch.go
- register_le_rfc_ledger_is_derived.go
- register_lg_pki.go
- register_managed_ca_trust.go
- register_modify_increment_med.go
- register_pppoe_padr_flood_linux.go
- register_pppoe_per_mac_cap_linux.go
- register_pppoe_service_name_linux.go
- register_prefixsid_announce_rail.go
- register_resolve_rir.go
- register_rsvpte_reload.go
- register_static_distance.go
- register_traceroute_source_af.go
- register_tx_protocol_external_plugin.go
- register_verify_reds_in_flight.go
- register_version_header_suppress.go
- routing_fixture.go
- routing_fixture_linux.go
- static_distance_fixture.go
- tunnel_fixture_ipsec.go
- tunnel_fixture_l2tp.go
- tunnel_fixture_l2tp_failing_socket.go
- tunnel_fixture_l2tp_ppp.go
- tunnel_fixture_l2tp_radius.go
- tunnel_fixture_l2tp_sccrq_avp.go
- tunnel_fixture_l2tp_session.go
- tunnel_fixture_pppoe.go
- tunnel_fixture_pppoe_linux.go
- tunnel_fixture_pppoe_padr_flood_linux.go
- tunnel_fixture_pppoe_per_mac_cap_linux.go
- ui_fixture_alias_peers.go
- ui_fixture_alias_summary.go
- ui_fixture_api_user_removed_by_reload.go
- ui_fixture_cli_data_config_dir.go
- ui_fixture_cli_format_default.go
- ui_fixture_cli_verb_daemon_dispatch.go
- ui_fixture_common.go
- ui_fixture_display_fill_completion.go
- ui_fixture_display_fill_filtered_command.go
- ui_fixture_display_fill_remainder.go
- ui_fixture_display_fill_select.go
- ui_fixture_doctor_config_claims.go
- ui_fixture_doctor_web_tls_pair.go
- ui_fixture_le_binary_dispatches.go
- ui_fixture_le_checks_answers.go
- ui_fixture_le_codegen_answers.go
- ui_fixture_le_consistency_answers.go
- ui_fixture_le_dev_gates.go
- ui_fixture_le_discovery_answers.go
- ui_fixture_le_docvalid_answers.go
- ui_fixture_le_evidence_answers.go
- ui_fixture_le_evidence_vpp_answers.go
- ui_fixture_le_functional_answers.go
- ui_fixture_le_go_extract_answers.go
- ui_fixture_le_inventory_answers.go
- ui_fixture_le_job_admits.go
- ui_fixture_le_l2tp_diagnostics_answers.go
- ui_fixture_le_namespace_dispatch.go
- ui_fixture_le_placement_answers.go
- ui_fixture_le_qemu_install_answers.go
- ui_fixture_le_qemu_run_answers.go
- ui_fixture_le_rfc_answers.go
- ui_fixture_le_rules_answers.go
- ui_fixture_le_spec_status_answers.go
- ui_fixture_le_ste_answers.go
- ui_fixture_le_vendor_web_answers.go
- ui_fixture_le_weekly_answers.go
- ui_fixture_pipe_alias_completion.go
- ui_fixture_pipe_interactive_save.go
- ui_fixture_pipe_review_entry_contracts.go
- ui_fixture_send_bgp.go
- ui_fixture_send_raw.go
- ui_fixture_show_bgp_children_do_not_inherit.go
- ui_fixture_show_bgp_declared_shapes.go
- ui_fixture_show_bgp_peer_list_column_order.go
- ui_fixture_show_bgp_peer_rows.go
- ui_fixture_show_bgp_plugin_shapes.go
- ui_fixture_show_bgp_summary_column_order.go
- ui_fixture_show_column_order_absent_unchanged.go
- ui_fixture_support_doctor_owner_check.go
- ui_fixture_update_delay.go
- ui_fixture_update_serve.go
- ui_fixture_web_commit_reject.go
- ui_fixture_web_recovery_session_survives_commit.go
- ui_fixture_web_user_removed_by_reload.go
- ui_fixture_ze_stripped_no_bgp.go
- ui_fixture_ze_stripped_surface.go
- vrrp_accept_mode_linux.go
- vrrp_track_linux.go