@@ -21,10 +21,6 @@ void main() {
21
21
expect (TestCommand (BuildCommandRunner ()).name, "test" );
22
22
});
23
23
24
- test ('deploy' , () {
25
- expect (DeployCommand (BuildCommandRunner ()).name, "deploy" );
26
- });
27
-
28
24
test ('generate' , () {
29
25
expect (GenerateCommand (BuildCommandRunner ()).name, "generate" );
30
26
});
@@ -87,13 +83,6 @@ void main() {
87
83
});
88
84
});
89
85
90
- test ('deploy' , () async {
91
- var runner = makeTestRunner ();
92
- await runner.run (["-r19" , "-d../.." , "deploy" ]).whenComplete (() {
93
- buildSpecAssertions (runner, "deploy" );
94
- });
95
- });
96
-
97
86
test ('verify' , () async {
98
87
var runner = makeTestRunner ();
99
88
await runner.run (["-r19" , "-d../.." , "verify" ]).whenComplete (() {
@@ -102,75 +91,6 @@ void main() {
102
91
});
103
92
});
104
93
105
- group ('release' , () {
106
- test ('simple' , () async {
107
- var runner = makeTestRunner ();
108
- late TestDeployCommand cmd;
109
- await runner.run (["-r19" , "-d../.." , "deploy" ]).whenComplete (() {
110
- cmd = (runner.commands['deploy' ] as TestDeployCommand );
111
- });
112
- expect (cmd.isReleaseValid, true );
113
- });
114
-
115
- test ('minor' , () async {
116
- var runner = makeTestRunner ();
117
- late TestDeployCommand cmd;
118
- await runner.run (["-r19.2" , "-d../.." , "deploy" ]).whenComplete (() {
119
- cmd = (runner.commands['deploy' ] as TestDeployCommand );
120
- });
121
- expect (cmd.isReleaseValid, true );
122
- });
123
-
124
- test ('patch invalid' , () async {
125
- var runner = makeTestRunner ();
126
- late TestDeployCommand cmd;
127
- await runner.run (["-r19.2.1" , "-d../.." , "deploy" ]).whenComplete (() {
128
- cmd = (runner.commands['deploy' ] as TestDeployCommand );
129
- });
130
- expect (cmd.isReleaseValid, false );
131
- });
132
-
133
- test ('non-numeric' , () async {
134
- var runner = makeTestRunner ();
135
- late TestDeployCommand cmd;
136
- await runner.run (["-rx19.2" , "-d../.." , "deploy" ]).whenComplete (() {
137
- cmd = (runner.commands['deploy' ] as TestDeployCommand );
138
- });
139
- expect (cmd.isReleaseValid, false );
140
- });
141
- });
142
-
143
- group ('deploy' , () {
144
- test ('clean' , () async {
145
- var dir = Directory .current;
146
- var runner = makeTestRunner ();
147
- await runner
148
- .run (["-r=19" , "-d../.." , "deploy" , "--no-as" , "--no-ij" ])
149
- .whenComplete (() {
150
- expect (Directory .current.path, equals (dir.path));
151
- });
152
- });
153
-
154
- test ('without --release' , () async {
155
- var runner = makeTestRunner ();
156
- late TestDeployCommand cmd;
157
- await runner.run (["-d../.." , "deploy" ]).whenComplete (() {
158
- cmd = (runner.commands['deploy' ] as TestDeployCommand );
159
- });
160
- expect (cmd.paths, orderedEquals ([]));
161
- });
162
-
163
- test ('release paths' , () async {
164
- var runner = makeTestRunner ();
165
- late TestDeployCommand cmd;
166
- await runner.run (["--release=19" , "-d../.." , "deploy" ]).whenComplete (() {
167
- cmd = (runner.commands['deploy' ] as TestDeployCommand );
168
- });
169
- var specs = cmd.specs.where ((s) => s.isStableChannel).toList ();
170
- expect (cmd.paths.length, specs.length);
171
- });
172
- });
173
-
174
94
group ('build' , () {
175
95
test ('plugin.xml' , () async {
176
96
var runner = makeTestRunner ();
@@ -255,41 +175,11 @@ BuildCommandRunner makeTestRunner() {
255
175
var runner = BuildCommandRunner ();
256
176
runner.addCommand (TestMakeCommand (runner));
257
177
runner.addCommand (TestTestCommand (runner));
258
- runner.addCommand (TestDeployCommand (runner));
259
178
runner.addCommand (TestGenCommand (runner));
260
179
runner.addCommand (TestVerifyCommand (runner));
261
180
return runner;
262
181
}
263
182
264
- class TestDeployCommand extends DeployCommand {
265
- List <String > paths = < String > [];
266
- List <String > plugins = < String > [];
267
-
268
- TestDeployCommand (super .runner);
269
-
270
- @override
271
- bool get isTesting => true ;
272
-
273
- @override
274
- void changeDirectory (Directory dir) {}
275
-
276
- String readTokenFile () {
277
- return "token" ;
278
- }
279
-
280
- @override
281
- Future <int > upload (
282
- String filePath,
283
- String pluginNumber,
284
- String token,
285
- String channel,
286
- ) {
287
- paths.add (filePath);
288
- plugins.add (pluginNumber);
289
- return Future (() => 0 );
290
- }
291
- }
292
-
293
183
class TestGenCommand extends GenerateCommand {
294
184
TestGenCommand (super .runner);
295
185
0 commit comments