tests: context-cap and the catalog's model list are named in the route and settings guards
747632890added POST /api/settings/context-cap and settings.ContextCap, andeb56de0b5added GET /api/catalog/models, with no line in either guard, so TestEveryRouteHasACommandOrIsNamed and TestSettingsSaveKeepsWhatItDoesNotSend were red on CI from8aae124b0on (run 42954436265, ubuntu and macOS). context-cap has its command, magpie model context-cap; the catalog list is the model editor's Same as picker, with no command yet (stage 2). The settings-keep test now sets ContextCap, which has its own route, and checks a Settings save keeps it (it does: the test passes with no code change). Run on mote at origin/main245f07b19plus this: go test -count=1 ./internal/cli ok (42s). ./internal/gui: both guards ok; the package's red tests there were TestCoreScriptBudget (next commit) and eight AppKit window tests that wait 30s for a window over ssh (TestPanelCloseHidesIt, TestMainWindowCorners and the like), which this change doesn't reach. Red before: both guards on CI at8aae124b0, naming these three.
This commit is contained in:
@@ -230,6 +230,7 @@ var cliForRoute = map[string]string{
|
||||
"POST /api/update/check": "magpie update check",
|
||||
"POST /api/settings/agent-compact": "magpie model compact",
|
||||
"POST /api/settings/agent-suffix": "magpie model suffix",
|
||||
"POST /api/settings/context-cap": "magpie model context-cap",
|
||||
"POST /api/update/install": "magpie update",
|
||||
"GET /api/model-price": "magpie model price",
|
||||
"POST /api/model-price": "magpie model price",
|
||||
@@ -332,6 +333,7 @@ var notYet = map[string]string{
|
||||
"GET /api/plugins/builtin": P, // builtins.go
|
||||
"POST /api/plugins/builtin": P, // builtins.go
|
||||
"GET /api/plugins/counts": P, // plugins_counts.go: Discover's installs and likes
|
||||
"GET /api/catalog/models": P, // catalog_models.go: the model editor's Same as picker
|
||||
"POST /api/plugins/like": P, // plugins_counts.go
|
||||
"GET /api/library/browser": L, // browser.go
|
||||
"POST /api/library/browser/setup": L, // browser.go
|
||||
|
||||
@@ -213,6 +213,7 @@ func TestSettingsSaveKeepsWhatItDoesNotSend(t *testing.T) {
|
||||
was.ProxyCustom = "http://me:secret@proxy.example:8080"
|
||||
was.PluginProxyCustom = "http://me:secret@plugins.example:8080"
|
||||
was.PanelShortcut = "Ctrl+Alt+K"
|
||||
was.ContextCap = 200000 // its own route, POST /api/settings/context-cap
|
||||
was.SearcherThen = []string{"fake/m1", "fake/m2"} // set in its own row
|
||||
was.RouterNote = "Los Angeles" // the Library's servers/hub-note
|
||||
was.RouterAllTools = true // the Library's servers/hub-tools
|
||||
|
||||
Reference in New Issue
Block a user