Commit 3b14e028 authored by Łukasz Nowak's avatar Łukasz Nowak

component/caddy: Disable telemetry fully

Copied part of gowork.install:command to activate GO111MODULES and also the
[caddy] section is minimised, as the whole build happnes in proper place.
parent 0ae52767
[buildout] [buildout]
extends = extends =
../../component/golang/buildout.cfg ../../component/golang/buildout.cfg
gowork.cfg
parts = parts =
gowork
caddy caddy
[gowork.goinstall]
command = bash -c ". ${gowork:env.sh} && cd ${go_github.com_caddyserver_caddy:location} && GO111MODULE=on go install -v $(echo -n '${gowork:install}' |tr '\n' ' ')"
[gowork] [gowork]
# Caddy 1.x+ uses go modules, for which gowork does not work yet
golang = ${golang1.12:location} golang = ${golang1.12:location}
install = install =
github.com/caddyserver/caddy/...
[gowork.goinstall]
command = :
depends =
${caddy:recipe}
[caddy] [caddy]
# revision and repository can be used to control which caddy version is used recipe = plone.recipe.command
revision = v1.0.3 command = exit 0
repository = github.com/caddyserver/caddy/caddy
recipe = plone.recipe.command
update-command = ${:command} update-command = ${:command}
stop-on-error = True
# GO111MODULE=on enables go modules support
# the chmod is needed as modules are fetched with u-w
command =
. ${gowork:env.sh} &&
cd ${gowork:directory} &&
export GO111MODULE=on &&
go get ${:repository}@${:revision} &&
chmod -R u+w .
output = ${gowork:bin}/caddy output = ${gowork:bin}/caddy
location = ${:output} location = ${:output}
# Code generated by gowork-snapshot; DO NOT EDIT.
# list of go git repositories to fetch
[gowork.goinstall]
depends_gitfetch =
${go_github.com_caddyserver_caddy:recipe}
[go_github.com_caddyserver_caddy]
<= go-git-package
go.importpath = github.com/caddyserver/caddy
repository = https://lab.nexedi.com/nexedi/caddy.git
revision = nxd-v1.0.3-1-g2c11cedc
...@@ -1682,6 +1682,15 @@ class TestSlave(SlaveHttpFrontendTestCase, TestDataMixin): ...@@ -1682,6 +1682,15 @@ class TestSlave(SlaveHttpFrontendTestCase, TestDataMixin):
proto proto
) )
def test_telemetry_disabled(self):
# here we trust that telemetry not present in error log means it was
# really disabled
error_log_file = glob.glob(
os.path.join(
self.instance_path, '*', 'var', 'log', 'frontend-error.log'))[0]
with open(error_log_file) as fh:
self.assertNotIn('Sending telemetry', fh.read(), 'Telemetry enabled')
def test_url(self): def test_url(self):
parameter_dict = self.assertSlaveBase('Url') parameter_dict = self.assertSlaveBase('Url')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment