@@ -11,16 +11,16 @@ import (
11
11
var theT * testing.T
12
12
13
13
func GomegaFail (message string , callerSkip ... int ) {
14
- randID := RandString (16 )
14
+ randID := randString (16 )
15
15
logger .Error ("Spec has failed, capturing failure..." )
16
- logger .Tracef ("Dumping artifacts to %s with prefix %s" , artifacts_base_dir , randID )
16
+ logger .Tracef ("Dumping artifacts to %s with prefix %s" , artifactsBaseDir , randID )
17
17
18
- TakeScreenShot (randID ) //Save the screenshot of failure
19
- DumpingDOM (randID )
20
- DumpBrowserLogs (randID )
21
- DumpResources (randID )
22
- DumpClusterInfo (randID )
23
- DumpConfigRepo (randID )
18
+ takeScreenShot (randID ) //Save the screenshot of failure
19
+ dumpingDOM (randID )
20
+ dumpBrowserLogs (randID )
21
+ dumpResources (randID )
22
+ dumpClusterInfo (randID )
23
+ dumpConfigRepo (randID )
24
24
25
25
//Pass this down to the default handler for onward processing
26
26
ginkgo .Fail (message , callerSkip ... )
@@ -35,21 +35,15 @@ func TestAcceptance(t *testing.T) {
35
35
//Intercept the assertiona Failure
36
36
gomega .RegisterFailHandler (GomegaFail )
37
37
38
- // Runs the UI tests
39
- DescribeSpecsUi (RealGitopsTestRunner {})
40
- // Runs the CLI tests
41
- DescribeSpecsCli (RealGitopsTestRunner {})
42
-
43
38
ginkgo .RunSpecs (t , "Weave GitOps Enterprise Acceptance Tests" )
44
-
45
39
}
46
40
47
41
var _ = ginkgo .BeforeSuite (func () {
48
42
gomega .SetDefaultEventuallyTimeout (ASSERTION_DEFAULT_TIME_OUT ) // Things are slow when running on Kind
49
- SetupTestEnvironment () // Read OS environment variables and initialize the test environment
50
- InitializeLogger ("acceptance-tests.log" ) // Initilaize the global logger and tee Ginkgowriter
51
- InstallWeaveGitopsControllers () // Install weave gitops core and enterprise controllers
52
- InitializeWebdriver ( test_ui_url ) // Initilize web driver for whole test suite run
43
+ setupTestEnvironment () // Read OS environment variables and initialize the test environment
44
+ initializeLogger ("acceptance-tests.log" ) // Initilaize the global logger and tee Ginkgowriter
45
+ installWeaveGitopsControllers () // Install weave gitops core and enterprise controllers
46
+ initializeWebdriver ( testUiUrl ) // Initilize web driver for whole test suite run
53
47
54
48
ginkgo .By (fmt .Sprintf ("Login as a %s user" , userCredentials .UserType ), func () {
55
49
loginUser () // Login to the weaveworks enterprise dashboard
@@ -59,14 +53,14 @@ var _ = ginkgo.BeforeSuite(func() {
59
53
}
60
54
})
61
55
62
- CheckClusterService ( wge_endpoint_url ) // Cluster service should be running before running any test for enterprise
56
+ checkClusterService ( wgeEndpointUrl ) // Cluster service should be running before running any test for enterprise
63
57
})
64
58
65
59
var _ = ginkgo .AfterSuite (func () {
66
60
//Tear down the suite level setup
67
61
ginkgo .By (fmt .Sprintf ("Logout as a %s user" , userCredentials .UserType ), func () {
68
- gomega .Expect (webDriver .Navigate (test_ui_url )).To (gomega .Succeed ()) // Make sure the UI should not has any popups and modal dialogs
69
- logoutUser () // Logout to the weaveworks enterprise
62
+ gomega .Expect (webDriver .Navigate (testUiUrl )).To (gomega .Succeed ()) // Make sure the UI should not has any popups and modal dialogs
63
+ logoutUser () // Logout to the weaveworks enterprise
70
64
})
71
65
72
66
deleteRepo (gitProviderEnv ) // Delete the config repository to keep the org clean
0 commit comments