• Matthew Dempsky's avatar
    net: fix TestUpdateResolvConf after CL 18860 · 8caf19c4
    Matthew Dempsky authored
    When writing a fake dnsConfig to conf.dnsConfig, set lastChecked to an
    hour into the future.  This causes dnsclient_unix.go's
    tryUpdate("/etc/resolv.conf") calls to short-circuit and ignore that
    /etc/resolv.conf's mtime differs from the test's fake resolv.conf
    file.  We only need to zero out lastChecked in teardown.
    
    While here, this makes two other tryUpdate(conf.path) test calls
    pointless, since they'll now short circuit too.
    
    Fixes #14437.
    
    Change-Id: Ieb520388e319b9826dfa49f134907f4927608a53
    Reviewed-on: https://go-review.googlesource.com/19777
    Run-TryBot: Matthew Dempsky <mdempsky@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarMikio Hara <mikioh.mikioh@gmail.com>
    8caf19c4
Name
Last commit
Last update
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...