Skip to content

Commit b0aee81

Browse files
committed
Remove previous tests.
1 parent 52e25a4 commit b0aee81

File tree

3 files changed

+1
-69
lines changed

3 files changed

+1
-69
lines changed

dlp/src/test/java/com/example/dlp/InspectIT.java

Lines changed: 0 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -53,74 +53,6 @@ public void setUp() {
5353
assertNotNull(System.getenv("GOOGLE_APPLICATION_CREDENTIALS"));
5454
}
5555

56-
@Test
57-
public void testStringInspectionReturnsInfoTypes() throws Exception {
58-
String text =
59-
"\"My phone number is (234) 456-7890 and my email address is [email protected]\"";
60-
Inspect.main(new String[] {"-s", text, "-infoTypes", "PHONE_NUMBER", "EMAIL_ADDRESS"});
61-
String output = bout.toString();
62-
63-
assertThat(output, containsString("PHONE_NUMBER"));
64-
assertThat(output, containsString("EMAIL_ADDRESS"));
65-
}
66-
67-
@Test
68-
public void testStringInspectionReturnsCustomInfoTypes() throws Exception {
69-
String text =
70-
"\"My phone number is (234) 456-7890 and my email address is [email protected]\"";
71-
Inspect.main(
72-
new String[] {
73-
"-s",
74-
text,
75-
"-customDictionaries",
76-
77-
"-customRegexes",
78-
"\\(\\d{3}\\) \\d{3}-\\d{4}"
79-
});
80-
String output = bout.toString();
81-
82-
assertThat(output, containsString("CUSTOM_DICTIONARY_0"));
83-
assertThat(output, containsString("CUSTOM_REGEX_0"));
84-
}
85-
86-
@Test
87-
public void testTextFileInspectionReturnsInfoTypes() throws Exception {
88-
Inspect.main(
89-
new String[] {
90-
"-f", "src/test/resources/test.txt", "-infoTypes", "PHONE_NUMBER", "EMAIL_ADDRESS"
91-
});
92-
String output = bout.toString();
93-
assertThat(output, containsString("PHONE_NUMBER"));
94-
assertThat(output, containsString("EMAIL_ADDRESS"));
95-
}
96-
97-
@Test
98-
public void testTextFileInspectionReturnsCustomInfoTypes() throws Exception {
99-
Inspect.main(
100-
new String[] {
101-
"-f",
102-
"src/test/resources/test.txt",
103-
"-customDictionaries",
104-
105-
"-customRegexes",
106-
"\\(\\d{3}\\) \\d{3}-\\d{4}"
107-
});
108-
String output = bout.toString();
109-
assertThat(output, containsString("CUSTOM_DICTIONARY_0"));
110-
assertThat(output, containsString("CUSTOM_REGEX_0"));
111-
}
112-
113-
@Test
114-
public void testImageFileInspectionReturnsInfoTypes() throws Exception {
115-
Inspect.main(
116-
new String[] {
117-
"-f", "src/test/resources/test.png", "-infoTypes", "PHONE_NUMBER", "EMAIL_ADDRESS"
118-
});
119-
String output = bout.toString();
120-
assertThat(output, containsString("PHONE_NUMBER"));
121-
assertThat(output, containsString("EMAIL_ADDRESS"));
122-
}
123-
12456
// Requires that bucket by the specified name exists
12557
@Test
12658
public void testGcsFileInspectionReturnsInfoTypes() throws Exception {

dlp/src/test/resources/test.png

-15.9 KB
Loading

dlp/src/test/resources/test.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
My phone number is (223) 456-7890 and my email address is gary@somedomain.com.
1+
My phone number is (223) 456-7890 and my email address is gary@example.com.

0 commit comments

Comments
 (0)