170
177
// Tests scenario where CYCLE is modified on SEQUENCE.
171
178
{"modify_sequence_cycle_on", false, false, false, false},
172
179
{"modify_sequence_cycle_off", false, false, false, false},
180
// Tests correct finding of function end.
181
{"modify_function_end_detection", false, false, false, false},
173
182
// Tests scenario where new FUNCTION without args is added.
174
183
{"add_function_noargs", false, false, false, false},
175
184
// Tests scenario where FUNCTION without args is dropped.
217
226
{"multiple_schemas", false, false, false, false},
218
227
// Tests scenario where --add-transaction is specified.
219
228
{"multiple_schemas", false, true, false, false},
229
// Tests dropping view default value
230
{"alter_view_drop_default", false, true, false, false},
231
// Tests adding view default value
232
{"alter_view_add_default", false, true, false, false},
233
// Tests changing view default value
234
{"alter_view_change_default", false, true, false, false},
220
235
// Tests creation of sequence with bug in MINVALUE value
221
{"add_sequence_bug2100013", false, true, false, false}
236
{"add_sequence_bug2100013", false, true, false, false},
237
// Tests view with default value
238
{"view_bug3080388", false, true, false, false}
243
* Runs single test on original schema.
245
* @throws FileNotFoundException Thrown if expected diff file was not found.
246
* @throws IOException Thrown if problem occurred while reading expected
249
@Test(timeout = 1000)
250
public void runDiffSameOriginal() throws FileNotFoundException, IOException {
251
final ByteArrayOutputStream diffInput = new ByteArrayOutputStream();
252
final PrintWriter writer = new PrintWriter(diffInput, true);
253
final PgDiffArguments arguments = new PgDiffArguments();
254
PgDiff.createDiff(writer, arguments,
255
PgDiffTest.class.getResourceAsStream(
256
fileNameTemplate + "_original.sql"),
257
PgDiffTest.class.getResourceAsStream(
258
fileNameTemplate + "_original.sql"));
261
Assert.assertEquals("File name template: " + fileNameTemplate,
262
"", diffInput.toString().trim());
266
* Runs single test on new schema.
268
* @throws FileNotFoundException Thrown if expected diff file was not found.
269
* @throws IOException Thrown if problem occurred while reading expected
272
@Test(timeout = 1000)
273
public void runDiffSameNew() throws FileNotFoundException, IOException {
274
final ByteArrayOutputStream diffInput = new ByteArrayOutputStream();
275
final PrintWriter writer = new PrintWriter(diffInput, true);
276
final PgDiffArguments arguments = new PgDiffArguments();
277
PgDiff.createDiff(writer, arguments,
278
PgDiffTest.class.getResourceAsStream(
279
fileNameTemplate + "_new.sql"),
280
PgDiffTest.class.getResourceAsStream(
281
fileNameTemplate + "_new.sql"));
284
Assert.assertEquals("File name template: " + fileNameTemplate,
285
"", diffInput.toString().trim());
226
289
* Runs single test using class member variables.
228
* @throws FileNotFoundException Thrown if expected diff file was not
230
* @throws IOException Thrown if problem occured while reading expected
291
* @throws FileNotFoundException Thrown if expected diff file was not found.
292
* @throws IOException Thrown if problem occurred while reading expected
233
295
@Test(timeout = 1000)
234
296
public void runDiff() throws FileNotFoundException, IOException {