mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 14:27:34 +00:00
fixed spelling error
This commit is contained in:
@@ -83,16 +83,16 @@ func (i *instance) Create(ctx context.Context, instance *domain.Instance) error
|
||||
// constraint violation
|
||||
if pgErr.Code == "23514" {
|
||||
if pgErr.ConstraintName == "instances_name_check" {
|
||||
return errors.New("instnace name not provided")
|
||||
return errors.New("instance name not provided")
|
||||
}
|
||||
if pgErr.ConstraintName == "instances_id_check" {
|
||||
return errors.New("instnace id not provided")
|
||||
return errors.New("instance id not provided")
|
||||
}
|
||||
}
|
||||
// duplicate
|
||||
if pgErr.Code == "23505" {
|
||||
if pgErr.ConstraintName == "instances_pkey" {
|
||||
return errors.New("instnace id already exists")
|
||||
return errors.New("instance id already exists")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -54,7 +54,7 @@ func TestCreateInstance(t *testing.T) {
|
||||
}
|
||||
return instance
|
||||
}(),
|
||||
err: errors.New("instnace name not provided"),
|
||||
err: errors.New("instance name not provided"),
|
||||
},
|
||||
{
|
||||
name: "adding same instance twice",
|
||||
@@ -78,7 +78,7 @@ func TestCreateInstance(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
return &inst
|
||||
},
|
||||
err: errors.New("instnace id already exists"),
|
||||
err: errors.New("instance id already exists"),
|
||||
},
|
||||
{
|
||||
name: "adding instance with no id",
|
||||
@@ -96,7 +96,7 @@ func TestCreateInstance(t *testing.T) {
|
||||
}
|
||||
return instance
|
||||
}(),
|
||||
err: errors.New("instnace id not provided"),
|
||||
err: errors.New("instance id not provided"),
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
|
Reference in New Issue
Block a user