mirror of
				https://github.com/juanfont/headscale.git
				synced 2025-11-04 10:01:05 +01:00 
			
		
		
		
	Extended DNS config unit tests
This commit is contained in:
		
							parent
							
								
									c9e4da3ff5
								
							
						
					
					
						commit
						5dbf6b5127
					
				@ -117,12 +117,12 @@ func (*Suite) TestDNSConfigLoading(c *check.C) {
 | 
				
			|||||||
	err = cli.LoadConfig(tmpDir)
 | 
						err = cli.LoadConfig(tmpDir)
 | 
				
			||||||
	c.Assert(err, check.IsNil)
 | 
						c.Assert(err, check.IsNil)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	dnsConfig := cli.GetDNSConfig()
 | 
						dnsConfig, baseDomain := cli.GetDNSConfig()
 | 
				
			||||||
	fmt.Println(dnsConfig)
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	c.Assert(dnsConfig.Nameservers[0].String(), check.Equals, "1.1.1.1")
 | 
						c.Assert(dnsConfig.Nameservers[0].String(), check.Equals, "1.1.1.1")
 | 
				
			||||||
 | 
					 | 
				
			||||||
	c.Assert(dnsConfig.Resolvers[0].Addr, check.Equals, "1.1.1.1")
 | 
						c.Assert(dnsConfig.Resolvers[0].Addr, check.Equals, "1.1.1.1")
 | 
				
			||||||
 | 
						c.Assert(dnsConfig.Proxied, check.Equals, true)
 | 
				
			||||||
 | 
						c.Assert(baseDomain, check.Equals, "example.com")
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func writeConfig(c *check.C, tmpDir string, configYaml []byte) {
 | 
					func writeConfig(c *check.C, tmpDir string, configYaml []byte) {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user