github.com/redhat-appstudio/e2e-tests@v0.0.0-20240520140907-9709f6f59323/tests/upgrade/utils/util.go (about) 1 package utils 2 3 import ( 4 "github.com/redhat-appstudio/e2e-tests/pkg/constants" 5 "github.com/redhat-appstudio/e2e-tests/pkg/framework" 6 utilsFramework "github.com/redhat-appstudio/e2e-tests/pkg/utils" 7 8 . "github.com/onsi/gomega" 9 ) 10 11 func PrepareForUpgradeTests() (fw *framework.Framework, testNamespace string) { 12 // Initialize the tests controllers 13 fw, err := framework.NewFramework(UpgradeNamespace) 14 Expect(err).NotTo(HaveOccurred()) 15 16 testNamespace = fw.UserNamespace 17 Expect(testNamespace).NotTo(BeEmpty()) 18 // Check to see if the github token was provided 19 Expect(utilsFramework.CheckIfEnvironmentExists(constants.GITHUB_TOKEN_ENV)).Should(BeTrue(), "%s environment variable is not set", constants.GITHUB_TOKEN_ENV) 20 return fw, testNamespace 21 }