@@ -21,10 +21,6 @@ void main() {
2121 expect (TestCommand (BuildCommandRunner ()).name, "test" );
2222 });
2323
24- test ('deploy' , () {
25- expect (DeployCommand (BuildCommandRunner ()).name, "deploy" );
26- });
27-
2824 test ('generate' , () {
2925 expect (GenerateCommand (BuildCommandRunner ()).name, "generate" );
3026 });
@@ -87,13 +83,6 @@ void main() {
8783 });
8884 });
8985
90- test ('deploy' , () async {
91- var runner = makeTestRunner ();
92- await runner.run (["-r19" , "-d../.." , "deploy" ]).whenComplete (() {
93- buildSpecAssertions (runner, "deploy" );
94- });
95- });
96-
9786 test ('verify' , () async {
9887 var runner = makeTestRunner ();
9988 await runner.run (["-r19" , "-d../.." , "verify" ]).whenComplete (() {
@@ -102,75 +91,6 @@ void main() {
10291 });
10392 });
10493
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-
17494 group ('build' , () {
17595 test ('plugin.xml' , () async {
17696 var runner = makeTestRunner ();
@@ -255,41 +175,11 @@ BuildCommandRunner makeTestRunner() {
255175 var runner = BuildCommandRunner ();
256176 runner.addCommand (TestMakeCommand (runner));
257177 runner.addCommand (TestTestCommand (runner));
258- runner.addCommand (TestDeployCommand (runner));
259178 runner.addCommand (TestGenCommand (runner));
260179 runner.addCommand (TestVerifyCommand (runner));
261180 return runner;
262181}
263182
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-
293183class TestGenCommand extends GenerateCommand {
294184 TestGenCommand (super .runner);
295185
0 commit comments