feat(package,daemon): show binary variant details; list installed files
This commit is contained in:
1 parent
b8c362917f
commit
27d909fdad
10 files changed
+145
-1
No files matched your search
@@ -49,6 +49,7 @@ check_process(0 "Usage: vbs publish " "" publish --help)
|
||||
check_process(0 "Usage: vbs publish-binary " "" publish-binary --help)
|
||||
check_process(0 "Usage: vbs binaries <command>.*Commands:.*list.*fetch" "" binaries --help)
|
||||
check_process(0 "Usage: vbs binaries list " "" binaries list --help)
|
||||
check_process(0 "Usage: vbs binaries show " "" binaries show --help)
|
||||
check_process(0 "Usage: vbs releases list " "" releases list --help)
|
||||
check_process(0 "Usage: vbs releases yank " "" releases yank --help)
|
||||
check_process(2 "" "--registry, --name, and --version are required" releases yank)
|
||||
|
||||
@@ -2235,6 +2235,11 @@ void build(Void::Build::Project &project) {
|
||||
Void::Testing::expect(int_field(*installed, "files") >= 1);
|
||||
Void::Testing::expect(std::filesystem::exists(prefix / "bin" / "app"));
|
||||
Void::Testing::expect(std::filesystem::exists(str_field(*installed, "manifest")));
|
||||
const auto installed_files = string_array_field(*installed, "installed_files");
|
||||
Void::Testing::require(!installed_files.empty());
|
||||
Void::Testing::expect(std::filesystem::exists(installed_files.front()));
|
||||
Void::Testing::expect(installed_files.size() <=
|
||||
static_cast<std::size_t>(int_field(*installed, "files")));
|
||||
Void::Testing::require(missing_prefix.has_value());
|
||||
Void::Testing::expect(!bool_field(*missing_prefix, "ok", true));
|
||||
|
||||
|
||||
@@ -1433,6 +1433,20 @@ target_include_directories(hello_pkg PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include
|
||||
std::string(64, 'a')};
|
||||
trusted_fetch.environment.set_vars["VBS_REGISTRY_TOKEN"] = *tok;
|
||||
auto trusted_binary_res = Platform::run_supervised(trusted_fetch);
|
||||
|
||||
Platform::ProcessRequest binaries_show;
|
||||
binaries_show.executable = vbs_bin;
|
||||
binaries_show.arguments = {"binaries", "show", "--registry", reg_url, "--name",
|
||||
"hello-pkg", "--version", "1.1.0", "--variant", "cli-variant"};
|
||||
binaries_show.environment.set_vars["VBS_REGISTRY_TOKEN"] = *tok;
|
||||
auto binaries_show_res = Platform::run_supervised(binaries_show);
|
||||
Void::Testing::expect(binaries_show_res.has_value() && binaries_show_res->succeeded());
|
||||
if (binaries_show_res) {
|
||||
Void::Testing::expect(binaries_show_res->stdout_data.find("variant=cli-variant") !=
|
||||
std::string::npos);
|
||||
Void::Testing::expect(binaries_show_res->stdout_data.find("signed=") != std::string::npos);
|
||||
}
|
||||
|
||||
Void::Testing::expect(trusted_binary_res.has_value() && !trusted_binary_res->succeeded());
|
||||
|
||||
Platform::ProcessRequest tokens_list;
|
||||
|
||||
Reference in new issue
Block a user