aboutsummaryrefslogtreecommitdiff
path: root/tests/rep-auth.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/rep-auth.test')
-rw-r--r--tests/rep-auth.test80
1 files changed, 43 insertions, 37 deletions
diff --git a/tests/rep-auth.test b/tests/rep-auth.test
index c67bd75..5fa3568 100644
--- a/tests/rep-auth.test
+++ b/tests/rep-auth.test
@@ -173,8 +173,8 @@ sc = " " # Space character to append to here-document line when required.
$clone_cfg;
$rep_fetch 2>>"EOE" != 0;
- fetching build2.org/rep-auth/signed
- warning: authenticity of the certificate for repository build2.org/rep-auth/signed cannot be established
+ fetching bpkg:build2.org/rep-auth/signed
+ warning: authenticity of the certificate for repository bpkg:build2.org/rep-auth/signed cannot be established
certificate is for build2.org, "Code Synthesis" <info@build2.org>
certificate SHA256 fingerprint:
$cert_fp
@@ -191,7 +191,7 @@ sc = " " # Space character to append to here-document line when required.
$clone_cfg;
$rep_fetch --trust $cert_fp 2>>EOE;
- fetching build2.org/rep-auth/signed
+ fetching bpkg:build2.org/rep-auth/signed
1 package(s) in 1 repository(s)
EOE
@@ -204,7 +204,7 @@ sc = " " # Space character to append to here-document line when required.
$clone_cfg;
$rep_fetch --trust-no --trust $cert_fp 2>>EOE;
- fetching build2.org/rep-auth/signed
+ fetching bpkg:build2.org/rep-auth/signed
1 package(s) in 1 repository(s)
EOE
@@ -217,7 +217,7 @@ sc = " " # Space character to append to here-document line when required.
$clone_cfg;
$rep_fetch --trust-yes 2>>EOE;
- fetching build2.org/rep-auth/signed
+ fetching bpkg:build2.org/rep-auth/signed
1 package(s) in 1 repository(s)
EOE
@@ -230,8 +230,8 @@ sc = " " # Space character to append to here-document line when required.
$clone_cfg;
$rep_fetch --trust-no 2>>EOE != 0;
- fetching build2.org/rep-auth/signed
- error: authenticity of the certificate for repository build2.org/rep-auth/signed cannot be established
+ fetching bpkg:build2.org/rep-auth/signed
+ error: authenticity of the certificate for repository bpkg:build2.org/rep-auth/signed cannot be established
EOE
$not_fetched
@@ -243,7 +243,7 @@ sc = " " # Space character to append to here-document line when required.
$clone_cfg;
$rep_fetch --trust-yes --trust-no 2>>EOE != 0;
- fetching build2.org/rep-auth/signed
+ fetching bpkg:build2.org/rep-auth/signed
error: --trust-yes and --trust-no are mutually exclusive
EOE
@@ -256,19 +256,19 @@ sc = " " # Space character to append to here-document line when required.
$clone_cfg;
$rep_fetch --trust-yes 2>>EOE;
- fetching build2.org/rep-auth/signed
+ fetching bpkg:build2.org/rep-auth/signed
1 package(s) in 1 repository(s)
EOE
$rep_fetch 2>>EOE;
- fetching build2.org/rep-auth/signed
+ fetching bpkg:build2.org/rep-auth/signed
1 package(s) in 1 repository(s)
EOE
$fetched;
$rep_fetch --trust-no 2>>EOE;
- fetching build2.org/rep-auth/signed
+ fetching bpkg:build2.org/rep-auth/signed
1 package(s) in 1 repository(s)
EOE
@@ -284,7 +284,7 @@ sc = " " # Space character to append to here-document line when required.
: no-auth
:
$rep_info 2>>"EOE" != 0
- warning: authenticity of the certificate for repository build2.org/rep-auth/signed cannot be established
+ warning: authenticity of the certificate for repository bpkg:build2.org/rep-auth/signed cannot be established
certificate is for build2.org, "Code Synthesis" <info@build2.org>
certificate SHA256 fingerprint:
$cert_fp
@@ -303,7 +303,7 @@ sc = " " # Space character to append to here-document line when required.
: trust-no
:
$rep_info --trust-no 2>>EOE != 0
- error: authenticity of the certificate for repository build2.org/rep-auth/signed cannot be established
+ error: authenticity of the certificate for repository bpkg:build2.org/rep-auth/signed cannot be established
EOE
: already-trusted
@@ -347,11 +347,11 @@ sc = " " # Space character to append to here-document line when required.
:
{
r = $canonicalize([dir_path] $~/pkg/1/b.a.build2.org/);
- mkdir -p $r;
+ mkdir -p $r;
cp -r $rep/self-match $r;
$rep_info $r/self-match 2>>EOE != 0
- error: certificate name mismatch for repository b.a.build2.org/self-match
+ error: certificate name mismatch for repository bpkg:b.a.build2.org/self-match
info: certificate name is *build2.org
EOE
}
@@ -397,7 +397,7 @@ sc = " " # Space character to append to here-document line when required.
: exact
:
$rep_info $rep/subdomain-match 2>>EOE != 0
- error: certificate name mismatch for repository build2.org/rep-auth/subdomain-match
+ error: certificate name mismatch for repository bpkg:build2.org/rep-auth/subdomain-match
info: certificate name is *.build2.org
EOE
@@ -419,11 +419,11 @@ sc = " " # Space character to append to here-document line when required.
:
{
r = $canonicalize([dir_path] $~/pkg/1/b.a.build2.org/);
- mkdir -p $r;
+ mkdir -p $r;
cp -r $rep/subdomain-match $r;
$rep_info $r/subdomain-match 2>>EOE != 0
- error: certificate name mismatch for repository b.a.build2.org/subdomain-match
+ error: certificate name mismatch for repository bpkg:b.a.build2.org/subdomain-match
info: certificate name is *.build2.org
EOE
}
@@ -447,8 +447,8 @@ sc = " " # Space character to append to here-document line when required.
$clone_cfg;
$rep_fetch 2>>~%EOE% != 0;
- fetching build2.org/rep-auth/unsigned1
- warning: repository build2.org/rep-auth/unsigned1 is unsigned
+ fetching bpkg:build2.org/rep-auth/unsigned1
+ warning: repository bpkg:build2.org/rep-auth/unsigned1 is unsigned
%continue without authenticating repositories at .+\? \[y/n\] %
error: unable to read y/n answer from STDOUT
EOE
@@ -462,7 +462,7 @@ sc = " " # Space character to append to here-document line when required.
$clone_cfg;
$rep_fetch --trust-yes 2>>EOE;
- fetching build2.org/rep-auth/unsigned1
+ fetching bpkg:build2.org/rep-auth/unsigned1
1 package(s) in 1 repository(s)
EOE
@@ -475,8 +475,8 @@ sc = " " # Space character to append to here-document line when required.
$clone_cfg;
$rep_fetch --trust-no 2>>EOE != 0;
- fetching build2.org/rep-auth/unsigned1
- error: repository build2.org/rep-auth/unsigned1 is unsigned
+ fetching bpkg:build2.org/rep-auth/unsigned1
+ error: repository bpkg:build2.org/rep-auth/unsigned1 is unsigned
EOE
$not_fetched
@@ -488,19 +488,19 @@ sc = " " # Space character to append to here-document line when required.
$clone_cfg;
$rep_fetch --trust-yes 2>>EOE;
- fetching build2.org/rep-auth/unsigned1
+ fetching bpkg:build2.org/rep-auth/unsigned1
1 package(s) in 1 repository(s)
EOE
$rep_fetch 2>>EOE;
- fetching build2.org/rep-auth/unsigned1
+ fetching bpkg:build2.org/rep-auth/unsigned1
1 package(s) in 1 repository(s)
EOE
$fetched;
$rep_fetch --trust-no 2>>EOE;
- fetching build2.org/rep-auth/unsigned1
+ fetching bpkg:build2.org/rep-auth/unsigned1
1 package(s) in 1 repository(s)
EOE
@@ -509,8 +509,8 @@ sc = " " # Space character to append to here-document line when required.
$rep_add $rep/unsigned2;
$rep_fetch 2>>EOE;
- fetching build2.org/rep-auth/unsigned1
- fetching build2.org/rep-auth/unsigned2
+ fetching bpkg:build2.org/rep-auth/unsigned1
+ fetching bpkg:build2.org/rep-auth/unsigned2
1 package(s) in 2 repository(s)
EOE
@@ -526,19 +526,21 @@ sc = " " # Space character to append to here-document line when required.
: no-auth
:
$rep_info 2>>~%EOE% != 0
- warning: repository build2.org/rep-auth/unsigned1 is unsigned
+ warning: repository bpkg:build2.org/rep-auth/unsigned1 is unsigned
%continue without authenticating repositories at .+\? \[y/n\] %
error: unable to read y/n answer from STDOUT
EOE
: trust-yes
:
- $rep_info --trust-yes >"build2.org/rep-auth/unsigned1 ($rep/unsigned1)"
+ $rep_info --trust-yes >>"EOO"
+ bpkg:build2.org/rep-auth/unsigned1 ($rep/unsigned1)
+ EOO
: trust-no
:
$rep_info --trust-no 2>>EOE != 0
- error: repository build2.org/rep-auth/unsigned1 is unsigned
+ error: repository bpkg:build2.org/rep-auth/unsigned1 is unsigned
EOE
: already-trusted
@@ -547,8 +549,12 @@ sc = " " # Space character to append to here-document line when required.
$clone_root_cfg;
rep_info += -d cfg;
- $rep_info --trust-yes >"build2.org/rep-auth/unsigned1 ($rep/unsigned1)";
- $rep_info >"build2.org/rep-auth/unsigned1 ($rep/unsigned1)"
+ $rep_info --trust-yes >>"EOO";
+ bpkg:build2.org/rep-auth/unsigned1 ($rep/unsigned1)
+ EOO
+ $rep_info >>"EOO"
+ bpkg:build2.org/rep-auth/unsigned1 ($rep/unsigned1)
+ EOO
}
}
}
@@ -561,20 +567,20 @@ sc = " " # Space character to append to here-document line when required.
: name-mismatch
:
$rep_info $rep/name-mismatch 2>>EOE != 0
- error: certificate name mismatch for repository build2.org/rep-auth/name-mismatch
+ error: certificate name mismatch for repository bpkg:build2.org/rep-auth/name-mismatch
info: certificate name is build2.org/mismatched/name
EOE
: expired
:
$rep_info $rep/expired 2>>EOE != 0
- error: certificate for repository build2.org/rep-auth/expired has expired
+ error: certificate for repository bpkg:build2.org/rep-auth/expired has expired
EOE
: sha256sum-mismatch
:
$rep_info $rep/sha256sum-mismatch 2>>EOE != 0
- error: packages manifest file checksum mismatch for build2.org/rep-auth/sha256sum-mismatch
+ error: packages manifest file checksum mismatch for bpkg:build2.org/rep-auth/sha256sum-mismatch
info: try again
EOE
@@ -582,7 +588,7 @@ sc = " " # Space character to append to here-document line when required.
:
$rep_info $rep/signature-mismatch 2>>~%EOE% != 0
%.*
- %error: unable to authenticate repository build2.org/rep-auth/signature-mismatch: .*%
+ %error: unable to authenticate repository bpkg:build2.org/rep-auth/signature-mismatch: .*%
EOE
: create-rep