update test framework to use msi id when possible, update gitignore file

This commit is contained in:
zjhe 2023-02-10 15:03:31 +08:00
parent 82a1bc5993
commit cdd05cd894
2 changed files with 8 additions and 1 deletions

3
.gitignore vendored
View File

@ -17,3 +17,6 @@ _repo.*/
go.sum go.sum
TestRecord TestRecord
**/TestRecord.md.tmp
terraform.tfstate
terraform.tfstate.backup

View File

@ -12,6 +12,10 @@ import (
) )
func Test_Quickstarts(t *testing.T) { func Test_Quickstarts(t *testing.T) {
msiId := os.Getenv("MSI_ID")
if msiId != "" {
_ = os.Setenv("TF_VAR_msi_id", msiId)
}
input := os.Getenv("CHANGED_FOLDERS") input := os.Getenv("CHANGED_FOLDERS")
folders := strings.Split(input, ",") folders := strings.Split(input, ",")
if input == "" { if input == "" {