summaryrefslogtreecommitdiff
path: root/spec/unit/provider/git_spec.rb
Commit message (Collapse)AuthorAgeFilesLines
* Fix some odd whitespacing in tests.Pete Higgins2020-06-241-3/+3
| | | | Signed-off-by: Pete Higgins <pete@peterhiggins.org>
* Align all our comments with the codeTim Smith2020-05-061-3/+3
| | | | | | Autocorrected with chefstyle after enabling that cop. It was very hard to read some complex autocorrected blocks w/o this. Signed-off-by: Tim Smith <tsmith@chef.io>
* Chef-16 git provider fixesLamont Granquist2020-04-231-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | The git provider now no longer checks out to a "deploy" branch by default and now checks out to the branch (with a remote upstream) or else checks out to a detatched head. The prior behavior can be restored by using "checkout branch 'deploy'". This also removes the SCM resource base class and replaces it with a resource partial and does some internal reorganization. It also introduces the RecipeDSLHelper for better functional tests and cleans up the functional tests of the git provider. Properties that were only ever implemented on the git provider were removed from the subversion provider where they had been inherited from the base class incorrectly. Some additional env var handling was added to the subversion handler in the process of sorting out the common properties, including HOME handling for alternative users. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Merge pull request #9627 from ↵Tim Smith2020-04-201-0/+37
|\ | | | | | | | | chef/Kapil/GitHub-2860_exception_raised_in_define_resource_requirements git resource: Fix for exceptions raised in why-run mode
| * Fix for exception raised in define resource requirementsKapil/GitHub-2860_exception_raised_in_define_resource_requirementsKapil Chouhan2020-04-171-0/+37
| | | | | | | | Signed-off-by: Kapil Chouhan <kapil.chouhan@msystechnologies.com>
* | Remove copyright dateslcg/remove-copyright-datesLamont Granquist2020-04-131-1/+1
|/ | | | | | | | Legally incredibly dubious, particularly since we don't follow it strictly as policy, and we have git history instead, which does it right. This is just a waste of time and a cargo cult. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Layout/AlignArgumentslcg/new-chefstyleLamont Granquist2019-07-021-38/+38
| | | | | | | | | | | | | | this is using: Layout/AlignArguments: Enabled: true EnforcedStyle: with_fixed_indentation the default style can use really excessive whitespace. on starting lines which are already long, it fully indents across to where the arguments start and then begins the line there. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* changes for rubocop engine upgrades.lcg/rubocop-upgradesLamont Granquist2019-01-151-1/+1
| | | | | | | this is the result of changes to rules we already previously had enabled. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Layout/LeadingCommentSpaceLamont Granquist2018-07-021-1/+1
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Layout/AlignHash caused by Style/HashSyntaxLamont Granquist2018-07-021-1/+1
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Layout/IndentHeredocLamont Granquist2018-07-021-15/+15
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Style/HashSyntaxLamont Granquist2018-07-021-106/+106
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Update specs for the quotingTim Smith2018-06-041-3/+3
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* sadly --prune-tags is not available with old git versions, fixes #7233Roland Moriz2018-05-101-4/+4
| | | | Signed-off-by: Roland Moriz <roland@moriz.de>
* prune remotes with git fetch, fixes #3929Roland Moriz2018-04-061-8/+8
| | | | Signed-off-by: Roland Moriz <roland@moriz.de>
* implement feedback from reviewkzwin2017-09-021-1/+22
| | | | Signed-off-by: kzwin <kz@example.org>
* test without stubkzwin2017-08-291-0/+4
| | | | Signed-off-by: kzwin <kz@example.org>
* lintedkzwin2017-08-281-16/+16
|
* handle apple gitkzwin2017-08-281-0/+30
| | | | Signed-off-by: kzwin <k.z.win@happyw.info>
* Merge pull request #4902 from MichaelPereira/handle-user-id-git-resourceThom May2016-05-181-0/+36
|\ | | | | Handle numeric id for the user value in the git resource
| * remove extra space from expected unit test outputMichael Pereira2016-05-101-1/+1
| |
| * try @thommay suggestion for resolving unit test issueMichael Pereira2016-05-101-1/+1
| |
| * Handle numeric id for the user value in the git resourceMichael Pereira2016-05-051-0/+36
| |
* | address chefstyle offensesJoshua C. Burt2016-04-271-10/+10
| |
* | correct spacing in the testsJoshua C. Burt2016-04-271-2/+2
| |
* | merge of external updates from jgit repoJoshua C. Burt2016-04-271-13/+36
|/
* autofixing whitespace copsLamont Granquist2016-02-051-40/+39
| | | | | | | | | | | | | | | | | | | | | | 4174 Style/SpaceInsideHashLiteralBraces 1860 Style/SpaceAroundOperators 1336 Style/SpaceInsideBlockBraces 1292 Style/AlignHash 997 Style/SpaceAfterComma 860 Style/SpaceAroundEqualsInParameterDefault 310 Style/EmptyLines 294 Style/IndentationConsistency 267 Style/TrailingWhitespace 238 Style/ExtraSpacing 212 Style/SpaceBeforeBlockBraces 166 Style/MultilineOperationIndentation 144 Style/TrailingBlankLines 120 Style/EmptyLineBetweenDefs 101 Style/IndentationWidth 82 Style/SpaceAroundBlockParameters 40 Style/EmptyLinesAroundMethodBody 29 Style/EmptyLinesAroundAccessModifier 1 Style/RescueEnsureAlignment
* Replace all Opscode copyrights with Chef Software.Noah Kantrowitz2016-02-021-1/+1
| | | Created via git ls-files | xargs perl -pi -e "s/(Copyright.*?), Opscode(,)? Inc(\.)?/\\1, Chef Software Inc./gi"
* Copyright year update for 2016 and massive cleanup.Noah Kantrowitz2016-02-021-1/+1
| | | Generated via git ls-files | xargs perl -pi -e "s/[Cc]opyright (?:\([Cc]\) )?((?\!$(date +%Y))\\d{4})(-\\d{4})?([, ][ \d]+)*(,|(?= ))/Copyright \\1-$(date +%Y),/g"
* Use double quotes by defaultThom May2016-01-141-28/+28
| | | | | | | This is an entirely mechanically generated (chefstyle -a) change, to go along with chef/chefstyle#5 . We should pick something and use it consistently, and my opinion is that double quotes are the appropriate thing.
* autocorrecting Style/TrailingCommalcg/trailing_commaLamont Granquist2016-01-131-2/+2
| | | | chefstyle -a fixed 1044 occurrances
* Execute and Script Resource improvementsLamont Granquist2014-12-081-0/+5
| | | | | | | | | | | - Warning on incorrect usage of the command resource in any script resource - Warning on code in script resource being nil - Specs added to force deprecation of incorrect usage in Chef-13 - Specs added around the (supported) incorrect usage in Chef-12 - Cleanup+Modernization of providers and specs - Fixed some global state bugs around the Chef::Log.level in the spec tests
* Update to RSpec 3.Claire McQuin2014-10-291-5/+5
|
* updating resources/providers unit tests to rpsec3Lamont Granquist2014-10-241-172/+172
| | | | mechanically generated patch using transpec 2.3.7 gem
* Merge pull request #2079 from jbence/CHEF-2065Serdar Sutay2014-10-101-0/+46
|\ | | | | Use exact match to locate remote git-reference
| * Add test for matching heads when no tag matchesJames Bence2014-09-271-0/+9
| |
| * Add fallback search for exact revision enteredJames Bence2014-09-241-0/+10
| |
| * Update specs for exact match on remote revisionsJames Bence2014-09-231-0/+27
| |
* | Work around breaking change in gitMal Graty2014-10-021-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In git 1.7.10 shallow clone behavior was changed from shallow cloning all branches by default, to only shallow cloning the branch being checked out. Unfortunately, this breaks prior and expected behavior in Chef as, on subsequent deploys it is not possible to switch branch, because no other branches exist in the cache-copy of the repo. To fix this we must use the `--no-single-branch` flag when performing the inital clone. Unfortunately this flag is not supported by git versions prior to 1.7.10, so we must check the version of git before deciding if the workaround is required. It probably makes sense to make this prior behavior optional in a future patch, however this one just seeks to give consistent results across all versions of git.
* | Fixed git provider specsjdmundrawala/git-windowsJay Mundrawala2014-09-291-3/+4
| |
* | Support checkout for git < 1.7.3jdmundrawala/git-centosJay Mundrawala2014-09-251-2/+2
|/
* cleanup: remove OVERRIDE_HOMEsawanoboly2014-08-211-1/+1
|
* HOME can overwrite by user with OVERRIDE_HOMEsawanoboly2014-08-211-28/+37
|
* add_env_to_scm_resourcesawanoboly2014-08-211-17/+28
|
* update git checkout test descriptionJordan Evans2014-07-281-1/+1
|
* fix broken testJordan Evans2014-07-251-1/+1
|
* updating git provider specs according to previous fix saving 1 system call ↵Raphaël Valyi2014-05-191-2/+2
| | | | during git sync
* quote git rev_pattern to prevent pathname expansionJeremiah Snapp2014-04-101-4/+4
|
* fix should_not raise_error(SpecificException)Lamont Granquist2014-01-291-1/+1
|
* s/mock\(/double(/gLamont Granquist2014-01-291-11/+11
|