Skip to content

Commit

Permalink
Strip rendered_config in diff
Browse files Browse the repository at this point in the history
  • Loading branch information
miaow2 committed Sep 29, 2023
1 parent 9cc3041 commit 0a22775
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion netbox_config_diff/compliance/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

def get_unified_diff(rendered_config: str, actual_config: str, device: str) -> str:
diff = unified_diff(
rendered_config.splitlines(),
rendered_config.strip().splitlines(),
actual_config.splitlines(),
fromfiledate=device,
tofiledate=device,
Expand Down
3 changes: 1 addition & 2 deletions tests/test_compliance_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
interface fa-0/0
switchport mode access
switchport access vlan 100
"""
switchport access vlan 100"""


@pytest.mark.parametrize(
Expand Down

0 comments on commit 0a22775

Please sign in to comment.