Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Ian Eiloart
Sympl
Commits
64996e33
Commit
64996e33
authored
May 13, 2016
by
Patrick J Cherry
Browse files
httpd: Added test to make sure links in sites-enabled are recreated
parent
51561576
Changes
1
Hide whitespace changes
Inline
Side-by-side
httpd/test.d/tb_symbiosois_httpd_configure.rb
View file @
64996e33
...
...
@@ -228,4 +228,35 @@ class TestSymbiosisHttpdConfigure < Test::Unit::TestCase
system
(
"
#{
@script
}
--root-dir
#{
@root
}
--no-reload
#{
domain2
.
name
}
"
)
end
def
test_recreate_sites_enabled_links_if_missing
domain
=
Symbiosis
::
Domain
.
new
(
nil
,
@prefix
)
domain
.
create
name
=
domain
.
name
FileUtils
.
mkdir_p
(
domain
.
htdocs_dir
)
#
# These are the files we expect to be in place.
#
domain_conf_fn
=
File
.
join
(
@apache2_dir
,
"sites-enabled"
,
domain
.
name
+
".conf"
)
#
# Don't create a public/htdocs directory for this domain and
# disable mass hosting
#
FileUtils
.
touch
(
"
#{
@root
}
/etc/symbiosis/apache.d/disabled.zz-mass-hosting"
)
system
(
"
#{
@script
}
--root-dir
#{
@root
}
--no-reload"
)
assert_equal
(
0
,
$?
.
exitstatus
,
"
#{
@script
}
exited with a non-zero status"
)
assert
(
File
.
exist?
(
domain_conf_fn
),
"File
#{
domain_conf_fn
}
is not present when it was on the cmd line."
)
File
.
unlink
(
domain_conf_fn
)
system
(
"
#{
@script
}
--root-dir
#{
@root
}
--no-reload"
)
assert
(
File
.
exist?
(
domain_conf_fn
),
"File
#{
domain_conf_fn
}
is not present when it was on the cmd line."
)
end
end
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment