diff --git a/internal/integrationtest/board/board_test.go b/internal/integrationtest/board/board_test.go index f4759f5b861..57afcf9301e 100644 --- a/internal/integrationtest/board/board_test.go +++ b/internal/integrationtest/board/board_test.go @@ -130,22 +130,17 @@ func TestBoardListMock(t *testing.T) { } func TestBoardListWithFqbnFilter(t *testing.T) { - if os.Getenv("CI") != "" { - t.Skip("VMs have no serial ports") - } - env, cli := integrationtest.CreateArduinoCLIWithEnvironment(t) defer env.CleanUp() _, _, err := cli.Run("core", "update-index") require.NoError(t, err) + + cli.InstallMockedSerialDiscovery(t) + stdout, _, err := cli.Run("board", "list", "-b", "foo:bar:baz", "--format", "json") require.NoError(t, err) - // this is a bit of a passpartout test, it actually filters the "bluetooth boards" locally - // but it would succeed even if the filtering wasn't working properly - // TODO: find a way to simulate connected boards or create a unit test which - // mocks or initializes multiple components - requirejson.Query(t, stdout, `.boards | length`, `0`) + requirejson.Query(t, stdout, `.detected_ports | length`, `0`) } func TestBoardListWithFqbnFilterInvalid(t *testing.T) {