-
Notifications
You must be signed in to change notification settings - Fork 9
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 #135 from larsewi/mpfv
CFE-4071: Added --masterfiles option for cfbs init
- Loading branch information
Showing
11 changed files
with
135 additions
and
16 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
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,11 @@ | ||
set -e | ||
set -x | ||
cd tests/ | ||
mkdir -p ./tmp/ | ||
cd ./tmp/ | ||
touch cfbs.json && rm cfbs.json | ||
rm -rf .git | ||
|
||
cfbs --non-interactive init --masterfiles=no | ||
!( grep '"name": "masterfiles"' cfbs.json ) | ||
cfbs build |
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,12 @@ | ||
set -e | ||
set -x | ||
cd tests/ | ||
mkdir -p ./tmp/ | ||
cd ./tmp/ | ||
touch cfbs.json && rm cfbs.json | ||
rm -rf .git | ||
|
||
cfbs --non-interactive init --masterfiles=master | ||
grep '"name": "masterfiles"' cfbs.json | ||
grep '"url": "https://github.com/cfengine/masterfiles"' cfbs.json | ||
cfbs build |
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,12 @@ | ||
set -e | ||
set -x | ||
cd tests/ | ||
mkdir -p ./tmp/ | ||
cd ./tmp/ | ||
touch cfbs.json && rm cfbs.json | ||
rm -rf .git | ||
|
||
cfbs --non-interactive init --masterfiles=3.18.2 | ||
grep '"name": "masterfiles"' cfbs.json | ||
grep '"version": "3.18.2"' cfbs.json | ||
cfbs build |
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,12 @@ | ||
set -e | ||
set -x | ||
cd tests/ | ||
mkdir -p ./tmp/ | ||
cd ./tmp/ | ||
touch cfbs.json && rm cfbs.json | ||
rm -rf .git | ||
|
||
cfbs --non-interactive init --masterfiles=3.18.1-1 | ||
grep '"name": "masterfiles"' cfbs.json | ||
grep '"version": "3.18.1-1"' cfbs.json | ||
cfbs build |
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,9 @@ | ||
from cfbs.git import ls_remote | ||
from cfbs.utils import is_a_commit_hash | ||
|
||
|
||
def test_ls_remote(): | ||
commit = ls_remote("https://github.com/cfengine/masterfiles.git", "master") | ||
print(commit) | ||
assert commit != None | ||
assert is_a_commit_hash(commit) |