diff --git a/tests/golden_config_infra/templates/sample_golden_config_db.j2 b/tests/golden_config_infra/templates/sample_golden_config_db.j2 index 07a119dd2e5..634711e4225 100644 --- a/tests/golden_config_infra/templates/sample_golden_config_db.j2 +++ b/tests/golden_config_infra/templates/sample_golden_config_db.j2 @@ -1,7 +1,9 @@ {% set portchannels= [] %} -{% for pc, value in PORTCHANNEL.items() %} - {% set _ = portchannels.append(pc) %} -{% endfor %} +{% if PORTCHANNEL is defined %} + {% for pc, value in PORTCHANNEL.items() %} + {% set _ = portchannels.append(pc) %} + {% endfor %} +{% endif %} { "NEW_FEATURE": {