mirror of
https://github.com/go-gitea/gitea.git
synced 2026-06-21 23:17:38 +02:00
fix
This commit is contained in:
parent
6bc7ee657b
commit
9d4c76a5e1
@ -52,11 +52,3 @@ func TestMigrateOptionsSSHKeyOwnerIDRoundtrip(t *testing.T) {
|
||||
assert.Equal(t, int64(42), got.SSHKeyOwnerID)
|
||||
}
|
||||
|
||||
// TestMigrateOptionsSSHKeyOwnerIDOmitemptyZero ensures the default value (use
|
||||
// repository owner's key) is omitted from the serialised JSON so existing task
|
||||
// payloads in the DB stay compact and backward-compatible.
|
||||
func TestMigrateOptionsSSHKeyOwnerIDOmitemptyZero(t *testing.T) {
|
||||
data, err := json.Marshal(MigrateOptions{})
|
||||
assert.NoError(t, err)
|
||||
assert.NotContains(t, string(data), "ssh_key_owner_id")
|
||||
}
|
||||
|
||||
@ -19,7 +19,7 @@ type MigrateOptions struct {
|
||||
AuthTokenEncrypted string `json:"auth_token_encrypted,omitempty"`
|
||||
// SSHKeyOwnerID overrides the owner whose managed SSH keypair authenticates
|
||||
// the SSH clone. 0 means use the target repository owner (the default).
|
||||
SSHKeyOwnerID int64 `json:"ssh_key_owner_id,omitempty"`
|
||||
SSHKeyOwnerID int64 `json:"ssh_key_owner_id"`
|
||||
// required: true
|
||||
UID int `json:"uid" binding:"Required"`
|
||||
// required: true
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user