MCPcopy Create free account
hub / github.com/apache/arrow / TEST

Function TEST

cpp/src/arrow/filesystem/s3fs_test.cc:1843–1864  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1841// S3GlobalOptions::Defaults tests
1842
1843TEST(S3GlobalOptions, DefaultsLogLevel) {
1844 // Verify we get the default value of Fatal
1845 ASSERT_EQ(S3LogLevel::Fatal, arrow::fs::S3GlobalOptions::Defaults().log_level);
1846
1847 // Verify we get the value specified by env var and not the default
1848 {
1849 EnvVarGuard log_level_guard("ARROW_S3_LOG_LEVEL", "ERROR");
1850 ASSERT_EQ(S3LogLevel::Error, arrow::fs::S3GlobalOptions::Defaults().log_level);
1851 }
1852
1853 // Verify we trim and case-insensitively compare the environment variable's value
1854 {
1855 EnvVarGuard log_level_guard("ARROW_S3_LOG_LEVEL", " eRrOr ");
1856 ASSERT_EQ(S3LogLevel::Error, arrow::fs::S3GlobalOptions::Defaults().log_level);
1857 }
1858
1859 // Verify we get the default value of Fatal if our env var is invalid
1860 {
1861 EnvVarGuard log_level_guard("ARROW_S3_LOG_LEVEL", "invalid");
1862 ASSERT_EQ(S3LogLevel::Fatal, arrow::fs::S3GlobalOptions::Defaults().log_level);
1863 }
1864}
1865
1866} // namespace fs
1867} // namespace arrow

Callers 1

localfs_test.ccFile · 0.70

Calls 1

DefaultsFunction · 0.50

Tested by

no test coverage detected