File tree 2 files changed +33
-9
lines changed
internal/integrationtest/update
2 files changed +33
-9
lines changed Original file line number Diff line number Diff line change
1
+ // This file is part of arduino-cli.
2
+ //
3
+ // Copyright 2022 ARDUINO SA (http://www.arduino.cc/)
4
+ //
5
+ // This software is released under the GNU General Public License version 3,
6
+ // which covers the main part of arduino-cli.
7
+ // The terms of this license can be found at:
8
+ // https://www.gnu.org/licenses/gpl-3.0.en.html
9
+ //
10
+ // You can be released from the requirements of the above licenses by purchasing
11
+ // a commercial license. Buying such a license is mandatory if you want to
12
+ // modify or otherwise use the software for commercial activities involving the
13
+ // Arduino software without disclosing the source code of your own applications.
14
+ // To purchase a commercial license, send an email to license@arduino.cc.
15
+
16
+ package update_test
17
+
18
+ import (
19
+ "testing"
20
+
21
+ "github.com/arduino/arduino-cli/internal/integrationtest"
22
+ "github.com/stretchr/testify/require"
23
+ )
24
+
25
+ func TestUpdate (t * testing.T ) {
26
+ env , cli := integrationtest .CreateArduinoCLIWithEnvironment (t )
27
+ defer env .CleanUp ()
28
+
29
+ stdout , _ , err := cli .Run ("update" )
30
+ require .NoError (t , err )
31
+ require .Contains (t , string (stdout ), "Downloading index: package_index.tar.bz2 downloaded" )
32
+ require .Contains (t , string (stdout ), "Downloading index: library_index.tar.bz2 downloaded" )
33
+ }
Original file line number Diff line number Diff line change 16
16
from pathlib import Path
17
17
18
18
19
- def test_update (run_command ):
20
- res = run_command (["update" ])
21
- assert res .ok
22
- lines = [l .strip () for l in res .stdout .splitlines ()]
23
-
24
- assert "Downloading index: package_index.tar.bz2 downloaded" in lines
25
- assert "Downloading index: library_index.tar.bz2 downloaded" in lines
26
-
27
-
28
19
def test_update_showing_outdated (run_command ):
29
20
# Updates index for cores and libraries
30
21
run_command (["core" , "update-index" ])
You can’t perform that action at this time.
0 commit comments