mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
New provider: Linode (#268)
This commit is contained in:
committed by
Tom Limoncelli
parent
25df50634d
commit
9a44e785ac
23
providers/linode/linodeProvider_test.go
Normal file
23
providers/linode/linodeProvider_test.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package linode
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestFixTTL(t *testing.T) {
|
||||
for i, test := range []struct {
|
||||
given, expected uint32
|
||||
}{
|
||||
{299, 300},
|
||||
{300, 300},
|
||||
{301, 3600},
|
||||
{2419202, 2419200},
|
||||
{600, 3600},
|
||||
{3600, 3600},
|
||||
} {
|
||||
found := fixTTL(test.given)
|
||||
if found != test.expected {
|
||||
t.Errorf("Test %d: Expected %d, but was %d", i, test.expected, found)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user