Android-cuttlefish cvd tool
Classes | Namespaces | Typedefs | Functions
cas_downloader_test.cpp File Reference
#include "cuttlefish/host/libs/web/cas/cas_downloader.h"
#include <stdlib.h>
#include <algorithm>
#include <cctype>
#include <fstream>
#include <functional>
#include <memory>
#include <optional>
#include <string>
#include <utility>
#include <vector>
#include "android-base/file.h"
#include "fmt/base.h"
#include "fmt/core.h"
#include "fmt/format.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include "cuttlefish/common/libs/utils/files.h"
#include "cuttlefish/files/file_exists.h"
#include "cuttlefish/host/libs/web/android_build.h"
#include "cuttlefish/host/libs/web/android_build_string/device_build_string.h"
#include "cuttlefish/host/libs/web/build_api.h"
#include "cuttlefish/host/libs/web/cas/cas_flags.h"
#include "cuttlefish/io/reader_seeker.h"
#include "cuttlefish/posix/remove.h"
#include "cuttlefish/result/result.h"
#include "cuttlefish/result/result_matchers.h"
Include dependency graph for cas_downloader_test.cpp:

Classes

class  cuttlefish::anonymous_namespace{cas_downloader_test.cpp}::FakeDigestsSource
 
class  cuttlefish::CasDownloaderTests
 

Namespaces

namespace  cuttlefish
 
namespace  cuttlefish::anonymous_namespace{cas_downloader_test.cpp}
 

Typedefs

using cuttlefish::anonymous_namespace{cas_downloader_test.cpp}::DigestsFn = std::function< Result< std::string >(const std::string &)>
 

Functions

void cuttlefish::CreateTempFileWithText (const std::string &filepath, const std::string &text)
 
Result< void > cuttlefish::anonymous_namespace{cas_downloader_test.cpp}::RemoveFileIfExists (const std::string &path)
 
 cuttlefish::TEST_F (CasDownloaderTests, FailsToCreateWithInvalidConfigPath)
 
 cuttlefish::TEST_F (CasDownloaderTests, FailsToCreateWithInvalidCasDownloaderPath)
 
 cuttlefish::TEST_F (CasDownloaderTests, UsesAdcIfServiceAccountUnavailable)
 
 cuttlefish::TEST_F (CasDownloaderTests, UsesServiceAccountIfAvailable)
 
 cuttlefish::TEST_F (CasDownloaderTests, UsesServiceAccountFromConfig)
 
 cuttlefish::TEST_F (CasDownloaderTests, ConfigServiceAccountOverridesCommandLine)
 
 cuttlefish::TEST_F (CasDownloaderTests, FailsToCreateWithMissingConfigServiceAccount)
 
 cuttlefish::TEST_F (CasDownloaderTests, IgnoresUnsupportedFlags)
 
 cuttlefish::TEST_F (CasDownloaderTests, HandlesFalseBoolFlag)
 
 cuttlefish::TEST_F (CasDownloaderTests, HandlesInvocationIdFlag)
 
 cuttlefish::TEST_F (CasDownloaderTests, HandlesUnexpectedHelpOutput)
 
 cuttlefish::TEST_F (CasDownloaderTests, PassesOptionalStatsFilepathWhenSet)
 
 cuttlefish::TEST_F (CasDownloaderTests, RecognizesValidFlags)
 
 cuttlefish::TEST_F (CasDownloaderTests, DisablesCacheIfCacheDirNotSet)
 
 cuttlefish::TEST_F (CasDownloaderTests, CacheEnabledIfCacheDirSet)
 
 cuttlefish::TEST_F (CasDownloaderTests, FailsIfDigestsFileDoesNotExist)
 
 cuttlefish::TEST_F (CasDownloaderTests, FailsIfArtifactNotInDigestsFile)
 
 cuttlefish::TEST_F (CasDownloaderTests, DownloadsDigestsOnlyIfNeeded)
 
 cuttlefish::TEST_F (CasDownloaderTests, DownloadsUncompressedIfPreferUncompressed)
 
 cuttlefish::TEST_F (CasDownloaderTests, DownloadsCompressedIfNotPreferUncompressed)
 
 cuttlefish::TEST_F (CasDownloaderTests, DownloadsCompressedIfPreferUncompressedButUnavailable)
 
 cuttlefish::TEST_F (CasDownloaderTests, PassesCasOptionsFromCommandLine)
 
 cuttlefish::TEST_F (CasDownloaderTests, CacheMaxSize_DefaultWhenAbsent)
 
 cuttlefish::TEST_F (CasDownloaderTests, CacheMaxSize_OverriddenWhenTooSmall)
 
 cuttlefish::TEST_F (CasDownloaderTests, DownloadFileReturnsTheArtifactPath)
 
 cuttlefish::TEST_F (CasDownloaderTests, DownloadsDigestsFromTheDigestsSource)
 
 cuttlefish::TEST_F (CasDownloaderTests, DownloadsUncompressedIntoTheArtifactPath)
 
 cuttlefish::TEST_F (CasDownloaderTests, RejectsArtifactsWithoutImgBeforeAnyWork)
 
 cuttlefish::TEST_F (CasDownloaderTests, GetBuildIsNotSupported)
 
 cuttlefish::TEST_F (CasDownloaderTests, FileReaderIsNotSupported)
 
int cuttlefish::main (int argc, char **argv)