Megan Marsh
ff6a039d5b
replace scrubconfig with packer.LogSecretFilter.Set
...
filter winrm password from logs
Add new root-level packer template option, sensitive-variables, to tell us what user variables to mark sensitive.
2018-08-20 15:35:55 -07:00
Ali Rizvi-Santiago
d4b00b722a
Removed an extra '/' from the TestFileExistsLocally test in common/config_test.go
2018-02-02 20:36:08 -06:00
Ali Rizvi-Santiago
efc97dbda2
Fixed TestFileExistsLocally tests in common/config_test.go so that they're actually being run. Added a non-existent-protocol:// test.
2018-02-02 20:29:10 -06:00
Ali Rizvi-Santiago
8a102a42a0
gofmt -w on common/config{,_test}.go
2018-01-18 23:09:53 -06:00
Ali Rizvi-Santiago
15079a99dc
Fixed common/config_test.go tests for DownloadableURL to avoid writing to disk on the windows platform. Also added tests for relative paths/uris.
...
common/config_test.go:
Replaced instances of os.Mkdir and os.Create with tests that use
the existing "common/test-fixtures" mechanism.
Removed the runtime.GOOS test for the "FileExistsLocally" test,
as the functionality should work regardless of the platform.
Added some more comprehensive tests for the relative uri/pathing.
Replaced the Windows Object Manager name test as the Object
Manager's naming scheme is different from a UNC path.
Modified the FilePaths tests to support the policy of windows absolute
paths being prefixed with the `/` introduced with PR #5761 .
2018-01-18 23:08:22 -06:00
Ali Rizvi-Santiago
50e9cd2ca7
Initial fixes of common/config.go after rebase before refactoring of test-cases so that they don't require root to run.
2018-01-16 13:46:27 -06:00
Ali Rizvi-Santiago
c17f827e1d
Split up DownloadableURL() into it's individual components: SupportedURL(), DownloadableURL(), and ValidatedURL(). Updated all instances of DownloadableURL() to point to ValidatedURL(). Reverted the tests that are based on un-supported protocols.
2018-01-16 13:37:32 -06:00
Ali Rizvi-Santiago
3cf448f6ec
Reverted previously removed additions of tests that check for ftp:// or nonexistent-protocol:// using DownloadableURL. DownloadableURL's responsibility is not to have inherent knowledge of protocols that are available, but to format an invalid url/path to a valid url/path.
2018-01-16 13:37:32 -06:00
Ali Rizvi-Santiago
4a1fb0d262
Grrr...gofmt -w common/*.go
2018-01-16 13:37:31 -06:00
Ali Rizvi-Santiago
5d97b105a8
Removed implementation of the ftp protocol and the usage of cheggaaa's progress-bar as suggested by @SwampDragons. Replaced some of the old smoke-tests that were based on the ftp-protocol non-existing with a "non-existent://" protocol that's guaranteed to not exist.
2018-01-16 13:37:31 -06:00
Ali Rizvi-Santiago
2f1104625d
Fixed some of the unit-tests in common/ due to the changes made in {config,download}.go
...
config.go:
Fixed some issues related to the url scheme not being lowercased which broke some of the tests.
config_test.go:
Removed the UNC share test for \\host\share\file since SMB support has been moved to a different uri scheme.
download_test.go:
Explicitly set the CopyFile configuration option for all the unit-tests that test file copying capability.
Removed the UNC share testcase since it's under a different uri scheme now.
Modified the file:// UNC share testcase to explicitly test the smb:// uri.
Changed the incorrect t.Errorf calls to t.Logf so that the tests can pass.
2018-01-16 13:37:30 -06:00
SwampDragons
fb730cf521
Merge pull request #5761 from hashicorp/fix_5713
...
fix nasty edge case where we can't find guest additions on windows if they are on a different drive
2018-01-11 11:48:26 -08:00
Megan Marsh
bdd186fa2b
add tests for fileexistslocally helper function
2018-01-10 16:44:27 -08:00
Megan Marsh
a04a921c2d
add UNC path to test cases, so I can try to enable it in future
2018-01-09 17:14:32 -08:00
Megan Marsh
154973241f
add a bunch of windows filepath tests
2018-01-09 16:57:52 -08:00
Megan Marsh
a3d5d40f78
reformat TestDownloadableURL into a table test to allow adding more URLS
2018-01-05 11:06:26 -08:00
Taliesin Sisson
e5510873bb
Added file with correct line endings
...
When dealing with windows the file url format is file:///c:/
On windows a lot of git clients will convert LF to CRLF. This would be a problem where file contents are compared exactly
2016-12-12 22:44:51 +00:00
Mitchell Hashimoto
adb6b43dd8
common: remove unused config methods
2015-05-27 14:58:09 -07:00
Mitchell Hashimoto
34834057c3
common: add test for empty val
2014-05-06 18:52:02 -07:00
Mitchell Hashimoto
ba05119a75
common: user variable conversion to non-string types works [GH-1079]
2014-04-28 16:18:45 -07:00
Mitchell Hashimoto
d5981c69f2
common: config strings to slices [GH-950]
2014-04-27 14:47:16 -07:00
Mitchell Hashimoto
5fac6c79c4
fmt
2014-04-26 11:12:43 -07:00
Mitchell Hashimoto
8395d0e97a
common: tests for ChooseSTring
2014-04-21 21:30:49 -07:00
Mitchell Hashimoto
7191c1f250
common: Fix URL parsing issues on Windows
2014-04-21 21:28:47 -07:00
Mitchell Hashimoto
4c6800f5a3
common: process user variables in non-string config decodes [GH-598]
2013-12-16 17:57:07 -08:00
Mitchell Hashimoto
48fb1f9dfb
common: fix tests
2013-12-06 18:36:16 -08:00
Matthew Hooker
5315b19822
common/config: config filter function [GH-521]
...
Fixes #521
2013-10-13 11:01:12 -07:00
Mitchell Hashimoto
5b7d8fbc74
rename builder/common to common since it is generally useful
2013-08-01 12:11:54 -07:00