Test for DNA json in Chef Solo
This commit is contained in:
parent
18cdcb4330
commit
29ced979a2
|
@ -18,4 +18,20 @@ describe "vagrant provisioning with chef solo" do
|
|||
results = assert_execute("vagrant", "ssh", "-c", "cat /tmp/chef_solo_basic")
|
||||
results.stdout.should == "success"
|
||||
end
|
||||
|
||||
it "merges JSON into the attributes" do
|
||||
# Copy the skeleton
|
||||
environment.skeleton!("chef_solo_json")
|
||||
|
||||
# Setup the basic environment
|
||||
require_box("default")
|
||||
assert_execute("vagrant", "box", "add", "base", box_path("default"))
|
||||
|
||||
# Bring up the VM
|
||||
assert_execute("vagrant", "up")
|
||||
|
||||
# Check for the file it should have created
|
||||
results = assert_execute("vagrant", "ssh", "-c", "cat /tmp/chef_solo_basic")
|
||||
results.stdout.should == "json_data"
|
||||
end
|
||||
end
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
# Chef Solo Basic Skeleton
|
||||
|
||||
This is a skeleton that contains a basic chef solo setup.
|
|
@ -0,0 +1,6 @@
|
|||
# Create a file where the contents is the data we set with
|
||||
# the Vagrantfile.
|
||||
file "/tmp/chef_solo_basic" do
|
||||
mode 0644
|
||||
content node[:test][:data]
|
||||
end
|
Loading…
Reference in New Issue