-
-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
On-line test for git-over-ssh indexes
- Loading branch information
Showing
8 changed files
with
66 additions
and
31 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
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 |
---|---|---|
|
@@ -208,6 +208,13 @@ package body Alr.Commands.Index is | |
& " case a pull operation will be performed on them." | ||
& " An index initially set up with a specific commit will" | ||
& " not be updated.") | ||
.New_Line | ||
.Append ("URL can be one of:") | ||
.Append ("- Plain absolute path: /path/to/index") | ||
.Append ("- Explicit path: file://path/to/index") | ||
.Append ("- git over HTTP/HTTPS: git+https://github.com/org/repo") | ||
.Append ("- git over SSH: git+ssh://[email protected]:/path/to/repo") | ||
.Append ("- git user over SSH: [email protected]:/org/repo") | ||
); | ||
|
||
--------------------- | ||
|
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 @@ | ||
from drivers.alr import init_local_crate, run_alr | ||
|
||
ORG="github.com:/alire-project" | ||
INDEX_REPO="test-index" | ||
CRATE_REPO="libhello" | ||
SSH_IMPLICIT_INDEX = f"git@{ORG}/{INDEX_REPO}" | ||
SSH_EXPLICIT_INDEX = f"git+ssh://{SSH_IMPLICIT_INDEX}" | ||
|
||
# Test that we can add an index using implicit ssh | ||
run_alr("index", "--name", "implicit", "--add", SSH_EXPLICIT_INDEX) | ||
run_alr("index", "--check") | ||
run_alr("index", "--update-all") # Check pulling | ||
|
||
# Remove so it can be re-added | ||
run_alr("index", "--del", "implicit") | ||
|
||
# Test that we can add an index using explicit ssh | ||
run_alr("index", "--name", "explicit", "--add", SSH_EXPLICIT_INDEX) | ||
run_alr("index", "--check") | ||
run_alr("index", "--update-all") | ||
|
||
# Test that we can pin a crate using implicit ssh | ||
init_local_crate() | ||
run_alr("with", "libhello", "--use", f"git@{ORG}/{CRATE_REPO}") | ||
run_alr("update") # Check pulling pin | ||
|
||
# Remove and re-pin using explicit ssh | ||
run_alr("with", "--del", "libhello") | ||
run_alr("with", "libhello", "--use", f"git+ssh://git@{ORG}/{CRATE_REPO}") | ||
run_alr("update") | ||
|
||
|
||
print("SUCCESS") |
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,9 @@ | ||
driver: python-script | ||
indexes: | ||
compiler_only_index: {} | ||
|
||
# We cannot run this test without ssh keys, so not intended for remote use. | ||
# Also, it requires going on-line. | ||
control: | ||
- [SKIP, "skip_local", "Local developer-only tests disabled"] | ||
- [SKIP, "skip_network", "Network-requiring tests disabled"] |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.