mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-20 01:47:33 +00:00
clientupdate: implement update for Unraid (#10344)
Use the [`plugin` CLI](https://forums.unraid.net/topic/72240-solved-is-there-a-way-to-installuninstall-plugins-from-script/#comment-676870) to fetch and apply the update. Updates https://github.com/tailscale/tailscale/issues/10184 Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
This commit is contained in:
@@ -795,3 +795,31 @@ func TestCleanupOldDownloads(t *testing.T) {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestParseUnraidPluginVersion(t *testing.T) {
|
||||
tests := []struct {
|
||||
plgPath string
|
||||
wantVer string
|
||||
wantErr string
|
||||
}{
|
||||
{plgPath: "testdata/tailscale-1.52.0.plg", wantVer: "1.52.0"},
|
||||
{plgPath: "testdata/tailscale-1.54.0.plg", wantVer: "1.54.0"},
|
||||
{plgPath: "testdata/tailscale-nover.plg", wantErr: "version not found in plg file"},
|
||||
{plgPath: "testdata/tailscale-nover-path-mentioned.plg", wantErr: "version not found in plg file"},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.plgPath, func(t *testing.T) {
|
||||
got, err := parseUnraidPluginVersion(tt.plgPath)
|
||||
if got != tt.wantVer {
|
||||
t.Errorf("got version: %q, want %q", got, tt.wantVer)
|
||||
}
|
||||
var gotErr string
|
||||
if err != nil {
|
||||
gotErr = err.Error()
|
||||
}
|
||||
if gotErr != tt.wantErr {
|
||||
t.Errorf("got error: %q, want %q", gotErr, tt.wantErr)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user