summaryrefslogtreecommitdiff
path: root/spec
Commit message (Collapse)AuthorAgeFilesLines
* Hard Coding the gems in the gemfile to overcome a Ruby 3.1 bugJohn McCrae2022-04-041-1/+1
| | | | Signed-off-by: John McCrae <jmccrae@chf.io>
* fix broken windows teststestsmwrock2020-11-181-9/+10
| | | | Signed-off-by: mwrock <matt@mattwrock.com>
* Fix loading of spec support filesdocsTim Smith2020-11-161-2/+1
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Merge pull request #224 from ↵Tim Smith2020-11-121-0/+15
|\ | | | | | | | | MsysTechnologiesllc/Kapil/MSYS-1131_Retrieves_the_environment_variables_for_the_specified_user Signed-off-by: Tim Smith <tsmith@chef.io>
| * Added yard commentsKapil Chouhan2020-09-101-1/+1
| | | | | | | | Signed-off-by: Kapil Chouhan <kapil.chouhan@msystechnologies.com>
| * Added Dependency of ffi-win31-extensions gem and added test casesKapil Chouhan2020-09-091-0/+15
| | | | | | | | Signed-off-by: Kapil Chouhan <kapil.chouhan@msystechnologies.com>
* | Remove the path shifts in the spec helperloosen_win32_depTim Smith2020-10-291-2/+0
| | | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* | Simplify things a bit with &.safeTim Smith2020-09-091-3/+3
| | | | | | | | | | | | Use the latest and greatest ruby-isms to cut down on some code. Signed-off-by: Tim Smith <tsmith@chef.io>
* | Merge pull request #220 from chef/dirTim Smith2020-09-091-2/+2
|\ \ | | | | | | Signed-off-by: Tim Smith <tsmith@chef.io>
| * | Use __dir__ instead of __FILE__Tim Smith2020-09-081-2/+2
| |/ | | | | | | | | | | Makes things a bit easier to read Signed-off-by: Tim Smith <tsmith@chef.io>
* | chefstyleLamont Granquist2020-08-241-2/+3
| | | | | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | fix the helper spec testLamont Granquist2020-08-241-0/+11
|/ | | | | | | not pulling in mixlib-log as a test dep, but just monkeypatching a trace level into the ruby logger Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Fix a few typosspellingTim Smith2020-07-282-3/+3
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Fix a minor chefstyle comment alignment issueTim Smith2020-07-161-1/+1
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* chefstyleLamont Granquist2020-07-161-1/+1
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* this API isn't supported in 2.2Lamont Granquist2020-07-163-1/+16
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* add a simple smoke testlcg/extract-mixlib-shelloutLamont Granquist2020-07-161-0/+30
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* shellout_spec: make "current user" independent of the environmentAntonio Terceiro2020-03-081-1/+2
| | | | | | | | There is no guarantee that ENV["USER"] is always present, and in some environments, it's not. Get the current user from Etc.getpwuid, which works even in the absence of any environment variables. Signed-off-by: Antonio Terceiro <asa@terceiro.xyz>
* Blinding applying chefstyle -a.Ryan Davis2019-07-303-5/+8
| | | | Signed-off-by: Ryan Davis <zenspider@chef.io>
* Remove the unused platform helperTim Smith2019-06-061-2/+0
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Support array args on windowslcg/win-array-argsLamont Granquist2019-06-061-0/+84
| | | | | | | | | | | | | | | | | | | | | | Implements correct quoting and escaping of arguments on windows. That means that this works right now: ```ruby filename = "c:\program files" shell_out("dir", filename); ``` So all the defensive coding around quotes-around-filepaths -- which were all actually buggy even when they worked (trailing backslashes would fail) -- are unnecessary and arguments can just be passed in as an array and this code will sort it out. We rely on the existing determination of if metacharacters mean it needs to run under cmd and if it needs the ^ quoting which seems to be well tested, and which all runs after this does. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Update the github links in commentsTim Smith2018-10-231-5/+5
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* master of chefstyle + fixesLamont Granquist2018-07-062-8/+8
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* remove hashrocket syntaxlcg/remove-hashrocketsLamont Granquist2018-06-252-37/+37
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* add sensitive featuredheerajd-msys2018-06-151-6/+6
| | | | Signed-off-by: dheerajd-msys <dheeraj.dubey@msystechnologies.com>
* [MSYS-629] Added username,password validation for elavated option (#151)Nimisha Sharad2017-08-091-3/+13
| | | | | | * Added username,password validation for elavated option Signed-off-by: nimisha <nimisha.sharad@clogeny.com>
* Update error messages to indicate user who lacks privilege on WindowsBryan McLellan2017-07-191-1/+1
| | | | | | | In some cases the user running mixlib-shellout needs additional privileges, in other cases the user we're trying to run the process as needs them. Signed-off-by: Bryan McLellan <btm@loftninjas.org>
* Launch process with elevated tokenNimishaS2017-07-191-0/+8
| | | | Signed-off-by: NimishaS <nimisha.sharad@msystechnologies.com>
* spec cleanup and some light refactoringlcg/cleanup2Lamont Granquist2017-02-011-176/+131
| | | | | | | | | | | | | | | - mostly cleans up the windows specs so its easier to read the API out of them and removes some of the very brittle internal testing - refactors the 'which' logic a bit. trying to converge towards the chef/chef version and eventually extracting common code so that do not have to maintain 10+ slightly different copies everywhere. - adds the Mixlib::ShellOut::EmptyWindowsCommand exception because letting CreateProcessW throw a generic SystemCallError is pretty much useless to everyone. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* remove largely useless Utils classLamont Granquist2017-01-272-12/+11
| | | | | | | | its just a collection of private methods, they should be private methods retain a method in the class that was being used externally. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Resolve most chefstyle warningsTim Smith2016-10-073-380/+381
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Require Ruby 2.1+deprecateTim Smith2016-08-222-14/+1
| | | | | | Just removes some 1.9 logic from testing. Signed-off-by: Tim Smith <tsmith@chef.io>
* add logging message if attempting to kill critical processsmurawski/agressive_terminationSteven Murawski2016-06-061-5/+7
|
* Keep `kill_process_tree` from killing protected system processes.Steven Murawski2016-05-241-3/+43
|
* convert environment hash keys to stringsEvan Tschuy2015-11-101-0/+8
| | | | | | | by converting the hash keys to strings, we can use symbols in our environment blocks: environment {FOO: 'bar', SHELL: 'zsh'}
* improve the test to more accurately detrermine if child process is killedMatt Wrock2015-10-201-8/+5
|
* kill all windows child processes when the command times outMatt Wrock2015-09-241-0/+13
|
* make tests pass when run by a domain joined userMatt Wrock2015-09-241-2/+2
|
* prevent shellout from attempting to execute a directory on windowsMatt Wrock2015-09-111-0/+2
|
* have failing testMatt Wrock2015-09-111-0/+29
|
* Added comment for bugjdm/testJay Mundrawala2015-08-261-0/+10
|
* Don't use presence of fd to check if fd's were inheritedJay Mundrawala2015-08-261-2/+4
| | | | | | | | | This is breaking on windows with ruby 2.0.0p645. The issue seems to be that there is something at the fd, but it's not the file descriptor from the parent. Instead, we're now testing that both the fd exists and the file contains the contents that were written
* force expect syntaxLamont Granquist2015-05-151-0/+3
|
* rspec3ificationLamont Granquist2015-05-153-283/+350
|
* Merge pull request #94 from chef/lcg/no-getpgrpLamont Granquist2015-05-151-6/+6
|\ | | | | remove getpgrp back to setsid
| * remove getpgrp back to setsidlcg/no-getpgrpLamont Granquist2015-05-151-6/+6
| |
* | Fix 2 ruby warnings for uninitialized variablesdanielsdeleo2015-05-151-0/+3
|/
* Merge pull request #78 from BackSlasher/add-loginLamont Granquist2015-05-141-1/+83
|\ | | | | with_logon now simulates login in unix
| * Added TODO for next majorNitz2015-02-151-0/+3
| |
| * Option "login" now simulates login in unixNitz2015-02-151-1/+80
| | | | | | | | | | | | | | | | | | Added: * Secondary groups from etc files * Set environment variables like `su` would * Set primary group to user's primary group if no other group specified All only if `login` is set