File tree Expand file tree Collapse file tree 1 file changed +15
-4
lines changed
embulk-input-s3/src/test/java/org/embulk/input/s3 Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -119,11 +119,22 @@ public void useTotalFileCountLimit()
119
119
public void usePathMatchPattern ()
120
120
throws Exception
121
121
{
122
- ConfigSource config = this .config .deepCopy ().set ("path_match_pattern" , "/match/" );
123
- ConfigDiff configDiff = runner .transaction (config , new Control (runner , output ));
122
+ { // match pattern
123
+ ConfigSource config = this .config .deepCopy ().set ("path_match_pattern" , "/sample_01" );
124
+ ConfigDiff configDiff = runner .transaction (config , new Control (runner , output ));
124
125
125
- assertNull (configDiff .get (String .class , "last_path" ));
126
- assertEquals (0 , getRecords (config , output ).size ());
126
+ assertEquals (EMBULK_S3_TEST_PATH_PREFIX + "/sample_01.csv" , configDiff .get (String .class , "last_path" ));
127
+ assertRecords (config , output );
128
+ }
129
+
130
+ output = new MockPageOutput ();
131
+ { // not match pattern
132
+ ConfigSource config = this .config .deepCopy ().set ("path_match_pattern" , "/match/" );
133
+ ConfigDiff configDiff = runner .transaction (config , new Control (runner , output ));
134
+
135
+ assertNull (configDiff .get (String .class , "last_path" ));
136
+ assertEquals (0 , getRecords (config , output ).size ());
137
+ }
127
138
}
128
139
129
140
static class Control
You can’t perform that action at this time.
0 commit comments