-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
make service alias unique #619
Conversation
Co-Authored-By: ilgooz <[email protected]>
I'm freezing this PR for now. Discussion needs to be finalized first. |
Anthony suggest to put the logic if the service alias already exist in the |
…it replace previous service
This PR is only about adding a new behavior to the database package. |
s3 := &service.Service{ID: "02", Alias: "2", Name: "test-service"} | ||
require.NoError(t, db.Save(s3)) | ||
ss, _ = db.All() | ||
require.Len(t, ss, 2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it'd be better also to compare received services here with Equal so we can make sure that we really overwrite the service with new one(s2) correctly.
LGTM |
a part of #618