Skip to content

Commit

Permalink
gtest: added test for Dir Address v6 handling
Browse files Browse the repository at this point in the history
  • Loading branch information
alaaeddineelamri committed Sep 23, 2021
1 parent 081b879 commit c9a328b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
12 changes: 12 additions & 0 deletions core/src/tests/addresses_and_ports.cc
Expand Up @@ -252,6 +252,18 @@ TEST(addresses_and_ports_setup, OLD_STYLE_dir_v4address_set)
check_addresses_list(path_to_config, expected_addresses);
}

TEST(addresses_and_ports_setup, OLD_STYLE_dir_v6address_set)
{
InitGlobals();
std::string path_to_config = std::string(
RELATIVE_PROJECT_SOURCE_DIR
"/configs/addresses-and-ports/old-style/dir-v6address-set/");

std::vector<std::string> expected_addresses{"host[ipv6;::1;9101]"};

check_addresses_list(path_to_config, expected_addresses);
}


/*The next two tests are the same in terms of functionnality, but there is a
slight difference in the order of directive setup (DirAddress and DirPort).
Expand Down
@@ -0,0 +1,5 @@
Director {
Name = bareos-dir
Password = "dir_password"
DirAddress = ::1
}

0 comments on commit c9a328b

Please sign in to comment.