-
-
Notifications
You must be signed in to change notification settings - Fork 385
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cr: remove
latest_compatible_version
from gRPC api.
We leave only the `latest_compatible` field from the API. This field will have the same meaning the the former `latest_compatible_version`. Meaning that if the `latest_compatible` contains a version it is a release that can be installed. However it might happen that we have newer releases that cannot be installed. If the client is interested to show newer-non-installable-releases, the `releases` field can be used to infer that.
- Loading branch information
1 parent
d3c7d95
commit dfb4d40
Showing
13 changed files
with
176 additions
and
193 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -80,7 +80,6 @@ func TestPlatformSearch(t *testing.T) { | |
}, | ||
}, | ||
InstalledVersion: "", | ||
LatestVersion: "1.0.6", | ||
}) | ||
}) | ||
|
||
|
@@ -101,19 +100,8 @@ func TestPlatformSearch(t *testing.T) { | |
Email: "[email protected]", | ||
Indexed: true, | ||
}, | ||
Releases: map[string]*rpc.PlatformRelease{ | ||
"1.0.6": { | ||
Name: "RK002", | ||
Type: []string{"Contributed"}, | ||
Installed: false, | ||
Version: "1.0.6", | ||
Boards: []*rpc.Board{{Name: "RK002"}}, | ||
Help: &rpc.HelpResources{Online: "https://www.retrokits.com/rk002/arduino"}, | ||
Compatible: false, | ||
}, | ||
}, | ||
Releases: map[string]*rpc.PlatformRelease{}, | ||
InstalledVersion: "", | ||
LatestVersion: "1.0.6", | ||
}) | ||
}) | ||
|
||
|
@@ -155,7 +143,6 @@ func TestPlatformSearch(t *testing.T) { | |
}, | ||
}, | ||
InstalledVersion: "", | ||
LatestVersion: "1.0.6", | ||
}) | ||
}) | ||
|
||
|
@@ -197,7 +184,6 @@ func TestPlatformSearch(t *testing.T) { | |
}, | ||
}, | ||
InstalledVersion: "", | ||
LatestVersion: "1.0.6", | ||
}) | ||
}) | ||
|
||
|
@@ -239,7 +225,6 @@ func TestPlatformSearch(t *testing.T) { | |
}, | ||
}, | ||
InstalledVersion: "", | ||
LatestVersion: "1.0.6", | ||
}) | ||
}) | ||
|
||
|
@@ -299,7 +284,6 @@ func TestPlatformSearch(t *testing.T) { | |
}, | ||
}, | ||
InstalledVersion: "", | ||
LatestVersion: "1.8.3", | ||
}) | ||
}) | ||
|
||
|
@@ -359,7 +343,6 @@ func TestPlatformSearch(t *testing.T) { | |
}, | ||
}, | ||
InstalledVersion: "", | ||
LatestVersion: "1.8.3", | ||
}) | ||
}) | ||
} | ||
|
@@ -383,15 +366,15 @@ func TestPlatformSearchSorting(t *testing.T) { | |
res, stat := PlatformSearch(&rpc.PlatformSearchRequest{ | ||
Instance: inst, | ||
SearchArgs: "", | ||
AllVersions: false, | ||
AllVersions: true, | ||
}) | ||
require.Nil(t, stat) | ||
require.NotNil(t, res) | ||
|
||
require.Len(t, res.SearchOutput, 3) | ||
require.Equal(t, res.SearchOutput[0].GetLatestRelease().Name, "Arduino AVR Boards") | ||
require.Equal(t, res.SearchOutput[0].GetSortedReleases()[0].Name, "Arduino AVR Boards") | ||
require.Equal(t, res.SearchOutput[0].Metadata.Deprecated, false) | ||
require.Equal(t, res.SearchOutput[1].GetLatestRelease().Name, "RK002") | ||
require.Equal(t, res.SearchOutput[1].GetSortedReleases()[0].Name, "RK002") | ||
require.Equal(t, res.SearchOutput[1].Metadata.Deprecated, false) | ||
require.Equal(t, res.SearchOutput[2].GetLatestRelease().Name, "Platform") | ||
require.Equal(t, res.SearchOutput[2].Metadata.Deprecated, true) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.