mirror of
				https://github.com/TeaOSLab/EdgeAdmin.git
				synced 2025-11-04 05:00:25 +08:00 
			
		
		
		
	优化代码
This commit is contained in:
		@@ -14,13 +14,7 @@ func TestLoadAPIConfig(t *testing.T) {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func TestAPIConfig_WriteFile(t *testing.T) {
 | 
			
		||||
	config := &APIConfig{
 | 
			
		||||
		RPC: struct {
 | 
			
		||||
			Endpoints []string `yaml:"endpoints"`
 | 
			
		||||
		}{},
 | 
			
		||||
		NodeId: "1",
 | 
			
		||||
		Secret: "2",
 | 
			
		||||
	}
 | 
			
		||||
	config := &APIConfig{}
 | 
			
		||||
	err := config.WriteFile("/tmp/api_config.yaml")
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		t.Fatal(err)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user