Skip to content

Commit

Permalink
Fix test for release (#790)
Browse files Browse the repository at this point in the history
* changelog for release

* update version

* update version file

* read expected version from file
  • Loading branch information
vhvb1989 committed Sep 30, 2022
1 parent 431d7ad commit c534416
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cli/azd/test/functional/cli_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,11 @@ func Test_CLI_Version_PrintsVersion(t *testing.T) {

rn := os.Getenv("GITHUB_RUN_NUMBER")
if rn != "" {
// TODO: This should be read from cli/version.txt (https://github.com/Azure/azure-dev/issues/36)
require.Contains(t, out, "0.2.0")
runningTestPath := azdcli.GetAzdLocation()
cliPath := strings.Split(runningTestPath, "cli")[0]
version, err := os.ReadFile(path.Join(cliPath, "cli", "version.txt"))
require.NoError(t, err)
require.Contains(t, out, strings.ReplaceAll(string(version), "\n", ""))
} else {
require.Contains(t, out, fmt.Sprintf("azd version %s", internal.Version))
}
Expand Down

0 comments on commit c534416

Please sign in to comment.