Skip to content

Commit 2dddd31

Browse files
committed
Added webxray.hackasaurus.org and tests for it, as well as new tests for hackasaurus.org to ensure localization works.
1 parent 21f3cd6 commit 2dddd31

File tree

4 files changed

+47
-0
lines changed

4 files changed

+47
-0
lines changed

fabfile/testing.py

+17
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,23 @@ def testHomePageIsAccessible(self):
7979
f = vhostreq('http://hackasaurus.org/en-US/')
8080
self.assertTrue('Hackasaurus' in f.read())
8181

82+
def testSpanishLocaleIsAccessible(self):
83+
f = vhostreq('http://hackasaurus.org/es/')
84+
self.assertTrue('Superlentes' in f.read())
85+
86+
class WebxrayTests(unittest.TestCase):
87+
def testWebxrayJsIsAccessible(self):
88+
f = vhostreq('http://webxray.hackasaurus.org/webxray.js')
89+
self.assertTrue('webxrayWhenGogglesLoad' in f.read())
90+
91+
def testSrcDirIsAccessible(self):
92+
f = vhostreq('http://webxray.hackasaurus.org/src/get-bookmarklet-url.js')
93+
self.assertTrue('webxrayWhenGogglesLoad' in f.read())
94+
95+
def testSpanishLocaleIsAccessible(self):
96+
f = vhostreq('http://webxray.hackasaurus.org/src/locale/es.js')
97+
self.assertTrue('Superlentes' in f.read())
98+
8299
class MysqlTests(unittest.TestCase):
83100
def testRootLoginWorks(self):
84101
try_mysql_login('root', 'mysql_root_pw', 'mysql')

manifests/site.pp

+1
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@
66
include hackpub
77
include testswarm
88
include jsbin
9+
include webxray

modules/webxray/manifests/init.pp

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
class webxray {
2+
$site = 'webxray.hackasaurus.org'
3+
$rootDir = '/var/webxray.hackasaurus.org'
4+
$staticFilesDir = "$rootDir"
5+
6+
apache2::vhost { "$site":
7+
content => template("webxray/apache-site.conf.erb")
8+
}
9+
10+
file { "$rootDir":
11+
ensure => directory
12+
}
13+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<VirtualHost *:80>
2+
ServerName <%= site %>
3+
ServerAlias <%= site %>.dev
4+
5+
DocumentRoot <%= staticFilesDir %>
6+
<Directory />
7+
Options FollowSymLinks
8+
AllowOverride None
9+
</Directory>
10+
<Directory <%= staticFilesDir %>/>
11+
Options Indexes FollowSymLinks MultiViews
12+
AllowOverride FileInfo
13+
Order allow,deny
14+
allow from all
15+
</Directory>
16+
</VirtualHost>

0 commit comments

Comments
 (0)