forked from WebOfTrust/keripy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix alias renaming * test added for renaming alias * test added for renaming alias * execution permission to the test script
- Loading branch information
1 parent
28b2631
commit adc2a0c
Showing
3 changed files
with
37 additions
and
3 deletions.
There are no files selected for viewing
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,25 @@ | ||
#!/bin/bash | ||
|
||
# CREATE DATABASE AND KEYSTORE | ||
kli init --name rename-test --base "${KERI_TEMP_DIR}" --nopasscode | ||
|
||
# Incept with the initial alias "sabbir" | ||
kli incept --name rename-test --base "${KERI_TEMP_DIR}" --alias sabbir --file ${KERI_DEMO_SCRIPT_DIR}/data/transferable-sample.json | ||
|
||
# Rename the alias from "sabbir" to "irfan" | ||
kli rename --name rename-test --base "${KERI_TEMP_DIR}" --alias sabbir irfan | ||
|
||
# Extract alias from status | ||
irfan_alias=$(kli status --name rename-test --base "${KERI_TEMP_DIR}" --alias irfan | grep -Eo 'Alias:\s+(.+)' | awk '{print $2}') | ||
|
||
|
||
|
||
# Check if the extracted alias is "irfan" | ||
if [ "$irfan_alias" = "irfan" ]; then | ||
echo "Alias successfully changed to 'irfan'." | ||
else | ||
echo "Alias did not change !" | ||
|
||
fi | ||
|
||
echo 'Test Complete' |
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