" } ]"
" } ]"
"}",
-// Configuration 1
+// Configuration 1 - only use when mysql is enabled
"{ \"interfaces-config\": {"
" \"interfaces\": [ \"*\" ]"
"},"
" } ]"
" } ]"
"}",
-// Configuration 2
+// Configuration 2 - only use when pgsql is enabled
"{ \"interfaces-config\": {"
" \"interfaces\": [ \"*\" ]"
"},"
SHOULD_PASS);
}
+#ifdef HAVE_MYSQL
// This test checks that the client can acquire and decline the lease.
TEST_F(DeclineTest, declineNoIdentifierChangeMySQL) {
Dhcp4Client client(Dhcp4Client::SELECTING);
"01:02:03:04:05:06", "12:14",
SHOULD_PASS, 1);
}
+#endif
+#ifdef HAVE_PGSQL
// This test checks that the client can acquire and decline the lease.
TEST_F(DeclineTest, declineNoIdentifierChangePgSQL) {
Dhcp4Client client(Dhcp4Client::SELECTING);
"01:02:03:04:05:06", "12:14",
SHOULD_PASS, 2);
}
+#endif
// This test verifies the decline correctness in the following case:
// - Client acquires new lease using HW address only
" \"interface\": \"eth0\""
" } ],"
"\"valid-lifetime\": 4000 }",
-// Configuration 1
+// Configuration 1 - only use when mysql is enabled
"{ \"interfaces-config\": {"
" \"interfaces\": [ \"*\" ]"
"},"
" \"interface\": \"eth0\""
" } ],"
"\"valid-lifetime\": 4000 }",
-// Configuration 2
+// Configuration 2 - only use when pgsql is enabled
"{ \"interfaces-config\": {"
" \"interfaces\": [ \"*\" ]"
"},"
1234, VALID_ADDR, SHOULD_PASS);
}
+#ifdef HAVE_MYSQL
// This test checks that the client can acquire and decline the lease.
TEST_F(DeclineTest, basicMySQL) {
Dhcp6Client client;
acquireAndDecline(client, "01:02:03:04:05:06", 1234, "01:02:03:04:05:06",
1234, VALID_ADDR, SHOULD_PASS, 1);
}
+#endif
+#ifdef HAVE_PGSQL
TEST_F(DeclineTest, basicPgSQL) {
Dhcp6Client client;
acquireAndDecline(client, "01:02:03:04:05:06", 1234, "01:02:03:04:05:06",
1234, VALID_ADDR, SHOULD_PASS, 2);
}
+#endif
}
}
fi
# Get the files.
-files=$(find ${files} -type f \( -name '*.rst' -or -name '*.json' \) -and -not -path '/_build/*' -and -not -path '/man/*' | sort)
+files=$(find ${files} -type f \( -name '*.rst' -or -name '*.json' \) -and -not -path '*/_build/*' -and -not -path '*/man/*' | sort)
work_file=$(mktemp)
for file in $files; do
json=0
fi
fi
fi
- done <<< $(cat $file | sed ':a;N;$!ba;s/,\s*\n\s*\.\.\.//g' | sed 's/\\\"/\\\\\"/g' | sed 's/\\\\,/\\\\\\\\,/g')
+ done <<< $(cat $file | sed ':a;N;$!ba;s/,\s*\n\s*\.\.\.//g')
if [ $comment -eq 0 -a $json -eq 1 ]; then
# if the file ended but the parser is processing a json structure
cat $work_file | jq . > /dev/null