Skip to content

Commit

Permalink
Merge branch 'jessie-use-new-repos-for-testing' into 'jessie'
Browse files Browse the repository at this point in the history
autotest: Added new dev repo locations for testing

See merge request !19
  • Loading branch information
telyn committed Mar 3, 2017
2 parents e0203fe + 846efe7 commit 67c89c6
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 34 deletions.
5 changes: 2 additions & 3 deletions .gitlab-ci.yml
Expand Up @@ -13,11 +13,10 @@ stages:
script:
- adduser --home=/srv --shell=/bin/bash --no-create-home --disabled-login --gecos='Symbiosis Administrator,,,' admin
- chown admin.admin /srv
- cp autotest/test.d/conf/maker-sources.list /etc/apt/sources.list.d/
- cp autotest/test.d/conf/autotest-sources.list /etc/apt/sources.list.d/
- "[ -z \"$TEST_DEPS\" ] || (apt-get update ; apt-get install $TEST_DEPS)"
- export PACKAGE=${CI_BUILD_NAME##test:}
- cd $PACKAGE
- env
- "[ ! -f Makefile ] || make test"

test:backup:
Expand Down Expand Up @@ -155,7 +154,7 @@ publish:
- rm -fv /usr/sbin/policy-rc.d
- cd autotest
- echo ${CI_BUILD_NAME##install:} > test.d/conf/action
- "echo deb http://repo.bytemark.co.uk/symbiosis/$CI_BUILD_REF_SLUG/$CI_PIPELINE_ID/ ./ >> test.d/conf/maker-sources.list"
- "echo deb http://repo.bytemark.co.uk/symbiosis/$CI_BUILD_REF_SLUG/$CI_PIPELINE_ID/ ./ >> test.d/conf/autotest-sources.list"
- run-parts $VERBOSE --new-session --exit-on-error $PWD/test.d

#
Expand Down
11 changes: 0 additions & 11 deletions autotest/test.d/00-add-local-maker-host-alias

This file was deleted.

16 changes: 8 additions & 8 deletions autotest/test.d/05-install-and-upgrade
Expand Up @@ -12,8 +12,8 @@ if [ -f $PREFIX/conf/action ] ; then
ACTION=$(< ${PREFIX}/conf/action)
fi

# echo "Acquire::http::Proxy::maker2.bytemark.co.uk DIRECT;" > /etc/apt/apt.conf.d/95proxy
# echo "Acquire::http::Proxy \"http://maker2.bytemark.co.uk:3142\";" >> /etc/apt/apt.conf.d/95proxy
# echo "Acquire::http::Proxy::repo.bytemark.co.uk DIRECT;" > /etc/apt/apt.conf.d/95proxy
# echo "Acquire::http::Proxy \"http://$GATEWAY:3142\";" >> /etc/apt/apt.conf.d/95proxy

if [ "upgrade" = "$ACTION" ] ; then
echo "I: Installing current version of Symbiosis from repo.bytemark.co.uk"
Expand All @@ -23,7 +23,7 @@ if [ "upgrade" = "$ACTION" ] ; then
$PREFIX/02-seed-debconf

echo "I: Performing dist-upgrade"
$PREFIX/bin/apt-get-install $PREFIX/conf/maker-sources.list
$PREFIX/bin/apt-get-install $PREFIX/conf/autotest-sources.list

elif [ "dist-upgrade" = "$ACTION" ] ; then
#
Expand Down Expand Up @@ -59,20 +59,20 @@ elif [ "dist-upgrade" = "$ACTION" ] ; then
#
# If the install has failed, try to start pure-authd and carry on
#
if ! $PREFIX/bin/apt-get-install $PREFIX/conf/maker-sources.list ; then
if ! $PREFIX/bin/apt-get-install $PREFIX/conf/autotest-sources.list ; then
service pure-authd start
$PREFIX/bin/apt-get-install $PREFIX/conf/maker-sources.list
$PREFIX/bin/apt-get-install $PREFIX/conf/autotest-sources.list
fi

echo "I: Re-seed debconf"
$PREFIX/02-seed-debconf

echo "I: ensuring Symbiosis packages are installed"
$PREFIX/bin/apt-get-install $PREFIX/conf/maker-sources.list $PREFIX/conf/jessie-packages
$PREFIX/bin/apt-get-install $PREFIX/conf/autotest-sources.list $PREFIX/conf/jessie-packages
else


echo "I: Installing latest version of Symbiosis from maker2.bytemark.co.uk"
$PREFIX/bin/apt-get-install $PREFIX/conf/maker-sources.list $PREFIX/conf/jessie-packages
echo "I: Installing latest version of Symbiosis from repo.bytemark.co.uk"
$PREFIX/bin/apt-get-install $PREFIX/conf/autotest-sources.list $PREFIX/conf/jessie-packages
fi

14 changes: 14 additions & 0 deletions autotest/test.d/conf/autotest-sources.list
@@ -0,0 +1,14 @@
deb http://repo.bytemark.co.uk/open-source/netlinkrb/master/latest/jessie/ ./
deb http://repo.bytemark.co.uk/open-source/prosody-modules/master/latest/jessie/ ./
deb http://repo.bytemark.co.uk/open-source/ruby-cracklib/master/latest/jessie/ ./
deb http://repo.bytemark.co.uk/open-source/bytemark-keys/master/latest/jessie/ ./
deb http://repo.bytemark.co.uk/open-source/squirrelmail-change-pass/master/latest/jessie/ ./

#
# Ruby letsencrypt stuff
#
deb http://repo.bytemark.co.uk/open-source/ruby-acme-client/master-jessie/latest/jessie ./
deb http://repo.bytemark.co.uk/open-source/ruby-securecompare/master/latest/jessie ./
deb http://repo.bytemark.co.uk/open-source/ruby-json-jwt/master/latest/jessie ./
deb http://repo.bytemark.co.uk/open-source/ruby-bindata/master/latest/jessie ./
deb http://repo.bytemark.co.uk/open-source/ruby-url-safe-base64/master/latest/jessie ./
10 changes: 0 additions & 10 deletions autotest/test.d/conf/maker-sources.list

This file was deleted.

2 changes: 1 addition & 1 deletion common/debian/control
Expand Up @@ -10,7 +10,7 @@ XS-Ruby-Versions: all
Package: symbiosis-common
Architecture: all
XB-Ruby-Versions: ${ruby:Versions}
Depends: ruby | ruby-interpreter, ruby-acme-client (>= 0.2.4), ruby-linux-netlink, ruby-cracklib, ruby-erubis, ruby-mocha, ruby-webmock, ruby-test-unit, openssl, sudo, adduser, cracklib-runtime, ssl-cert, ${misc:Depends}
Depends: ruby | ruby-interpreter, ruby-acme-client (>= 0.3.5), ruby-linux-netlink, ruby-cracklib, ruby-erubis, ruby-mocha, ruby-webmock, ruby-test-unit, openssl, sudo, adduser, cracklib-runtime, ssl-cert, ${misc:Depends}
Replaces: symbiosis-firewall (<< 2011:1214), symbiosis-range, symbiosis-test, bytemark-vhost-range, bytemark-vhost-test, symbiosis-crack
Breaks: symbiosis-firewall (<< 2011:1214), symbiosis-email (<< 2012:0215)
Conflicts: symbiosis-range, symbiosis-test, symbiosis-crack, bytemark-vhost-range, bytemark-vhost-test, symbiosis-email (<< 2012:0215)
Expand Down
2 changes: 1 addition & 1 deletion common/test.d/tc_ssl_letsencrypt.rb
Expand Up @@ -283,7 +283,7 @@ def test_register
result = @client.registered?
assert(result, "#registered? should return true once registered")

assert_raise(Acme::Client::Error::Malformed, "#register should return raise an error on second attempt") { @client.register }
assert_raise(Acme::Client::Error::Unauthorized, "#register should return raise an error on second attempt") { @client.register }
end

def test_verify
Expand Down

0 comments on commit 67c89c6

Please sign in to comment.