github.com/teknogeek/dnscontrol@v0.2.8/providers/linode/linodeProvider_test.go (about) 1 package linode 2 3 import ( 4 "testing" 5 ) 6 7 func TestFixTTL(t *testing.T) { 8 for i, test := range []struct { 9 given, expected uint32 10 }{ 11 {299, 300}, 12 {300, 300}, 13 {301, 3600}, 14 {2419202, 2419200}, 15 {600, 3600}, 16 {3600, 3600}, 17 } { 18 found := fixTTL(test.given) 19 if found != test.expected { 20 t.Errorf("Test %d: Expected %d, but was %d", i, test.expected, found) 21 } 22 } 23 }