Skip to content

Improve account copying#1069

Merged
braginini merged 1 commit intonetbirdio:mainfrom
surik:improve-account-copying
Aug 22, 2023
Merged

Improve account copying#1069
braginini merged 1 commit intonetbirdio:mainfrom
surik:improve-account-copying

Conversation

@surik
Copy link
Copy Markdown
Contributor

@surik surik commented Aug 9, 2023

With this fix, all nested slices and pointers will be copied by value.
Also, this fixes tests to compare the original and copy account by their values by marshaling them to JSON strings.

Before that, they were copying the pointers that also passed the simple = compassion (as the addresses match).

Describe your changes

Issue ticket number and link

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)
  • Extended the README / documentation, if necessary

@surik surik force-pushed the improve-account-copying branch from 16cff27 to 0384be8 Compare August 9, 2023 13:02
@surik surik marked this pull request as ready for review August 9, 2023 13:17
braginini
braginini previously approved these changes Aug 10, 2023
Copy link
Copy Markdown
Collaborator

@braginini braginini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Thanks for the PR!

@surik surik force-pushed the improve-account-copying branch from 0384be8 to 232985b Compare August 14, 2023 08:21
With this fix, all nested slices and pointers will be copied by value.
Also, this fixes tests to compare the original and copy account by their
values by marshaling them to JSON strings.

Before that, they were copying the pointers that also passed the simple `=` compassion
(as the addresses match).
@braginini braginini merged commit e586eca into netbirdio:main Aug 22, 2023
pulsastrix pushed a commit to pulsastrix/netbird that referenced this pull request Dec 24, 2023
With this fix, all nested slices and pointers will be copied by value.
Also, this fixes tests to compare the original and copy account by their
values by marshaling them to JSON strings.

Before that, they were copying the pointers that also passed the simple `=` compassion
(as the addresses match).
Foosec pushed a commit to Foosec/netbird that referenced this pull request May 8, 2024
With this fix, all nested slices and pointers will be copied by value.
Also, this fixes tests to compare the original and copy account by their
values by marshaling them to JSON strings.

Before that, they were copying the pointers that also passed the simple `=` compassion
(as the addresses match).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants