-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrun_e2e_test.dart
More file actions
45 lines (37 loc) · 1.15 KB
/
run_e2e_test.dart
File metadata and controls
45 lines (37 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
@Tags(['e2e'])
library;
import 'package:test/test.dart';
import 'e2e_helpers.dart';
void main() {
late Directory tempDir;
setUp(() {
tempDir = createTestDatasetDir();
});
tearDown(() {
if (tempDir.existsSync()) {
tempDir.deleteSync(recursive: true);
}
});
group('devals run', () {
test('fails with missing job argument', () async {
final result = await runDevals(
['run'],
workingDirectory: tempDir.path,
);
expect(result.exitCode, 1);
expect(result.stdout, contains('Missing required argument'));
});
test('dry-run outputs the command that would run', () async {
final result = await runDevals(
['run', '--dry-run', 'local_dev'],
workingDirectory: tempDir.path,
);
// The command will try to run `run-evals`, which may not be installed.
// If installed, it should mention the dry-run args.
// If not installed, it exits with an error about run-evals not found.
// Either way, the output should reference the job name.
final combined = result.stdout + result.stderr;
expect(combined, contains('local_dev'));
});
});
}