Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion API.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ void LoggingCallback(const SFS::LogData& logData)
Notes:
- The callback itself is processed in the main thread. Do not use a blocking callback. If heavy processing has to be done, consider capturing the data and processing another thread.
- The LogData contents only exist within the callback call. If the processing will be done later, you should copy the data elsewhere.
- The callback should not do any re-entrant calls (e.g. call `SFSClient` methods).
- The callback should not do any reentrant calls (e.g. call `SFSClient` methods).

## Class instances

Expand Down
2 changes: 1 addition & 1 deletion TEST.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Some test behaviors are controlled by test overrides set via environment variables.
They only work when the CMake Option `SFS_ENABLE_TEST_OVERRIDES` is set to `ON`.
To enable that during build, you must use the switch `-EnableTestOverrides` (`--enable-test-overrides` on Linux) with the build scripts. Click [here](README.md#building) for more. See also [here](README.md#building-with-cmake-vscode-extension) for how to set when using VSCode.
To enable that during build, you must use the switch `-EnableTestOverrides` (`--enable-test-overrides` on Linux) with the build scripts. See [building](README.md#building) for more information. See also [building with cmake vscode extension](README.md#building-with-cmake-vscode-extension) for how to set when using VSCode.

When the test overrides are enabled, a few environment variables can be used to adjust the behavior of the tool:

Expand Down
2 changes: 1 addition & 1 deletion client/include/sfsclient/AppContent.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class AppPrerequisiteContent
const ContentId& GetContentId() const noexcept;

/**
* @return Files belonging to this Prequisite
* @return Files belonging to this Prerequisite
*/
const std::vector<AppFile>& GetFiles() const noexcept;

Expand Down
9 changes: 5 additions & 4 deletions client/include/sfsclient/ClientConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ struct ClientConfig

/**
* @brief A logging callback function that is called when the SFSClient logs a message
* @details This function returns logging information from the SFSClient. The caller is responsible for incoporating
* the received data into their logging system. The callback will be called in the same thread as the
* main flow, so make sure the callback does not block for too long so it doesn't delay operations. The
* LogData does not exist after the callback returns, so caller has to copy it if the data will be stored.
* @details This function returns logging information from the SFSClient. The caller is responsible for
* incorporating the received data into their logging system. The callback will be called in the same
* thread as the main flow, so make sure the callback does not block for too long so it doesn't delay
* operations. The LogData does not exist after the callback returns, so caller has to copy it if the
* data will be stored.
*/
std::optional<LoggingCallbackFn> logCallbackFn;
};
Expand Down
2 changes: 1 addition & 1 deletion client/src/details/connection/CurlConnection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ void CurlConnection::ProcessRetry(int attempt, const Result& httpResult)

std::chrono::milliseconds baseRetryDelay = s_baseRetryDelay;

// Value can be overriden in tests
// Value can be overridden in tests
if (auto override = test::GetTestOverrideAsInt(test::TestOverride::BaseRetryDelayMs))
{
baseRetryDelay = std::chrono::milliseconds{*override};
Expand Down
2 changes: 1 addition & 1 deletion client/tests/functional/details/CurlConnectionTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ TEST("Testing CurlConnection()")
REQUIRE_THROWS_CODE(connection->Post(url + "/names", "{}"), HttpNotFound);

url = server.GetBaseUrl() + "/api/v1/contents/" + c_instanceId + "/namespaces/" + c_namespace + "/names/" +
c_productName + "/versYions/" + c_version + "/files?action=GenerateDownloadInfo";
c_productName + "/versionYs/" + c_version + "/files?action=GenerateDownloadInfo";

std::string out;
REQUIRE_THROWS_CODE(connection->Get(url), HttpNotFound);
Expand Down
2 changes: 1 addition & 1 deletion client/tests/mock/MockWebServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ void MockWebServerImpl::ConfigureGetSpecificVersion()
throw StatusCodeException(httplib::StatusCode::InternalServerError_500);
}

// TODO: Are apps suppported?
// TODO: Are apps supported?

const std::string& version = req.path_params.at("version");
if (version.empty() || !versions.count(version))
Expand Down
18 changes: 10 additions & 8 deletions client/tests/unit/AppContentTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,13 @@ std::unique_ptr<AppContent> GetAppContent(const std::string& contentNameSpace,
const std::vector<AppFile>& files)
{
std::unique_ptr<ContentId> contentId = GetContentId(contentNameSpace, contentName, contentVersion);
std::vector<AppPrerequisiteContent> clonedPreqs;
std::vector<AppPrerequisiteContent> clonedPrereqs;
for (const auto& prereq : prerequisites)
{
clonedPreqs.push_back(std::move(*GetPrerequisiteContent(prereq.GetContentId().GetNameSpace(),
prereq.GetContentId().GetName(),
prereq.GetContentId().GetVersion(),
prereq.GetFiles())));
clonedPrereqs.push_back(std::move(*GetPrerequisiteContent(prereq.GetContentId().GetNameSpace(),
prereq.GetContentId().GetName(),
prereq.GetContentId().GetVersion(),
prereq.GetFiles())));
}

std::vector<AppFile> clonedFiles;
Expand All @@ -100,9 +100,11 @@ std::unique_ptr<AppContent> GetAppContent(const std::string& contentNameSpace,
}

std::unique_ptr<AppContent> appContent;
REQUIRE(
AppContent::Make(std::move(contentId), updateId, std::move(clonedPreqs), std::move(clonedFiles), appContent) ==
Result::Success);
REQUIRE(AppContent::Make(std::move(contentId),
updateId,
std::move(clonedPrereqs),
std::move(clonedFiles),
appContent) == Result::Success);
REQUIRE(appContent != nullptr);
return appContent;
}
Expand Down
2 changes: 1 addition & 1 deletion client/tests/unit/details/SFSClientImplTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ TEST("Testing test override SFS_TEST_OVERRIDE_BASE_URL")
REQUIRE(sfsClient.MakeUrlBuilder().GetUrl() == "http://customUrl.com/");

{
INFO("Can also override a custom base base url with the test key");
INFO("Can also override a custom base url with the test key");
ScopedTestOverride override(TestOverride::BaseUrl, "http://override.com");
if (AreTestOverridesAllowed())
{
Expand Down
2 changes: 1 addition & 1 deletion samples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ This folder contains a few samples that show how to use the SFS Client library.

## integration-do-client

This sample shows how to use the SFSClient to retrieva metadata and URLs from the SFS Service and the [Delivery Optimization SDK](https://github.com/microsoft/do-client) to perform the download of the retrieved URLs.
This sample shows how to use the SFSClient to retrieve metadata and URLs from the SFS Service and the [Delivery Optimization SDK](https://github.com/microsoft/do-client) to perform the download of the retrieved URLs.

In Windows, the DO SDK uses COM APIs. In Linux, it will require the DO Agent, which is built from the same repository.
2 changes: 1 addition & 1 deletion scripts/Setup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ function Install-CMake {
function Install-CppBuildTools {
Write-Host -ForegroundColor Cyan "`nInstalling C++ Builds tools if they are not installed"

# Instaling vswhere, which will be used to query for the required build tools
# Installing vswhere, which will be used to query for the required build tools
try {
vswhere -? 2>&1 | Out-Null
}
Expand Down
Loading