-
Notifications
You must be signed in to change notification settings - Fork 6
/
main_test.go
22 lines (20 loc) · 1.26 KB
/
main_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package main
import (
"github.com/stretchr/testify/require"
"runtime"
"testing"
)
func Test_getFlutterSdkSourceURL(t *testing.T) {
if runtime.GOOS == "darwin" {
if runtime.GOARCH == "arm64" {
require.Equal(t, getFlutterSdkSourceURL("3.0.1", "stable"), "https://storage.googleapis.com/flutter_infra_release/releases/stable/macos/flutter_macos_arm64_3.0.1-stable.zip")
require.Equal(t, getFlutterSdkSourceURL("3.1.0", "beta"), "https://storage.googleapis.com/flutter_infra_release/releases/beta/macos/flutter_macos_arm64_3.1.0-beta.zip")
} else {
require.Equal(t, getFlutterSdkSourceURL("3.0.1", "stable"), "https://storage.googleapis.com/flutter_infra_release/releases/stable/macos/flutter_macos_3.0.1-stable.zip")
require.Equal(t, getFlutterSdkSourceURL("3.1.0", "beta"), "https://storage.googleapis.com/flutter_infra_release/releases/beta/macos/flutter_macos_3.1.0-beta.zip")
}
} else if runtime.GOOS == "linux" {
require.Equal(t, getFlutterSdkSourceURL("3.0.1", "stable"), "https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.0.1-stable.tar.xz")
require.Equal(t, getFlutterSdkSourceURL("3.1.0", "beta"), "https://storage.googleapis.com/flutter_infra_release/releases/beta/linux/flutter_linux_3.1.0-beta.tar.xz")
}
}