Skip to content

Commit

Permalink
Merge pull request #49 from chadell/release-v1.1.2
Browse files Browse the repository at this point in the history
Release v1.1.2
  • Loading branch information
chadell authored May 9, 2022
2 parents 0439603 + 06cbc55 commit da6a708
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 2 deletions.
6 changes: 6 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## v1.1.2 - 2022-05-09

### Fixed

- [#48](https://github.com/nautobot/nautobot-plugin-ssot/pull/48) - Fix introduced bug in #43, using a nonexistent method in an object.

## v1.1.1 - 2022-05-06

### Added
Expand Down
2 changes: 1 addition & 1 deletion nautobot_ssot/jobs/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def calculate_diff(self):
self.diff = self.source_adapter.diff_to(self.target_adapter, flags=self.diffsync_flags)
self.sync.diff = self.diff.dict()
self.sync.save()
self.log_info(message=self.sync.diff.summary())
self.log_info(message=self.diff.summary())
else:
self.log_warning(message="Not both adapters were properly initialized prior to diff calculation.")

Expand Down
11 changes: 11 additions & 0 deletions nautobot_ssot/tests/test_jobs.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test the Job classes in nautobot_ssot."""
from unittest.mock import Mock
import uuid
from django.contrib.contenttypes.models import ContentType

Expand Down Expand Up @@ -89,6 +90,16 @@ def test_run(self):
self.assertTrue(self.job.sync.dry_run)
self.assertEqual(self.job.job_result, self.job.sync.job_result)

def test_calculate_diff(self):
"""Test calculate_diff() method."""
self.job.sync = Mock()
self.job.source_adapter = Mock()
self.job.target_adapter = Mock()
self.job.source_adapter.diff_to().dict.return_value = {}
self.job.calculate_diff()
self.job.source_adapter.diff_to.assert_called()
self.job.sync.save.assert_called_once()


class DataSourceTestCase(BaseJobTestCase):
"""Test the DataSource class."""
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "nautobot-ssot"
version = "1.1.1"
version = "1.1.2"
description = "Nautobot Single Source of Truth"
authors = ["Network to Code, LLC <opensource@networktocode.com>"]
license = "Apache-2.0"
Expand Down

0 comments on commit da6a708

Please sign in to comment.