fix(api): naming cleanup in user and session service (#6379)

* fix(api): rename first and last name to given and family name, intent to idp_intent, remove _ actions

* fix merge

* fully rename intent to idp intent in api

---------

Co-authored-by: Tim Möhlmann <tim+github@zitadel.com>
This commit is contained in:
Livio Spring
2023-08-22 12:05:45 +02:00
committed by GitHub
parent f03a9d03b6
commit a9fb2a6e5c
17 changed files with 146 additions and 145 deletions

View File

@@ -24,7 +24,7 @@ import (
var ignoreTypes = []protoreflect.FullName{"google.protobuf.Duration", "google.protobuf.Struct"}
func Test_intentToIDPInformationPb(t *testing.T) {
func Test_idpIntentToIDPIntentPb(t *testing.T) {
decryption := func(err error) crypto.EncryptionAlgorithm {
mCrypto := crypto.NewMockEncryptionAlgorithm(gomock.NewController(t))
mCrypto.EXPECT().Algorithm().Return("enc")
@@ -44,7 +44,7 @@ func Test_intentToIDPInformationPb(t *testing.T) {
alg crypto.EncryptionAlgorithm
}
type res struct {
resp *user.RetrieveIdentityProviderInformationResponse
resp *user.RetrieveIdentityProviderIntentResponse
err error
}
tests := []struct {
@@ -113,7 +113,7 @@ func Test_intentToIDPInformationPb(t *testing.T) {
alg: decryption(nil),
},
res{
resp: &user.RetrieveIdentityProviderInformationResponse{
resp: &user.RetrieveIdentityProviderIntentResponse{
Details: &object_pb.Details{
Sequence: 123,
ChangeDate: timestamppb.New(time.Date(2019, 4, 1, 1, 1, 1, 1, time.Local)),
@@ -166,7 +166,7 @@ func Test_intentToIDPInformationPb(t *testing.T) {
},
},
res{
resp: &user.RetrieveIdentityProviderInformationResponse{
resp: &user.RetrieveIdentityProviderIntentResponse{
Details: &object_pb.Details{
Sequence: 123,
ChangeDate: timestamppb.New(time.Date(2019, 4, 1, 1, 1, 1, 1, time.Local)),
@@ -205,7 +205,7 @@ func Test_intentToIDPInformationPb(t *testing.T) {
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
got, err := intentToIDPInformationPb(tt.args.intent, tt.args.alg)
got, err := idpIntentToIDPIntentPb(tt.args.intent, tt.args.alg)
require.ErrorIs(t, err, tt.res.err)
grpc.AllFieldsEqual(t, tt.res.resp.ProtoReflect(), got.ProtoReflect(), grpc.CustomMappers)
})