Commit Graph

27 Commits

Author SHA1 Message Date
Adrien Delorme 23762a1810 fix tests for common/download_test.go 2018-09-06 15:53:59 +02:00
Adrien Delorme ddd96c513b first draft at self refreshing loading bar centralized/controlled by Ui 2018-09-06 15:53:59 +02:00
Ali Rizvi-Santiago 5726927cba Moved the progress bar out of packer.Ui and unlinked it out of all the packer.Ui implementations. Split up the terminal-related functions into a separate terminal.go and calculate the progress bar width by traversing through packer.Ui to avoid the issue with github.com/ugorji/go/codec serializing private members (or unsafe pointers) of structs. Shuffled some arguments around in getConsoleScreenBufferInfo in common/terminal_windows.go so that the interface forces the user to correctly declare a _CONSOLE_SCREEN_BUFFER_INFO type. 2018-08-20 21:55:18 -05:00
Ali Rizvi-Santiago 16ecb3ad9a Reverted removal of progress-bar that was done by commit 5d97b105a8 and added some missing arguments that were missed during the rebase. Modified the default progress bar's width to 80 as a result of the conversation on PR #5851. 2018-08-20 21:55:18 -05:00
Adrien Delorme 6b3844a64f
Revert "allow to use ISO images in-place v.s. copying them" 2018-08-20 10:48:06 +02:00
Adrien Delorme fae3db4e58 test inplace linking 2018-08-15 17:09:39 +02:00
Adrien Delorme 863222b1e2 Also use the terminology Inplace in DownloadConfig for clarity/consistency
* swapped boolean checks
* swapped in tests too
2018-08-15 15:26:31 +02:00
DanHam d9d8b93c14
Remove tmp file created by common/ test. Avoid possible race condition. 2018-05-09 22:09:05 +01:00
M. Marsh 7c46e3d89c
Merge pull request #6207 from gtirloni/issue-6203
[WIP] Handle HTTP download errors
2018-05-08 15:56:06 -07:00
DanHam 7e478f650e
Remove tmp files created by common/ tests 2018-04-30 18:16:46 +01:00
Giovanni Tirloni 413d13c411
Handle HTTP download errors 2018-04-26 18:59:30 -03: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 5a3e98b529 Updated the testcases in common/download_test.go to pass a non-nil progress-bar due to the removal of a pointer type in commit ed2e341b7d7f49a063dd5018701b4ae548b8ec14 from yesterday. 2018-01-16 13:37:31 -06:00
Ali Rizvi-Santiago 8c6efe336c Added second argument for custom-formatted progress-bar to NewDownloadClient in common/download_test.go. This second parameter was added as a result of commit f0bd9018f3e318caafb1fe7d46e04c470e07c092 which lets you customize the progress-bar format. 2018-01-16 13:37:31 -06:00
Ali Rizvi-Santiago 5a4ce2165c Modified common/download_test.go to not test the smb:// uri on platforms other than windows. Added an immediate platform error to SMBDownloader.Download as opposed to letting .toPath return it (which would have left the structure partially initialized). 2018-01-16 13:37:31 -06:00
Ali Rizvi-Santiago 4783b6508e Fix common/download_test.go to avoid formatting the volume name to a hidden windows share when not on windows. 2018-01-16 13:37:31 -06:00
Ali Rizvi-Santiago b1ff14714b go fmt 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
Ali Rizvi-Santiago da9c94b345 Added some testcases for the various file uri transforms to download_test.go
Moved some of the code for normalizing a Windows file uri to a regular path into it's own function NormalizeWindowsURL
2018-01-16 13:36:18 -06: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
Chris Bednarski 6e8c6a15ad Implement fix, add comments so it's more apparent why we're doing special logic 2015-08-14 17:49:08 -07:00
Chris Bednarski 7ecfb057ff Added test case to catch deleting local source file when checksum doesn't match 2015-08-14 17:37:57 -07:00
Mitchell Hashimoto 2f530534d2 common/download: resume test 2015-06-22 12:14:35 -07:00
Mitchell Hashimoto bf456f35f9 common: download client tests
/cc @cbednarski
2015-06-22 12:02:38 -07:00
Mark Rushakoff 9e5c0f6c6a HTTPDownloader uses UserAgent from DownloadConfig 2014-01-09 08:41:34 -08:00
Mitchell Hashimoto 01e998a81c common: support SHA512 as checksum type [Gh-356] 2013-08-28 09:09:43 -07:00
Mitchell Hashimoto 5b7d8fbc74 rename builder/common to common since it is generally useful 2013-08-01 12:11:54 -07:00