generated from LinuxSuRen/.github
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support to install KubeSphere with a not release version (#228)
- Loading branch information
1 parent
7522ed5
commit 3f8ecfc
Showing
2 changed files
with
54 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
package install | ||
|
||
import "testing" | ||
|
||
func Test_isNotReleaseVersion(t *testing.T) { | ||
type args struct { | ||
version string | ||
} | ||
tests := []struct { | ||
name string | ||
args args | ||
want bool | ||
}{{ | ||
name: "rc version", | ||
args: args{ | ||
version: "v1.0-rc1", | ||
}, | ||
want: true, | ||
}, { | ||
name: "alpha version", | ||
args: args{ | ||
version: "v1.0-alpha1", | ||
}, | ||
want: true, | ||
}, { | ||
name: "beta version", | ||
args: args{ | ||
version: "v1.0-beta-1", | ||
}, | ||
want: true, | ||
}, { | ||
name: "release version", | ||
args: args{ | ||
version: "v1.0", | ||
}, | ||
want: false, | ||
}} | ||
for _, tt := range tests { | ||
t.Run(tt.name, func(t *testing.T) { | ||
if got := isNotReleaseVersion(tt.args.version); got != tt.want { | ||
t.Errorf("isNotReleaseVersion() = %v, want %v", got, tt.want) | ||
} | ||
}) | ||
} | ||
} |