Skip to content

Commit

Permalink
Pass plan object, not list of records to apply
Browse files Browse the repository at this point in the history
  • Loading branch information
ross committed Apr 18, 2024
1 parent afcf7f2 commit ddf3992
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions tests/test_octodns_provider_googlecloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,12 +351,12 @@ def __init__(self, name, changes):
changes.append(Delete(delete_r))
changes.append(Update(existing=update_existing_r, new=update_new_r))

existing = Zone('unit.tests.', [])
existing.add_record(update_existing_r)
existing.add_record(delete_r)
provider.apply(
Plan(
existing=[update_existing_r, delete_r],
desired=desired,
changes=changes,
exists=True,
existing=existing, desired=desired, changes=changes, exists=True
)
)

Expand Down Expand Up @@ -394,9 +394,12 @@ def __init__(self, name, changes):
type(status_mock).status = "pending"

with self.assertRaises(RuntimeError):
existing = Zone('unit.tests.', [])
existing.add_record(update_existing_r)
existing.add_record(delete_r)
provider.apply(
Plan(
existing=[update_existing_r, delete_r],
existing=existing,
desired=desired,
changes=changes,
exists=True,
Expand Down

0 comments on commit ddf3992

Please sign in to comment.