aboutsummaryrefslogtreecommitdiff
path: root/functional/server-jessie-stretch-debian.yaml
blob: 0a1fe60148d943ca0d119cd5f7f753a603a7feed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
device_type: lxc
job_name: Upgrade lava-server on jessie to stretch using debian

timeouts:
  job:
    hours: 1
  action:
    minutes: 2
  connection:
    minutes: 2
priority: medium
visibility: public

metadata:
  source: https://git.linaro.org/lava-team/refactoring.git
  path: functional/server-jessie-stretch-debian.yaml
  lava.series: release-testing

protocols:
  lava-lxc:
    name: server-unittests
    template: debian
    distribution: debian
    release: jessie
    mirror: http://ftp.uk.debian.org/debian/

actions:
- deploy:
    timeout:
      minutes: 20
    to: lxc

- boot:
    method: lxc
    timeout:
      minutes: 3
    prompts:
    - 'root@(.*):/#'

- test:
    timeout:
      hours: 1
    definitions:
    - repository:
        metadata:
          format: Lava-Test Test Definition 1.0
          name: jessie-stretch-upgrade
          description: "Install jessie base and upgrade to staging"
        run:
          steps:
          - apt -q update
          # fix up the hosts file before installing apache
          # need to have an image with backports enabled.
          - echo 127.0.0.1   localhost `hostname` >> /etc/hosts
          - echo "nameserver 8.8.8.8" >> /etc/resolv.conf
          - lava-test-case postgres --shell apt -y install postgresql wget whiptail
          # 2014.09-1
          - DEBIAN_FRONTEND=noninteractive apt-get -y install lava-dispatcher lava-server
          - dpkg-query -W lava-server
          - django-admin --version
          - lava-test-case ensite --shell a2ensite lava-server
          - a2dissite 000-default
          - a2enmod proxy
          - a2enmod proxy_http
          - lava-test-case apache --shell apache2ctl restart
          # add backports
          - echo "deb http://mirror.bytemark.co.uk/debian jessie-backports main" > /etc/apt/sources.list.d/lava-backports.list
          - apt -q update
          - DEBIAN_FRONTEND=noninteractive apt -q -y -t jessie-backports install python-django python-django-tables2 lava-server python-voluptuous python-pyudev python-django-restricted-resource lxc debootstrap
          # use current stretch
          - echo "deb http://mirror.bytemark.co.uk/debian stretch main" > /etc/apt/sources.list.d/lava-test.list
          - apt -q update
          - django-admin --version
          - DEBIAN_FRONTEND=noninteractive apt-get -y upgrade
          - DEBIAN_FRONTEND=noninteractive apt-get -y dist-upgrade
          # once helpers are available, add a device type, device & device dictionary here
          - lava-test-case devicedict --shell lava-server manage device-dictionary --help
          - lava-test-case env --shell cat /etc/lava-server/env.yaml
          - lava-test-case server --shell service lava-server-gunicorn status
          - lava-test-case master --shell service lava-master status
          - lava-test-case slave --shell service lava-slave status
          - lava-server manage migrate --no-color --no-input
          - lava-test-case dpkg -- shell dpkg-query -W lava-server
      from: inline
      name: stretch-upgrade-inline
      path: inline/stretch-upgrade.yaml

- test:
    timeout:
      minutes: 10
    definitions:
    - repository: http://git.linaro.org/lava-team/lava-functional-tests.git
      from: git
      path: lava-test-shell/smoke-tests-basic.yaml
      name: smoke-tests
    - repository: http://git.linaro.org/lava-team/lava-functional-tests.git
      from: git
      path: lava-test-shell/single-node/singlenode03.yaml
      name: singlenode-advanced