| 1841 | // S3GlobalOptions::Defaults tests |
| 1842 | |
| 1843 | TEST(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 |
no test coverage detected