mirror of
				https://github.com/StackExchange/dnscontrol.git
				synced 2024-05-11 05:55:12 +00:00 
			
		
		
		
	refactor into groups (#684)
* Refactor tests into "groups", each with its own filter (not/only/requires) to select which providers are appropriate. * Test driver code is now a lot more simple and clear. * Add support for not(), only(), and requires() as a way to select/reject providers for a test. * Add docs explaining how to add tests * Logging messages are much cleaner now, especially when tests are skipped. * -start and -end now refer to test groups, not individual tests. Log messages list the group numbers clearly. * Add stringer for Capabilities * Change the order of the tests so that simple tests are first * Removed knownFailures from providers.json * fmtjson providers.json Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
This commit is contained in:
		@@ -40,7 +40,7 @@ func init() {
 | 
			
		||||
 | 
			
		||||
// features declares which features and options are available.
 | 
			
		||||
var features = providers.DocumentationNotes{
 | 
			
		||||
	providers.CanUseAlias:            providers.Can(),
 | 
			
		||||
	providers.CanUseAlias:            providers.Can("Only on the bare domain. Otherwise CNAME will be substituted"),
 | 
			
		||||
	providers.CanUseCAA:              providers.Can(),
 | 
			
		||||
	providers.CanUsePTR:              providers.Can(),
 | 
			
		||||
	providers.CanUseSRV:              providers.Can(),
 | 
			
		||||
@@ -155,6 +155,11 @@ func PrepDesiredRecords(dc *models.DomainConfig) {
 | 
			
		||||
 | 
			
		||||
	recordsToKeep := make([]*models.RecordConfig, 0, len(dc.Records))
 | 
			
		||||
	for _, rec := range dc.Records {
 | 
			
		||||
		if rec.Type == "ALIAS" && rec.Name != "@" {
 | 
			
		||||
			// GANDI only permits aliases on a naked domain.
 | 
			
		||||
			// Therefore, we change this to a CNAME.
 | 
			
		||||
			rec.Type = "CNAME"
 | 
			
		||||
		}
 | 
			
		||||
		if rec.TTL < 300 {
 | 
			
		||||
			printer.Warnf("Gandi does not support ttls < 300. Setting %s from %d to 300\n", rec.GetLabelFQDN(), rec.TTL)
 | 
			
		||||
			rec.TTL = 300
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user