mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-29 10:57:44 +09:00 
			
		
		
		
	Add integrations tests from git cli (#3377)
* test: integration add git cli tests Extracted form for easing review process and debug #3152 * test: integration add git cli big file commit * fix: Don't rewrite key if internal server
This commit is contained in:
		
				
					committed by
					
						 Lauris BH
						Lauris BH
					
				
			
			
				
	
			
			
			
						parent
						
							695b10bedd
						
					
				
				
					commit
					095fb9f2e3
				
			| @@ -304,6 +304,11 @@ func CheckPublicKeyString(content string) (_ string, err error) { | ||||
|  | ||||
| // appendAuthorizedKeysToFile appends new SSH keys' content to authorized_keys file. | ||||
| func appendAuthorizedKeysToFile(keys ...*PublicKey) error { | ||||
| 	// Don't need to rewrite this file if builtin SSH server is enabled. | ||||
| 	if setting.SSH.StartBuiltinServer { | ||||
| 		return nil | ||||
| 	} | ||||
|  | ||||
| 	sshOpLocker.Lock() | ||||
| 	defer sshOpLocker.Unlock() | ||||
|  | ||||
| @@ -532,6 +537,11 @@ func DeletePublicKey(doer *User, id int64) (err error) { | ||||
| // Note: x.Iterate does not get latest data after insert/delete, so we have to call this function | ||||
| // outside any session scope independently. | ||||
| func RewriteAllPublicKeys() error { | ||||
| 	//Don't rewrite key if internal server | ||||
| 	if setting.SSH.StartBuiltinServer { | ||||
| 		return nil | ||||
| 	} | ||||
|  | ||||
| 	sshOpLocker.Lock() | ||||
| 	defer sshOpLocker.Unlock() | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user