http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/10de190e/sshd-core/src/test/resources/org/apache/sshd/common/util/SecurityUtilsTest-DSA-KeyPair ---------------------------------------------------------------------- diff --git a/sshd-core/src/test/resources/org/apache/sshd/common/util/SecurityUtilsTest-DSA-KeyPair b/sshd-core/src/test/resources/org/apache/sshd/common/util/SecurityUtilsTest-DSA-KeyPair deleted file mode 100644 index 1d3ef24..0000000 --- a/sshd-core/src/test/resources/org/apache/sshd/common/util/SecurityUtilsTest-DSA-KeyPair +++ /dev/null @@ -1,12 +0,0 @@ ------BEGIN DSA PRIVATE KEY----- -MIIBvAIBAAKBgQDIPyMbBuQcZxeYDOyCqqkdK37cWQvp+RpWzvieB/oiG/ykfDQX -oZMRtwqwWTBfejNitbBBmC6G/t5OK+9aFmj7pfJ+a7fZKXfiUquIg9soDsoOindf -2AwR6MZ3os8uiP2xrC8IQAClnETa15mFShs4a4b2VjddgCQ6tphnY97MywIVAPtr -YyW11RIXsVTf/9KlbhYaNlt5AoGAX9JzbHykC/0xDKOyKU6xDIOVdEZ0ooAl9Psl -BEUuNhlv2XgmQScO6C9l2W7gbbut7zIw4FaZ2/dgXa3D4IyexBVug5XMnrssErZo -NcoF5g0dgEAsb9Hl9gkIK3VHM5kWteeUg1VE700JTtSMisdL8CgIdR+xN8iVH5Ew -CbLWxmECgYEAtv+cdRfNevYFkp55jVqazc8zRLvfb64jzgc5oSJVc64kFs4yx+ab -YpGX9WxNxDlG6g2WiY8voDBB0YnUJsn0kVRjBKX9OceROxrfT4K4dVbQZsdt+SLa -XWL4lGJFrFZL3LZqvySvq6xfhJfakQDDivW4hUOhFPXPHrE5/Ia3T7ACFQCE6flG -nmVCAbzo9YsbdJWBnxMnBA== ------END DSA PRIVATE KEY----- \ No newline at end of file
http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/10de190e/sshd-core/src/test/resources/org/apache/sshd/common/util/SecurityUtilsTest-DSA-KeyPair.pub ---------------------------------------------------------------------- diff --git a/sshd-core/src/test/resources/org/apache/sshd/common/util/SecurityUtilsTest-DSA-KeyPair.pub b/sshd-core/src/test/resources/org/apache/sshd/common/util/SecurityUtilsTest-DSA-KeyPair.pub deleted file mode 100644 index c0790ed..0000000 --- a/sshd-core/src/test/resources/org/apache/sshd/common/util/SecurityUtilsTest-DSA-KeyPair.pub +++ /dev/null @@ -1 +0,0 @@ -ssh-dss AAAAB3NzaC1kc3MAAACBAMg/IxsG5BxnF5gM7IKqqR0rftxZC+n5GlbO+J4H+iIb/KR8NBehkxG3CrBZMF96M2K1sEGYLob+3k4r71oWaPul8n5rt9kpd+JSq4iD2ygOyg6Kd1/YDBHoxneizy6I/bGsLwhAAKWcRNrXmYVKGzhrhvZWN12AJDq2mGdj3szLAAAAFQD7a2MltdUSF7FU3//SpW4WGjZbeQAAAIBf0nNsfKQL/TEMo7IpTrEMg5V0RnSigCX0+yUERS42GW/ZeCZBJw7oL2XZbuBtu63vMjDgVpnb92BdrcPgjJ7EFW6DlcyeuywStmg1ygXmDR2AQCxv0eX2CQgrdUczmRa155SDVUTvTQlO1IyKx0vwKAh1H7E3yJUfkTAJstbGYQAAAIEAtv+cdRfNevYFkp55jVqazc8zRLvfb64jzgc5oSJVc64kFs4yx+abYpGX9WxNxDlG6g2WiY8voDBB0YnUJsn0kVRjBKX9OceROxrfT4K4dVbQZsdt+SLaXWL4lGJFrFZL3LZqvySvq6xfhJfakQDDivW4hUOhFPXPHrE5/Ia3T7A= dsa-key-20130709 \ No newline at end of file http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/10de190e/sshd-core/src/test/resources/org/apache/sshd/common/util/SecurityUtilsTest-EC-256-KeyPair ---------------------------------------------------------------------- diff --git a/sshd-core/src/test/resources/org/apache/sshd/common/util/SecurityUtilsTest-EC-256-KeyPair b/sshd-core/src/test/resources/org/apache/sshd/common/util/SecurityUtilsTest-EC-256-KeyPair deleted file mode 100644 index 31b1268..0000000 --- a/sshd-core/src/test/resources/org/apache/sshd/common/util/SecurityUtilsTest-EC-256-KeyPair +++ /dev/null @@ -1,5 +0,0 @@ ------BEGIN EC PRIVATE KEY----- -MHcCAQEEIPKmiQzAASg656IP4PuuElLdLdO/MIXrGxQG6tGkKZ1HoAoGCCqGSM49 -AwEHoUQDQgAEobHtw9wkL332ep9fi8Gw5g8sEGwslNonPUCDR6YUZ9mjOehliLpF -DLHLxlIFafrVM+LIpagjpRKZcnpGPWQDnA== ------END EC PRIVATE KEY----- http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/10de190e/sshd-core/src/test/resources/org/apache/sshd/common/util/SecurityUtilsTest-EC-256-KeyPair.pub ---------------------------------------------------------------------- diff --git a/sshd-core/src/test/resources/org/apache/sshd/common/util/SecurityUtilsTest-EC-256-KeyPair.pub b/sshd-core/src/test/resources/org/apache/sshd/common/util/SecurityUtilsTest-EC-256-KeyPair.pub deleted file mode 100644 index 1c9763f..0000000 --- a/sshd-core/src/test/resources/org/apache/sshd/common/util/SecurityUtilsTest-EC-256-KeyPair.pub +++ /dev/null @@ -1 +0,0 @@ -ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBKGx7cPcJC999nqfX4vBsOYPLBBsLJTaJz1Ag0emFGfZoznoZYi6RQyxy8ZSBWn61TPiyKWoI6USmXJ6Rj1kA5w= root@osv-linux \ No newline at end of file http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/10de190e/sshd-core/src/test/resources/org/apache/sshd/common/util/SecurityUtilsTest-EC-384-KeyPair ---------------------------------------------------------------------- diff --git a/sshd-core/src/test/resources/org/apache/sshd/common/util/SecurityUtilsTest-EC-384-KeyPair b/sshd-core/src/test/resources/org/apache/sshd/common/util/SecurityUtilsTest-EC-384-KeyPair deleted file mode 100644 index 29af76f..0000000 --- a/sshd-core/src/test/resources/org/apache/sshd/common/util/SecurityUtilsTest-EC-384-KeyPair +++ /dev/null @@ -1,6 +0,0 @@ ------BEGIN EC PRIVATE KEY----- -MIGkAgEBBDB15z4n/vjug4fcEXPcgeonCHQuxJOwgFDIap/rgtM3EwuFDpE9wkfM -K64UwV1ZSlygBwYFK4EEACKhZANiAARSJmbXE4/ONrLZXFRyxQRcUxMe5bt41vWm -Qr3dK/X1DSmei20T4epdaCeKMwK58O163kAVHOaDXfRweUTSfI5dZ1l2OXFwQOzH -Gayma2JpPs8TYR+lC/pDC2iZMp4CR0M= ------END EC PRIVATE KEY----- http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/10de190e/sshd-core/src/test/resources/org/apache/sshd/common/util/SecurityUtilsTest-EC-384-KeyPair.pub ---------------------------------------------------------------------- diff --git a/sshd-core/src/test/resources/org/apache/sshd/common/util/SecurityUtilsTest-EC-384-KeyPair.pub b/sshd-core/src/test/resources/org/apache/sshd/common/util/SecurityUtilsTest-EC-384-KeyPair.pub deleted file mode 100644 index 93ceef0..0000000 --- a/sshd-core/src/test/resources/org/apache/sshd/common/util/SecurityUtilsTest-EC-384-KeyPair.pub +++ /dev/null @@ -1 +0,0 @@ -ecdsa-sha2-nistp384 AAAAE2VjZHNhLXNoYTItbmlzdHAzODQAAAAIbmlzdHAzODQAAABhBFImZtcTj842stlcVHLFBFxTEx7lu3jW9aZCvd0r9fUNKZ6LbRPh6l1oJ4ozArnw7XreQBUc5oNd9HB5RNJ8jl1nWXY5cXBA7McZrKZrYmk+zxNhH6UL+kMLaJkyngJHQw== root@osv-linux \ No newline at end of file http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/10de190e/sshd-core/src/test/resources/org/apache/sshd/common/util/SecurityUtilsTest-EC-521-KeyPair ---------------------------------------------------------------------- diff --git a/sshd-core/src/test/resources/org/apache/sshd/common/util/SecurityUtilsTest-EC-521-KeyPair b/sshd-core/src/test/resources/org/apache/sshd/common/util/SecurityUtilsTest-EC-521-KeyPair deleted file mode 100644 index 43f79d7..0000000 --- a/sshd-core/src/test/resources/org/apache/sshd/common/util/SecurityUtilsTest-EC-521-KeyPair +++ /dev/null @@ -1,7 +0,0 @@ ------BEGIN EC PRIVATE KEY----- -MIHcAgEBBEIBUacw+zn8Mw0PYaqqtAlOyaVXARegI6sK5YBhl5E1l9sqTzVN77ce -1RrqQ8smfvZ6Hiw5gdGcPTszbiorVV5npg6gBwYFK4EEACOhgYkDgYYABACg4siC -q1iqr4U/spXmw6b2VwBMsof7XLQGoD9wfwUikb8XWthNSmPP1nL6rlzJ5j8Bezn9 -BSSDfVAJfgqxmGIHdgHRVc0mkdq1/Q/DKhBgRyjZc29eo0o2ck3SNGNVaAabRYj6 -ck/iub/U6trKM7bdqy/joYYMwZdxLyYW5YxkPbqEfQ== ------END EC PRIVATE KEY----- http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/10de190e/sshd-core/src/test/resources/org/apache/sshd/common/util/SecurityUtilsTest-EC-521-KeyPair.pub ---------------------------------------------------------------------- diff --git a/sshd-core/src/test/resources/org/apache/sshd/common/util/SecurityUtilsTest-EC-521-KeyPair.pub b/sshd-core/src/test/resources/org/apache/sshd/common/util/SecurityUtilsTest-EC-521-KeyPair.pub deleted file mode 100644 index 520b64e..0000000 --- a/sshd-core/src/test/resources/org/apache/sshd/common/util/SecurityUtilsTest-EC-521-KeyPair.pub +++ /dev/null @@ -1 +0,0 @@ -ecdsa-sha2-nistp521 AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1MjEAAACFBACg4siCq1iqr4U/spXmw6b2VwBMsof7XLQGoD9wfwUikb8XWthNSmPP1nL6rlzJ5j8Bezn9BSSDfVAJfgqxmGIHdgHRVc0mkdq1/Q/DKhBgRyjZc29eo0o2ck3SNGNVaAabRYj6ck/iub/U6trKM7bdqy/joYYMwZdxLyYW5YxkPbqEfQ== root@osv-linux \ No newline at end of file http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/10de190e/sshd-core/src/test/resources/org/apache/sshd/common/util/SecurityUtilsTest-RSA-KeyPair ---------------------------------------------------------------------- diff --git a/sshd-core/src/test/resources/org/apache/sshd/common/util/SecurityUtilsTest-RSA-KeyPair b/sshd-core/src/test/resources/org/apache/sshd/common/util/SecurityUtilsTest-RSA-KeyPair deleted file mode 100644 index afc6aa8..0000000 --- a/sshd-core/src/test/resources/org/apache/sshd/common/util/SecurityUtilsTest-RSA-KeyPair +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIEoQIBAAKCAQEAxr3N5fkt966xJINl0hH7Q6lLDRR1D0yMjcXCE5roE9VFut2c -tGFuo90TCOxkPOMnwzwConeyScVF4ConZeWsxbG9VtRh61IeZ6R5P5ZTvE9xPdZB -gIEWvU1bRfrrOfSMihqF98pODspE6NoTtND2eglwSGwxcYFmpdTAmu+8qgxgGxlE -aaCjqwdiNPZhygrH81Mv2ruolNeZkn4Bj+wFFmZTD/waN1pQaMf+SO1+kEYIYFNl -5+8JRGuUcr8MhHHJB+gwqMTF2BSBVITJzZUiQR0TMtkK6Vbs7yt1F9hhzDzAFDwh -V+rsfNQaOHpl3zP07qH+/99A0XG1CVcEdHqVMwIBIwKCAQALW02YHN4OJz1Siypj -xoNi87slUaBKBF/NlkWauGUIcpZFMTwnkIn6vCz5MhRbQC4oadRDzFNUrC/g7HdH -prlqYe2P7uEGIfMb3YNFdk3tgOHmRsHqFgFMpVWsOjlTxNTUsQ74N3Isuxnha4wY -9f90sBULc+WRdRvO9jbkSDaqoYVKAqCFWtocL+ZWwBXWrIrsQW4PElgZ/duc5DX7 -eeJ5DXCSj9dO+1KxsWEOKaoeABEegrRVys1/shcDNPhf/p0QShKIdPcpnDUc8cny -1bq8GSt6jEQ+tuRoSnYrY+RD+mlkHrx373Xc1a9woV+QKTThmd9TQ8gzHMHNqq0a -7kR7AoGBAOuPOTRiKaDtQyMTEX7eeHsPNE24EgvONjNpxyQ6gKGthG5SiB0IO7mP -r7EggbR2EY8eMCY5HjvxzxgH86n2Pqbzsr6UlQq7YTPupCm/7fPgRknu917GA20f -1cuY8B04Jp4FIGryBmCcScX6usXXhjfAvYCWWfkSytA8gX9+b1TNAoGBANf8shbp -wRnQfgAzw2S+xs29pdwa6Jb/xuLvHSyklmgidrK4nsVI8G+zeCqwkqkNM02sM+vR -c8EX7+myrGf+S2V3JS3AMNXEhavrWVH0CuqFHlBjSwHZ0uKuPpWHlCnud+23AdQz -Bf1H7tYKt5es3J/B37o4YxhAL6U9qq+ewZH/AoGBAOTURjLjA94oT9jt870SoOyS -bVLQEYfPol3UeE8UQnEsN4Ec+UDGK2PNaNfzsTL2WjNB5aF5UJIA184znD60seQC -raMxQFORdF5ViYekgMEFwJ+XrnlSpD4e7PGqgtqOUWZOH33VKsRADSa5DTU3xDYo -8porp9wDoHKD64MqXYWTAoGADFeVJeF4v6WDivukw+2k9dBSntz3WRXuG5iilNY0 -evqnsnDzITdeMkTFCcDycA9iBHA9ezCKRYxW2id3kOn1rgbO7KvliI7jESNkMJGa -OUlvck7RFgxyc1pp+ep9fr0rbKtfMLJ1Xu4q56jXSn7oCSEFeFr+WSg9PKRwJ0rm -fV8CgYAkYOiNY8jH5lwwoPWOIPJg62zdzmRQktrU3z7Nzk5udN6JnG3g57QjkozX -AgHARKQ2MuXW9OfOnYNhbGeavcBQmg5XUx3eL4PRFw8mFZdjpBD/kM/dfCEwEta3 -FpRlVGn0RNqVV5xxClObD/CikkDqKZG4MSj3CrO3JK33gl1Lgg== ------END RSA PRIVATE KEY----- http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/10de190e/sshd-core/src/test/resources/org/apache/sshd/common/util/SecurityUtilsTest-RSA-KeyPair.pub ---------------------------------------------------------------------- diff --git a/sshd-core/src/test/resources/org/apache/sshd/common/util/SecurityUtilsTest-RSA-KeyPair.pub b/sshd-core/src/test/resources/org/apache/sshd/common/util/SecurityUtilsTest-RSA-KeyPair.pub deleted file mode 100644 index 9fac6f7..0000000 --- a/sshd-core/src/test/resources/org/apache/sshd/common/util/SecurityUtilsTest-RSA-KeyPair.pub +++ /dev/null @@ -1 +0,0 @@ -ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAxr3N5fkt966xJINl0hH7Q6lLDRR1D0yMjcXCE5roE9VFut2ctGFuo90TCOxkPOMnwzwConeyScVF4ConZeWsxbG9VtRh61IeZ6R5P5ZTvE9xPdZBgIEWvU1bRfrrOfSMihqF98pODspE6NoTtND2eglwSGwxcYFmpdTAmu+8qgxgGxlEaaCjqwdiNPZhygrH81Mv2ruolNeZkn4Bj+wFFmZTD/waN1pQaMf+SO1+kEYIYFNl5+8JRGuUcr8MhHHJB+gwqMTF2BSBVITJzZUiQR0TMtkK6Vbs7yt1F9hhzDzAFDwhV+rsfNQaOHpl3zP07qH+/99A0XG1CVcEdHqVMw== lgoldstein@LGOLDSTEIN-WIN7 http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/10de190e/sshd-core/src/test/resources/org/apache/sshd/common/util/super-secret-passphrase-RSA-AES-128-key ---------------------------------------------------------------------- diff --git a/sshd-core/src/test/resources/org/apache/sshd/common/util/super-secret-passphrase-RSA-AES-128-key b/sshd-core/src/test/resources/org/apache/sshd/common/util/super-secret-passphrase-RSA-AES-128-key deleted file mode 100644 index 2b93a42..0000000 --- a/sshd-core/src/test/resources/org/apache/sshd/common/util/super-secret-passphrase-RSA-AES-128-key +++ /dev/null @@ -1,30 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -Proc-Type: 4,ENCRYPTED -DEK-Info: AES-128-CBC,D41AC063160FCC09B1E1931FB43BCEAA - -V218dGT2pUpimnwEVn+2ljvK6mvm2aNLlaakMunlHfIswrakJ1WTs8a61pYILOn9 -MGHrCiqe6ZI7FBJ2wXpSxhcuM3fzk6/dW4Ghh4EHG1Y94w97EizxNfyz/iI2XQw0 -i6ttaDLVzP8UcSRElqG+Zpe1A7EE/DkdkXD3f/DaGHtu1zirVeaEIggMLjfTdwnR -sH9VnUZhe74VdPV0x16h7JjLt5fcbIjqJ6NWW4QvQpPBv3k0oiUy/nP4FXg1b7VW -7SowuCPi+mF821hj4xSO8ETlAU1eZdtgXqtejtKm0iDtsjnTBZPvDDrq5ephBlxO -k7JBJG1LFUiDIGnpxos5nCsKEo8UAw9a5/D4xE3C6UTocXon28XGzVCbkZBN6jcd -UbpjCVwKMJmFL97487u9S57xrGTmJdi1AtF9Rei8juTTQY4+r3l2c7JtdtcbLUhj -iLvdYnbh6kUEyE19/+omJaWGQlFhYp7ZMRRQSiz6TD8lhSIBPpXzs+uMfhkrifVk -3WpjRoikmPOOFLtecee5Rp+SpGd700XgLnxwZ47l0FNfrKKqd3+nZX4JILQ2M0JP -sBx8gcIew8aUqMzWrwZxbrt9Pd1+2kSNVG9hpLoNoA4WpQnYQMo4L0eTCeMNUOap -f9H0Hh3QnqXTPHbcYZJCGE2RUxLzn/d7rUxUdEzER+pkhJcw9JbV/izTrpDHs9bM -cfBLggQvs+UIBww2OFz2BztwoQzsSEuNW/SxG/y6SfRUQq5TZw9NxYnrrqfBXKtx -svB1JVbn2fKq2Lvi8AZ1fF3tyrNot/tptDf0yDHejWDUvVx5cXsKVK2BbVjbZ88k -mBtUbw7ea9Ev7ZsihNB2EdhPjLhhKlKLIZznPKeXL3GDTXqCgCxTVh4wLvaR8rDU -C3Isil4WprCeynmZpOe7bxAZDm2QCobnDB8sLQqBI4zgH8X/1iyXJVdSKfK9vxcB -sJ5pYCcS2q0C+CJkn6HVTlMQ5CyyzvPaDJukJoxwxsZ5hgCsUHFzrvyGnXqGfTBD -qEW+oA7cj48CfweV5pXHj+mZpCrpn1zRVJRz4h1FZRsttPGtBRAlns5I3kh5BPRs -4m1BO1jiWyp/7HkUrDRhEf/QeJsP+mTH32pQgnngZ/AGA0PUcKanMUpe1d2ju83V -EIcTz9ycTHPiOAM6GaVt54fKj9WRBU+7pf14ZdJmfhp6twc0jNtaTh+/I6Pfb0jN -0d6yKV//pOeJJBNhuOJgm/0vfkOnOojIJchOQCRt5Lg/a4fD/JXtLOed2zOQa+0J -3d8Y93mQX/iN1wi95/sG79YBYF3FkJYVhjosSKbiIaxIn76zIx4IAlziycDKvgpr -JgZcVvCDc4flwrf3Cv/uHK7UWOE+16X1CfAy8JzFg5bhiMmhgsJyHmd+zDGrY6NX -zz+wLmwOenEwC40gpt89OXbgMcwJMtfiSusatRtZ+AAs0jb/8jExVXfcYE3m3r1/ -FqLZ7seTQT2D01YoPlwUtSPxzaZbziAJ/NaGmURnBGVibDCJxwUAiOSIQH4prIfg -Q2FCJeMTbLV43Lanlby5nrmLkzsw3uo1MO8Of1DbcnVUHNSwrp/nNzrYdxBLIvqS ------END RSA PRIVATE KEY----- http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/10de190e/sshd-core/src/test/resources/org/apache/sshd/common/util/super-secret-passphrase-RSA-AES-128-key.pub ---------------------------------------------------------------------- diff --git a/sshd-core/src/test/resources/org/apache/sshd/common/util/super-secret-passphrase-RSA-AES-128-key.pub b/sshd-core/src/test/resources/org/apache/sshd/common/util/super-secret-passphrase-RSA-AES-128-key.pub deleted file mode 100644 index b1d66a6..0000000 --- a/sshd-core/src/test/resources/org/apache/sshd/common/util/super-secret-passphrase-RSA-AES-128-key.pub +++ /dev/null @@ -1 +0,0 @@ -ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC/oDbs/yYxBdT02ldP6JIrcETJQ+TCml1tHYuo8cIQp0DZCgRZiEZ4foucAT8R/vLK01nnjRzrI42MXiCzyAHb1sPRD0Fsbpa4TFJczPBBRM2mp56airnArQUMmg/ZKlOf82hn+u7Kgn+ljyjYG5FrdoUBju62i0H4+oBfX+pTkd5ruUgqLyPUC3qtNLwjS4PIPAda/pfpsi9UawQ4ommWCCLlwK55NiSrPDBwKNuVWROcQps2NZRxzRLQEiiCEVBEdiUqqUQ+dg2beLV/4cCS860ZZRvCfe+ko8TUBJ7SLtcrvOEYJOKIZDVhcnQKN/wyXCHExSYytUconlFn/9YX root@devenv-aas \ No newline at end of file http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/10de190e/sshd-core/src/test/resources/org/apache/sshd/common/util/super-secret-passphrase-RSA-AES-192-key ---------------------------------------------------------------------- diff --git a/sshd-core/src/test/resources/org/apache/sshd/common/util/super-secret-passphrase-RSA-AES-192-key b/sshd-core/src/test/resources/org/apache/sshd/common/util/super-secret-passphrase-RSA-AES-192-key deleted file mode 100644 index 014410d..0000000 --- a/sshd-core/src/test/resources/org/apache/sshd/common/util/super-secret-passphrase-RSA-AES-192-key +++ /dev/null @@ -1,30 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -Proc-Type: 4,ENCRYPTED -DEK-Info: AES-192-CBC,EDF8E3E634D2106991113815A3C1F11F - -PZaaf2TCSCRmPZDnUa9Hq+RVGAXRXl8T8rduiqFLKG2Vk192AEo4WRPWhIcJ4ov+ -o6N69V0Fj/NrRyuwjihQQM27gTK2JK8cvDen+WB3mp5wmfFaazHXO21xNGMAp3bm -obEeO+NHaG0080yxQ4AU2BzPZ1q/ePjDGBiENUsBAHeZvN2fM5uI4Cs9pqko2OM/ -ZiJQkn2QlnpSPm8B7kspqpEV9bn1peVYAMIkp/yES18Kw50kan3R2CqccutVQfdP -8ddTPPUvWUrDSrW/Ae2qZvRoCXVLDhy1jBKQDMUCrxqDJCo58GR0FWxK4nhCgfeL -wmxGaKL/3uKDl5otkj93C1qCbEvQCJm5rcwEjkRVfeSPvNNh+WQrJE7uNcJB4kXX -tF8c5peZI8ymdlFFXlCqjVpdhJh0YKRhpxhWKLA15I1bbwwY4/mwIIMyXOcAQo58 -G7XOwBPw01/lSJ/YTR8y1ubFbWJ6LgoLgSzsOLnBxJJji148UiNDPPbal0FN8vK2 -VsSRBrjrNHSmh+BSA0AStq4QtQpwNMU0qKFLzx5HvoYiaSG+OKtJLZNqTGzDG5aS -Xe8rNoTQTaZBy5yTY1zTn2lMFngWSt/aYyXfc1BXdYyTOk/eoGHtXxp91nQtCdkG -4VMMfPlnbW1Q2Cq4ATdcIUPPKLaNVlP2TbloBb1wYjXy8RfFFqZVNOLnxXnXOXUG -U5SlG44XV5AouwhrlUPrm+0+9jIh4pO4sfG0ldGwabGbUMZ6vvgcU9w1yRcsjycG -v9yH7CfFKKXjUL5RR2weZVD8vRjQMbfVHRt3P4NFClI6e1gXx92FmT7x97866e+T -TohyC7uZQq2prBzt8BwxFP0h19+CiTVzofe2I9x+Hce67F+ATnLq9fxOnjZlwK1i -K95eK+Itc9zSu9tIZGaLvghOExZ24893Ncz5NJ2nn0YptxSi24e8PcECHhSUrjv9 -1VOi8JUmv58bQ5ocuUlHmB2FkpnsYUNjtQx1OT2IRovQJIDCttHhT3QIGoiqoeTw -sSwyz0gDYzAJtuVkSZxqXJ4LEMozaA3uwxv0TfaQordm+GuGKuV5MsKyEQtITUk5 -5bgQfS0VQqkbq2fRjtd3nIJWCF5otrVulY0tzoTBjGZ2trNj5nz5ZEUTFdRSAaxb -F+i3Mv8gGPC+2YIo8feDCHnRQ1AALjLon8nKefRsWAOYUozNCtHvu4g7WK6+GcPd -eiYM7tbSrNCHg+KdB+eWrJCfVCgVHTj8mGb3EiH6oxgx51TmlyuQYJAVseWjQOdm -IDKiAsNNZijmgMWLsFZG1VvF/446VWIGkSW9eB6bB7aR1Kg4F18VkXdn+SPmaHrC -NHhNa9dOmcOvlNXIs7jlTjRVEC0pp8DH0AUdPjqlR/F1IHb7uFyqlza8Cqb7PZJs -x+9GbSwuyKLKLvMzmsnBtpRT32Srsbx6pWst40gaoOMFxto22vmGxz4IABGi96V/ -NrrDHtuZ5OaePl7GihKcUCSSVcoFO2jKKNMMHSSVGhxkfir7qGzMe5LZ9/zl+bvW -vBS0wSPUd+P3mLc0m53mH+g26I479ryX6/2W+GecB1h5p7S7vJMPQjqZAJskogf5 ------END RSA PRIVATE KEY----- http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/10de190e/sshd-core/src/test/resources/org/apache/sshd/common/util/super-secret-passphrase-RSA-AES-192-key.pub ---------------------------------------------------------------------- diff --git a/sshd-core/src/test/resources/org/apache/sshd/common/util/super-secret-passphrase-RSA-AES-192-key.pub b/sshd-core/src/test/resources/org/apache/sshd/common/util/super-secret-passphrase-RSA-AES-192-key.pub deleted file mode 100644 index 3fda036..0000000 --- a/sshd-core/src/test/resources/org/apache/sshd/common/util/super-secret-passphrase-RSA-AES-192-key.pub +++ /dev/null @@ -1 +0,0 @@ -ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCutvykV6G6t4JlLhlJOQKknSB++PXLTtuSjXaH77hUUEl/yc9VbEsfOz1NySBRQDWT0sgRZ1D2YAxaIvK9+0wZPnRNO1ptDrwj650Gflh8vKkEQOlHH7ISTxQTHtyHGeXfm3Bl+qqxTMPG5gcxxkKINMvKAkNYBnOyVX1OXUvqtM1jx6THlfWPQ9yFuVmZDVj1W5VItxjG293RejbjN1EjhhGRBiqwczcIPgPiMDfR0+xFNEQt6YD4k9TFEkLmIfCn+fcqKJhP/z99bRosMHtkRwfX/Rco+G9dRwe1sHvVH7ETeS7v3vl3WoM58AlpYYGUIXsxozRdGE93AmTkaSIj SecurityUtilsTest \ No newline at end of file http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/10de190e/sshd-core/src/test/resources/org/apache/sshd/common/util/super-secret-passphrase-RSA-AES-256-key ---------------------------------------------------------------------- diff --git a/sshd-core/src/test/resources/org/apache/sshd/common/util/super-secret-passphrase-RSA-AES-256-key b/sshd-core/src/test/resources/org/apache/sshd/common/util/super-secret-passphrase-RSA-AES-256-key deleted file mode 100644 index 26b699e..0000000 --- a/sshd-core/src/test/resources/org/apache/sshd/common/util/super-secret-passphrase-RSA-AES-256-key +++ /dev/null @@ -1,30 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -Proc-Type: 4,ENCRYPTED -DEK-Info: AES-256-CBC,4FF564F3E05187BEDEDA0529D44EE13E - -z7KGBVkxJzNS1Z8vMurcYmHhlbxnUYHry87VgzV38UkwsLSo5FIPNUaxvLPeD3Im -YW4hQ/1Z+3onSwTgaUqxih6YK+fHS0RZD5R4HjOWaERCPZa5/oDciLrjOU3EKkSV -n84/ezqUn8GlMJYcpB2sURCmnJZ6erHCVSPAhVlsrWPO9uZHx8BpaclqsvC4Gq7a -C4liGjDNsFvVO998eDIDLmHeO+qGnyeQK+pu3/+Ausvd9QjUf4L3T+Lu+Cgr0w59 -tB3TxeGxPel9Av88VYIhCddIEvRyMcN8lzLrrYrsLNPMmaF1x2uNDORJCTlEjvLw -QG6zugofiUVdZdsWRPFmM8DbujeoUHkPkwImXedhiKz1Tp0Rz6gqGx6tzsqEe0kD -eS2e0Ibj41fFxpkQlaG/xDliUvntkoQ6v7ZKbXQrsBP4hyoMcjeUMhWL+5shkJEV -RzvZOl7WKoovFnf3glLdiDFqlfLK5BhBJckLmdmnVvsD1HYeKqSDrx+r3hUF3yZ5 -Obxxk++QTC1qHhnyAwqW7Y2owq81pmOhgxKqh/4OoxYV0trIgzI47+5hKsp12Van -7qBCfTtXv4IlBKaKARTroQ2sDPAi1B2j8mU5lrGm81BzsLSqh1IJjOMsccWNfjMS -jQMKvcQN94y7AvxcBDGVn9FZftNWs9/ZwitRCFfrz/n0u6hLDQBbH6muDffo4ZhF -ZiH23W743N/ZASC/kA7LZ3pmH6TNl2Zf1gP+tTrfXu17BRDJYi8VqHBcuck/M4Ox -qOpP4mK2B/aAVmTkty67+QJerIwsW+h8LsjkQTnXGoneobsx2nL8OvJtPHkOUo4b -1zFyFvQK+V8DWWAml4Y8V+4NCgrybqqK11ApRl7FfaOyCMgZ+AvqzjK3E5s1gsaf -AaxORV0iDE0Y8nhq9EEhDNTr5Yi6FeHuRmVsack1AQqYn1U64k21x4ZEmDjslq9t -WKizqG6jz6xtRtsypr0oCBYirt8p5qDmeO58MdES6A+nkOZC0ysyhizpDWdj01rQ -6w3el0t/wUh1lBC3UCTeD7Vz20B1rAs5AlbdFmOUGHoH2Hjty1DQVZ+Fl5/K9AQi -yaVR07IDE45i9rvl7DThRHT6Qd0KAb7bIo+Xlz/xKUgA0UVLkpfGtgDNi1DSTsBQ -m6xlvR9M3tmMwnHlOEfX8YAGIQR9JLiImUtypjXnp6IdxCn682UIWC9XakqMFbzS -Hm4Y0VBHYPisByl7PuavEP69pgYVdt1PqFFOc3xL42QVihYsM9huw1j4rlP7/jXB -zJyH6yuqZHV7BYmurBByxRCe4joN24D6HYWTLKhPjgIG++n/IZ+PO7s0khrTh3Pl -L3bOujyLtr88w6PPhBOCVDPgmJEC6lIGC8zhh+S9Knewr50PsvOoQVKGDTSPO+G7 -NNa/ugN9/eTeO2ru2y6HuahWrf2seKrTQB8JVYP0SZkOe4zVdMRR5M559iLIdh0e -U/hrj6v/dYVbIkmSWdhtxx0jXbM2VlWTeQQjUYzeVumVhZ1pk2P0LeHrSWhHa5h2 -hadw69Ht0hRTbljZ1MHjK9BbQI1Ph+YBuDr0aPVBf2ePYFvPObw2Mik7ctiDlmQT ------END RSA PRIVATE KEY----- http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/10de190e/sshd-core/src/test/resources/org/apache/sshd/common/util/super-secret-passphrase-RSA-AES-256-key.pub ---------------------------------------------------------------------- diff --git a/sshd-core/src/test/resources/org/apache/sshd/common/util/super-secret-passphrase-RSA-AES-256-key.pub b/sshd-core/src/test/resources/org/apache/sshd/common/util/super-secret-passphrase-RSA-AES-256-key.pub deleted file mode 100644 index 6a3a0ac..0000000 --- a/sshd-core/src/test/resources/org/apache/sshd/common/util/super-secret-passphrase-RSA-AES-256-key.pub +++ /dev/null @@ -1 +0,0 @@ -ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDNUSajd7RzgqvQ2Q2em3CFA4Fh2f8YJkzJTPrcn9L9SFZnent2rABlVVr216jh3hAjhRFEkRhsoWUxUB7UYN6Ox/hGXrfCtD9wB0QbpOjNb0tnSovl3e+LfnWO5mpaRAb9croiuKVwQXuiwLNOQqs5C2wvLJhc77U4myuvFycYQ9Gh9g12g05Q8Qs+Du6hFSV1n1ZDMTtiVYknhe2gCLmBh1ghpaGeG3eWpd8EXumTrpwrylb1hJtj4yo748dXFa/YUJpqzCNyoA+0aY+v0MwgxZcS6zWt5VQ3yqRi4YrXX7vvhz80rKmJQlEhvM9rVKAwKc/qkJdTWlU+v0+/zY7/ hello@world \ No newline at end of file http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/10de190e/sshd-core/src/test/resources/org/apache/sshd/common/util/super-secret-passphrase-RSA-DES-EDE3-key ---------------------------------------------------------------------- diff --git a/sshd-core/src/test/resources/org/apache/sshd/common/util/super-secret-passphrase-RSA-DES-EDE3-key b/sshd-core/src/test/resources/org/apache/sshd/common/util/super-secret-passphrase-RSA-DES-EDE3-key deleted file mode 100644 index e6f6156..0000000 --- a/sshd-core/src/test/resources/org/apache/sshd/common/util/super-secret-passphrase-RSA-DES-EDE3-key +++ /dev/null @@ -1,30 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -Proc-Type: 4,ENCRYPTED -DEK-Info: DES-EDE3-CBC,7DD956370CB0B83E - -oTBNWVUGIKQ3LX/bIE+upuTtiVSWQ9ooTxdNJRIpGsq6oTevtxgkuIF9oO+ShZJq -zf/mTQPtAyRHSX8JsTKw9GZhd5w7c07V3wfzx689RHFCZDW1DIl67KvwyhRwfRtY -HXZGYPW/XmOgh3Gw31csmLlJd42r8d+7MRIfmo25SO5Sy67mNccRJikdbYa/HH50 -yMVaf7o73tLLIS3WNnhaKjf9hRsSW370aICk3hfS/NMriae0xAMpqpYQmGkn9Zhh -zTg+Kjo0FiEZEnMNKZQRRWx7VsoQRfrebOZq3LF7tfEnJcKneJ+grvQp0FpkEMzN -JeiaEwtoIrXRU5KENQbEnXqF2Mpai6ejh5lVflcHqI01lwWGWkwxnNpxgMbWCKuB -Unad3fQQLFQU67B8jQpES2AQVXO7UaaDHNtATftC2gFpBktlkSurT/KZBT4bVfS7 -z3K9gFB/lYrji2ef+xuzbLmq+eja9OlZIVxH7RTxODkyrxeNhtEUXJgezOB64Cny -YFrsDPcR8rSRc5SjMMuAy2dSkyndSp3m2YmtVFHibPrX18K2lblRkiuVDci0EX4p -1XzaCJ9mhdtMedpIzFdwgCOt/M8OBw9g02qgOK1uBu37tXdACNxhX/wrFPCtbJjD -yBwnBbXoeca8ZF45uw1egKlHaY2d7kTsH+bdx04bTo4Xq0+lXMALxxkfwTOt27xL -JQp15AFm6ZAshVt7hxCtm512HoSkkFYMPUPawH9HVZE6f4sbNBlbqgCmYhD5HPMN -Kd3ssQWTXwiOSd+k8HuBUBhtdZsgdpSdR5xH9wEymS9fcGmrf2yLuRlxhvoqo44X -+go5CqLoAKoUtVJdtZrkmMdF1OxufDBZ16+fKN8NNE8vQv8Kt221yg/mmDy3t6mh -axynBSxk1Qtjz2H9iZJ5nglF2Hceb1FQXHGlLCNv+cwA9vRC0pQJ25fPHVhvxhmW -gnLJ5OY+zXENUWvMIeAGCSfjSVtnSVWAfdJ7kgHZc/wCWO6rYAwlfsPDq8ZdQ8Za -4Hm6sUnkHHtagvJZahjdSPoziE68FiHqFU3PdmuQsZpCFOzloxahWImgx0UM9n8k -2DlRPK6bMBCjpUrb5D0jp8YU2KDepw2D4O7RaFLh47w78oxrO1gABY23M4JQfUiP -lzsfsGy9OI1twCcsJhFOX95nL9w+hlvFALTkY5UT3dB3eWP3k2nE12UxQhE3hVZ9 -vI100y2m/FUnKkeGYkvhRw9yD611jjYuRYGL3LsKNaOK97Ses+vAB0LNOss+12vz -7bYvDUVJ5csfpPGqxyzYwIbytDwUcvxTLxRlgQNb2YMqzSmVodO0lyXdNF1/KUFF -nIdlh0KSe4BALzYhya9V71MngLHFifp/erS4gdnFbbBCmZTEZhziBnqimRPoN5Co -K+22blcRkDytiL+NTRybvfOYvy6Ulb4OK/So+Y5r1B5KGhJqFWSeo0g2ftAB6r1h -HSbfoxYO/xCMQy7aNXuJI0giVRThcQsQapTO2DMeymt/0nj8qEPF0dubtbmgJ4dd -aZuYaY1Qxk0umVfq9zHsRTbRb+16TuZtp+7brDDRpRe6lSzdbTNShg== ------END RSA PRIVATE KEY----- http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/10de190e/sshd-core/src/test/resources/org/apache/sshd/common/util/super-secret-passphrase-RSA-DES-EDE3-key.pub ---------------------------------------------------------------------- diff --git a/sshd-core/src/test/resources/org/apache/sshd/common/util/super-secret-passphrase-RSA-DES-EDE3-key.pub b/sshd-core/src/test/resources/org/apache/sshd/common/util/super-secret-passphrase-RSA-DES-EDE3-key.pub deleted file mode 100644 index f5c8c85..0000000 --- a/sshd-core/src/test/resources/org/apache/sshd/common/util/super-secret-passphrase-RSA-DES-EDE3-key.pub +++ /dev/null @@ -1 +0,0 @@ -ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAxvz5QWkCxznYbBOUbMFsCf+PJLauyZTcPsHLPZ/lHYH7EIa9s8NWbfFyTJXVwcuJiDCoRZ8d7KBahAuNjGeXsuJQuCqlLLl6GKoFnI0hnbKbFHDDSub+s3WvLdaTeF22qlTmlPb3RFYUO0cWk9MVpVNM6ev33CUGv4Dmbr0dZNkgUOkcPHiQpxKizsED+EWSVh1Ptx8AEDObNyFHJljbHUeJrHTIlcaekJheRXQWLvsJqKD0TN+Dkvi044MDWG9VjVyNsyXBCz1Vk9VaK1dNkkH+RDGTsFvFj7IPwBS/FliEVRrKOUgjMrmKUPbAm8IblIsno+HLZ60OB6X6hu2iHw== lgoldstein@LGOLDSTEIN-WIN7 http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/10de190e/sshd-git/pom.xml ---------------------------------------------------------------------- diff --git a/sshd-git/pom.xml b/sshd-git/pom.xml index b31f28e..8a4205f 100644 --- a/sshd-git/pom.xml +++ b/sshd-git/pom.xml @@ -62,6 +62,13 @@ </dependency> <dependency> <groupId>org.apache.sshd</groupId> + <artifactId>sshd-common</artifactId> + <version>${project.version}</version> + <type>test-jar</type> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.sshd</groupId> <artifactId>sshd-sftp</artifactId> <version>${project.version}</version> <scope>test</scope> http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/10de190e/sshd-git/src/test/java/org/apache/sshd/git/pack/GitPackCommandTest.java ---------------------------------------------------------------------- diff --git a/sshd-git/src/test/java/org/apache/sshd/git/pack/GitPackCommandTest.java b/sshd-git/src/test/java/org/apache/sshd/git/pack/GitPackCommandTest.java index 77e520a..0764e91 100644 --- a/sshd-git/src/test/java/org/apache/sshd/git/pack/GitPackCommandTest.java +++ b/sshd-git/src/test/java/org/apache/sshd/git/pack/GitPackCommandTest.java @@ -30,8 +30,8 @@ import org.apache.sshd.server.SshServer; import org.apache.sshd.server.auth.password.AcceptAllPasswordAuthenticator; import org.apache.sshd.server.subsystem.sftp.SftpSubsystemFactory; import org.apache.sshd.util.test.BaseTestSupport; +import org.apache.sshd.util.test.CommonTestSupportUtils; import org.apache.sshd.util.test.JSchLogger; -import org.apache.sshd.util.test.Utils; import org.eclipse.jgit.api.Git; import org.eclipse.jgit.lib.Constants; import org.eclipse.jgit.transport.CredentialsProvider; @@ -79,14 +79,14 @@ public class GitPackCommandTest extends BaseTestSupport { int port = sshd.getPort(); try { Path serverDir = serverRootDir.resolve(getCurrentTestName() + Constants.DOT_GIT_EXT); - Utils.deleteRecursive(serverDir); + CommonTestSupportUtils.deleteRecursive(serverDir); Git.init().setBare(true).setDirectory(serverDir.toFile()).call(); JSch.setConfig("StrictHostKeyChecking", "no"); CredentialsProvider.setDefault(new UsernamePasswordCredentialsProvider(getCurrentTestName(), getCurrentTestName())); Path localRootDir = gitRootDir.resolve("local"); Path localDir = localRootDir.resolve(serverDir.getFileName()); - Utils.deleteRecursive(localDir); + CommonTestSupportUtils.deleteRecursive(localDir); SshClient client = SshClient.setUpDefaultClient(); SshSessionFactory.setInstance(new GitSshdSessionFactory(client)); http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/10de190e/sshd-git/src/test/java/org/apache/sshd/git/pgm/GitPgmCommandTest.java ---------------------------------------------------------------------- diff --git a/sshd-git/src/test/java/org/apache/sshd/git/pgm/GitPgmCommandTest.java b/sshd-git/src/test/java/org/apache/sshd/git/pgm/GitPgmCommandTest.java index 1e5973d..18cf599 100644 --- a/sshd-git/src/test/java/org/apache/sshd/git/pgm/GitPgmCommandTest.java +++ b/sshd-git/src/test/java/org/apache/sshd/git/pgm/GitPgmCommandTest.java @@ -34,7 +34,7 @@ import org.apache.sshd.git.GitLocationResolver; import org.apache.sshd.server.SshServer; import org.apache.sshd.server.subsystem.sftp.SftpSubsystemFactory; import org.apache.sshd.util.test.BaseTestSupport; -import org.apache.sshd.util.test.Utils; +import org.apache.sshd.util.test.CommonTestSupportUtils; import org.eclipse.jgit.api.Git; import org.junit.FixMethodOrder; import org.junit.Test; @@ -58,7 +58,7 @@ public class GitPgmCommandTest extends BaseTestSupport { int port = sshd.getPort(); try { - Utils.deleteRecursive(serverDir); + CommonTestSupportUtils.deleteRecursive(serverDir); try (SshClient client = setupTestClient()) { client.start(); http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/10de190e/sshd-ldap/pom.xml ---------------------------------------------------------------------- diff --git a/sshd-ldap/pom.xml b/sshd-ldap/pom.xml index 3415c1f..9f6a9ba 100644 --- a/sshd-ldap/pom.xml +++ b/sshd-ldap/pom.xml @@ -102,6 +102,13 @@ <scope>test</scope> </dependency> <dependency> + <groupId>org.apache.sshd</groupId> + <artifactId>sshd-common</artifactId> + <version>${project.version}</version> + <type>test-jar</type> + <scope>test</scope> + </dependency> + <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <scope>test</scope> http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/10de190e/sshd-ldap/src/test/java/org/apache/sshd/server/auth/BaseAuthenticatorTest.java ---------------------------------------------------------------------- diff --git a/sshd-ldap/src/test/java/org/apache/sshd/server/auth/BaseAuthenticatorTest.java b/sshd-ldap/src/test/java/org/apache/sshd/server/auth/BaseAuthenticatorTest.java index a614869..d4881ca 100644 --- a/sshd-ldap/src/test/java/org/apache/sshd/server/auth/BaseAuthenticatorTest.java +++ b/sshd-ldap/src/test/java/org/apache/sshd/server/auth/BaseAuthenticatorTest.java @@ -55,8 +55,8 @@ import org.apache.directory.shared.ldap.schema.registries.SchemaLoader; import org.apache.sshd.common.util.GenericUtils; import org.apache.sshd.common.util.ValidateUtils; import org.apache.sshd.util.test.BaseTestSupport; +import org.apache.sshd.util.test.CommonTestSupportUtils; import org.apache.sshd.util.test.NoIoTestCase; -import org.apache.sshd.util.test.Utils; import org.junit.experimental.categories.Category; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -103,8 +103,9 @@ public abstract class BaseAuthenticatorTest extends BaseTestSupport { @SuppressWarnings("checkstyle:avoidnestedblocks") public static SimpleImmutableEntry<LdapServer, DirectoryService> startApacheDs(Class<?> anchor) throws Exception { Logger log = LoggerFactory.getLogger(anchor); - File targetFolder = Objects.requireNonNull(Utils.detectTargetFolder(anchor), "Failed to detect target folder"); - File workingDirectory = assertHierarchyTargetFolderExists(Utils.deleteRecursive(Utils.resolve(targetFolder, anchor.getSimpleName(), "apacheds-work"))); + File targetFolder = Objects.requireNonNull(CommonTestSupportUtils.detectTargetFolder(anchor), "Failed to detect target folder"); + File anchorFolder = CommonTestSupportUtils.resolve(targetFolder, anchor.getSimpleName(), "apacheds-work"); + File workingDirectory = assertHierarchyTargetFolderExists(CommonTestSupportUtils.deleteRecursive(anchorFolder)); DirectoryService directoryService = new DefaultDirectoryService(); directoryService.setWorkingDirectory(workingDirectory); @@ -140,7 +141,9 @@ public abstract class BaseAuthenticatorTest extends BaseTestSupport { { JdbmPartition systemPartition = new JdbmPartition(); systemPartition.setId("system"); - systemPartition.setPartitionDir(assertHierarchyTargetFolderExists(Utils.deleteRecursive(new File(workingDirectory, systemPartition.getId())))); + + File partitionFolder = CommonTestSupportUtils.deleteRecursive(new File(workingDirectory, systemPartition.getId())); + systemPartition.setPartitionDir(assertHierarchyTargetFolderExists(partitionFolder)); systemPartition.setSuffix(ServerDNConstants.SYSTEM_DN); systemPartition.setSchemaManager(schemaManager); directoryService.setSystemPartition(systemPartition); @@ -151,7 +154,9 @@ public abstract class BaseAuthenticatorTest extends BaseTestSupport { JdbmPartition partition = new JdbmPartition(); partition.setId("users"); partition.setSuffix(BASE_DN_TEST); - partition.setPartitionDir(assertHierarchyTargetFolderExists(Utils.deleteRecursive(new File(workingDirectory, partition.getId())))); + + File partitionFolder = CommonTestSupportUtils.deleteRecursive(new File(workingDirectory, partition.getId())); + partition.setPartitionDir(assertHierarchyTargetFolderExists(partitionFolder)); directoryService.addPartition(partition); } @@ -251,7 +256,7 @@ public abstract class BaseAuthenticatorTest extends BaseTestSupport { log.info("Directory service shut down"); log.info("Deleting " + workDir.getAbsolutePath()); - Utils.deleteRecursive(workDir); + CommonTestSupportUtils.deleteRecursive(workDir); log.info(workDir.getAbsolutePath() + " deleted"); } } http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/10de190e/sshd-mina/pom.xml ---------------------------------------------------------------------- diff --git a/sshd-mina/pom.xml b/sshd-mina/pom.xml index 14f37a5..5defe91 100644 --- a/sshd-mina/pom.xml +++ b/sshd-mina/pom.xml @@ -57,6 +57,13 @@ <scope>test</scope> </dependency> <dependency> + <groupId>org.apache.sshd</groupId> + <artifactId>sshd-common</artifactId> + <version>${project.version}</version> + <type>test-jar</type> + <scope>test</scope> + </dependency> + <dependency> <groupId>net.i2p.crypto</groupId> <artifactId>eddsa</artifactId> <scope>test</scope> http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/10de190e/sshd-netty/pom.xml ---------------------------------------------------------------------- diff --git a/sshd-netty/pom.xml b/sshd-netty/pom.xml index 5dcdb2e..3482db4 100644 --- a/sshd-netty/pom.xml +++ b/sshd-netty/pom.xml @@ -64,6 +64,13 @@ <scope>test</scope> </dependency> <dependency> + <groupId>org.apache.sshd</groupId> + <artifactId>sshd-common</artifactId> + <version>${project.version}</version> + <type>test-jar</type> + <scope>test</scope> + </dependency> + <dependency> <groupId>net.i2p.crypto</groupId> <artifactId>eddsa</artifactId> <scope>test</scope> http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/10de190e/sshd-scp/pom.xml ---------------------------------------------------------------------- diff --git a/sshd-scp/pom.xml b/sshd-scp/pom.xml index ac02bd9..f6eae7d 100644 --- a/sshd-scp/pom.xml +++ b/sshd-scp/pom.xml @@ -42,7 +42,7 @@ <artifactId>sshd-core</artifactId> <version>${project.version}</version> </dependency> - + <!-- Test dependencies --> <dependency> <groupId>org.apache.sshd</groupId> <artifactId>sshd-core</artifactId> @@ -51,6 +51,13 @@ <scope>test</scope> </dependency> <dependency> + <groupId>org.apache.sshd</groupId> + <artifactId>sshd-common</artifactId> + <version>${project.version}</version> + <type>test-jar</type> + <scope>test</scope> + </dependency> + <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <scope>test</scope> http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/10de190e/sshd-scp/src/test/java/org/apache/sshd/client/scp/ScpTest.java ---------------------------------------------------------------------- diff --git a/sshd-scp/src/test/java/org/apache/sshd/client/scp/ScpTest.java b/sshd-scp/src/test/java/org/apache/sshd/client/scp/ScpTest.java index 9d81194..21ff1a4 100644 --- a/sshd-scp/src/test/java/org/apache/sshd/client/scp/ScpTest.java +++ b/sshd-scp/src/test/java/org/apache/sshd/client/scp/ScpTest.java @@ -61,9 +61,10 @@ import org.apache.sshd.server.command.Command; import org.apache.sshd.server.scp.ScpCommand; import org.apache.sshd.server.scp.ScpCommandFactory; import org.apache.sshd.util.test.BaseTestSupport; +import org.apache.sshd.util.test.CommonTestSupportUtils; +import org.apache.sshd.util.test.CoreTestSupportUtils; import org.apache.sshd.util.test.JSchLogger; import org.apache.sshd.util.test.SimpleUserInfo; -import org.apache.sshd.util.test.Utils; import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; @@ -143,12 +144,12 @@ public class ScpTest extends BaseTestSupport { @BeforeClass public static void setupClientAndServer() throws Exception { JSchLogger.init(); - sshd = Utils.setupTestServer(ScpTest.class); + sshd = CoreTestSupportUtils.setupTestServer(ScpTest.class); sshd.setCommandFactory(new ScpCommandFactory()); sshd.start(); port = sshd.getPort(); - client = Utils.setupTestClient(ScpTest.class); + client = CoreTestSupportUtils.setupTestClient(ScpTest.class); client.start(); } @@ -180,17 +181,18 @@ public class ScpTest extends BaseTestSupport { public void testNormalizedScpRemotePaths() throws Exception { Path targetPath = detectTargetFolder(); Path parentPath = targetPath.getParent(); - Path scpRoot = Utils.resolve(targetPath, ScpHelper.SCP_COMMAND_PREFIX, getClass().getSimpleName(), getCurrentTestName()); - Utils.deleteRecursive(scpRoot); + Path scpRoot = CommonTestSupportUtils.resolve(targetPath, + ScpHelper.SCP_COMMAND_PREFIX, getClass().getSimpleName(), getCurrentTestName()); + CommonTestSupportUtils.deleteRecursive(scpRoot); Path localDir = assertHierarchyTargetFolderExists(scpRoot.resolve("local")); Path localFile = localDir.resolve("file.txt"); - byte[] data = Utils.writeFile(localFile, getClass().getName() + "#" + getCurrentTestName() + IoUtils.EOL); + byte[] data = CommonTestSupportUtils.writeFile(localFile, getClass().getName() + "#" + getCurrentTestName() + IoUtils.EOL); Path remoteDir = assertHierarchyTargetFolderExists(scpRoot.resolve("remote")); Path remoteFile = remoteDir.resolve(localFile.getFileName().toString()); String localPath = localFile.toString(); - String remotePath = Utils.resolveRelativeRemotePath(parentPath, remoteFile); + String remotePath = CommonTestSupportUtils.resolveRelativeRemotePath(parentPath, remoteFile); String[] remoteComps = GenericUtils.split(remotePath, '/'); Factory<? extends Random> factory = client.getRandomFactory(); Random rnd = factory.create(); @@ -240,17 +242,18 @@ public class ScpTest extends BaseTestSupport { public void testUploadAbsoluteDriveLetter() throws Exception { Path targetPath = detectTargetFolder(); Path parentPath = targetPath.getParent(); - Path scpRoot = Utils.resolve(targetPath, ScpHelper.SCP_COMMAND_PREFIX, getClass().getSimpleName(), getCurrentTestName()); - Utils.deleteRecursive(scpRoot); + Path scpRoot = CommonTestSupportUtils.resolve(targetPath, + ScpHelper.SCP_COMMAND_PREFIX, getClass().getSimpleName(), getCurrentTestName()); + CommonTestSupportUtils.deleteRecursive(scpRoot); Path localDir = assertHierarchyTargetFolderExists(scpRoot.resolve("local")); Path localFile = localDir.resolve("file-1.txt"); - byte[] data = Utils.writeFile(localFile, getClass().getName() + "#" + getCurrentTestName() + IoUtils.EOL); + byte[] data = CommonTestSupportUtils.writeFile(localFile, getClass().getName() + "#" + getCurrentTestName() + IoUtils.EOL); Path remoteDir = assertHierarchyTargetFolderExists(scpRoot.resolve("remote")); Path remoteFile = remoteDir.resolve(localFile.getFileName().toString()); String localPath = localFile.toString(); - String remotePath = Utils.resolveRelativeRemotePath(parentPath, remoteFile); + String remotePath = CommonTestSupportUtils.resolveRelativeRemotePath(parentPath, remoteFile); try (ClientSession session = client.connect(getCurrentTestName(), TEST_LOCALHOST, port) .verify(CONNECT_TIMEOUT, TimeUnit.SECONDS) .getSession()) { @@ -262,12 +265,12 @@ public class ScpTest extends BaseTestSupport { assertFileLength(remoteFile, data.length, TimeUnit.SECONDS.toMillis(5L)); Path secondRemote = remoteDir.resolve("file-2.txt"); - String secondPath = Utils.resolveRelativeRemotePath(parentPath, secondRemote); + String secondPath = CommonTestSupportUtils.resolveRelativeRemotePath(parentPath, secondRemote); scp.upload(localPath, secondPath); assertFileLength(secondRemote, data.length, TimeUnit.SECONDS.toMillis(5L)); Path pathRemote = remoteDir.resolve("file-path.txt"); - String pathPath = Utils.resolveRelativeRemotePath(parentPath, pathRemote); + String pathPath = CommonTestSupportUtils.resolveRelativeRemotePath(parentPath, pathRemote); scp.upload(localFile, pathPath); assertFileLength(pathRemote, data.length, TimeUnit.SECONDS.toMillis(5L)); } @@ -286,18 +289,19 @@ public class ScpTest extends BaseTestSupport { Path targetPath = detectTargetFolder(); Path parentPath = targetPath.getParent(); - Path scpRoot = Utils.resolve(targetPath, ScpHelper.SCP_COMMAND_PREFIX, getClass().getSimpleName(), getCurrentTestName()); - Utils.deleteRecursive(scpRoot); + Path scpRoot = CommonTestSupportUtils.resolve(targetPath, + ScpHelper.SCP_COMMAND_PREFIX, getClass().getSimpleName(), getCurrentTestName()); + CommonTestSupportUtils.deleteRecursive(scpRoot); Path localDir = assertHierarchyTargetFolderExists(scpRoot.resolve("local")); Path localFile = localDir.resolve("file.txt"); - Utils.writeFile(localFile, data); + CommonTestSupportUtils.writeFile(localFile, data); Path remoteDir = assertHierarchyTargetFolderExists(scpRoot.resolve("remote")); Path remoteFile = remoteDir.resolve(localFile.getFileName()); - Utils.writeFile(remoteFile, data + data); + CommonTestSupportUtils.writeFile(remoteFile, data + data); - String remotePath = Utils.resolveRelativeRemotePath(parentPath, remoteFile); + String remotePath = CommonTestSupportUtils.resolveRelativeRemotePath(parentPath, remoteFile); scp.upload(localFile.toString(), remotePath); assertFileLength(remoteFile, data.length(), TimeUnit.SECONDS.toMillis(5L)); } @@ -306,7 +310,8 @@ public class ScpTest extends BaseTestSupport { @Test public void testScpUploadZeroLengthFile() throws Exception { Path targetPath = detectTargetFolder(); - Path scpRoot = Utils.resolve(targetPath, ScpHelper.SCP_COMMAND_PREFIX, getClass().getSimpleName(), getCurrentTestName()); + Path scpRoot = CommonTestSupportUtils.resolve(targetPath, + ScpHelper.SCP_COMMAND_PREFIX, getClass().getSimpleName(), getCurrentTestName()); Path localDir = assertHierarchyTargetFolderExists(scpRoot.resolve("local")); Path remoteDir = assertHierarchyTargetFolderExists(scpRoot.resolve("remote")); Path zeroLocal = localDir.resolve("zero.txt"); @@ -330,7 +335,7 @@ public class ScpTest extends BaseTestSupport { session.auth().verify(AUTH_TIMEOUT, TimeUnit.SECONDS); ScpClient scp = createScpClient(session); - String remotePath = Utils.resolveRelativeRemotePath(targetPath.getParent(), zeroRemote); + String remotePath = CommonTestSupportUtils.resolveRelativeRemotePath(targetPath.getParent(), zeroRemote); scp.upload(zeroLocal.toString(), remotePath); assertFileLength(zeroRemote, 0L, TimeUnit.SECONDS.toMillis(5L)); } @@ -339,7 +344,8 @@ public class ScpTest extends BaseTestSupport { @Test public void testScpDownloadZeroLengthFile() throws Exception { Path targetPath = detectTargetFolder(); - Path scpRoot = Utils.resolve(targetPath, ScpHelper.SCP_COMMAND_PREFIX, getClass().getSimpleName(), getCurrentTestName()); + Path scpRoot = CommonTestSupportUtils.resolve(targetPath, + ScpHelper.SCP_COMMAND_PREFIX, getClass().getSimpleName(), getCurrentTestName()); Path localDir = assertHierarchyTargetFolderExists(scpRoot.resolve("local")); Path remoteDir = assertHierarchyTargetFolderExists(scpRoot.resolve("remote")); Path zeroLocal = localDir.resolve(getCurrentTestName()); @@ -362,7 +368,7 @@ public class ScpTest extends BaseTestSupport { session.auth().verify(AUTH_TIMEOUT, TimeUnit.SECONDS); ScpClient scp = createScpClient(session); - String remotePath = Utils.resolveRelativeRemotePath(targetPath.getParent(), zeroRemote); + String remotePath = CommonTestSupportUtils.resolveRelativeRemotePath(targetPath.getParent(), zeroRemote); scp.download(remotePath, zeroLocal.toString()); assertFileLength(zeroLocal, 0L, TimeUnit.SECONDS.toMillis(5L)); } @@ -375,8 +381,9 @@ public class ScpTest extends BaseTestSupport { Path targetPath = detectTargetFolder(); Path parentPath = targetPath.getParent(); - Path scpRoot = Utils.resolve(targetPath, ScpHelper.SCP_COMMAND_PREFIX, getClass().getSimpleName(), getCurrentTestName()); - Utils.deleteRecursive(scpRoot); + Path scpRoot = CommonTestSupportUtils.resolve(targetPath, + ScpHelper.SCP_COMMAND_PREFIX, getClass().getSimpleName(), getCurrentTestName()); + CommonTestSupportUtils.deleteRecursive(scpRoot); Path localDir = assertHierarchyTargetFolderExists(scpRoot.resolve("local")); Path localOutFile = localDir.resolve("file-1.txt"); @@ -390,12 +397,12 @@ public class ScpTest extends BaseTestSupport { session.auth().verify(AUTH_TIMEOUT, TimeUnit.SECONDS); ScpClient scp = createScpClient(session); - Utils.writeFile(localOutFile, data); + CommonTestSupportUtils.writeFile(localOutFile, data); assertFalse("Remote folder already exists: " + remoteDir, Files.exists(remoteDir)); String localOutPath = localOutFile.toString(); - String remoteOutPath = Utils.resolveRelativeRemotePath(parentPath, remoteOutFile); + String remoteOutPath = CommonTestSupportUtils.resolveRelativeRemotePath(parentPath, remoteOutFile); outputDebugMessage("Expect upload failure %s => %s", localOutPath, remoteOutPath); try { scp.upload(localOutPath, remoteOutPath); @@ -410,13 +417,13 @@ public class ScpTest extends BaseTestSupport { assertFileLength(remoteOutFile, data.length(), TimeUnit.SECONDS.toMillis(11L)); Path secondLocal = localDir.resolve(localOutFile.getFileName()); - String downloadTarget = Utils.resolveRelativeRemotePath(parentPath, secondLocal); + String downloadTarget = CommonTestSupportUtils.resolveRelativeRemotePath(parentPath, secondLocal); outputDebugMessage("Expect download success %s => %s", remoteOutPath, downloadTarget); scp.download(remoteOutPath, downloadTarget); assertFileLength(secondLocal, data.length(), TimeUnit.SECONDS.toMillis(11L)); Path localPath = localDir.resolve("file-path.txt"); - downloadTarget = Utils.resolveRelativeRemotePath(parentPath, localPath); + downloadTarget = CommonTestSupportUtils.resolveRelativeRemotePath(parentPath, localPath); outputDebugMessage("Expect download success %s => %s", remoteOutPath, downloadTarget); scp.download(remoteOutPath, downloadTarget); assertFileLength(localPath, data.length(), TimeUnit.SECONDS.toMillis(11L)); @@ -434,19 +441,20 @@ public class ScpTest extends BaseTestSupport { ScpClient scp = createScpClient(session); Path targetPath = detectTargetFolder(); Path parentPath = targetPath.getParent(); - Path scpRoot = Utils.resolve(targetPath, ScpHelper.SCP_COMMAND_PREFIX, getClass().getSimpleName(), getCurrentTestName()); - Utils.deleteRecursive(scpRoot); + Path scpRoot = CommonTestSupportUtils.resolve(targetPath, + ScpHelper.SCP_COMMAND_PREFIX, getClass().getSimpleName(), getCurrentTestName()); + CommonTestSupportUtils.deleteRecursive(scpRoot); Path localDir = assertHierarchyTargetFolderExists(scpRoot.resolve("local")); Path local1 = localDir.resolve("file-1.txt"); - byte[] data = Utils.writeFile(local1, getClass().getName() + "#" + getCurrentTestName() + IoUtils.EOL); + byte[] data = CommonTestSupportUtils.writeFile(local1, getClass().getName() + "#" + getCurrentTestName() + IoUtils.EOL); Path local2 = localDir.resolve("file-2.txt"); Files.write(local2, data); Path remoteDir = assertHierarchyTargetFolderExists(scpRoot.resolve("remote")); Path remote1 = remoteDir.resolve(local1.getFileName()); - String remote1Path = Utils.resolveRelativeRemotePath(parentPath, remote1); + String remote1Path = CommonTestSupportUtils.resolveRelativeRemotePath(parentPath, remote1); String[] locals = {local1.toString(), local2.toString()}; try { scp.upload(locals, remote1Path); @@ -464,7 +472,7 @@ public class ScpTest extends BaseTestSupport { } Path remoteSubDir = assertHierarchyTargetFolderExists(remoteDir.resolve("dir")); - scp.upload(locals, Utils.resolveRelativeRemotePath(parentPath, remoteSubDir)); + scp.upload(locals, CommonTestSupportUtils.resolveRelativeRemotePath(parentPath, remoteSubDir)); Path remoteSub1 = remoteSubDir.resolve(local1.getFileName()); assertFileLength(remoteSub1, data.length, TimeUnit.SECONDS.toMillis(11L)); @@ -473,12 +481,12 @@ public class ScpTest extends BaseTestSupport { assertFileLength(remoteSub2, data.length, TimeUnit.SECONDS.toMillis(11L)); String[] remotes = { - Utils.resolveRelativeRemotePath(parentPath, remoteSub1), - Utils.resolveRelativeRemotePath(parentPath, remoteSub2), + CommonTestSupportUtils.resolveRelativeRemotePath(parentPath, remoteSub1), + CommonTestSupportUtils.resolveRelativeRemotePath(parentPath, remoteSub2), }; try { - scp.download(remotes, Utils.resolveRelativeRemotePath(parentPath, local1)); + scp.download(remotes, CommonTestSupportUtils.resolveRelativeRemotePath(parentPath, local1)); fail("Unexpected download success to existing local file: " + local1); } catch (IOException e) { // Ok @@ -511,26 +519,27 @@ public class ScpTest extends BaseTestSupport { ScpClient scp = createScpClient(session); Path targetPath = detectTargetFolder(); Path parentPath = targetPath.getParent(); - Path scpRoot = Utils.resolve(targetPath, ScpHelper.SCP_COMMAND_PREFIX, getClass().getSimpleName(), getCurrentTestName()); - Utils.deleteRecursive(scpRoot); + Path scpRoot = CommonTestSupportUtils.resolve(targetPath, + ScpHelper.SCP_COMMAND_PREFIX, getClass().getSimpleName(), getCurrentTestName()); + CommonTestSupportUtils.deleteRecursive(scpRoot); Path localDir = scpRoot.resolve("local"); Path localSubDir = assertHierarchyTargetFolderExists(localDir.resolve("dir")); Path localSub1 = localSubDir.resolve("file-1.txt"); - byte[] data = Utils.writeFile(localSub1, getClass().getName() + "#" + getCurrentTestName() + IoUtils.EOL); + byte[] data = CommonTestSupportUtils.writeFile(localSub1, getClass().getName() + "#" + getCurrentTestName() + IoUtils.EOL); Path localSub2 = localSubDir.resolve("file-2.txt"); Files.write(localSub2, data); Path remoteDir = assertHierarchyTargetFolderExists(scpRoot.resolve("remote")); - scp.upload(localSubDir, Utils.resolveRelativeRemotePath(parentPath, remoteDir), ScpClient.Option.Recursive); + scp.upload(localSubDir, CommonTestSupportUtils.resolveRelativeRemotePath(parentPath, remoteDir), ScpClient.Option.Recursive); Path remoteSubDir = remoteDir.resolve(localSubDir.getFileName()); assertFileLength(remoteSubDir.resolve(localSub1.getFileName()), data.length, TimeUnit.SECONDS.toMillis(11L)); assertFileLength(remoteSubDir.resolve(localSub2.getFileName()), data.length, TimeUnit.SECONDS.toMillis(11L)); - Utils.deleteRecursive(localSubDir); + CommonTestSupportUtils.deleteRecursive(localSubDir); - scp.download(Utils.resolveRelativeRemotePath(parentPath, remoteSubDir), localDir, ScpClient.Option.Recursive); + scp.download(CommonTestSupportUtils.resolveRelativeRemotePath(parentPath, remoteSubDir), localDir, ScpClient.Option.Recursive); assertFileLength(localSub1, data.length, TimeUnit.SECONDS.toMillis(11L)); assertFileLength(localSub2, data.length, TimeUnit.SECONDS.toMillis(11L)); } @@ -547,17 +556,18 @@ public class ScpTest extends BaseTestSupport { ScpClient scp = createScpClient(session); Path targetPath = detectTargetFolder(); Path parentPath = targetPath.getParent(); - Path scpRoot = Utils.resolve(targetPath, ScpHelper.SCP_COMMAND_PREFIX, getClass().getSimpleName(), getCurrentTestName()); - Utils.deleteRecursive(scpRoot); + Path scpRoot = CommonTestSupportUtils.resolve(targetPath, + ScpHelper.SCP_COMMAND_PREFIX, getClass().getSimpleName(), getCurrentTestName()); + CommonTestSupportUtils.deleteRecursive(scpRoot); Path localDir = assertHierarchyTargetFolderExists(scpRoot.resolve("local")); Path local1 = localDir.resolve("file-1.txt"); - byte[] data = Utils.writeFile(local1, getClass().getName() + "#" + getCurrentTestName() + IoUtils.EOL); + byte[] data = CommonTestSupportUtils.writeFile(local1, getClass().getName() + "#" + getCurrentTestName() + IoUtils.EOL); Path local2 = localDir.resolve("file-2.txt"); Files.write(local2, data); Path remoteDir = assertHierarchyTargetFolderExists(scpRoot.resolve("remote")); - String remotePath = Utils.resolveRelativeRemotePath(parentPath, remoteDir); + String remotePath = CommonTestSupportUtils.resolveRelativeRemotePath(parentPath, remoteDir); scp.upload(localDir.toString() + File.separator + "*", remotePath); assertFileLength(remoteDir.resolve(local1.getFileName()), data.length, TimeUnit.SECONDS.toMillis(11L)); assertFileLength(remoteDir.resolve(local2.getFileName()), data.length, TimeUnit.SECONDS.toMillis(11L)); @@ -581,18 +591,19 @@ public class ScpTest extends BaseTestSupport { ScpClient scp = createScpClient(session); Path targetPath = detectTargetFolder(); Path parentPath = targetPath.getParent(); - Path scpRoot = Utils.resolve(targetPath, ScpHelper.SCP_COMMAND_PREFIX, getClass().getSimpleName(), getCurrentTestName()); - Utils.deleteRecursive(scpRoot); + Path scpRoot = CommonTestSupportUtils.resolve(targetPath, + ScpHelper.SCP_COMMAND_PREFIX, getClass().getSimpleName(), getCurrentTestName()); + CommonTestSupportUtils.deleteRecursive(scpRoot); Path localDir = scpRoot.resolve("local"); Path localSubDir = assertHierarchyTargetFolderExists(localDir.resolve("dir")); Path local1 = localDir.resolve("file-1.txt"); - byte[] data = Utils.writeFile(local1, getClass().getName() + "#" + getCurrentTestName() + IoUtils.EOL); + byte[] data = CommonTestSupportUtils.writeFile(local1, getClass().getName() + "#" + getCurrentTestName() + IoUtils.EOL); Path localSub2 = localSubDir.resolve("file-2.txt"); Files.write(localSub2, data); Path remoteDir = assertHierarchyTargetFolderExists(scpRoot.resolve("remote")); - String remotePath = Utils.resolveRelativeRemotePath(parentPath, remoteDir); + String remotePath = CommonTestSupportUtils.resolveRelativeRemotePath(parentPath, remoteDir); scp.upload(localDir.toString() + File.separator + "*", remotePath, ScpClient.Option.Recursive); assertFileLength(remoteDir.resolve(local1.getFileName()), data.length, TimeUnit.SECONDS.toMillis(11L)); @@ -600,7 +611,7 @@ public class ScpTest extends BaseTestSupport { assertFileLength(remoteSubDir.resolve(localSub2.getFileName()), data.length, TimeUnit.SECONDS.toMillis(11L)); Files.delete(local1); - Utils.deleteRecursive(localSubDir); + CommonTestSupportUtils.deleteRecursive(localSubDir); scp.download(remotePath + "/*", localDir); assertFileLength(local1, data.length, TimeUnit.SECONDS.toMillis(11L)); @@ -624,8 +635,9 @@ public class ScpTest extends BaseTestSupport { ScpClient scp = createScpClient(session); Path targetPath = detectTargetFolder(); Path parentPath = targetPath.getParent(); - Path scpRoot = Utils.resolve(targetPath, ScpHelper.SCP_COMMAND_PREFIX, getClass().getSimpleName(), getCurrentTestName()); - Utils.deleteRecursive(scpRoot); + Path scpRoot = CommonTestSupportUtils.resolve(targetPath, + ScpHelper.SCP_COMMAND_PREFIX, getClass().getSimpleName(), getCurrentTestName()); + CommonTestSupportUtils.deleteRecursive(scpRoot); Path localDir = scpRoot.resolve("local"); Path localSubDir = assertHierarchyTargetFolderExists(localDir.resolve("dir")); @@ -633,7 +645,7 @@ public class ScpTest extends BaseTestSupport { final long lastModMillis = System.currentTimeMillis() - TimeUnit.DAYS.toMillis(1); final long lastModSecs = TimeUnit.MILLISECONDS.toSeconds(lastModMillis); Path local1 = localDir.resolve("file-1.txt"); - byte[] data = Utils.writeFile(local1, getClass().getName() + "#" + getCurrentTestName() + IoUtils.EOL); + byte[] data = CommonTestSupportUtils.writeFile(local1, getClass().getName() + "#" + getCurrentTestName() + IoUtils.EOL); File lclFile1 = local1.toFile(); boolean lcl1ModSet = lclFile1.setLastModified(lastModMillis); @@ -646,7 +658,7 @@ public class ScpTest extends BaseTestSupport { boolean lclSub2ModSet = lclSubFile2.setLastModified(lastModMillis); Path remoteDir = assertHierarchyTargetFolderExists(scpRoot.resolve("remote")); - String remotePath = Utils.resolveRelativeRemotePath(parentPath, remoteDir); + String remotePath = CommonTestSupportUtils.resolveRelativeRemotePath(parentPath, remoteDir); scp.upload(localDir.toString() + File.separator + "*", remotePath, ScpClient.Option.Recursive, ScpClient.Option.PreserveAttributes); Path remote1 = remoteDir.resolve(local1.getFileName()); @@ -662,7 +674,7 @@ public class ScpTest extends BaseTestSupport { File remSubFile2 = remoteSub2.toFile(); assertLastModifiedTimeEquals(remSubFile2, lclSub2ModSet, lastModSecs); - Utils.deleteRecursive(localDir); + CommonTestSupportUtils.deleteRecursive(localDir); assertHierarchyTargetFolderExists(localDir); scp.download(remotePath + "/*", localDir, ScpClient.Option.Recursive, ScpClient.Option.PreserveAttributes); @@ -684,12 +696,13 @@ public class ScpTest extends BaseTestSupport { ScpClient scp = createScpClient(session); Path targetPath = detectTargetFolder(); Path parentPath = targetPath.getParent(); - Path scpRoot = Utils.resolve(targetPath, ScpHelper.SCP_COMMAND_PREFIX, getClass().getSimpleName(), getCurrentTestName()); - Utils.deleteRecursive(scpRoot); + Path scpRoot = CommonTestSupportUtils.resolve(targetPath, + ScpHelper.SCP_COMMAND_PREFIX, getClass().getSimpleName(), getCurrentTestName()); + CommonTestSupportUtils.deleteRecursive(scpRoot); Path remoteDir = assertHierarchyTargetFolderExists(scpRoot.resolve("remote")); Path remoteFile = remoteDir.resolve("file.txt"); - String remotePath = Utils.resolveRelativeRemotePath(parentPath, remoteFile); + String remotePath = CommonTestSupportUtils.resolveRelativeRemotePath(parentPath, remoteFile); byte[] data = (getClass().getName() + "#" + getCurrentTestName()).getBytes(StandardCharsets.UTF_8); outputDebugMessage("Upload data to %s", remotePath); scp.upload(data, remotePath, EnumSet.allOf(PosixFilePermission.class), null); @@ -753,8 +766,9 @@ public class ScpTest extends BaseTestSupport { Path targetPath = detectTargetFolder(); Path parentPath = targetPath.getParent(); - Path scpRoot = Utils.resolve(targetPath, ScpHelper.SCP_COMMAND_PREFIX, getClass().getSimpleName(), getCurrentTestName()); - Utils.deleteRecursive(scpRoot); + Path scpRoot = CommonTestSupportUtils.resolve(targetPath, + ScpHelper.SCP_COMMAND_PREFIX, getClass().getSimpleName(), getCurrentTestName()); + CommonTestSupportUtils.deleteRecursive(scpRoot); Path remoteDir = assertHierarchyTargetFolderExists(scpRoot); Path localFile = remoteDir.resolve("data.txt"); @@ -762,7 +776,7 @@ public class ScpTest extends BaseTestSupport { Files.write(localFile, data); Path remoteFile = remoteDir.resolve("upload.txt"); - String remotePath = Utils.resolveRelativeRemotePath(parentPath, remoteFile); + String remotePath = CommonTestSupportUtils.resolveRelativeRemotePath(parentPath, remoteFile); outputDebugMessage("Upload data to %s", remotePath); scp.upload(localFile, remotePath); assertFileLength(remoteFile, data.length, TimeUnit.SECONDS.toMillis(11L)); @@ -838,12 +852,13 @@ public class ScpTest extends BaseTestSupport { ScpClient scp = creator.createScpClient(session); Path targetPath = detectTargetFolder(); Path parentPath = targetPath.getParent(); - Path scpRoot = Utils.resolve(targetPath, ScpHelper.SCP_COMMAND_PREFIX, getClass().getSimpleName(), getCurrentTestName()); - Utils.deleteRecursive(scpRoot); + Path scpRoot = CommonTestSupportUtils.resolve(targetPath, + ScpHelper.SCP_COMMAND_PREFIX, getClass().getSimpleName(), getCurrentTestName()); + CommonTestSupportUtils.deleteRecursive(scpRoot); Path remoteDir = assertHierarchyTargetFolderExists(scpRoot.resolve("remote")); Path remoteFile = remoteDir.resolve("file.txt"); - String remotePath = Utils.resolveRelativeRemotePath(parentPath, remoteFile); + String remotePath = CommonTestSupportUtils.resolveRelativeRemotePath(parentPath, remoteFile); byte[] data = (getClass().getName() + "#" + getCurrentTestName()).getBytes(StandardCharsets.UTF_8); outputDebugMessage("Upload data to %s", remotePath); try { @@ -918,7 +933,7 @@ public class ScpTest extends BaseTestSupport { String unixPath = unixDir + "/" + fileName; File root = new File(unixDir); File target = new File(unixPath); - Utils.deleteRecursive(root); + CommonTestSupportUtils.deleteRecursive(root); root.mkdirs(); assertTrue("Failed to ensure existence of " + root, root.exists()); @@ -961,12 +976,13 @@ public class ScpTest extends BaseTestSupport { public void testWithGanymede() throws Exception { Path targetPath = detectTargetFolder(); Path parentPath = targetPath.getParent(); - Path scpRoot = Utils.resolve(targetPath, ScpHelper.SCP_COMMAND_PREFIX, getClass().getSimpleName(), getCurrentTestName()); - Utils.deleteRecursive(scpRoot); + Path scpRoot = CommonTestSupportUtils.resolve(targetPath, + ScpHelper.SCP_COMMAND_PREFIX, getClass().getSimpleName(), getCurrentTestName()); + CommonTestSupportUtils.deleteRecursive(scpRoot); byte[] expected = (getClass().getName() + "#" + getCurrentTestName()).getBytes(StandardCharsets.UTF_8); Path remoteDir = assertHierarchyTargetFolderExists(scpRoot.resolve("remote")); - String remotePath = Utils.resolveRelativeRemotePath(parentPath, remoteDir); + String remotePath = CommonTestSupportUtils.resolveRelativeRemotePath(parentPath, remoteDir); String fileName = "file.txt"; Path remoteFile = remoteDir.resolve(fileName); String mode = ScpHelper.getOctalPermissions(EnumSet.of( http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/10de190e/sshd-scp/src/test/java/org/apache/sshd/client/scp/SimpleScpClientTest.java ---------------------------------------------------------------------- diff --git a/sshd-scp/src/test/java/org/apache/sshd/client/scp/SimpleScpClientTest.java b/sshd-scp/src/test/java/org/apache/sshd/client/scp/SimpleScpClientTest.java index d9b9b08..b66071a 100644 --- a/sshd-scp/src/test/java/org/apache/sshd/client/scp/SimpleScpClientTest.java +++ b/sshd-scp/src/test/java/org/apache/sshd/client/scp/SimpleScpClientTest.java @@ -29,7 +29,7 @@ import org.apache.sshd.common.scp.ScpHelper; import org.apache.sshd.common.session.Session; import org.apache.sshd.common.util.io.IoUtils; import org.apache.sshd.server.scp.ScpCommandFactory; -import org.apache.sshd.util.test.Utils; +import org.apache.sshd.util.test.CommonTestSupportUtils; import org.apache.sshd.util.test.client.simple.BaseSimpleClientTestSupport; import org.junit.FixMethodOrder; import org.junit.Test; @@ -77,17 +77,18 @@ public class SimpleScpClientTest extends BaseSimpleClientTestSupport { @Test public void testScpUploadProxy() throws Exception { try (CloseableScpClient scp = login()) { - Path scpRoot = Utils.resolve(targetPath, ScpHelper.SCP_COMMAND_PREFIX, getClass().getSimpleName(), getCurrentTestName()); - Utils.deleteRecursive(scpRoot); + Path scpRoot = CommonTestSupportUtils.resolve(targetPath, + ScpHelper.SCP_COMMAND_PREFIX, getClass().getSimpleName(), getCurrentTestName()); + CommonTestSupportUtils.deleteRecursive(scpRoot); Path localDir = assertHierarchyTargetFolderExists(scpRoot.resolve("local")); Path localFile = localDir.resolve("file.txt"); String data = getClass().getName() + "#" + getCurrentTestName() + IoUtils.EOL; - byte[] written = Utils.writeFile(localFile, data); + byte[] written = CommonTestSupportUtils.writeFile(localFile, data); Path remoteDir = assertHierarchyTargetFolderExists(scpRoot.resolve("remote")); Path remoteFile = remoteDir.resolve(localFile.getFileName()); - String remotePath = Utils.resolveRelativeRemotePath(parentPath, remoteFile); + String remotePath = CommonTestSupportUtils.resolveRelativeRemotePath(parentPath, remoteFile); scp.upload(localFile, remotePath); byte[] uploaded = Files.readAllBytes(remoteFile); @@ -98,16 +99,17 @@ public class SimpleScpClientTest extends BaseSimpleClientTestSupport { @Test public void testScpDownloadProxy() throws Exception { try (CloseableScpClient scp = login()) { - Path scpRoot = Utils.resolve(targetPath, ScpHelper.SCP_COMMAND_PREFIX, getClass().getSimpleName(), getCurrentTestName()); - Utils.deleteRecursive(scpRoot); + Path scpRoot = CommonTestSupportUtils.resolve(targetPath, + ScpHelper.SCP_COMMAND_PREFIX, getClass().getSimpleName(), getCurrentTestName()); + CommonTestSupportUtils.deleteRecursive(scpRoot); Path remoteDir = assertHierarchyTargetFolderExists(scpRoot.resolve("remote")); Path remoteFile = remoteDir.resolve("file.txt"); String data = getClass().getName() + "#" + getCurrentTestName() + IoUtils.EOL; - byte[] written = Utils.writeFile(remoteFile, data); + byte[] written = CommonTestSupportUtils.writeFile(remoteFile, data); Path localDir = assertHierarchyTargetFolderExists(scpRoot.resolve("local")); Path localFile = localDir.resolve(remoteFile.getFileName()); - String remotePath = Utils.resolveRelativeRemotePath(parentPath, remoteFile); + String remotePath = CommonTestSupportUtils.resolveRelativeRemotePath(parentPath, remoteFile); scp.download(remotePath, localFile); byte[] downloaded = Files.readAllBytes(localFile); http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/10de190e/sshd-sftp/pom.xml ---------------------------------------------------------------------- diff --git a/sshd-sftp/pom.xml b/sshd-sftp/pom.xml index e26eb32..f639511 100644 --- a/sshd-sftp/pom.xml +++ b/sshd-sftp/pom.xml @@ -42,7 +42,7 @@ <artifactId>sshd-core</artifactId> <version>${project.version}</version> </dependency> - + <!-- Test dependencies --> <dependency> <groupId>org.apache.sshd</groupId> <artifactId>sshd-core</artifactId> @@ -51,6 +51,13 @@ <scope>test</scope> </dependency> <dependency> + <groupId>org.apache.sshd</groupId> + <artifactId>sshd-common</artifactId> + <version>${project.version}</version> + <type>test-jar</type> + <scope>test</scope> + </dependency> + <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <scope>test</scope> http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/10de190e/sshd-sftp/src/main/java/org/apache/sshd/client/subsystem/sftp/SftpFileSystemProvider.java ---------------------------------------------------------------------- diff --git a/sshd-sftp/src/main/java/org/apache/sshd/client/subsystem/sftp/SftpFileSystemProvider.java b/sshd-sftp/src/main/java/org/apache/sshd/client/subsystem/sftp/SftpFileSystemProvider.java index df33c61..9810ba1 100644 --- a/sshd-sftp/src/main/java/org/apache/sshd/client/subsystem/sftp/SftpFileSystemProvider.java +++ b/sshd-sftp/src/main/java/org/apache/sshd/client/subsystem/sftp/SftpFileSystemProvider.java @@ -74,7 +74,7 @@ import org.apache.sshd.client.subsystem.sftp.SftpClient.Attributes; import org.apache.sshd.common.PropertyResolver; import org.apache.sshd.common.PropertyResolverUtils; import org.apache.sshd.common.SshException; -import org.apache.sshd.common.config.SshConfigFileReader; +import org.apache.sshd.common.config.ConfigFileReaderSupport; import org.apache.sshd.common.io.IoSession; import org.apache.sshd.common.subsystem.sftp.SftpConstants; import org.apache.sshd.common.subsystem.sftp.SftpException; @@ -180,7 +180,7 @@ public class SftpFileSystemProvider extends FileSystemProvider { String host = ValidateUtils.checkNotNullAndNotEmpty(uri.getHost(), "Host not provided"); int port = uri.getPort(); if (port <= 0) { - port = SshConfigFileReader.DEFAULT_PORT; + port = ConfigFileReaderSupport.DEFAULT_PORT; } String userInfo = ValidateUtils.checkNotNullAndNotEmpty(uri.getUserInfo(), "UserInfo not provided"); @@ -1219,13 +1219,13 @@ public class SftpFileSystemProvider extends FileSystemProvider { InetSocketAddress inetAddr = (InetSocketAddress) addr; return getFileSystemIdentifier(inetAddr.getHostString(), inetAddr.getPort(), username); } else { - return getFileSystemIdentifier(addr.toString(), SshConfigFileReader.DEFAULT_PORT, username); + return getFileSystemIdentifier(addr.toString(), ConfigFileReaderSupport.DEFAULT_PORT, username); } } public static String getFileSystemIdentifier(String host, int port, String username) { return GenericUtils.trimToEmpty(host) + ':' - + ((port <= 0) ? SshConfigFileReader.DEFAULT_PORT : port) + ':' + + ((port <= 0) ? ConfigFileReaderSupport.DEFAULT_PORT : port) + ':' + GenericUtils.trimToEmpty(username); } http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/10de190e/sshd-sftp/src/test/java/org/apache/sshd/client/subsystem/sftp/AbstractSftpClientTestSupport.java ---------------------------------------------------------------------- diff --git a/sshd-sftp/src/test/java/org/apache/sshd/client/subsystem/sftp/AbstractSftpClientTestSupport.java b/sshd-sftp/src/test/java/org/apache/sshd/client/subsystem/sftp/AbstractSftpClientTestSupport.java index 49e6c28..8d54edf 100644 --- a/sshd-sftp/src/test/java/org/apache/sshd/client/subsystem/sftp/AbstractSftpClientTestSupport.java +++ b/sshd-sftp/src/test/java/org/apache/sshd/client/subsystem/sftp/AbstractSftpClientTestSupport.java @@ -31,8 +31,8 @@ import org.apache.sshd.common.file.virtualfs.VirtualFileSystemFactory; import org.apache.sshd.server.SshServer; import org.apache.sshd.server.subsystem.sftp.SftpSubsystemFactory; import org.apache.sshd.util.test.BaseTestSupport; +import org.apache.sshd.util.test.CoreTestSupportUtils; import org.apache.sshd.util.test.JSchLogger; -import org.apache.sshd.util.test.Utils; import org.junit.AfterClass; import org.junit.BeforeClass; @@ -55,12 +55,12 @@ public abstract class AbstractSftpClientTestSupport extends BaseTestSupport { @BeforeClass public static void setupClientAndServer() throws Exception { JSchLogger.init(); - sshd = Utils.setupTestServer(AbstractSftpClientTestSupport.class); + sshd = CoreTestSupportUtils.setupTestServer(AbstractSftpClientTestSupport.class); sshd.setSubsystemFactories(Collections.singletonList(new SftpSubsystemFactory())); sshd.start(); port = sshd.getPort(); - client = Utils.setupTestClient(AbstractSftpClientTestSupport.class); + client = CoreTestSupportUtils.setupTestClient(AbstractSftpClientTestSupport.class); client.start(); } http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/10de190e/sshd-sftp/src/test/java/org/apache/sshd/client/subsystem/sftp/DefaultCloseableHandleTest.java ---------------------------------------------------------------------- diff --git a/sshd-sftp/src/test/java/org/apache/sshd/client/subsystem/sftp/DefaultCloseableHandleTest.java b/sshd-sftp/src/test/java/org/apache/sshd/client/subsystem/sftp/DefaultCloseableHandleTest.java index e5265d5..606e17e 100644 --- a/sshd-sftp/src/test/java/org/apache/sshd/client/subsystem/sftp/DefaultCloseableHandleTest.java +++ b/sshd-sftp/src/test/java/org/apache/sshd/client/subsystem/sftp/DefaultCloseableHandleTest.java @@ -26,7 +26,7 @@ import java.util.concurrent.atomic.AtomicBoolean; import org.apache.sshd.client.subsystem.sftp.SftpClient.CloseableHandle; import org.apache.sshd.client.subsystem.sftp.SftpClient.Handle; import org.apache.sshd.client.subsystem.sftp.impl.DefaultCloseableHandle; -import org.apache.sshd.util.test.BaseTestSupport; +import org.apache.sshd.util.test.JUnitTestSupport; import org.apache.sshd.util.test.NoIoTestCase; import org.junit.FixMethodOrder; import org.junit.Test; @@ -40,7 +40,7 @@ import org.mockito.Mockito; */ @FixMethodOrder(MethodSorters.NAME_ASCENDING) @Category({ NoIoTestCase.class }) -public class DefaultCloseableHandleTest extends BaseTestSupport { +public class DefaultCloseableHandleTest extends JUnitTestSupport { public DefaultCloseableHandleTest() { super(); } http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/10de190e/sshd-sftp/src/test/java/org/apache/sshd/client/subsystem/sftp/SftpFileSystemTest.java ---------------------------------------------------------------------- diff --git a/sshd-sftp/src/test/java/org/apache/sshd/client/subsystem/sftp/SftpFileSystemTest.java b/sshd-sftp/src/test/java/org/apache/sshd/client/subsystem/sftp/SftpFileSystemTest.java index 80428eb..9ecb690 100644 --- a/sshd-sftp/src/test/java/org/apache/sshd/client/subsystem/sftp/SftpFileSystemTest.java +++ b/sshd-sftp/src/test/java/org/apache/sshd/client/subsystem/sftp/SftpFileSystemTest.java @@ -70,7 +70,8 @@ import org.apache.sshd.server.SshServer; import org.apache.sshd.server.subsystem.sftp.SftpSubsystemEnvironment; import org.apache.sshd.server.subsystem.sftp.SftpSubsystemFactory; import org.apache.sshd.util.test.BaseTestSupport; -import org.apache.sshd.util.test.Utils; +import org.apache.sshd.util.test.CommonTestSupportUtils; +import org.apache.sshd.util.test.CoreTestSupportUtils; import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; @@ -94,7 +95,7 @@ public class SftpFileSystemTest extends BaseTestSupport { @BeforeClass public static void setupServerInstance() throws Exception { - sshd = Utils.setupTestServer(SftpFileSystemTest.class); + sshd = CoreTestSupportUtils.setupTestServer(SftpFileSystemTest.class); sshd.setSubsystemFactories(Collections.singletonList(new SftpSubsystemFactory())); sshd.start(); port = sshd.getPort(); @@ -157,8 +158,9 @@ public class SftpFileSystemTest extends BaseTestSupport { @Test public void testAttributes() throws IOException { Path targetPath = detectTargetFolder(); - Path lclSftp = Utils.resolve(targetPath, SftpConstants.SFTP_SUBSYSTEM_NAME, getClass().getSimpleName(), getCurrentTestName()); - Utils.deleteRecursive(lclSftp); + Path lclSftp = CommonTestSupportUtils.resolve(targetPath, + SftpConstants.SFTP_SUBSYSTEM_NAME, getClass().getSimpleName(), getCurrentTestName()); + CommonTestSupportUtils.deleteRecursive(lclSftp); try (FileSystem fs = FileSystems.newFileSystem(createDefaultFileSystemURI(), GenericUtils.<String, Object>mapBuilder() @@ -168,7 +170,7 @@ public class SftpFileSystemTest extends BaseTestSupport { Path parentPath = targetPath.getParent(); Path clientFolder = lclSftp.resolve("client"); - String remFilePath = Utils.resolveRelativeRemotePath(parentPath, clientFolder.resolve("file.txt")); + String remFilePath = CommonTestSupportUtils.resolveRelativeRemotePath(parentPath, clientFolder.resolve("file.txt")); Path file = fs.getPath(remFilePath); assertHierarchyTargetFolderExists(file.getParent()); Files.write(file, (getCurrentTestName() + "\n").getBytes(StandardCharsets.UTF_8)); @@ -203,7 +205,7 @@ public class SftpFileSystemTest extends BaseTestSupport { public void testRootFileSystem() throws IOException { Path targetPath = detectTargetFolder(); Path rootNative = targetPath.resolve("root").toAbsolutePath(); - Utils.deleteRecursive(rootNative); + CommonTestSupportUtils.deleteRecursive(rootNative); assertHierarchyTargetFolderExists(rootNative); try (FileSystem fs = FileSystems.newFileSystem(URI.create("root:" + rootNative.toUri().toString() + "!/"), null)) { @@ -215,13 +217,14 @@ public class SftpFileSystemTest extends BaseTestSupport { @Test // see SSHD-697 public void testFileChannel() throws IOException { Path targetPath = detectTargetFolder(); - Path lclSftp = Utils.resolve(targetPath, SftpConstants.SFTP_SUBSYSTEM_NAME, getClass().getSimpleName()); + Path lclSftp = CommonTestSupportUtils.resolve(targetPath, + SftpConstants.SFTP_SUBSYSTEM_NAME, getClass().getSimpleName()); Path lclFile = lclSftp.resolve(getCurrentTestName() + ".txt"); Files.deleteIfExists(lclFile); byte[] expected = (getClass().getName() + "#" + getCurrentTestName() + "(" + new Date() + ")").getBytes(StandardCharsets.UTF_8); try (FileSystem fs = FileSystems.newFileSystem(createDefaultFileSystemURI(), Collections.emptyMap())) { Path parentPath = targetPath.getParent(); - String remFilePath = Utils.resolveRelativeRemotePath(parentPath, lclFile); + String remFilePath = CommonTestSupportUtils.resolveRelativeRemotePath(parentPath, lclFile); Path file = fs.getPath(remFilePath); FileSystemProvider provider = fs.provider(); @@ -376,15 +379,16 @@ public class SftpFileSystemTest extends BaseTestSupport { } Path targetPath = detectTargetFolder(); - Path lclSftp = Utils.resolve(targetPath, SftpConstants.SFTP_SUBSYSTEM_NAME, getClass().getSimpleName(), getCurrentTestName()); - Utils.deleteRecursive(lclSftp); + Path lclSftp = CommonTestSupportUtils.resolve(targetPath, + SftpConstants.SFTP_SUBSYSTEM_NAME, getClass().getSimpleName(), getCurrentTestName()); + CommonTestSupportUtils.deleteRecursive(lclSftp); Path current = fs.getPath(".").toRealPath().normalize(); outputDebugMessage("CWD: %s", current); Path parentPath = targetPath.getParent(); Path clientFolder = lclSftp.resolve("client"); - String remFile1Path = Utils.resolveRelativeRemotePath(parentPath, clientFolder.resolve("file-1.txt")); + String remFile1Path = CommonTestSupportUtils.resolveRelativeRemotePath(parentPath, clientFolder.resolve("file-1.txt")); Path file1 = fs.getPath(remFile1Path); assertHierarchyTargetFolderExists(file1.getParent()); @@ -409,9 +413,9 @@ public class SftpFileSystemTest extends BaseTestSupport { assertListEquals("Mismatched ACLs for " + file1, aclView.getAcl(), acl); } - String remFile2Path = Utils.resolveRelativeRemotePath(parentPath, clientFolder.resolve("file-2.txt")); + String remFile2Path = CommonTestSupportUtils.resolveRelativeRemotePath(parentPath, clientFolder.resolve("file-2.txt")); Path file2 = fs.getPath(remFile2Path); - String remFile3Path = Utils.resolveRelativeRemotePath(parentPath, clientFolder.resolve("file-3.txt")); + String remFile3Path = CommonTestSupportUtils.resolveRelativeRemotePath(parentPath, clientFolder.resolve("file-3.txt")); Path file3 = fs.getPath(remFile3Path); try { outputDebugMessage("Move with failure expected %s => %s", file2, file3);
