fix(builder): SteamCMD is the only option for Linux Steam servers; settings must reach the server
This commit is contained in:
1 parent
1fcf05cc27
commit
010d7a57a1
3 files changed
+70
-10
No files matched your search
@@ -59,10 +59,10 @@ func TestParseAppInfoFindsLinuxServers(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestWithSteamCMDGoesFirstOnlyForLinuxServers(t *testing.T) {
|
||||
func TestWithSteamCMDIsTheOnlyRouteForLinuxServers(t *testing.T) {
|
||||
images := []string{"someone/example-server", "cm2network/steamcmd", "other/example"}
|
||||
got := withSteamCMD(images, true)
|
||||
if len(got) != 3 || got[0] != "cm2network/steamcmd" || got[1] != "someone/example-server" {
|
||||
if len(got) != 1 || got[0] != "cm2network/steamcmd" {
|
||||
t.Errorf("linux: %v", got)
|
||||
}
|
||||
got = withSteamCMD([]string{"someone/proton-example"}, false)
|
||||
@@ -89,10 +89,22 @@ func TestRecommendPrefersTheSteamCMDVariant(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestSteamCMDOnlyDropsImageVariantsOfLinuxSteamGames(t *testing.T) {
|
||||
// A Linux Steam server researched as two variants: SteamCMD, and a community image under its own title
|
||||
got := steamCMDOnly([]variant{
|
||||
{ID: "dedicated", SteamAppID: "1000000", Images: []string{"cm2network/steamcmd"}},
|
||||
{ID: "vanilla-stable", Images: []string{"someone/example-server"}},
|
||||
})
|
||||
if len(got) != 1 || got[0].ID != "dedicated" {
|
||||
t.Errorf("got %+v", got)
|
||||
}
|
||||
}
|
||||
|
||||
func TestOneOptionPerImageThenSteamCMDRecommended(t *testing.T) {
|
||||
// A variant runnable two ways becomes one option per way, SteamCMD recommended
|
||||
v := oneOptionPerImage([]variant{{
|
||||
ID: "dedicated", Title: "Example Dedicated Server", Recommended: true, SteamAppID: "1000000",
|
||||
Images: withSteamCMD([]string{"someone/example-server"}, true),
|
||||
Images: []string{"cm2network/steamcmd", "someone/example-server"},
|
||||
Verified: []string{"image someone/example-server exists", "Steam app 1000000 is \"Example Dedicated Server\""},
|
||||
}})
|
||||
recommend(v)
|
||||
|
||||
Reference in new issue
Block a user