From 7d20e47622c9a6e0a780bdbe9b53c8890c00deba Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Mon, 20 Feb 2017 12:45:04 +0100 Subject: Add GitLab QA integrations tests to GitLab CE / EE --- qa/qa.rb | 83 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 qa/qa.rb (limited to 'qa/qa.rb') diff --git a/qa/qa.rb b/qa/qa.rb new file mode 100644 index 00000000000..c47561bfa18 --- /dev/null +++ b/qa/qa.rb @@ -0,0 +1,83 @@ +$LOAD_PATH << File.expand_path(File.dirname(__FILE__)) + +module QA + ## + # GitLab QA runtime classes, mostly singletons. + # + module Runtime + autoload :User, 'qa/runtime/user' + autoload :Namespace, 'qa/runtime/namespace' + end + + ## + # GitLab QA Scenarios + # + module Scenario + ## + # Support files + # + autoload :Actable, 'qa/scenario/actable' + autoload :Template, 'qa/scenario/template' + + ## + # Test scenario entrypoints. + # + module Test + autoload :Instance, 'qa/scenario/test/instance' + end + + ## + # GitLab instance scenarios. + # + module Gitlab + module Project + autoload :Create, 'qa/scenario/gitlab/project/create' + end + + module License + autoload :Add, 'qa/scenario/gitlab/license/add' + end + end + end + + ## + # Classes describing structure of GitLab, pages, menus etc. + # + # Needed to execute click-driven-only black-box tests. + # + module Page + autoload :Base, 'qa/page/base' + + module Main + autoload :Entry, 'qa/page/main/entry' + autoload :Menu, 'qa/page/main/menu' + autoload :Groups, 'qa/page/main/groups' + autoload :Projects, 'qa/page/main/projects' + end + + module Project + autoload :New, 'qa/page/project/new' + autoload :Show, 'qa/page/project/show' + end + + module Admin + autoload :Menu, 'qa/page/admin/menu' + autoload :License, 'qa/page/admin/license' + end + end + + ## + # Classes describing operations on Git repositories. + # + module Git + autoload :Repository, 'qa/git/repository' + end + + ## + # Classes that make it possible to execute features tests. + # + module Specs + autoload :Config, 'qa/specs/config' + autoload :Runner, 'qa/specs/runner' + end +end -- cgit v1.2.1 From 161d0aa43dc767485c6f8a2300b6f4014c29ad7b Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Mon, 20 Feb 2017 13:59:11 +0100 Subject: Fix Rubocop offense and remove QA Rubocop from deps --- qa/qa.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qa/qa.rb') diff --git a/qa/qa.rb b/qa/qa.rb index c47561bfa18..106761fd215 100644 --- a/qa/qa.rb +++ b/qa/qa.rb @@ -1,4 +1,4 @@ -$LOAD_PATH << File.expand_path(File.dirname(__FILE__)) +$: << File.expand_path(File.dirname(__FILE__)) module QA ## -- cgit v1.2.1 From 5becdf01941e3a471def26dd82282784c58b5590 Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Thu, 9 Mar 2017 12:18:55 +0100 Subject: Implement GitLab QA release inflection strategy --- qa/qa.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'qa/qa.rb') diff --git a/qa/qa.rb b/qa/qa.rb index 106761fd215..3cc542b5c16 100644 --- a/qa/qa.rb +++ b/qa/qa.rb @@ -5,6 +5,7 @@ module QA # GitLab QA runtime classes, mostly singletons. # module Runtime + autoload :Release, 'qa/runtime/release' autoload :User, 'qa/runtime/user' autoload :Namespace, 'qa/runtime/namespace' end @@ -81,3 +82,5 @@ module QA autoload :Runner, 'qa/specs/runner' end end + +QA::Runtime::Release.autoloads -- cgit v1.2.1 From 92c3a9941cb519ed7ef18d09338bf4b855e3b911 Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Thu, 9 Mar 2017 12:22:47 +0100 Subject: Fix using release inflector to define autoloads --- qa/qa.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'qa/qa.rb') diff --git a/qa/qa.rb b/qa/qa.rb index 3cc542b5c16..bc54f20e17b 100644 --- a/qa/qa.rb +++ b/qa/qa.rb @@ -83,4 +83,6 @@ module QA end end -QA::Runtime::Release.autoloads +if QA::Runtime::Release.has_autoloads? + require QA::Runtime::Release.autoloads_file +end -- cgit v1.2.1 From 6373ef07c74b91b489d58cd9e20f7e5ea4c47664 Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Thu, 9 Mar 2017 12:29:55 +0100 Subject: Remove EE classes from GitLab QA merged into CE --- qa/qa.rb | 5 ----- 1 file changed, 5 deletions(-) (limited to 'qa/qa.rb') diff --git a/qa/qa.rb b/qa/qa.rb index bc54f20e17b..7fe18676634 100644 --- a/qa/qa.rb +++ b/qa/qa.rb @@ -34,10 +34,6 @@ module QA module Project autoload :Create, 'qa/scenario/gitlab/project/create' end - - module License - autoload :Add, 'qa/scenario/gitlab/license/add' - end end end @@ -63,7 +59,6 @@ module QA module Admin autoload :Menu, 'qa/page/admin/menu' - autoload :License, 'qa/page/admin/license' end end -- cgit v1.2.1 From 0731365b9de9411a937bd786d6e3fd7e10099800 Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Mon, 13 Mar 2017 13:54:33 +0100 Subject: Add GitLab QA CE strategy and simplify inflector --- qa/qa.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'qa/qa.rb') diff --git a/qa/qa.rb b/qa/qa.rb index 7fe18676634..58cf615cc9f 100644 --- a/qa/qa.rb +++ b/qa/qa.rb @@ -78,6 +78,4 @@ module QA end end -if QA::Runtime::Release.has_autoloads? - require QA::Runtime::Release.autoloads_file -end +QA::Runtime::Release.extend_autoloads! -- cgit v1.2.1