-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #253 from ardriveapp/dev
PE-1039: Release ArDrive CLI v1.9.0
- Loading branch information
Showing
24 changed files
with
369 additions
and
117 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file renamed
BIN
+173 KB
...re-js-npm-1.7.0-1fc3cbf016-3223964ec9.zip → ...re-js-npm-1.8.0-5a3b702d23-091a457022.zip
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# String with 256 characters | ||
ENTITY_NAME_LONG='+===============================================================================================================================================================================================================================================================' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/usr/bin/env bats | ||
|
||
# Support lib | ||
load '/home/node/packages/node_modules/bats-support/load.bash' | ||
# Assertions | ||
load '/home/node/packages/node_modules/bats-assert/load.bash' | ||
# Constants | ||
load '../constants.sh' | ||
|
||
@test "create drive with empty name results in an error message and exit code 1" { | ||
run -1 bash -c "yarn ardrive create-drive --dry-run -n '' -w $WALLET" | ||
|
||
assert_line -n 0 "Error: Required parameter driveName wasn't provided!" | ||
} | ||
|
||
@test "create drive with long name results in an error message and exit code 1" { | ||
run -1 bash -c "yarn ardrive create-drive --dry-run -n $ENTITY_NAME_LONG -w $WALLET" | ||
|
||
assert_line -n 0 'Error: The drive name must not exceed 255 bytes' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/usr/bin/env bats | ||
|
||
# Support lib | ||
load '/home/node/packages/node_modules/bats-support/load.bash' | ||
# Assertions | ||
load '/home/node/packages/node_modules/bats-assert/load.bash' | ||
|
||
@test "generate-wallet creates canonical wallet" { | ||
|
||
run -0 bash -c "yarn ardrive generate-wallet -s 'this is an example twelve word seed phrase that you could use' | jq .kty,.n,.e,.d,.p,.q,.dp,.dq,.qi,.kid" | ||
|
||
assert_line -n 0 '"RSA"' | ||
assert_line -n 1 '"jw8e2rH-iNRaLsoutq7UIVrcK0wxqQzG7wJ8ip0J6uNDXDKzFB9H0WwcHXYZyhE2faS73J47Tob5KtpTlBXt6lCOnl8Vp0Ud3Y025lDhxMevnSVkTBY8SIxSsAOwwUDPFIJE9W2f9ZZ4DZh5hWy7n0wYWi4APWiwD7tfvxX8xHUcOOvZRiTY-JOmN7pOnFvwzblX4Mpg1kON-b31VLxhyZKUYFhDuEXsxX8mHT_kpbUdHV24DMch44SbzNkRSYKJ3IqSW6fBZo5Zt9wzpFe7VhhRrfM8ZEOVYWdebLQfMc0lxt4zXQCHpmrUub8e13GGCB2kL3q38sR7XU_fa1PyiTsPtYjH0v4cdvkK58dfnTZDlhfSJjoyNYi_MVuhdtw5drECxxGJQItE6IdWvnKW8yAjJs0rAxQ8vVQhw9Ss6Kj4exM-szuKjcNpbbS_k8dK1j-CELPJ1bh2rThfc2NFCGvweTtn-oatJDObqymkqOV2939k8Xydeb0cC3CTt4QGnO5zW3yffupT3DorX0T2OhTDHjVWVmXE0e5hACpguHTIMLF418t5OcH981EG2d0sTDDrCBVTWyhmADZpvdTryj4r2c4YgaPw8YElyGCGkhw3txAfMPAUPxtbx3v3OBeFCpSpIjXdRqrDapaDd3CLSBgHy3OuNF4_YBXSBIBiNpU"' | ||
assert_line -n 2 '"AQAB"' | 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gjJGFXrggHszRCRaccjeFJOHP22RMakqddAgImnMtStAFwOKdlNA1WND0xd4e1zVJso_IFRO9-kMrMv8JmLj-3QloS5-UFDlvfywfqHwPiyy3KVQtgGnm6PJ6WR2qbA2dcBgiGpM-lbC-t-mRa4YeNANmrTchr5RIlXNg4pVaFZUjG6-QDb4WL_CFmA5KgC70HFzaXFHvKFM2SYRo_lUytjINzsv6oayB6nFfhq0e1EyouyOY5cU5B57Lu9QSfMWdnbNdwW7pHNkZwOd9BqrRhBcO1JncHKsyr8bplWO1ffTftpMmSseDzaSd_Zi1n2h8dblu8jMh6pNAiWF46bBA"' | ||
assert_line -n 9 '"2011-04-29"' | ||
} | ||
|
||
@test "generate-wallet rejects short and long seed phrases" { | ||
|
||
run -1 bash -c "yarn ardrive generate-wallet -s 'invalid seed phrase'" | ||
|
||
assert_line -n 0 "Error: 'invalid seed phrase' is not a valid 12 word seed phrase!" | ||
|
||
run -1 bash -c "yarn ardrive generate-wallet -s 'this invalid seed phrase has thirteen words and is expected to be rejected'" | ||
|
||
assert_line -n 0 "Error: 'this invalid seed phrase has thirteen words and is expected to be rejected' is not a valid 12 word seed phrase!" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/usr/bin/env bats | ||
|
||
# Support lib | ||
load '/home/node/packages/node_modules/bats-support/load.bash' | ||
# Assertions | ||
load '/home/node/packages/node_modules/bats-assert/load.bash' | ||
|
||
@test "get-address finds the correct address of a canonical seed phrase" { | ||
|
||
run -0 bash -c "yarn ardrive get-address -s 'this is an example twelve word seed phrase that you could use'" | ||
|
||
assert_line -n 0 'HTTn8F92tR32N8wuo-NIDkjmqPknrbl10JWo5MZ9x2k' | ||
} | ||
|
||
@test "get-address rejects short and long seed phrases" { | ||
|
||
run -1 bash -c "yarn ardrive get-address -s 'invalid seed phrase'" | ||
|
||
assert_line -n 0 "Error: 'invalid seed phrase' is not a valid 12 word seed phrase!" | ||
|
||
run -1 bash -c "yarn ardrive get-address -s 'this invalid seed phrase has thirteen words and is expected to be rejected'" | ||
|
||
assert_line -n 0 "Error: 'this invalid seed phrase has thirteen words and is expected to be rejected' is not a valid 12 word seed phrase!" | ||
} | ||
|
||
@test "get-address finds the correct address of a canonical wallet" { | ||
|
||
WALLET=' | ||
{ | ||
"kty": "RSA", | ||
"n": "jw8e2rH-iNRaLsoutq7UIVrcK0wxqQzG7wJ8ip0J6uNDXDKzFB9H0WwcHXYZyhE2faS73J47Tob5KtpTlBXt6lCOnl8Vp0Ud3Y025lDhxMevnSVkTBY8SIxSsAOwwUDPFIJE9W2f9ZZ4DZh5hWy7n0wYWi4APWiwD7tfvxX8xHUcOOvZRiTY-JOmN7pOnFvwzblX4Mpg1kON-b31VLxhyZKUYFhDuEXsxX8mHT_kpbUdHV24DMch44SbzNkRSYKJ3IqSW6fBZo5Zt9wzpFe7VhhRrfM8ZEOVYWdebLQfMc0lxt4zXQCHpmrUub8e13GGCB2kL3q38sR7XU_fa1PyiTsPtYjH0v4cdvkK58dfnTZDlhfSJjoyNYi_MVuhdtw5drECxxGJQItE6IdWvnKW8yAjJs0rAxQ8vVQhw9Ss6Kj4exM-szuKjcNpbbS_k8dK1j-CELPJ1bh2rThfc2NFCGvweTtn-oatJDObqymkqOV2939k8Xydeb0cC3CTt4QGnO5zW3yffupT3DorX0T2OhTDHjVWVmXE0e5hACpguHTIMLF418t5OcH981EG2d0sTDDrCBVTWyhmADZpvdTryj4r2c4YgaPw8YElyGCGkhw3txAfMPAUPxtbx3v3OBeFCpSpIjXdRqrDapaDd3CLSBgHy3OuNF4_YBXSBIBiNpU", | ||
"e": "AQAB", | ||
"d": "W9efPVOsT3fU9dkDKHEQ6uEEHB_sedUkGemEvxCWf1-rrRM3eKGkX8SCQD_DysBGNV9-4-IJvR5V9Lb5lUaG2TkidnYg1qQ-yi-QoUg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g4pVaFZUjG6-QDb4WL_CFmA5KgC70HFzaXFHvKFM2SYRo_lUytjINzsv6oayB6nFfhq0e1EyouyOY5cU5B57Lu9QSfMWdnbNdwW7pHNkZwOd9BqrRhBcO1JncHKsyr8bplWO1ffTftpMmSseDzaSd_Zi1n2h8dblu8jMh6pNAiWF46bBA", | ||
"kid": "2011-04-29" | ||
} | ||
' | ||
|
||
run -0 bash -c 'echo $WALLET | yarn ardrive get-address -w /dev/stdin' | ||
|
||
assert_line -n 0 'HTTn8F92tR32N8wuo-NIDkjmqPknrbl10JWo5MZ9x2k' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
#!/bin/bash | ||
|
||
# Depends on ./rename_drive.sh | ||
# Depends on ../..constants.sh | ||
|
||
rename_invalid_names() { | ||
echo "$(rename_drive "${PUB_DRIVE_ID}" " leading spaces.txt")" | ||
echo "$(rename_drive "${PUB_DRIVE_ID}" "trailing spaces.png ")" | ||
echo "$(rename_drive "${PUB_DRIVE_ID}" "trailing dots.doc.")" | ||
echo "$(rename_drive "${PUB_DRIVE_ID}" "reserved characters :*.txt")" | ||
echo "$(rename_drive "${PUB_DRIVE_ID}" "$ENTITY_NAME_LONG")" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
#!/bin/bash | ||
|
||
# Depends on ./rename_file.sh | ||
# Depends on ../..constants.sh | ||
|
||
rename_invalid_names() { | ||
echo "$(rename_file "${PUB_FILE_ID}" " leading spaces.txt")" | ||
echo "$(rename_file "${PUB_FILE_ID}" "trailing spaces.png ")" | ||
echo "$(rename_file "${PUB_FILE_ID}" "trailing dots.doc.")" | ||
echo "$(rename_file "${PUB_FILE_ID}" "reserved characters :*.txt")" | ||
echo "$(rename_file "${PUB_FILE_ID}" "$ENTITY_NAME_LONG")" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.