mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
NS1: Improve NS1_URLFWD handling (#2015)
This commit is contained in:
@ -496,6 +496,10 @@ func tlsa(name string, usage, selector, matchingtype uint8, target string) *mode
|
||||
return r
|
||||
}
|
||||
|
||||
func urlfwd(name, target string) *models.RecordConfig {
|
||||
return makeRec(name, target, "URLFWD")
|
||||
}
|
||||
|
||||
func ignoreName(name string) *models.RecordConfig {
|
||||
r := &models.RecordConfig{
|
||||
Type: "IGNORE_NAME",
|
||||
@ -917,6 +921,12 @@ func makeTests(t *testing.T) []*TestGroup {
|
||||
tc("Update 1200 records", manyA("rec%04d", "1.2.3.5", 1200)...),
|
||||
),
|
||||
|
||||
testgroup("NS1_URLFWD tests",
|
||||
only("NS1"),
|
||||
tc("Add a urlfwd", urlfwd("urlfwd1", "/ http://example.com 302 2 0")),
|
||||
tc("Update a urlfwd", urlfwd("urlfwd1", "/ http://example.org 301 2 0")),
|
||||
),
|
||||
|
||||
//
|
||||
// CanUse* types:
|
||||
//
|
||||
|
Reference in New Issue
Block a user