Merge "Remove salt-master, reclass from pkg dependencis"
diff --git a/.kitchen.travis.yml b/.kitchen.travis.yml
deleted file mode 100644
index 9b22c31..0000000
--- a/.kitchen.travis.yml
+++ /dev/null
@@ -1,6 +0,0 @@
-suites:
-
-  - name: <%= ENV['SUITE'] %>
-    provisioner:
-      pillars-from-files:
-        aptly.sls: tests/pillar/<%= ENV['SUITE'] %>.sls
diff --git a/.travis.yml b/.travis.yml
index c4761e3..7ea81dc 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -24,7 +24,8 @@
   - make test | tail
 
 script:
-  - KITCHEN_LOCAL_YAML=.kitchen.travis.yml bundle exec kitchen test -t tests/integration
+  - test ! -e .kitchen.yml || bundle exec kitchen converge ${SUITE} || true
+  - test ! -e .kitchen.yml || bundle exec kitchen verify ${SUITE} -t tests/integration
 
 notifications:
   webhooks:
diff --git a/README.rst b/README.rst
index 6321347..d84ba04 100644
--- a/README.rst
+++ b/README.rst
@@ -100,6 +100,20 @@
                distributions:
                  - nightly/trusty
 
+Proxy environment variables (optional) in cron job for mirroring script
+
+.. code-block:: yaml
+
+  aptly:
+    server:
+      enabled: true
+      ...
+      mirror_update:
+        enabled: true
+        http_proxy: "http://1.2.3.4:8000"
+        https_proxy: "http://1.2.3.4:8000"
+      ...
+
 Read more
 =========
 
diff --git a/aptly/server/mirrors.sls b/aptly/server/mirrors.sls
index cd19a10..5bdb17b 100644
--- a/aptly/server/mirrors.sls
+++ b/aptly/server/mirrors.sls
@@ -4,7 +4,7 @@
 
 aptly_mirror_update_cron:
   cron.present:
-  - name: "/usr/local/bin/aptly_mirror_update.sh -s"
+  - name: "{% if server.mirror_update.http_proxy is defined %}export http_proxy={{ server.mirror_update.http_proxy }}; {% endif %}{% if server.mirror_update.https_proxy is defined %}export https_proxy={{ server.mirror_update.https_proxy }}; {% endif %}/usr/local/bin/aptly_mirror_update.sh -s"
   - identifier: aptly_mirror_update
   - hour: "{{ server.mirror_update.hour }}"
   - minute: "{{ server.mirror_update.minute }}"
diff --git a/tests/pillar/default.sls b/tests/pillar/default.sls
index 8f85ef1..35431e3 100644
--- a/tests/pillar/default.sls
+++ b/tests/pillar/default.sls
@@ -16,6 +16,8 @@
       enabled: true
       hour: 2
       minute: random
+      http_proxy: "http://1.2.3.4:8000"
+      https_proxy: "https://1.2.3.4:8000"
     gpg_passphrase: passphrase
     gpg_private_key: |
       -----BEGIN PGP PRIVATE KEY BLOCK-----