--- # `vector test` unit tests for the VM-ingest routing transform. tests: - name: host_token_is_subject_safe inputs: - insert_at: tag type: log log_fields: host: "db1.syd1.example.net" message: "sshd accepted" outputs: - extract_from: tag conditions: - type: vrl source: | assert_eq!(.host_token, "db1_syd1_example_net") - name: missing_host_defaults_to_unknown inputs: - insert_at: tag type: log log_fields: message: "no host field" outputs: - extract_from: tag conditions: - type: vrl source: | assert_eq!(.host_token, "unknown")