clientupdate, net/dns: fix some "tailsacle" typos
Updates #cleanup Change-Id: I982175e74b0c8c5b3e01a573e5785e6596b7ac39 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
parent
92d3f64e95
commit
8d7894c68e
|
@ -19,11 +19,11 @@ func restartSystemdUnit(ctx context.Context) error {
|
||||||
}
|
}
|
||||||
defer c.Close()
|
defer c.Close()
|
||||||
if err := c.ReloadContext(ctx); err != nil {
|
if err := c.ReloadContext(ctx); err != nil {
|
||||||
return fmt.Errorf("failed to reload tailsacled.service: %w", err)
|
return fmt.Errorf("failed to reload tailscaled.service: %w", err)
|
||||||
}
|
}
|
||||||
ch := make(chan string, 1)
|
ch := make(chan string, 1)
|
||||||
if _, err := c.RestartUnitContext(ctx, "tailscaled.service", "replace", ch); err != nil {
|
if _, err := c.RestartUnitContext(ctx, "tailscaled.service", "replace", ch); err != nil {
|
||||||
return fmt.Errorf("failed to restart tailsacled.service: %w", err)
|
return fmt.Errorf("failed to restart tailscaled.service: %w", err)
|
||||||
}
|
}
|
||||||
select {
|
select {
|
||||||
case res := <-ch:
|
case res := <-ch:
|
||||||
|
|
|
@ -177,17 +177,17 @@ func TestReadResolve(t *testing.T) {
|
||||||
{in: `# nameserver 192.168.0.100`, want: OSConfig{}},
|
{in: `# nameserver 192.168.0.100`, want: OSConfig{}},
|
||||||
{in: `nameserver192.168.0.100`, wantErr: true},
|
{in: `nameserver192.168.0.100`, wantErr: true},
|
||||||
|
|
||||||
{in: `search tailsacle.com`,
|
{in: `search tailscale.com`,
|
||||||
want: OSConfig{
|
want: OSConfig{
|
||||||
SearchDomains: []dnsname.FQDN{"tailsacle.com."},
|
SearchDomains: []dnsname.FQDN{"tailscale.com."},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{in: `search tailsacle.com # typo`,
|
{in: `search tailscale.com # comment`,
|
||||||
want: OSConfig{
|
want: OSConfig{
|
||||||
SearchDomains: []dnsname.FQDN{"tailsacle.com."},
|
SearchDomains: []dnsname.FQDN{"tailscale.com."},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{in: `searchtailsacle.com`, wantErr: true},
|
{in: `searchtailscale.com`, wantErr: true},
|
||||||
{in: `search`, wantErr: true},
|
{in: `search`, wantErr: true},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,17 +44,17 @@ func TestParse(t *testing.T) {
|
||||||
{in: `# nameserver 192.168.0.100`, want: &Config{}},
|
{in: `# nameserver 192.168.0.100`, want: &Config{}},
|
||||||
{in: `nameserver192.168.0.100`, wantErr: true},
|
{in: `nameserver192.168.0.100`, wantErr: true},
|
||||||
|
|
||||||
{in: `search tailsacle.com`,
|
{in: `search tailscale.com`,
|
||||||
want: &Config{
|
want: &Config{
|
||||||
SearchDomains: []dnsname.FQDN{"tailsacle.com."},
|
SearchDomains: []dnsname.FQDN{"tailscale.com."},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{in: `search tailsacle.com # typo`,
|
{in: `search tailscale.com # comment`,
|
||||||
want: &Config{
|
want: &Config{
|
||||||
SearchDomains: []dnsname.FQDN{"tailsacle.com."},
|
SearchDomains: []dnsname.FQDN{"tailscale.com."},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{in: `searchtailsacle.com`, wantErr: true},
|
{in: `searchtailscale.com`, wantErr: true},
|
||||||
{in: `search`, wantErr: true},
|
{in: `search`, wantErr: true},
|
||||||
|
|
||||||
// Issue 6875: there can be multiple search domains, and even if they're
|
// Issue 6875: there can be multiple search domains, and even if they're
|
||||||
|
|
Loading…
Reference in New Issue