-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
9 additions
and
26 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
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 |
---|---|---|
|
@@ -30,25 +30,15 @@ git config user.email "[email protected]" | |
git config user.name "Some User" | ||
git annex init | ||
|
||
cp ${TESTFILE_PATH} . | ||
git annex add testfile.txt | ||
git commit -m "Add test file to git annex" | ||
|
||
# get git annex-generated key | ||
ANNEX_KEY=$(git annex lookupkey testfile.txt) | ||
|
||
# put item into dataset at git annex-expected key | ||
dtool add item testfile.txt "${SOURCE_DATASET}" "${ANNEX_KEY}" | ||
dtool add item "${TESTFILE_PATH}" "${SOURCE_DATASET}" | ||
dtool freeze "${SOURCE_DATASET}" | ||
|
||
git annex initremote --verbose --debug dtool_remote type=external externaltype=dtool encryption=none uri="${SOURCE_DATASET}" | ||
|
||
git annex info | ||
ITEM_UUID=$(dtool ls "${SOURCE_DATASET}" | awk '{ print $1 }') | ||
|
||
SPECIAL_REMOTE_UUID=$(git config --get remote.dtool_remote.annex-uuid) | ||
git annex initremote --verbose --debug dtool_remote type=external externaltype=dtool encryption=none | ||
|
||
# tell git annex that file is retrievable from special remote | ||
git annex setpresentkey "${ANNEX_KEY}" "${SPECIAL_REMOTE_UUID}" 1 | ||
git annex addurl --file testfile.txt "dtool:${SOURCE_DATASET}/${ITEM_UUID}" | ||
|
||
# test read-only special remote | ||
git annex testremote --verbose --debug dtool_remote --test-readonly=testfile.txt 2>&1 | tail -n 1000 | ||
git annex testremote --debug --verbose dtool_remote --test-readonly=testfile.txt 2>&1 | tail -n 1000 |