Formulas testing revision 2019/10

Related: PROD-32744
Related: PROD-33634
Related: PROD-33698

Change-Id: I9cd02f611d032b97291d27e586480c650f2c1dfb
diff --git a/.kitchen.yml b/.kitchen.yml
index 177281b..49bddd3 100644
--- a/.kitchen.yml
+++ b/.kitchen.yml
@@ -17,10 +17,16 @@
   dependencies:
     - name: linux
       repo: git
-      source: https://github.com/salt-formulas/salt-formula-linux
+      source: https://gerrit.mcp.mirantis.com/salt-formulas/linux
+      branch: <%=ENV['GERRIT_BRANCH'] || 'release/2019.2.0' %>
     - name: apache
       repo: git
-      source: https://github.com/salt-formulas/salt-formula-apache
+      source: https://gerrit.mcp.mirantis.com/salt-formulas/apache
+      branch: <%=ENV['GERRIT_BRANCH'] || 'release/2019.2.0' %>
+    - name: oslo_templates
+      repo: git
+      source: https://gerrit.mcp.mirantis.com/salt-formulas/oslo-templates
+      branch: <%=ENV['GERRIT_BRANCH'] || 'release/2019.2.0' %>
   state_top:
     base:
       "*":
@@ -35,49 +41,85 @@
           - gnocchi
           - release
           - storage
-  pillars-from-files:
-    linux_repo_openstack.sls: tests/pillar/repo_mcp_openstack_<%= ENV['OS_VERSION'] || 'pike' %>.sls
 
 verifier:
   name: inspec
   sudo: true
 
+docker_images:
+  - &xenial-20177 <%=ENV['IMAGE_XENIAL_20177'] || 'docker-dev-local.docker.mirantis.net/mirantis/drivetrain/salt-formulas-ci/salt-formulas-ci-xenial-2017.7:latest'%>
+
 platforms:
-  - name: <%= ENV['PLATFORM'] || 'ubuntu-xenial' %>
+  - name: xenial-2017.7
     driver_config:
-      image: <%= ENV['PLATFORM'] || 'epcim/salt-formulas:saltstack-ubuntu-xenial-salt-2016.3' %>
+      image: *xenial-20177
       platform: ubuntu
 
 suites:
-
-  - name: server_cluster
+<% versions = { "pike" => "4.0", "queens" => "4.2"} %>
+<% versions.each do |os_version, gnocchi_version| %>
+  - name: server_cluster_<%=os_version%>_<%=gnocchi_version%>_file
     provisioner:
       pillars-from-files:
         gnocchi.sls: tests/pillar/server_cluster.sls
+        linux_repo_openstack.sls: tests/pillar/repo_mcp_openstack_<%=os_version%>.sls
       pillars:
         release.sls:
           gnocchi:
             common:
-              version: <%= ENV['GNOCCHI_VERSION'] || '4.0' %>
+              version: '<%=gnocchi_version%>'
         storage.sls:
           gnocchi:
             common:
               storage:
-                driver: <%= ENV['GNOCCHI_STORAGE'] || 'file' %>
+                driver: file
 
-  - name: server_single
+  - name: server_single_<%=os_version%>_<%=gnocchi_version%>_file
     provisioner:
       pillars-from-files:
         gnocchi.sls: tests/pillar/server_single.sls
+        linux_repo_openstack.sls: tests/pillar/repo_mcp_openstack_<%=os_version%>.sls
       pillars:
         release.sls:
           gnocchi:
             common:
-              version: <%= ENV['GNOCCHI_VERSION'] || '4.0' %>
+              version: '<%=gnocchi_version%>'
         storage.sls:
           gnocchi:
             common:
               storage:
-                driver: <%= ENV['GNOCCHI_STORAGE'] || 'file' %>
+                driver: file
 
