Commit Graph

16 Commits

Author SHA1 Message Date
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