From 2e0f073e79dac3d68a0789cf6bfe26f6d0e9b223 Mon Sep 17 00:00:00 2001 From: Jorge Perez Date: Tue, 16 Jun 2020 10:45:24 -0300 Subject: [PATCH] Revert "Add tests enclave_name" Being tested in another branch This reverts commit 31d66847580b34c9e40b932bc6b54fb93d302e1d. Signed-off-by: Jorge Perez --- rcl/test/rcl/test_validate_enclave_name.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/rcl/test/rcl/test_validate_enclave_name.cpp b/rcl/test/rcl/test_validate_enclave_name.cpp index b382b1b55..689d216ab 100644 --- a/rcl/test/rcl/test_validate_enclave_name.cpp +++ b/rcl/test/rcl/test_validate_enclave_name.cpp @@ -42,7 +42,6 @@ TEST(TestValidateEnclaveName, test_validate) { RCL_RET_OK, rcl_validate_enclave_name("/foo", &validation_result, &invalid_index)); EXPECT_EQ(RCL_ENCLAVE_NAME_VALID, validation_result); - EXPECT_EQ(NULL, rcl_enclave_name_validation_result_string(validation_result)); EXPECT_EQ( RCL_RET_OK, @@ -57,20 +56,15 @@ TEST(TestValidateEnclaveName, test_validation_string) { int expected_validation_result; size_t expected_invalid_index; }; - std::string longString = "/looooooooooooooooooooooooooooooooooooooooooooooooo" - "oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo" - "oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo" - "oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo" - "ooooooooooooooooooooooooooooongString"; std::vector enclave_cases_that_should_fail = { + // TODO(blast_545): Look for naming conventions doc for enclave_names {"", RCL_ENCLAVE_NAME_INVALID_IS_EMPTY_STRING, 0}, {"~/foo", RCL_ENCLAVE_NAME_INVALID_NOT_ABSOLUTE, 0}, {"/foo/", RCL_ENCLAVE_NAME_INVALID_ENDS_WITH_FORWARD_SLASH, 4}, {"/foo/$", RCL_ENCLAVE_NAME_INVALID_CONTAINS_UNALLOWED_CHARACTERS, 5}, {"/bar#", RCL_ENCLAVE_NAME_INVALID_CONTAINS_UNALLOWED_CHARACTERS, 4}, {"/foo//bar", RCL_ENCLAVE_NAME_INVALID_CONTAINS_REPEATED_FORWARD_SLASH, 5}, - {"/1bar", RCL_ENCLAVE_NAME_INVALID_NAME_TOKEN_STARTS_WITH_NUMBER, 1}, - {longString, RCL_ENCLAVE_NAME_INVALID_TOO_LONG, RCL_ENCLAVE_NAME_MAX_LENGTH - 1} + {"/1bar", RCL_ENCLAVE_NAME_INVALID_NAME_TOKEN_STARTS_WITH_NUMBER, 1} }; for (const auto & case_tuple : enclave_cases_that_should_fail) { std::string enclave = case_tuple.enclave;