+  - name: server_cluster_<%=os_version%>_<%=gnocchi_version%>_redis
+    provisioner:
+      pillars-from-files:
+        gnocchi.sls: tests/pillar/server_cluster.sls
+        linux_repo_openstack.sls: tests/pillar/repo_mcp_openstack_<%=os_version%>.sls
+      pillars:
+        release.sls:
+          gnocchi:
+            common:
+              version: '<%=gnocchi_version%>'
+        storage.sls:
+          gnocchi:
+            common:
+              storage:
+                driver: redis
+
+  - name: server_single_<%=os_version%>_<%=gnocchi_version%>_redis
+    provisioner:
+      pillars-from-files:
+        gnocchi.sls: tests/pillar/server_single.sls
+        linux_repo_openstack.sls: tests/pillar/repo_mcp_openstack_<%=os_version%>.sls
+      pillars:
+        release.sls:
+          gnocchi:
+            common:
+              version: '<%=gnocchi_version%>'
+        storage.sls:
+          gnocchi:
+            common:
+              storage:
+                driver: redis
+<% end %>
 # vim: ft=yaml sw=2 ts=2 sts=2 tw=125
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 1d0b0db..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,44 +0,0 @@
-language: python
-python:
-- "2.7.13"
-sudo: required
-services:
-  - docker
-
-install:
-  - pip install PyYAML
-  - pip install virtualenv
-  - |
-    if [ ! -e Gemfile ]; then
-       curl -s -o ./Gemfile 'https://gerrit.mcp.mirantis.com/gitweb?p=salt-formulas/salt-formulas-scripts.git;a=blob_plain;f=Gemfile;hb=refs/heads/master'
-    fi
-  - bundle install
-
-env:
-  - PLATFORM=epcim/salt-formulas:saltstack-ubuntu-xenial-salt-2017.7 GNOCCHI_VERSION=4.0 GNOCCHI_STORAGE=file OS_VERSION=pike SUITE=server_cluster
-  - PLATFORM=epcim/salt-formulas:saltstack-ubuntu-xenial-salt-2017.7 GNOCCHI_VERSION=4.0 GNOCCHI_STORAGE=redis OS_VERSION=pike SUITE=server_cluster
-  - PLATFORM=epcim/salt-formulas:saltstack-ubuntu-xenial-salt-2017.7 GNOCCHI_VERSION=4.0 GNOCCHI_STORAGE=file OS_VERSION=pike SUITE=server_single
-  - PLATFORM=epcim/salt-formulas:saltstack-ubuntu-xenial-salt-2017.7 GNOCCHI_VERSION=4.0 GNOCCHI_STORAGE=redis OS_VERSION=pike SUITE=server_single
-  #- PLATFORM=epcim/salt-formulas:saltstack-ubuntu-xenial-salt-2017.7 GNOCCHI_VERSION=4.2 GNOCCHI_STORAGE=file OS_VERSION=queens SUITE=server_cluster
-  #- PLATFORM=epcim/salt-formulas:saltstack-ubuntu-xenial-salt-2017.7 GNOCCHI_VERSION=4.2 GNOCCHI_STORAGE=redis OS_VERSION=queens SUITE=server_cluster
-  #- PLATFORM=epcim/salt-formulas:saltstack-ubuntu-xenial-salt-2017.7 GNOCCHI_VERSION=4.2 GNOCCHI_STORAGE=file OS_VERSION=queens SUITE=server_single
-  #- PLATFORM=epcim/salt-formulas:saltstack-ubuntu-xenial-salt-2017.7 GNOCCHI_VERSION=4.2 GNOCCHI_STORAGE=redis OS_VERSION=queens SUITE=server_single
-
-before_script:
-  - set -o pipefail
-  - make test | tail
-
-script:
-  - test ! -e .kitchen.yml || bundle exec kitchen converge ${SUITE} || true
-  - test ! -e .kitchen.yml || bundle exec kitchen verify ${SUITE} -t tests/integration
-
-notifications:
-  webhooks:
-    urls:
-      - https://webhooks.gitter.im/e/6123573504759330786b
-    on_success: change  # options: [always|never|change] default: always
-    on_failure: never  # options: [always|never|change] default: always
-    on_start: never     # options: [always|never|change] default: always
-    on_cancel: never    # options: [always|never|change] default: always
-    on_error: never    # options: [always|never|change] default: always
-  email: false
\ No newline at end of file
diff --git a/gnocchi/files/4.2/gnocchi.conf b/gnocchi/files/4.2/gnocchi.conf
index 27fc420..87933c0 100644
--- a/gnocchi/files/4.2/gnocchi.conf
+++ b/gnocchi/files/4.2/gnocchi.conf
@@ -124,7 +124,7 @@
 #operation_timeout = 10
 {%- if server.get('api', {}).refresh_timeout is defined %}
 operation_timeout = {{ server.api.refresh_timeout }}
-{%- elif server.api.operation_timeout is defined %}
+{%- elif server.get('api', {}).operation_timeout is defined %}
 operation_timeout = {{ server.api.operation_timeout }}
 {%- endif %}
 
diff --git a/tests/pillar/repo_mcp_openstack_pike.sls b/tests/pillar/repo_mcp_openstack_pike.sls
index 789b907..fe6af3c 100644
--- a/tests/pillar/repo_mcp_openstack_pike.sls
+++ b/tests/pillar/repo_mcp_openstack_pike.sls
@@ -3,10 +3,10 @@
     enabled: true
     repo:
       mirantis_openstack_repo:
-        source: "deb http://mirror.fuel-infra.org/mcp-repos/pike/{{ grains.get('oscodename') }} pike main"
+        source: "deb http://mirror.mirantis.com/update/2019.2.0/openstack-pike/{{ grains.get('oscodename') }} {{ grains.get('oscodename') }} main"
         architectures: amd64
-        key_url: "http://mirror.fuel-infra.org/mcp-repos/pike/{{ grains.get('oscodename') }}/archive-mcppike.key"
+        key_url: "http://mirror.mirantis.com/update/2019.2.0/openstack-pike/{{ grains.get('oscodename') }}/archive-pike.key"
         pin:
-        - pin: 'release a=pike'
+        - pin: 'release l=pike'
           priority: 1050
           package: '*'
\ No newline at end of file
diff --git a/tests/pillar/repo_mcp_openstack_queens.sls b/tests/pillar/repo_mcp_openstack_queens.sls
new file mode 100644
index 0000000..ebe1964
--- /dev/null
+++ b/tests/pillar/repo_mcp_openstack_queens.sls
@@ -0,0 +1,12 @@
+linux:
+  system:
+    enabled: true
+    repo:
+      mirantis_openstack_repo:
+        source: "deb http://mirror.mirantis.com/update/2019.2.0/openstack-queens/{{ grains.get('oscodename') }} {{ grains.get('oscodename') }} main"
+        architectures: amd64
+        key_url: "http://mirror.mirantis.com/update/2019.2.0/openstack-queens/{{ grains.get('oscodename') }}/archive-queens.key"
+        pin:
+        - pin: 'release l=queens'
+          priority: 1050
+          package: '*'
\ No newline at end of file
diff --git a/tests/pillar/server_cluster.sls b/tests/pillar/server_cluster.sls
index c56b373..39738f8 100644
--- a/tests/pillar/server_cluster.sls
+++ b/tests/pillar/server_cluster.sls
@@ -72,6 +72,10 @@
       auth_type: password
     cache:
       engine: memcached
+      expiration_time: 600
+      backend_argument:
+        memcached_expire_time:
+          value: 660
       members:
       - host: 127.0.1.1
         port: 11211