kernel/v2: hostnames can be one character [GH-3713]
This commit is contained in:
parent
ef132cb84f
commit
338328fa15
|
@ -7,6 +7,10 @@ IMPROVEMENTS:
|
|||
- providers/docker: `build_args` config to specify extra args for
|
||||
`docker build`. [GH-3684]
|
||||
|
||||
BUG FIXES:
|
||||
|
||||
- core: Hostnames can be one character. [GH-3713]
|
||||
|
||||
## 1.6.1 (May 7, 2014)
|
||||
|
||||
IMPROVEMENTS:
|
||||
|
|
|
@ -480,7 +480,7 @@ module VagrantPlugins
|
|||
end
|
||||
|
||||
errors << I18n.t("vagrant.config.vm.hostname_invalid_characters") if \
|
||||
@hostname && @hostname !~ /^[a-z0-9][-.a-z0-9]+$/i
|
||||
@hostname && @hostname !~ /^[a-z0-9][-.a-z0-9]*$/i
|
||||
|
||||
if @box_version
|
||||
@box_version.split(",").each do |v|
|
||||
|
|
|
@ -134,6 +134,16 @@ describe VagrantPlugins::Kernel_V2::VMConfig do
|
|||
end
|
||||
end
|
||||
|
||||
describe "#hostname" do
|
||||
["a", "foo", "foo-bar", "baz0"].each do |valid|
|
||||
it "is valid: #{valid}" do
|
||||
subject.hostname = valid
|
||||
subject.finalize!
|
||||
assert_valid
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe "#network(s)" do
|
||||
it "defaults to forwarding SSH" do
|
||||
subject.finalize!
|
||||
|
|
Loading…
Reference in New Issue