Skip to content

Commit 2a77920

Browse files
committed
Initial commit
0 parents  commit 2a77920

File tree

7 files changed

+32
-0
lines changed

7 files changed

+32
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.project

blobs/data.dat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This is content in a data file!

project.ini

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[project]
2+
version = 1.0.0
3+
name = demo
4+
5+
[spec default]
6+
run_list = recipe[test-cookbook::default]
7+
8+
[blobs]
9+
Files=data.dat
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
file "/tmp/chef-text.txt" do
2+
content "This is a test written from chef!"
3+
end
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This is a test file!
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash
2+
3+
jetpack download data.dat /tmp/data.dat
4+
cat /tmp/data.dat > /tmp/test.txt
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import unittest
2+
3+
class TestCluster(unittest.TestCase):
4+
def test_chef(self):
5+
# The chef cookbook writes a file to disk, make sure it's there and has the write content
6+
with open('/tmp/chef-text.txt', 'r') as f:
7+
self.assertEquals("This is a test written from chef!", f.read())
8+
9+
def test_cluster_init(self):
10+
# The cluster init downloads a datafile (jetpack download) and then writes it's contents to a file
11+
# Make usre this is the case
12+
with open('/tmp/test.txt', 'r') as f:
13+
self.assertEquals("This is content in a data file!", f.read())

0 commit comments

Comments
 (0)