Skip to content

Bug: conn_child_is_list test fixture doesn't reach the intended code path #22

@majerr

Description

@majerr

Description

The conn_child_is_list entry in validate_configs_test.yml is intended to test that validate_config() returns NULL when a child of connection is a list rather than a length-1 character vector. However, the fixture is missing a driver_type field:

conn_child_is_list:
  connection:
    server:
      - foo
      - bar

validate_config() checks for driver_type first (line 55), so it returns NULL before ever reaching the connection-child validation at lines 70–75. The "child is list" code path is never exercised by this test.

Fix

Update the fixture so it has a valid driver_type and a Server field, with one connection child that is a vector of length > 1:

conn_child_is_list:
  driver_type: sqlite
  connection:
    Server: ":memory:"
    trusted_connection:
      - yes
      - no

And add a direct assertion (outside the if(interactive()) guard — see related issue) that validate_configs(configs["conn_child_is_list"]) returns an empty list.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions