-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
68d0705
commit 710aeb7
Showing
8 changed files
with
137 additions
and
51 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
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
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 |
---|---|---|
@@ -1,11 +1,36 @@ | ||
package fastlane | ||
|
||
var ( | ||
defaultGameIniPath = "./DefaultGame.ini" | ||
import ( | ||
"github.com/stretchr/testify/assert" | ||
"testing" | ||
) | ||
|
||
//func TestSetVersion(t *testing.T) { | ||
// expectedVersion := "2.1.1" | ||
// err := ManuallySetVersion(expectedVersion, defaultGameIniPath) | ||
// assert.Nil(t, err) | ||
//} | ||
func TestGetGithubReleases(t *testing.T) { | ||
// Published release | ||
release, err := GetLatestGithubRelease("eddiebeazer", "unreal-ci", false) | ||
if err != nil { | ||
return | ||
} | ||
|
||
assert.Equal(t, *release.TagName, "0.1.3") | ||
} | ||
|
||
func TestGetLatestDraftRelease(t *testing.T) { | ||
// Draft Release | ||
release, err := GetLatestGithubRelease("eddiebeazer", "unreal-ci", true) | ||
if err != nil { | ||
return | ||
} | ||
|
||
assert.Equal(t, *release.TagName, "0.1.4") | ||
} | ||
|
||
func TestGetGithubRelease(t *testing.T) { | ||
// Draft Release | ||
release, err := GetGithubRelease("eddiebeazer", "unreal-ci", "0.1.3") | ||
if err != nil { | ||
return | ||
} | ||
|
||
assert.NotNil(t, release) | ||
} |
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 |
---|---|---|
@@ -1,19 +1,62 @@ | ||
package flutter | ||
|
||
//func TestCleanDirectory(t *testing.T) { | ||
// dirToTest := "Test" | ||
// err := os.Mkdir(dirToTest, 777) | ||
// assert.Nil(t, err) | ||
// | ||
// // Testing that we can successfully delete the "Test" directory | ||
// err = Dist(dirToTest) | ||
// assert.Nil(t, err) | ||
// | ||
// // Testing that we exit if the directory isn't provided | ||
// err = Dist("") | ||
// assert.NotNil(t, err) | ||
// | ||
// // Testing fake directory that does not exists | ||
// err = Dist("aeed/asd//") | ||
// assert.Nil(t, err) | ||
//} | ||
import ( | ||
"github.com/stretchr/testify/assert" | ||
"testing" | ||
) | ||
|
||
func TestGetAppVersion(t *testing.T) { | ||
version, err := GetAppVersion() | ||
if err != nil { | ||
return | ||
} | ||
assert.Equal(t, version, "0.1.0+0") | ||
|
||
// Manually setting app version | ||
err = SetAppVersion("2.5.5", "23") | ||
if err != nil { | ||
return | ||
} | ||
version, err = GetAppVersion() | ||
if err != nil { | ||
return | ||
} | ||
assert.Equal(t, version, "2.5.5+23") | ||
|
||
// Setting app version from Github | ||
err = SetAppVersionFromLatestGithubRelease("eddiebeazer", "unreal-ci", false, "532") | ||
if err != nil { | ||
return | ||
} | ||
version, err = GetAppVersion() | ||
if err != nil { | ||
return | ||
} | ||
assert.Equal(t, version, "0.1.3+532") | ||
} | ||
|
||
func TestSetAppVersion(t *testing.T) { | ||
// Manually setting app version | ||
err := SetAppVersion("2.5.5", "23") | ||
if err != nil { | ||
return | ||
} | ||
version, err := GetAppVersion() | ||
if err != nil { | ||
return | ||
} | ||
assert.Equal(t, version, "2.5.5+23") | ||
} | ||
|
||
func TestSetAppVersionFromGitHub(t *testing.T) { | ||
// Setting app version from Github | ||
err := SetAppVersionFromLatestGithubRelease("eddiebeazer", "unreal-ci", false, "532") | ||
if err != nil { | ||
return | ||
} | ||
version, err := GetAppVersion() | ||
if err != nil { | ||
return | ||
} | ||
assert.Equal(t, version, "0.1.3+532") | ||
} |
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 |
---|---|---|
|
@@ -25,4 +25,4 @@ flutter: | |
uses-material-design: true | ||
name: form_app | ||
publish_to: none | ||
version: 0.1.4+233 | ||
version: 0.1.0+0 |