You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This sounds like a good idea and would complete document handling for drive.
The problem is that rclone can't verify the checksum or size when doing server side conversions. You would have to run it with --ignore-size to upload files.
It should nevertheless be possible to implement this feature.
I suggest --drive-import-formats as a new parameter to specify the wanted conversions. By default this has to be disabled, because the document conversion is not lossless and can not be reverted.
The --drive-formats should probably be renamed to --drive-export-formats to make the difference between both clearer.
Yes, I'm working on this (see B4dM4n/rclone#drive_import_formats)
It should be working already, but I would like to implement some tests to verify this.
@ncw I would like to add some tests to drive_test.go but I know it is generated from gen_tests.go. Any advice how I could add something like TestInternal to run before TestFinalise?
Edit:
How about this optional InternalTester interface for Fs?
This would generate a TestInternal function for each backend which checks for the interface and calls it when it exists.
diff --git a/fstest/fstests/fstests.go b/fstest/fstests/fstests.go
index 34229608..96b1ae21 100644
--- a/fstest/fstests/fstests.go+++ b/fstest/fstests/fstests.go@@ -57,6 +57,11 @@ var (
isLocalRemote bool
)
+// InternalTester is an optional interface for Fs which allows to execute internal tests+type InternalTester interface {+ InternalTest(*testing.T)+}+
// ExtraConfigItem describes a config item added on the fly while testing
type ExtraConfigItem struct{ Name, Key, Value string }
@@ -975,6 +980,16 @@ func TestObjectPurge(t *testing.T) {
assert.Error(t, err, "Expecting error after on second purge")
}
+// TestInternal calls InternalTest() on the Fs+func TestInternal(t *testing.T) {+ skipIfNotOk(t)+ if it, ok := remote.(InternalTester); ok {+ it.InternalTest(t)+ } else {+ t.Skipf("%T does not implement InternalTester", remote)+ }+}+
// TestFinalise tidies up after the previous tests
func TestFinalise(t *testing.T) {
skipIfNotOk(t)
The interface can be implemented in the backend_internal_test.go (subtests are only available on on go1.7+):
Hi
Please let me know when your test are fine on your side and i can also test
myself.
Regards
Le 19 févr. 2018 12:18, "Fabian Möller" <[email protected]> a écrit :
@dav1303
Sorry for the delay, but I didn't have time in the last weeks to work on this issue.
The problem I'm facing is mapping the real filename to a Google document name and back to a real filename for copy and sync to work properly.
I think I found a solution and will try to implement it in time for rclone v1.43.
Activity
B4dM4n commentedon Feb 6, 2018
This sounds like a good idea and would complete document handling for drive.
The problem is that rclone can't verify the checksum or size when doing server side conversions. You would have to run it with
--ignore-sizeto upload files.It should nevertheless be possible to implement this feature.
I suggest
--drive-import-formatsas a new parameter to specify the wanted conversions. By default this has to be disabled, because the document conversion is not lossless and can not be reverted.The
--drive-formatsshould probably be renamed to--drive-export-formatsto make the difference between both clearer.dav1303 commentedon Feb 16, 2018
@B4dM4n Did you plan to integrate this feature ?
B4dM4n commentedon Feb 19, 2018
Yes, I'm working on this (see B4dM4n/rclone#drive_import_formats)
It should be working already, but I would like to implement some tests to verify this.
@ncw I would like to add some tests to
drive_test.gobut I know it is generated fromgen_tests.go. Any advice how I could add something likeTestInternalto run beforeTestFinalise?Edit:
How about this optional
InternalTesterinterface forFs?This would generate a
TestInternalfunction for each backend which checks for the interface and calls it when it exists.The interface can be implemented in the
backend_internal_test.go(subtests are only available on on go1.7+):dav1303 commentedon Feb 21, 2018
dav1303 commentedon Mar 3, 2018
@B4dM4n have you finish your tests ?
Can i help you on tests ?
dav1303 commentedon May 1, 2018
Hello
Some news around that enhancement ?
Thanks
dav1303 commentedon May 20, 2018
Hello
@B4dM4n any news arround this feature ?
B4dM4n commentedon Jul 27, 2018
@dav1303
Sorry for the delay, but I didn't have time in the last weeks to work on this issue.
The problem I'm facing is mapping the real filename to a Google document name and back to a real filename for copy and sync to work properly.
I think I found a solution and will try to implement it in time for rclone v1.43.
dav1303 commentedon Jul 28, 2018
Hi
No problem
Take your time i would just want to follow.
Regards
B4dM4n commentedon Sep 1, 2018
There has been progress for this issue:
#2479 is a work in progress rewrite of the drive documents handling.
If anyone wants to help testing the new implementation, there is a beta branch containing the changes:
https://beta.rclone.org/branch/v1.42-162-g6a66967c-drive-documents/
Keep in mind this is not tested thoroughly yet and therefore be considered experimental.
Please post any feedback in #2479. Updated releases will also be anounced there.
B4dM4n commentedon Oct 4, 2018
#2479 has been merged lately.
This feature can be used since https://beta.rclone.org/v1.43-112-ga20fae03-beta/, the latest beta and in v1.44