Daniel Theophanes
d8ec5de5ee
sftp: update tests to finish and not panic on windows
...
Many Unix assuptions have been made when testing.
Previously running tests on windows threw a panic
part way through the tests. After these changes
many more tests pass when the fix was isolated
to the test itself, and none panic.
Some tests are skipped because they do make sense
on windows (chmod, chown), while others are skipped
just to how the test was implemented.
Lastly, some of the external executables were hard coded.
Change these to look paths in TestMain first. This is done
to better support windows, where openssh may be installed and
sftp and sftp-server may both be in the PATH.
2019-01-18 16:29:07 -08:00
John Eikenberry
4553269743
Fix #182 ; use ssh connection meta-data in example
2017-06-29 14:49:54 -07:00
xiu
a3ba113803
Fixes #177 : adds HostKeyCallback to ssh.ClientConfig
...
This is needed since https://github.com/golang/go/issues/19767
2017-04-26 18:31:26 +02:00
John Eikenberry
7aa3e48656
Have example sftp servers handle session EOF
...
As the EOF is expected when the client quits the session, have the
example servers handle it more gracefully so it is less confusing.
Fixes #169
2017-03-07 12:29:34 -08:00
John Eikenberry
b5277106cc
users in example servers should be the same
2017-03-07 12:28:52 -08:00
John Eikenberry
f436ee1e89
change package path back to original again
2017-02-18 18:20:37 -08:00
John Eikenberry
94ae9c6822
fix issue with out-of-order packets
2017-02-18 18:20:37 -08:00
John Eikenberry
52e562230f
fix import in example
2017-02-18 18:20:37 -08:00
John Eikenberry
9962211713
linter fixes
2017-02-18 18:20:37 -08:00
John Eikenberry
15d5c4cfef
gofmt hook having issues
2017-02-18 18:20:37 -08:00
John Eikenberry
b7df6d6ef6
initial version of in-memory example/test request backend
2017-02-18 18:20:37 -08:00
Robert Coleman
526cf9b2b3
make example server respect readOnly flag ( #108 )
2016-05-31 11:05:26 +10:00
Dave Cheney
f3fc26f1c3
General server cleanups ( #103 )
...
- no need to initalise mutexes, their zero value is valid
- make NewServer simpler, 90% of use cases already had an
io.ReadWriteCloser, in the single case that it it is easy to provide a
simple wrapper.
2016-05-29 16:32:05 +10:00
Matt Layher
8e47c759f5
server: remote rootDir parameter, as it does nothing
2016-01-16 12:41:01 -05:00
Matt Layher
403657b31e
server: use functional options for NewServer
2016-01-11 11:52:51 -05:00
Mike Houston
cf6c57c01f
Updates to code style
...
Replaced panic with log.Fatal
Removed old commented code line
Cleaned up declaration of flag variables
Fixed rootDir flag variable - was pointing to debugLevelStr
Log any final error returned by SFTP subsystem
2015-11-08 12:36:10 +00:00
Michael Houston
9287f24175
Created working example SFTP server
...
Purely gluing together the standalone_server and the SSH server examples, since
it took me a while to work out how they fit together. Thought it may save the next
person a few minutes!
2015-11-07 19:21:42 +00:00
Dave Cheney
97cfc9933a
removed gsftp, moved to github.com/constabulary/example-gsftp
2015-06-05 10:47:18 +10:00
Dave Cheney
750628aee1
Added -s flag to all benchmark programs
2015-05-23 22:03:37 +10:00
Dave Cheney
be8bb997e5
Add MaxPacket option to increase the size of the payload
...
% buffered-read-benchmark
2015/05/23 21:51:27 reading 1e+09 bytes
2015/05/23 21:51:53 read 1000000000 bytes in 25.668237836s
% buffered-read-benchmark -s 65536
2015/05/23 21:52:02 reading 1e+09 bytes
2015/05/23 21:52:20 read 1000000000 bytes in 18.419390056s
% buffered-read-benchmark -s 262144
2015/05/23 21:52:50 reading 1e+09 bytes
2015/05/23 21:53:08 read 1000000000 bytes in 18.367038236s
2015-05-23 21:53:59 +10:00
Otto Bretz
1c05ca70ba
New import paths for Go sub-respositories
...
see https://groups.google.com/forum/?fromgroups#!topic/golang-nuts/eD8dh3T9yyA
2014-11-06 09:30:12 +01:00
Dave Cheney
d72f41ea0b
remove tt
2014-10-22 20:49:39 +11:00
Dave Cheney
bcbcc6600d
Merge branch 'master' of https://github.com/pkg/sftp
2014-10-22 20:49:21 +11:00
Dave Cheney
c17d19e3f1
Added buffered benchmarks
2014-10-22 20:47:39 +11:00
Dave Cheney
0358f95a2a
Added streaming read and write benchmarks
2014-10-22 20:20:39 +11:00
jonathanpittman
7bbf9a0d66
Change log.Fatal to log.Fatalf
...
The first argument is a format string, so this should likely be log.Fatalf.
2014-05-13 23:09:14 -04:00
Saulius Gurklys
8d59c9c638
Fixed incompatibility with latest code.google.com/p/go.crypto/ssh
2014-04-10 15:37:10 +03:00
Dave Cheney
331b71c05b
Added more example and help text
2013-11-06 19:48:37 +11:00
Dave Cheney
7f887a54b8
added Client.Rename and example
2013-11-06 14:15:26 +11:00
Dave Cheney
af29244473
Added Client.Remove and example
2013-11-06 14:08:26 +11:00
Dave Cheney
402fa50430
added Write/writeAt and example
2013-11-06 13:04:40 +11:00
Dave Cheney
e7b8e37839
Added File.Stat and example
2013-11-06 12:36:05 +11:00
Dave Cheney
d533956e46
added File.Close
2013-11-06 11:30:01 +11:00
Dave Cheney
3f580d42b1
Added Client.Open method and example
2013-11-06 11:04:26 +11:00
Dave Cheney
be8a11c74d
Added example
2013-11-05 22:22:56 +11:00