Sha256: 562640466338d2889e333552d2a0cf998b307d1fcc97e6cb6a303c2cf388a700
Contents?: true
Size: 1.29 KB
Versions: 1
Compression:
Stored size: 1.29 KB
Contents
require_relative "../../../base" require "vagrant/util/template_renderer" describe "templates/guests/debian/network_dhcp" do let(:template) { "guests/debian/network_dhcp" } it "renders the template" do result = Vagrant::Util::TemplateRenderer.render(template, options: { device: "en0", }) expect(result).to eq <<-EOH.gsub(/^ {6}/, "") #VAGRANT-BEGIN # The contents below are automatically generated by Vagrant. Do not modify. auto eth iface eth inet dhcp post-up route del default dev $IFACE || true #VAGRANT-END EOH end context "when use_dhcp_assigned_default_route is set" do it "renders the template" do result = Vagrant::Util::TemplateRenderer.render(template, options: { device: "en0", use_dhcp_assigned_default_route: true, }) expect(result).to eq <<-EOH.gsub(/^ {8}/, "") #VAGRANT-BEGIN # The contents below are automatically generated by Vagrant. Do not modify. auto eth iface eth inet dhcp # We need to disable eth0, see GH-2648 post-up route del default dev eth0 || true post-up dhclient $IFACE pre-down route add default dev eth0 #VAGRANT-END EOH end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
vagrant-cloudstack-1.2.0 | vendor/bundle/bundler/gems/vagrant-c84e05fd063f/test/unit/templates/guests/debian/network_dhcp_test.rb |