Add system.env, system.profile, system.proxy and configure proxy under system.repo
diff --git a/tests/integration/system/env_spec.rb b/tests/integration/system/env_spec.rb
new file mode 100644
index 0000000..2f5c689
--- /dev/null
+++ b/tests/integration/system/env_spec.rb
@@ -0,0 +1,12 @@
+
+## PROXIES
+#
+describe file('/etc/environment') do
+    it('should exist')
+    its('content') { should_not match /HTTPS_PROXY"/ }
+    its('content') { should match /HTTP_PROXY="http:\/\/127.0.4.2:80"/ }
+    its('content') { should match /BOB_PATH=/}
+    its('content') { should match /LC_ALL="C"/ }
+    its('content') { should match /ftp_proxy=.*127.0.4.3:2121/ }
+    its('content') { should match /NO_PROXY=.*dummy.net,.local/ }
+end
diff --git a/tests/integration/system/profile_spec.rb b/tests/integration/system/profile_spec.rb
new file mode 100644
index 0000000..d51c11e
--- /dev/null
+++ b/tests/integration/system/profile_spec.rb
@@ -0,0 +1,17 @@
+
+describe file('/etc/profile.d/salt_profile_vi_flavors.sh') do
+    it('should exist')
+    its('content') { should match /EDITOR=vim/ }
+    its('content') { should match /PAGER=view/ }
+    its('content') { should match /alias vi=vim/ }
+end
+
+describe file('/etc/profile.d/salt_profile_locales.sh') do
+    it('should exist')
+    its('content') { should match /LANG=en_US/ }
+end
+
+describe file('/etc/profile.d/prompt.sh') do
+    it('should exist')
+end
+
diff --git a/tests/integration/system/repo_spec.rb b/tests/integration/system/repo_spec.rb
new file mode 100644
index 0000000..91b4b9b
--- /dev/null
+++ b/tests/integration/system/repo_spec.rb
@@ -0,0 +1,17 @@
+
+# PROXIES
+#
+# globally
+describe file('/etc/apt/apt.conf.d/99proxies-salt') do
+    it('should exist')
+    its('content') { should_not match /ftp/ }
+    its('content') { should match /proxy "https.*127.0.2.1:4443"/ }
+end
+
+# per repo
+describe file('/etc/apt/apt.conf.d/99proxies-salt-opencontrail') do
+    it('should exist')
+    its('content') { should_not match /ftp/ }
+    its('content') { should match /Acquire::https::proxy::ppa.launchpad.net/ }
+end
+
diff --git a/tests/pillar/system.sls b/tests/pillar/system.sls
index d92dc8e..216bca5 100644
--- a/tests/pillar/system.sls
+++ b/tests/pillar/system.sls
@@ -90,7 +90,29 @@
         version: latest
     repo:
       opencontrail:
-        source: "deb http://ppa.launchpad.net/tcpcloud/contrail-2.20/ubuntu trusty main"
+        source: "deb http://ppa.launchpad.net/tcpcloud/contrail-3.0/ubuntu xenial main"
+        keyid: E79EE90C
+        keyserver: keyserver.ubuntu.com
+        architectures: amd64
+        proxy:
+          enabled: true
+          https: https://127.0.5.1:443
+          #http: http://127.0.5.2:8080
+      apt-mk-salt:
+        source: "deb http://apt-mk.mirantis.com/xenial stable salt"
+        key_url: http://apt-mk.mirantis.com/public.gpg
+        architectures: amd64
+        proxy:
+          enabled: true
+      apt-mk-salt-nightly:
+        source: "deb http://apt-mk.mirantis.com/xenial nightly salt"
+        key_url: http://apt-mk.mirantis.com/public.gpg
+        architectures: amd64
+        proxy:
+          enabled: false
+      apt-mk-extra-nightly:
+        source: "deb http://apt-mk.mirantis.com/xenial nightly extra"
+        key_url: http://apt-mk.mirantis.com/public.gpg
         architectures: amd64
     locale:
       en_US.UTF-8:
@@ -200,3 +222,46 @@
         sudogroup3:
           commands:
             - ALL
+    env:
+      BOB_VARIABLE: Alice
+      BOB_PATH:
+        - /srv/alice/bin
+        - /srv/bob/bin
+      HTTPS_PROXY: https://127.0.4.1:443
+      http_proxy: http://127.0.4.2:80
+      ftp_proxy: ftp://127.0.4.3:2121
+      no_proxy:
+        - 192.168.0.1
+        - 192.168.0.2
+        - .saltstack.com
+        - .ubuntu.com
+        - .mirantis.com
+        - .launchpad.net
+        - .dummy.net
+        - .local
+      LANG: C
+      LC_ALL: C
+    profile:
+      vi_flavors.sh: |
+        export PAGER=view
+        alias vi=vim
+      locales: |
+        export LANG=en_US
+        export LC_ALL=en_US.UTF-8
+
+    # pillar for proxy configuration
+    proxy:
+      # for package managers
+      pkg:
+        enabled: true
+        https: https://127.0.2.1:4443
+        #http: http://127.0.2.2
+        ftp: none
+      # fallback, system defaults
+      https: https://127.0.1.1:443
+      #http: http://127.0.1.2
+      ftp: ftp://127.0.1.3
+      noproxy:
+        - host1
+        - host2
+        - .local