Commit Graph

50 Commits

Author SHA1 Message Date
rallytime
6d78adbf08 Merge branch '2016.3' into '2016.11'
Conflicts:
  - doc/topics/tutorials/gitfs.rst
  - salt/fileserver/roots.py
  - salt/loader.py
2017-02-15 10:35:02 -07:00
Erik Johnson
4ff13acf8b salt.fileserver.roots: Fix regression in symlink_list (#39409)
A recent PR of mine removed the logic in symlink_list and fell back to
the cached file list generated in _file_lists(). However, this code
dates back from before the fileserver backends' symlink_list() functions
were modified to return a dict mapping links to their destinations.

This fixes the code in _file_lists() so that it returns the correct
data. It also fixes the fact that '.' was showing up in the dir list
produced by _file_lists(), and updates the associated integration test
to include the cachedir in the mocked opts.
2017-02-15 10:06:17 -07:00
rallytime
a782b00ee1 Merge branch '2016.3' into '2016.11'
Conflicts:
  - salt/cloud/clouds/openstack.py
2017-02-01 13:35:10 -07:00
Erik Johnson
bcee3d1ef6 Move fileclient tests to tests/integration/fileserver/fileclient_test.py (#39081)
Being in the root of tests/integration/, these were not being run in
jenkins and would only run if executed manually using the -n flag in
runtests.py.
2017-01-31 13:44:50 -07:00
Mihai Dinca
b0f0b4effc Make sha256 the default hash_type 2016-08-15 10:02:19 +02:00
Erik Johnson
58c4c01743 Add __role to master opts for gitfs integration tests 2016-02-02 21:58:50 -06:00
Erik Johnson
20c8badf4c Add __role to master opts for gitfs integration tests 2016-02-02 21:29:39 -06:00
Erik Johnson
a1ffa0c1c4 More test fixes 2015-07-22 10:40:49 -05:00
Erik Johnson
73192390a2 Test fixes 2015-07-22 00:48:43 -05:00
Mike Place
c5081179ef gitfs test lint fix 2015-02-10 14:57:28 -07:00
Mike Place
78309a0e2d Last time with find removed 2015-02-10 13:40:33 -07:00
Mike Place
dbd74fbeee Remove another test. 2015-02-10 11:54:16 -07:00
Mike Place
1e14c9d097 Disable gitfs test that does not produce valuable data 2015-02-10 10:06:01 -07:00
Pedro Algarvio
60f215f191 Add from __future__ import absolute_import 2015-01-30 22:25:04 +00:00
Pedro Algarvio
b32d86d0f4 Allow getting the configuration from scratch.
Properly handle `client_config` when loading from cache.
Only delete the `_client` attribute if it has been set.
2014-10-08 01:00:06 +01:00
Erik Johnson
ec07a8efea Get effective username using pwd.getpwduid() 2014-08-21 15:22:54 -05:00
Erik Johnson
43de873bb2 D'oh, needed to capitalize USERNAME 2014-08-21 14:35:36 -05:00
Erik Johnson
26a3db2ac8 Set USERNAME env var manually in test suite
This works around a known issue in GitPython when the USERNAME
environment variable is missing.
2014-08-21 12:19:31 -05:00
Erik Johnson
bf982d6893 Update gitfs test opts to reflect new gitfs config opts 2014-08-20 22:23:45 -05:00
Thomas S Hatch
da2f3543fd Skip gitfs tests
These are running in an incosistent way, all of our local tests pass
2014-07-11 15:17:58 -06:00
Erik Johnson
1fd16fa434 Refine gitfs tests
This adds a tearDown to ensure a clean copy of the repo for each test.
In addition, it removes the dependency on lexicographical order by
running a find_file() inside the two tests which require it in order to
ensure that the file exists in the gitfs cache.
2014-07-09 16:06:36 -06:00
Erik Johnson
d942c98ef6 Fix gitfs tests
This changes how the setUp function initializes and commits the repo
used as a gitfs remote by these tests. Instead of using the git.Git
class, it simply uses the index object to add and then commit. See here
for more info:

https://pythonhosted.org/GitPython/0.3.1/tutorial.html#the-index-object

Additionally, file_hash() and serve_file() are designed to check copies
of files that have been retrieved from the blobs, in
$cachedir/gitfs/refs/$saltenv/path/to/file. The paths have been fixed in
these two tests, and the sha1 test has been renamed to ensure that it is
executed after test_find_file, so that the file exists in the cache.
2014-07-08 18:56:12 -06:00
Mike Place
c4f5298d62 Create gitfs cache dir if does not exist
Should fix test suite
2014-06-17 12:04:53 -06:00
Mike Place
b278fcebff Use sha1 hash for gitfs tests 2014-06-16 16:16:57 -06:00
Pedro Algarvio
9e1634d386 Patch the gitfs opts with custom opts and not master opts.
It worked but this was, as it was, it's more explicit
2014-06-15 13:25:21 +01:00
Pedro Algarvio
0a10c4d2c7 Turns out all we needed was the correct load 2014-06-15 13:24:39 +01:00
Pedro Algarvio
79d7918271 Add missing path key to the load.
Minor PEP-8, global variable `load` -> `LOAD`
2014-06-15 13:18:36 +01:00
Pedro Algarvio
7b017fe9ab Skip test for now.
/CC: @cachedout
2014-06-15 13:05:19 +01:00
Pedro Algarvio
130788864f Skip tests on missing empty_dir 2014-06-15 13:05:19 +01:00
Pedro Algarvio
cf4a531e62 Fix ensure in syspath 2014-06-05 15:56:20 +01:00
Pedro Algarvio
81b93dc944 Skip tests which need the empty_dir.
These will run perfectly fine with the upcoming salt-runtests.
2014-06-05 11:54:07 +01:00
Pedro Algarvio
c3fbe4fe98 The cachedir configuration option needs to be set. 2014-06-05 11:10:24 +01:00
Pedro Algarvio
c8466453a0 Wrap text 2014-06-05 10:10:56 +01:00
Pedro Algarvio
ccbf2ebfb6 No hardcoded paths. Provide required additional configuration options. 2014-06-05 10:10:56 +01:00
Pedro Algarvio
649c7e6d01 Ensure proper path in syspath 2014-06-05 10:10:56 +01:00
Pedro Algarvio
36ea569d0d Don't use hard coded paths 2014-06-05 10:10:55 +01:00
Pedro Algarvio
af503bfdcf Skip test if unable to import the git python package 2014-06-01 07:05:52 +01:00
David Boucha
9dc182a2f4 fix codeauthor misspellings 2014-05-21 18:59:02 -06:00
Mike Place
702d51f55e Remove unecessary test. 2014-04-09 16:27:44 -06:00
Pedro Algarvio
7465f0511f Remove unused import 2014-02-12 15:36:17 +00:00
Pedro Algarvio
c15526852a Remove unused imports 2014-02-12 15:35:14 +00:00
Pedro Algarvio
2a31e4e38b Remove unused imports & Skip if no mock available 2014-02-08 07:54:31 +00:00
Pedro Algarvio
6144ac22f7 Remove unused imports & Skip if no mock available 2014-02-08 07:51:28 +00:00
Pedro Algarvio
d67488775e Remove unused imports & Skip if no mock available 2014-02-08 07:50:12 +00:00
Mike Place
6c991e3216 Extreme-self-tab-lart 2013-12-12 11:31:11 -07:00
Mike Place
7405a4eaf3 Pylinting. 2013-12-12 10:16:45 -07:00
Mike Place
6027940a55 More gitfs integration testing. 2013-12-12 10:16:45 -07:00
Thomas S Hatch
7ee36fce89 pylint fixes 2013-12-11 13:07:36 -07:00
Mike Place
d59d8ecfd7 Fileserver integration testing.
Finished the roots integration tests for now. Started on GitFS testing.
2013-12-10 17:45:54 -07:00
Mike Place
55ecc5d0ab Starting work on new set of tests for fileclient.
Also, more integration testing for templates.
2013-12-09 16:47:49 -07:00