chemlab 0.0.1 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/chemlab.rb +35 -0
- data/lib/chemlab/api_fabricator.rb +134 -0
- data/lib/chemlab/attributable.rb +25 -0
- data/lib/chemlab/component.rb +87 -0
- data/lib/chemlab/configuration.rb +39 -0
- data/lib/chemlab/element.rb +22 -0
- data/lib/chemlab/page.rb +13 -0
- data/lib/chemlab/resource.rb +169 -0
- data/lib/chemlab/runtime/api_client.rb +18 -0
- data/lib/chemlab/runtime/browser.rb +66 -0
- data/lib/chemlab/runtime/env.rb +22 -0
- data/{qa → lib/chemlab}/runtime/logger.rb +1 -1
- data/{qa → lib/chemlab}/support/api.rb +2 -2
- data/lib/chemlab/support/logging.rb +176 -0
- data/{qa → lib/chemlab}/support/repeater.rb +1 -1
- data/{qa → lib/chemlab}/support/waiter.rb +2 -2
- data/lib/chemlab/version.rb +1 -1
- metadata +56 -629
- data/.gitignore +0 -4
- data/.rspec +0 -3
- data/.rspec_parallel +0 -5
- data/Dockerfile +0 -68
- data/Gemfile +0 -23
- data/Gemfile.lock +0 -137
- data/README.md +0 -201
- data/Rakefile +0 -47
- data/bin/qa +0 -7
- data/bin/test +0 -3
- data/chemlab.gemspec +0 -43
- data/knapsack/master_report.json +0 -54
- data/qa.rb +0 -513
- data/qa/ce/strategy.rb +0 -21
- data/qa/ee.rb +0 -234
- data/qa/ee/fixtures/gpg/admin.asc +0 -0
- data/qa/ee/fixtures/secure_license_files/.gitlab-ci.yml +0 -12
- data/qa/ee/fixtures/secure_license_files/gl-license-management-report.json +0 -24
- data/qa/ee/fixtures/secure_premade_reports/.gitlab-ci.yml +0 -61
- data/qa/ee/fixtures/secure_premade_reports/gl-container-scanning-report.json +0 -105
- data/qa/ee/fixtures/secure_premade_reports/gl-dast-report.json +0 -1
- data/qa/ee/fixtures/secure_premade_reports/gl-dependency-scanning-report.json +0 -226
- data/qa/ee/fixtures/secure_premade_reports/gl-license-management-report.json +0 -42
- data/qa/ee/fixtures/secure_premade_reports/gl-sast-report.json +0 -152
- data/qa/ee/fixtures/secure_premade_reports/yarn.lock +0 -10024
- data/qa/ee/page/admin/geo/nodes/new.rb +0 -36
- data/qa/ee/page/admin/geo/nodes/show.rb +0 -23
- data/qa/ee/page/admin/license.rb +0 -41
- data/qa/ee/page/admin/menu.rb +0 -55
- data/qa/ee/page/admin/monitoring/audit_log.rb +0 -27
- data/qa/ee/page/admin/overview/groups/edit.rb +0 -27
- data/qa/ee/page/admin/settings/component/elasticsearch.rb +0 -38
- data/qa/ee/page/admin/settings/component/email.rb +0 -35
- data/qa/ee/page/admin/settings/integration.rb +0 -25
- data/qa/ee/page/admin/settings/preferences.rb +0 -25
- data/qa/ee/page/admin/settings/templates.rb +0 -40
- data/qa/ee/page/component/design_management.rb +0 -80
- data/qa/ee/page/component/issue_board/show.rb +0 -154
- data/qa/ee/page/component/license_management.rb +0 -62
- data/qa/ee/page/component/secure_report.rb +0 -38
- data/qa/ee/page/component/web_ide/web_terminal_panel.rb +0 -58
- data/qa/ee/page/dashboard/projects.rb +0 -54
- data/qa/ee/page/file/show.rb +0 -49
- data/qa/ee/page/group/contribution_analytics.rb +0 -29
- data/qa/ee/page/group/epic/index.rb +0 -46
- data/qa/ee/page/group/epic/show.rb +0 -74
- data/qa/ee/page/group/issues_analytics.rb +0 -33
- data/qa/ee/page/group/members.rb +0 -19
- data/qa/ee/page/group/menu.rb +0 -117
- data/qa/ee/page/group/roadmap.rb +0 -34
- data/qa/ee/page/group/saml_sso_sign_in.rb +0 -22
- data/qa/ee/page/group/saml_sso_sign_up.rb +0 -34
- data/qa/ee/page/group/secure/show.rb +0 -24
- data/qa/ee/page/group/settings/general.rb +0 -112
- data/qa/ee/page/group/settings/ldap_sync.rb +0 -38
- data/qa/ee/page/group/settings/saml_sso.rb +0 -93
- data/qa/ee/page/insights/show.rb +0 -51
- data/qa/ee/page/main/banner.rb +0 -19
- data/qa/ee/page/merge_request/new.rb +0 -74
- data/qa/ee/page/merge_request/show.rb +0 -326
- data/qa/ee/page/profile/menu.rb +0 -15
- data/qa/ee/page/project/issue/index.rb +0 -46
- data/qa/ee/page/project/issue/show.rb +0 -97
- data/qa/ee/page/project/menu.rb +0 -17
- data/qa/ee/page/project/milestone/show.rb +0 -41
- data/qa/ee/page/project/new.rb +0 -56
- data/qa/ee/page/project/operations/kubernetes/show.rb +0 -50
- data/qa/ee/page/project/operations/metrics/show.rb +0 -101
- data/qa/ee/page/project/packages/index.rb +0 -30
- data/qa/ee/page/project/packages/show.rb +0 -29
- data/qa/ee/page/project/path_locks/index.rb +0 -30
- data/qa/ee/page/project/pipeline/show.rb +0 -34
- data/qa/ee/page/project/secure/dependency_list.rb +0 -19
- data/qa/ee/page/project/secure/show.rb +0 -17
- data/qa/ee/page/project/settings/ci_cd.rb +0 -25
- data/qa/ee/page/project/settings/integrations.rb +0 -21
- data/qa/ee/page/project/settings/license_compliance.rb +0 -67
- data/qa/ee/page/project/settings/merge_request.rb +0 -27
- data/qa/ee/page/project/settings/mirroring_repositories.rb +0 -30
- data/qa/ee/page/project/settings/protected_branches.rb +0 -37
- data/qa/ee/page/project/settings/push_rules.rb +0 -82
- data/qa/ee/page/project/settings/repository.rb +0 -27
- data/qa/ee/page/project/settings/services/jenkins.rb +0 -56
- data/qa/ee/page/project/show.rb +0 -35
- data/qa/ee/page/project/sub_menus/packages.rb +0 -27
- data/qa/ee/page/project/sub_menus/project.rb +0 -21
- data/qa/ee/page/project/sub_menus/repository.rb +0 -29
- data/qa/ee/page/project/sub_menus/security_compliance.rb +0 -44
- data/qa/ee/page/project/sub_menus/settings.rb +0 -42
- data/qa/ee/page/project/wiki/show.rb +0 -31
- data/qa/ee/resource/board/base_board.rb +0 -26
- data/qa/ee/resource/board/board_list/group/board_list.rb +0 -57
- data/qa/ee/resource/board/board_list/project/assignee_board_list.rb +0 -23
- data/qa/ee/resource/board/board_list/project/base_board_list.rb +0 -50
- data/qa/ee/resource/board/board_list/project/label_board_list.rb +0 -28
- data/qa/ee/resource/board/board_list/project/milestone_board_list.rb +0 -28
- data/qa/ee/resource/board/group_board.rb +0 -25
- data/qa/ee/resource/board/project_board.rb +0 -25
- data/qa/ee/resource/epic.rb +0 -60
- data/qa/ee/resource/geo/node.rb +0 -31
- data/qa/ee/resource/group_label.rb +0 -50
- data/qa/ee/resource/license.rb +0 -21
- data/qa/ee/resource/project_milestone.rb +0 -20
- data/qa/ee/resource/settings/elasticsearch.rb +0 -60
- data/qa/ee/runtime/env.rb +0 -30
- data/qa/ee/runtime/geo.rb +0 -28
- data/qa/ee/runtime/saml.rb +0 -37
- data/qa/ee/scenario/test/geo.rb +0 -211
- data/qa/ee/scenario/test/integration/elasticsearch.rb +0 -15
- data/qa/ee/scenario/test/integration/group_saml.rb +0 -17
- data/qa/ee/scenario/test/sanity/selectors.rb +0 -17
- data/qa/ee/strategy.rb +0 -28
- data/qa/fixtures/auto_devops_rack/Dockerfile +0 -9
- data/qa/fixtures/auto_devops_rack/Gemfile +0 -3
- data/qa/fixtures/auto_devops_rack/Gemfile.lock +0 -15
- data/qa/fixtures/auto_devops_rack/Rakefile +0 -7
- data/qa/fixtures/auto_devops_rack/config.ru +0 -1
- data/qa/fixtures/ldap/admin/1_add_nodes.ldif +0 -7
- data/qa/fixtures/ldap/admin/2_add_users.ldif +0 -63
- data/qa/fixtures/ldap/admin/3_add_groups.ldif +0 -16
- data/qa/fixtures/ldap/non_admin/1_add_nodes.ldif +0 -7
- data/qa/fixtures/ldap/non_admin/2_add_users.ldif +0 -61
- data/qa/fixtures/ldap/non_admin/3_add_groups.ldif +0 -16
- data/qa/fixtures/monitored_auto_devops/.gitlab-ci.yml +0 -337
- data/qa/flow/login.rb +0 -39
- data/qa/flow/project.rb +0 -19
- data/qa/flow/saml.rb +0 -72
- data/qa/flow/user.rb +0 -26
- data/qa/git/location.rb +0 -34
- data/qa/git/repository.rb +0 -269
- data/qa/page/admin/menu.rb +0 -110
- data/qa/page/admin/new_session.rb +0 -22
- data/qa/page/admin/overview/groups/edit.rb +0 -23
- data/qa/page/admin/overview/groups/index.rb +0 -32
- data/qa/page/admin/overview/groups/show.rb +0 -21
- data/qa/page/admin/overview/users/index.rb +0 -35
- data/qa/page/admin/overview/users/show.rb +0 -31
- data/qa/page/admin/settings/component/account_and_limit.rb +0 -26
- data/qa/page/admin/settings/component/ip_limits.rb +0 -30
- data/qa/page/admin/settings/component/outbound_requests.rb +0 -33
- data/qa/page/admin/settings/component/performance_bar.rb +0 -27
- data/qa/page/admin/settings/component/repository_storage.rb +0 -26
- data/qa/page/admin/settings/general.rb +0 -23
- data/qa/page/admin/settings/metrics_and_profiling.rb +0 -23
- data/qa/page/admin/settings/network.rb +0 -30
- data/qa/page/admin/settings/repository.rb +0 -23
- data/qa/page/alert/auto_devops_alert.rb +0 -13
- data/qa/page/base.rb +0 -348
- data/qa/page/component/breadcrumbs.rb +0 -19
- data/qa/page/component/ci_badge_link.rb +0 -49
- data/qa/page/component/clone_panel.rb +0 -38
- data/qa/page/component/confirm_modal.rb +0 -25
- data/qa/page/component/dropdown_filter.rb +0 -16
- data/qa/page/component/dropzone.rb +0 -33
- data/qa/page/component/groups_filter.rb +0 -37
- data/qa/page/component/issuable/common.rb +0 -31
- data/qa/page/component/lazy_loader.rb +0 -15
- data/qa/page/component/legacy_clone_panel.rb +0 -47
- data/qa/page/component/note.rb +0 -84
- data/qa/page/component/select2.rb +0 -48
- data/qa/page/component/users_select.rb +0 -14
- data/qa/page/component/web_ide/alert.rb +0 -27
- data/qa/page/dashboard/groups.rb +0 -34
- data/qa/page/dashboard/projects.rb +0 -37
- data/qa/page/dashboard/snippet/index.rb +0 -21
- data/qa/page/dashboard/snippet/new.rb +0 -70
- data/qa/page/dashboard/snippet/show.rb +0 -63
- data/qa/page/dashboard/welcome.rb +0 -17
- data/qa/page/element.rb +0 -55
- data/qa/page/file/edit.rb +0 -13
- data/qa/page/file/form.rb +0 -49
- data/qa/page/file/shared/commit_button.rb +0 -25
- data/qa/page/file/shared/commit_message.rb +0 -21
- data/qa/page/file/shared/editor.rb +0 -33
- data/qa/page/file/show.rb +0 -36
- data/qa/page/group/menu.rb +0 -52
- data/qa/page/group/new.rb +0 -37
- data/qa/page/group/settings/general.rb +0 -115
- data/qa/page/group/show.rb +0 -74
- data/qa/page/group/sub_menus/common.rb +0 -27
- data/qa/page/group/sub_menus/members.rb +0 -45
- data/qa/page/issuable/sidebar.rb +0 -27
- data/qa/page/label/index.rb +0 -34
- data/qa/page/label/new.rb +0 -32
- data/qa/page/layout/banner.rb +0 -19
- data/qa/page/layout/performance_bar.rb +0 -41
- data/qa/page/main/login.rb +0 -181
- data/qa/page/main/menu.rb +0 -150
- data/qa/page/main/oauth.rb +0 -21
- data/qa/page/main/sign_up.rb +0 -37
- data/qa/page/main/terms.rb +0 -21
- data/qa/page/mattermost/login.rb +0 -28
- data/qa/page/mattermost/main.rb +0 -15
- data/qa/page/merge_request/new.rb +0 -68
- data/qa/page/merge_request/show.rb +0 -232
- data/qa/page/profile/emails.rb +0 -29
- data/qa/page/profile/menu.rb +0 -52
- data/qa/page/profile/password.rb +0 -23
- data/qa/page/profile/personal_access_tokens.rb +0 -67
- data/qa/page/profile/ssh_keys.rb +0 -42
- data/qa/page/profile/two_factor_auth.rb +0 -17
- data/qa/page/project/activity.rb +0 -17
- data/qa/page/project/branches/show.rb +0 -56
- data/qa/page/project/commit/show.rb +0 -32
- data/qa/page/project/fork/new.rb +0 -19
- data/qa/page/project/import/github.rb +0 -78
- data/qa/page/project/issue/index.rb +0 -71
- data/qa/page/project/issue/new.rb +0 -35
- data/qa/page/project/issue/show.rb +0 -168
- data/qa/page/project/job/show.rb +0 -53
- data/qa/page/project/menu.rb +0 -43
- data/qa/page/project/milestone/index.rb +0 -19
- data/qa/page/project/milestone/new.rb +0 -29
- data/qa/page/project/new.rb +0 -76
- data/qa/page/project/operations/environments/index.rb +0 -21
- data/qa/page/project/operations/environments/show.rb +0 -23
- data/qa/page/project/operations/kubernetes/add.rb +0 -21
- data/qa/page/project/operations/kubernetes/add_existing.rb +0 -46
- data/qa/page/project/operations/kubernetes/index.rb +0 -25
- data/qa/page/project/operations/kubernetes/show.rb +0 -81
- data/qa/page/project/operations/metrics/show.rb +0 -87
- data/qa/page/project/pipeline/index.rb +0 -43
- data/qa/page/project/pipeline/show.rb +0 -76
- data/qa/page/project/settings/advanced.rb +0 -75
- data/qa/page/project/settings/auto_devops.rb +0 -21
- data/qa/page/project/settings/ci_cd.rb +0 -39
- data/qa/page/project/settings/ci_variables.rb +0 -56
- data/qa/page/project/settings/common.rb +0 -13
- data/qa/page/project/settings/deploy_keys.rb +0 -69
- data/qa/page/project/settings/deploy_tokens.rb +0 -64
- data/qa/page/project/settings/main.rb +0 -60
- data/qa/page/project/settings/members.rb +0 -62
- data/qa/page/project/settings/merge_request.rb +0 -32
- data/qa/page/project/settings/mirroring_repositories.rb +0 -132
- data/qa/page/project/settings/protected_branches.rb +0 -72
- data/qa/page/project/settings/repository.rb +0 -55
- data/qa/page/project/settings/runners.rb +0 -37
- data/qa/page/project/settings/visibility_features_permissions.rb +0 -26
- data/qa/page/project/show.rb +0 -165
- data/qa/page/project/sub_menus/ci_cd.rb +0 -27
- data/qa/page/project/sub_menus/common.rb +0 -19
- data/qa/page/project/sub_menus/issues.rb +0 -63
- data/qa/page/project/sub_menus/operations.rb +0 -58
- data/qa/page/project/sub_menus/project.rb +0 -29
- data/qa/page/project/sub_menus/repository.rb +0 -48
- data/qa/page/project/sub_menus/settings.rb +0 -81
- data/qa/page/project/web_ide/edit.rb +0 -139
- data/qa/page/project/wiki/edit.rb +0 -21
- data/qa/page/project/wiki/git_access.rb +0 -13
- data/qa/page/project/wiki/new.rb +0 -61
- data/qa/page/project/wiki/show.rb +0 -31
- data/qa/page/search/results.rb +0 -55
- data/qa/page/settings/common.rb +0 -26
- data/qa/page/sub_menus/common.rb +0 -50
- data/qa/page/validatable.rb +0 -21
- data/qa/page/validator.rb +0 -52
- data/qa/page/view.rb +0 -59
- data/qa/resource/api_fabricator.rb +0 -137
- data/qa/resource/base.rb +0 -170
- data/qa/resource/ci_variable.rb +0 -57
- data/qa/resource/deploy_key.rb +0 -39
- data/qa/resource/deploy_token.rb +0 -48
- data/qa/resource/events/base.rb +0 -42
- data/qa/resource/events/project.rb +0 -25
- data/qa/resource/file.rb +0 -63
- data/qa/resource/fork.rb +0 -92
- data/qa/resource/group.rb +0 -83
- data/qa/resource/issue.rb +0 -61
- data/qa/resource/kubernetes_cluster/base.rb +0 -40
- data/qa/resource/kubernetes_cluster/project_cluster.rb +0 -72
- data/qa/resource/label.rb +0 -61
- data/qa/resource/members.rb +0 -36
- data/qa/resource/merge_request.rb +0 -105
- data/qa/resource/merge_request_from_fork.rb +0 -33
- data/qa/resource/personal_access_token.rb +0 -31
- data/qa/resource/project.rb +0 -179
- data/qa/resource/project_imported_from_github.rb +0 -31
- data/qa/resource/project_member.rb +0 -35
- data/qa/resource/project_milestone.rb +0 -34
- data/qa/resource/protected_branch.rb +0 -76
- data/qa/resource/repository/commit.rb +0 -81
- data/qa/resource/repository/project_push.rb +0 -44
- data/qa/resource/repository/push.rb +0 -113
- data/qa/resource/repository/wiki_push.rb +0 -38
- data/qa/resource/runner.rb +0 -75
- data/qa/resource/sandbox.rb +0 -79
- data/qa/resource/settings/hashed_storage.rb +0 -26
- data/qa/resource/snippet.rb +0 -30
- data/qa/resource/ssh_key.rb +0 -57
- data/qa/resource/tag.rb +0 -30
- data/qa/resource/user.rb +0 -150
- data/qa/resource/user_gpg.rb +0 -46
- data/qa/resource/visibility.rb +0 -17
- data/qa/resource/wiki.rb +0 -48
- data/qa/runtime/address.rb +0 -29
- data/qa/runtime/api/client.rb +0 -90
- data/qa/runtime/api/request.rb +0 -49
- data/qa/runtime/application_settings.rb +0 -46
- data/qa/runtime/browser.rb +0 -220
- data/qa/runtime/env.rb +0 -330
- data/qa/runtime/feature.rb +0 -87
- data/qa/runtime/fixtures.rb +0 -43
- data/qa/runtime/gpg.rb +0 -37
- data/qa/runtime/ip_address.rb +0 -33
- data/qa/runtime/key/base.rb +0 -38
- data/qa/runtime/key/ecdsa.rb +0 -13
- data/qa/runtime/key/ed25519.rb +0 -13
- data/qa/runtime/key/rsa.rb +0 -13
- data/qa/runtime/mail_hog.rb +0 -15
- data/qa/runtime/namespace.rb +0 -27
- data/qa/runtime/path.rb +0 -13
- data/qa/runtime/release.rb +0 -40
- data/qa/runtime/scenario.rb +0 -38
- data/qa/runtime/search.rb +0 -124
- data/qa/runtime/user.rb +0 -57
- data/qa/scenario/actable.rb +0 -25
- data/qa/scenario/bootable.rb +0 -53
- data/qa/scenario/shared_attributes.rb +0 -14
- data/qa/scenario/template.rb +0 -64
- data/qa/scenario/test/instance.rb +0 -36
- data/qa/scenario/test/instance/all.rb +0 -18
- data/qa/scenario/test/instance/smoke.rb +0 -20
- data/qa/scenario/test/integration/github.rb +0 -20
- data/qa/scenario/test/integration/instance_saml.rb +0 -13
- data/qa/scenario/test/integration/kubernetes.rb +0 -13
- data/qa/scenario/test/integration/ldap_no_server.rb +0 -13
- data/qa/scenario/test/integration/ldap_no_tls.rb +0 -13
- data/qa/scenario/test/integration/ldap_tls.rb +0 -13
- data/qa/scenario/test/integration/mattermost.rb +0 -26
- data/qa/scenario/test/integration/object_storage.rb +0 -13
- data/qa/scenario/test/integration/smtp.rb +0 -13
- data/qa/scenario/test/sanity/framework.rb +0 -19
- data/qa/scenario/test/sanity/selectors.rb +0 -61
- data/qa/service/cluster_provider/base.rb +0 -41
- data/qa/service/cluster_provider/gcloud.rb +0 -115
- data/qa/service/cluster_provider/k3d.rb +0 -134
- data/qa/service/cluster_provider/k3s.rb +0 -94
- data/qa/service/cluster_provider/minikube.rb +0 -26
- data/qa/service/docker_run/base.rb +0 -47
- data/qa/service/docker_run/gitlab_runner.rb +0 -58
- data/qa/service/docker_run/jenkins.rb +0 -43
- data/qa/service/docker_run/k3s.rb +0 -46
- data/qa/service/docker_run/ldap.rb +0 -41
- data/qa/service/docker_run/maven.rb +0 -44
- data/qa/service/docker_run/node_js.rb +0 -38
- data/qa/service/docker_run/saml_idp.rb +0 -69
- data/qa/service/kubernetes_cluster.rb +0 -107
- data/qa/service/omnibus.rb +0 -23
- data/qa/service/shellout.rb +0 -31
- data/qa/specs/features/api/1_manage/.gitkeep +0 -0
- data/qa/specs/features/api/1_manage/rate_limits_spec.rb +0 -17
- data/qa/specs/features/api/1_manage/users_spec.rb +0 -35
- data/qa/specs/features/api/2_plan/.gitkeep +0 -0
- data/qa/specs/features/api/2_plan/closes_issue_via_pushing_a_commit_spec.rb +0 -48
- data/qa/specs/features/api/3_create/repository/files_spec.rb +0 -106
- data/qa/specs/features/api/3_create/repository/project_archive_compare_spec.rb +0 -74
- data/qa/specs/features/api/4_verify/.gitkeep +0 -0
- data/qa/specs/features/api/5_package/.gitkeep +0 -0
- data/qa/specs/features/api/6_release/.gitkeep +0 -0
- data/qa/specs/features/api/7_configure/.gitkeep +0 -0
- data/qa/specs/features/browser_ui/1_manage/group/create_group_with_mattermost_team_spec.rb +0 -20
- data/qa/specs/features/browser_ui/1_manage/group/transfer_project_spec.rb +0 -56
- data/qa/specs/features/browser_ui/1_manage/login/log_in_spec.rb +0 -25
- data/qa/specs/features/browser_ui/1_manage/login/log_into_gitlab_via_ldap_spec.rb +0 -15
- data/qa/specs/features/browser_ui/1_manage/login/log_into_mattermost_via_gitlab_spec.rb +0 -20
- data/qa/specs/features/browser_ui/1_manage/login/login_via_instance_wide_saml_sso_spec.rb +0 -19
- data/qa/specs/features/browser_ui/1_manage/login/register_spec.rb +0 -27
- data/qa/specs/features/browser_ui/1_manage/project/add_project_member_spec.rb +0 -24
- data/qa/specs/features/browser_ui/1_manage/project/create_project_spec.rb +0 -23
- data/qa/specs/features/browser_ui/1_manage/project/dashboard_images_spec.rb +0 -57
- data/qa/specs/features/browser_ui/1_manage/project/import_github_repo_spec.rb +0 -117
- data/qa/specs/features/browser_ui/1_manage/project/view_project_activity_spec.rb +0 -22
- data/qa/specs/features/browser_ui/2_plan/email/trigger_email_notification_spec.rb +0 -46
- data/qa/specs/features/browser_ui/2_plan/issue/check_mentions_for_xss_spec.rb +0 -45
- data/qa/specs/features/browser_ui/2_plan/issue/collapse_comments_in_discussions_spec.rb +0 -35
- data/qa/specs/features/browser_ui/2_plan/issue/comment_issue_spec.rb +0 -29
- data/qa/specs/features/browser_ui/2_plan/issue/create_issue_spec.rb +0 -40
- data/qa/specs/features/browser_ui/2_plan/issue/export_as_csv_spec.rb +0 -40
- data/qa/specs/features/browser_ui/2_plan/issue/filter_issue_comments_spec.rb +0 -36
- data/qa/specs/features/browser_ui/2_plan/issue/issue_suggestions_spec.rb +0 -28
- data/qa/specs/features/browser_ui/2_plan/issue/mentions_spec.rb +0 -35
- data/qa/specs/features/browser_ui/3_create/merge_request/create_merge_request_spec.rb +0 -64
- data/qa/specs/features/browser_ui/3_create/merge_request/merge_merge_request_from_fork_spec.rb +0 -26
- data/qa/specs/features/browser_ui/3_create/merge_request/rebase_merge_request_spec.rb +0 -49
- data/qa/specs/features/browser_ui/3_create/merge_request/squash_merge_request_spec.rb +0 -52
- data/qa/specs/features/browser_ui/3_create/merge_request/view_merge_request_diff_patch_spec.rb +0 -35
- data/qa/specs/features/browser_ui/3_create/repository/add_file_template_spec.rb +0 -68
- data/qa/specs/features/browser_ui/3_create/repository/add_list_delete_branches_spec.rb +0 -88
- data/qa/specs/features/browser_ui/3_create/repository/add_ssh_key_spec.rb +0 -30
- data/qa/specs/features/browser_ui/3_create/repository/clone_spec.rb +0 -51
- data/qa/specs/features/browser_ui/3_create/repository/create_edit_delete_file_via_web_spec.rb +0 -58
- data/qa/specs/features/browser_ui/3_create/repository/move_project_create_fork_spec.rb +0 -53
- data/qa/specs/features/browser_ui/3_create/repository/protocol_v2_push_http_spec.rb +0 -48
- data/qa/specs/features/browser_ui/3_create/repository/protocol_v2_push_ssh_spec.rb +0 -74
- data/qa/specs/features/browser_ui/3_create/repository/push_http_private_token_spec.rb +0 -34
- data/qa/specs/features/browser_ui/3_create/repository/push_mirroring_over_http_spec.rb +0 -43
- data/qa/specs/features/browser_ui/3_create/repository/push_over_http_file_size_spec.rb +0 -81
- data/qa/specs/features/browser_ui/3_create/repository/push_over_http_spec.rb +0 -44
- data/qa/specs/features/browser_ui/3_create/repository/push_protected_branch_spec.rb +0 -63
- data/qa/specs/features/browser_ui/3_create/repository/use_ssh_key_spec.rb +0 -37
- data/qa/specs/features/browser_ui/3_create/repository/user_views_commit_diff_patch_spec.rb +0 -66
- data/qa/specs/features/browser_ui/3_create/snippet/create_snippet_spec.rb +0 -29
- data/qa/specs/features/browser_ui/3_create/web_ide/add_file_template_spec.rb +0 -69
- data/qa/specs/features/browser_ui/3_create/web_ide/review_merge_request_spec.rb +0 -43
- data/qa/specs/features/browser_ui/3_create/wiki/create_edit_clone_push_wiki_spec.rb +0 -42
- data/qa/specs/features/browser_ui/4_verify/ci_variable/add_remove_ci_variable_spec.rb +0 -60
- data/qa/specs/features/browser_ui/4_verify/pipeline/create_and_process_pipeline_spec.rb +0 -89
- data/qa/specs/features/browser_ui/4_verify/runner/register_runner_spec.rb +0 -34
- data/qa/specs/features/browser_ui/5_package/.gitkeep +0 -0
- data/qa/specs/features/browser_ui/6_release/deploy_key/add_deploy_key_spec.rb +0 -28
- data/qa/specs/features/browser_ui/6_release/deploy_key/clone_using_deploy_key_spec.rb +0 -102
- data/qa/specs/features/browser_ui/6_release/deploy_token/add_deploy_token_spec.rb +0 -22
- data/qa/specs/features/browser_ui/6_release/pipeline/parent_child_pipelines_dependent_relationship_spec.rb +0 -122
- data/qa/specs/features/browser_ui/6_release/pipeline/parent_child_pipelines_independent_relationship_spec.rb +0 -121
- data/qa/specs/features/browser_ui/7_configure/auto_devops/create_project_with_auto_devops_spec.rb +0 -147
- data/qa/specs/features/browser_ui/7_configure/kubernetes/kubernetes_integration_spec.rb +0 -38
- data/qa/specs/features/browser_ui/8_monitor/apm/dashboards_spec.rb +0 -97
- data/qa/specs/features/browser_ui/non_devops/performance_bar_spec.rb +0 -38
- data/qa/specs/features/ee/api/1_manage/.gitkeep +0 -0
- data/qa/specs/features/ee/api/2_plan/.gitkeep +0 -0
- data/qa/specs/features/ee/api/2_plan/epics_milestone_dates_spec.rb +0 -173
- data/qa/specs/features/ee/api/3_create/.gitkeep +0 -0
- data/qa/specs/features/ee/api/4_verify/.gitkeep +0 -0
- data/qa/specs/features/ee/api/5_package/.gitkeep +0 -0
- data/qa/specs/features/ee/api/6_release/.gitkeep +0 -0
- data/qa/specs/features/ee/api/7_configure/.gitkeep +0 -0
- data/qa/specs/features/ee/api/enablement/elasticsearch/advanced_global_advanced_syntax_search_spec.rb +0 -70
- data/qa/specs/features/ee/api/enablement/elasticsearch/elasticsearch_api_spec.rb +0 -84
- data/qa/specs/features/ee/api/geo/geo_nodes_spec.rb +0 -91
- data/qa/specs/features/ee/browser_ui/1_manage/.gitkeep +0 -0
- data/qa/specs/features/ee/browser_ui/1_manage/group/group_audit_logs_1_spec.rb +0 -155
- data/qa/specs/features/ee/browser_ui/1_manage/group/group_audit_logs_2_spec.rb +0 -103
- data/qa/specs/features/ee/browser_ui/1_manage/group/group_file_template_spec.rb +0 -141
- data/qa/specs/features/ee/browser_ui/1_manage/group/group_ldap_sync_spec.rb +0 -183
- data/qa/specs/features/ee/browser_ui/1_manage/group/group_saml_enforced_sso_spec.rb +0 -115
- data/qa/specs/features/ee/browser_ui/1_manage/group/group_saml_group_managed_accounts_spec.rb +0 -178
- data/qa/specs/features/ee/browser_ui/1_manage/group/group_saml_non_enforced_sso_spec.rb +0 -87
- data/qa/specs/features/ee/browser_ui/1_manage/group/restrict_by_ip_address_spec.rb +0 -107
- data/qa/specs/features/ee/browser_ui/1_manage/insights/default_insights_spec.rb +0 -48
- data/qa/specs/features/ee/browser_ui/1_manage/instance/instance_audit_logs_spec.rb +0 -124
- data/qa/specs/features/ee/browser_ui/1_manage/ldap/admin_ldap_sync_spec.rb +0 -63
- data/qa/specs/features/ee/browser_ui/1_manage/project/project_audit_logs_spec.rb +0 -127
- data/qa/specs/features/ee/browser_ui/1_manage/project/project_templates_spec.rb +0 -165
- data/qa/specs/features/ee/browser_ui/2_plan/.gitkeep +0 -0
- data/qa/specs/features/ee/browser_ui/2_plan/burndown_chart/burndown_chart_spec.rb +0 -46
- data/qa/specs/features/ee/browser_ui/2_plan/custom_email/custom_email_spec.rb +0 -28
- data/qa/specs/features/ee/browser_ui/2_plan/epic/epics_management_spec.rb +0 -96
- data/qa/specs/features/ee/browser_ui/2_plan/epic/promote_issue_to_epic_spec.rb +0 -40
- data/qa/specs/features/ee/browser_ui/2_plan/epic/roadmap_spec.rb +0 -31
- data/qa/specs/features/ee/browser_ui/2_plan/issue_boards/configurable_issue_board_spec.rb +0 -28
- data/qa/specs/features/ee/browser_ui/2_plan/issue_boards/configure_issue_board_by_label_spec.rb +0 -44
- data/qa/specs/features/ee/browser_ui/2_plan/issue_boards/create_group_issue_board_spec.rb +0 -31
- data/qa/specs/features/ee/browser_ui/2_plan/issue_boards/focus_mode_spec.rb +0 -28
- data/qa/specs/features/ee/browser_ui/2_plan/issue_boards/group_issue_boards_spec.rb +0 -48
- data/qa/specs/features/ee/browser_ui/2_plan/issue_boards/project_issue_boards_spec.rb +0 -103
- data/qa/specs/features/ee/browser_ui/2_plan/issue_boards/read_only_board_configuration_spec.rb +0 -37
- data/qa/specs/features/ee/browser_ui/2_plan/issue_boards/sum_of_issues_weights_spec.rb +0 -40
- data/qa/specs/features/ee/browser_ui/2_plan/issues_analytics/issues_analytics_spec.rb +0 -35
- data/qa/specs/features/ee/browser_ui/2_plan/issues_weight/issue_weight_visualization_spec.rb +0 -46
- data/qa/specs/features/ee/browser_ui/2_plan/multiple_assignees_for_issues/four_assignees_spec.rb +0 -45
- data/qa/specs/features/ee/browser_ui/2_plan/multiple_assignees_for_issues/more_than_four_assignees_spec.rb +0 -70
- data/qa/specs/features/ee/browser_ui/2_plan/related_issues/related_issues_spec.rb +0 -50
- data/qa/specs/features/ee/browser_ui/2_plan/scoped_labels/editing_scoped_labels_spec.rb +0 -58
- data/qa/specs/features/ee/browser_ui/3_create/.gitkeep +0 -0
- data/qa/specs/features/ee/browser_ui/3_create/contribution_analytics_spec.rb +0 -53
- data/qa/specs/features/ee/browser_ui/3_create/design_management_spec.rb +0 -29
- data/qa/specs/features/ee/browser_ui/3_create/jenkins/jenkins_build_status_spec.rb +0 -158
- data/qa/specs/features/ee/browser_ui/3_create/merge_request/add_batch_comments_in_merge_request_spec.rb +0 -80
- data/qa/specs/features/ee/browser_ui/3_create/merge_request/approval_rules_spec.rb +0 -97
- data/qa/specs/features/ee/browser_ui/3_create/repository/assign_code_owners_spec.rb +0 -83
- data/qa/specs/features/ee/browser_ui/3_create/repository/code_owners_spec.rb +0 -75
- data/qa/specs/features/ee/browser_ui/3_create/repository/file_locking_spec.rb +0 -161
- data/qa/specs/features/ee/browser_ui/3_create/repository/pull_mirroring_over_http_spec.rb +0 -52
- data/qa/specs/features/ee/browser_ui/3_create/repository/pull_mirroring_over_ssh_with_key_spec.rb +0 -71
- data/qa/specs/features/ee/browser_ui/3_create/repository/push_rules_spec.rb +0 -202
- data/qa/specs/features/ee/browser_ui/3_create/repository/restrict_push_protected_branch_spec.rb +0 -120
- data/qa/specs/features/ee/browser_ui/3_create/web_ide/web_terminal_spec.rb +0 -80
- data/qa/specs/features/ee/browser_ui/4_verify/.gitkeep +0 -0
- data/qa/specs/features/ee/browser_ui/5_package/.gitkeep +0 -0
- data/qa/specs/features/ee/browser_ui/5_package/maven_repository_spec.rb +0 -102
- data/qa/specs/features/ee/browser_ui/5_package/npm_registry_spec.rb +0 -75
- data/qa/specs/features/ee/browser_ui/6_release/.gitkeep +0 -0
- data/qa/specs/features/ee/browser_ui/6_release/multi-project_pipelines_spec.rb +0 -98
- data/qa/specs/features/ee/browser_ui/6_release/pipelines_for_merged_results_and_merge_trains_spec.rb +0 -137
- data/qa/specs/features/ee/browser_ui/7_configure/.gitkeep +0 -0
- data/qa/specs/features/ee/browser_ui/8_monitor/.gitkeep +0 -0
- data/qa/specs/features/ee/browser_ui/8_monitor/apm/metrics_spec.rb +0 -68
- data/qa/specs/features/ee/browser_ui/8_monitor/health/alerting_spec.rb +0 -106
- data/qa/specs/features/ee/browser_ui/8_monitor/health/cluster_health_spec.rb +0 -52
- data/qa/specs/features/ee/browser_ui/enablement/elasticsearch/elasticsearch_reindexing_spec.rb +0 -78
- data/qa/specs/features/ee/browser_ui/geo/attachment_replication_spec.rb +0 -63
- data/qa/specs/features/ee/browser_ui/geo/database_delete_replication_spec.rb +0 -60
- data/qa/specs/features/ee/browser_ui/geo/http_push_spec.rb +0 -121
- data/qa/specs/features/ee/browser_ui/geo/http_push_to_secondary_spec.rb +0 -174
- data/qa/specs/features/ee/browser_ui/geo/rename_replication_spec.rb +0 -75
- data/qa/specs/features/ee/browser_ui/geo/ssh_push_spec.rb +0 -151
- data/qa/specs/features/ee/browser_ui/geo/ssh_push_to_secondary_spec.rb +0 -189
- data/qa/specs/features/ee/browser_ui/geo/wiki_http_push_spec.rb +0 -68
- data/qa/specs/features/ee/browser_ui/geo/wiki_http_push_to_secondary_spec.rb +0 -105
- data/qa/specs/features/ee/browser_ui/geo/wiki_ssh_push_spec.rb +0 -93
- data/qa/specs/features/ee/browser_ui/geo/wiki_ssh_push_to_secondary_spec.rb +0 -110
- data/qa/specs/features/ee/browser_ui/secure/create_merge_request_with_secure_spec.rb +0 -79
- data/qa/specs/features/ee/browser_ui/secure/license_compliance_spec.rb +0 -98
- data/qa/specs/features/ee/browser_ui/secure/merge_request_license_widget_spec.rb +0 -134
- data/qa/specs/features/ee/browser_ui/secure/security_reports_spec.rb +0 -143
- data/qa/specs/features/ee/browser_ui/secure/vulnerability_management_spec.rb +0 -101
- data/qa/specs/features/sanity/framework_spec.rb +0 -21
- data/qa/specs/helpers/quarantine.rb +0 -84
- data/qa/specs/loop_runner.rb +0 -21
- data/qa/specs/parallel_runner.rb +0 -33
- data/qa/specs/runner.rb +0 -78
- data/qa/support/dates.rb +0 -21
- data/qa/support/page/logging.rb +0 -178
- data/qa/support/retrier.rb +0 -64
- data/qa/support/wait_for_requests.rb +0 -25
- data/qa/tools/delete_subgroups.rb +0 -66
- data/qa/tools/delete_test_ssh_keys.rb +0 -61
- data/qa/tools/generate_perf_testdata.rb +0 -301
- data/qa/tools/revoke_all_personal_access_tokens.rb +0 -44
- data/qa/vendor/jenkins/page/base.rb +0 -24
- data/qa/vendor/jenkins/page/configure.rb +0 -48
- data/qa/vendor/jenkins/page/configure_job.rb +0 -72
- data/qa/vendor/jenkins/page/last_job_console.rb +0 -44
- data/qa/vendor/jenkins/page/login.rb +0 -31
- data/qa/vendor/jenkins/page/new_credentials.rb +0 -50
- data/qa/vendor/jenkins/page/new_job.rb +0 -38
- data/qa/vendor/saml_idp/page/base.rb +0 -14
- data/qa/vendor/saml_idp/page/login.rb +0 -31
@@ -1,25 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module QA
|
4
|
-
module Support
|
5
|
-
module WaitForRequests
|
6
|
-
module_function
|
7
|
-
|
8
|
-
def wait_for_requests
|
9
|
-
Waiter.wait_until(log: false) do
|
10
|
-
finished_all_ajax_requests? && finished_all_axios_requests?
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
|
-
def finished_all_axios_requests?
|
15
|
-
Capybara.page.evaluate_script('window.pendingRequests || 0').zero?
|
16
|
-
end
|
17
|
-
|
18
|
-
def finished_all_ajax_requests?
|
19
|
-
return true if Capybara.page.evaluate_script('typeof jQuery === "undefined"')
|
20
|
-
|
21
|
-
Capybara.page.evaluate_script('jQuery.active').zero?
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
@@ -1,66 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require_relative '../../qa'
|
4
|
-
|
5
|
-
# This script deletes all subgroups of a group specified by ENV['GROUP_NAME_OR_PATH']
|
6
|
-
# Required environment variables: GITLAB_QA_ACCESS_TOKEN and GITLAB_ADDRESS
|
7
|
-
# Optional environment variable: GROUP_NAME_OR_PATH (defaults to 'gitlab-qa-sandbox-group')
|
8
|
-
# Run `rake delete_subgroups`
|
9
|
-
|
10
|
-
module QA
|
11
|
-
module Tools
|
12
|
-
class DeleteSubgroups
|
13
|
-
include Support::Api
|
14
|
-
|
15
|
-
def initialize
|
16
|
-
raise ArgumentError, "Please provide GITLAB_ADDRESS" unless ENV['GITLAB_ADDRESS']
|
17
|
-
raise ArgumentError, "Please provide GITLAB_QA_ACCESS_TOKEN" unless ENV['GITLAB_QA_ACCESS_TOKEN']
|
18
|
-
|
19
|
-
@api_client = Runtime::API::Client.new(ENV['GITLAB_ADDRESS'], personal_access_token: ENV['GITLAB_QA_ACCESS_TOKEN'])
|
20
|
-
end
|
21
|
-
|
22
|
-
def run
|
23
|
-
STDOUT.puts 'Running...'
|
24
|
-
|
25
|
-
# Fetch group's id
|
26
|
-
group_id = fetch_group_id
|
27
|
-
|
28
|
-
sub_groups_head_response = head Runtime::API::Request.new(@api_client, "/groups/#{group_id}/subgroups", per_page: "100").url
|
29
|
-
total_sub_group_pages = sub_groups_head_response.headers[:x_total_pages]
|
30
|
-
|
31
|
-
sub_group_ids = fetch_subgroup_ids(group_id, total_sub_group_pages)
|
32
|
-
STDOUT.puts "Number of Sub Groups not already marked for deletion: #{sub_group_ids.length}"
|
33
|
-
|
34
|
-
delete_subgroups(sub_group_ids) unless sub_group_ids.empty?
|
35
|
-
STDOUT.puts "\nDone"
|
36
|
-
end
|
37
|
-
|
38
|
-
private
|
39
|
-
|
40
|
-
def delete_subgroups(sub_group_ids)
|
41
|
-
STDOUT.puts "Deleting #{sub_group_ids.length} subgroups..."
|
42
|
-
sub_group_ids.each do |subgroup_id|
|
43
|
-
delete_response = delete Runtime::API::Request.new(@api_client, "/groups/#{subgroup_id}").url
|
44
|
-
dot_or_f = delete_response.code == 202 ? "\e[32m.\e[0m" : "\e[31mF\e[0m"
|
45
|
-
print dot_or_f
|
46
|
-
end
|
47
|
-
end
|
48
|
-
|
49
|
-
def fetch_group_id
|
50
|
-
group_search_response = get Runtime::API::Request.new(@api_client, "/groups", search: ENV['GROUP_NAME_OR_PATH'] || 'gitlab-qa-sandbox-group').url
|
51
|
-
JSON.parse(group_search_response.body).first["id"]
|
52
|
-
end
|
53
|
-
|
54
|
-
def fetch_subgroup_ids(group_id, group_pages)
|
55
|
-
sub_groups_ids = []
|
56
|
-
|
57
|
-
group_pages.to_i.times do |page_no|
|
58
|
-
sub_groups_response = get Runtime::API::Request.new(@api_client, "/groups/#{group_id}/subgroups", page: (page_no + 1).to_s, per_page: "100").url
|
59
|
-
sub_groups_ids.concat(JSON.parse(sub_groups_response.body).reject { |subgroup| !subgroup["marked_for_deletion_on"].nil? }.map { |subgroup| subgroup["id"] })
|
60
|
-
end
|
61
|
-
|
62
|
-
sub_groups_ids.uniq
|
63
|
-
end
|
64
|
-
end
|
65
|
-
end
|
66
|
-
end
|
@@ -1,61 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require_relative '../../qa'
|
4
|
-
|
5
|
-
# This script deletes all test ssh keys (with titles including 'key for ssh tests' or 'key for audit event test') of a user specified by ENV['GITLAB_USERNAME']
|
6
|
-
# Required environment variables: GITLAB_QA_ACCESS_TOKEN, GITLAB_ADDRESS and GITLAB_USERNAME
|
7
|
-
|
8
|
-
module QA
|
9
|
-
module Tools
|
10
|
-
class DeleteTestSSHKeys
|
11
|
-
include Support::Api
|
12
|
-
|
13
|
-
def initialize
|
14
|
-
raise ArgumentError, "Please provide GITLAB_ADDRESS" unless ENV['GITLAB_ADDRESS']
|
15
|
-
raise ArgumentError, "Please provide GITLAB_QA_ACCESS_TOKEN" unless ENV['GITLAB_QA_ACCESS_TOKEN']
|
16
|
-
raise ArgumentError, "Please provide GITLAB_USERNAME" unless ENV['GITLAB_USERNAME']
|
17
|
-
|
18
|
-
@api_client = Runtime::API::Client.new(ENV['GITLAB_ADDRESS'], personal_access_token: ENV['GITLAB_QA_ACCESS_TOKEN'])
|
19
|
-
@username = ENV['GITLAB_USERNAME']
|
20
|
-
end
|
21
|
-
|
22
|
-
def run
|
23
|
-
STDOUT.puts 'Running...'
|
24
|
-
|
25
|
-
user_id = fetch_user_id
|
26
|
-
test_ssh_key_ids = fetch_test_ssh_key_ids(user_id)
|
27
|
-
STDOUT.puts "Number of test ssh keys to be deleted: #{test_ssh_key_ids.length}"
|
28
|
-
|
29
|
-
delete_ssh_keys(user_id, test_ssh_key_ids) unless test_ssh_key_ids.empty?
|
30
|
-
STDOUT.puts "\nDone"
|
31
|
-
end
|
32
|
-
|
33
|
-
private
|
34
|
-
|
35
|
-
def fetch_user_id
|
36
|
-
get_user_response = get Runtime::API::Request.new(@api_client, "/users?username=#{@username}").url
|
37
|
-
user = JSON.parse(get_user_response.body).first
|
38
|
-
raise "Unexpected user found. Expected #{@username}, found #{user['username']}" unless user['username'] == @username
|
39
|
-
|
40
|
-
user["id"]
|
41
|
-
end
|
42
|
-
|
43
|
-
def delete_ssh_keys(user_id, ssh_key_ids)
|
44
|
-
STDOUT.puts "Deleting #{ssh_key_ids.length} ssh keys..."
|
45
|
-
ssh_key_ids.each do |key_id|
|
46
|
-
delete_response = delete Runtime::API::Request.new(@api_client, "/users/#{user_id}/keys/#{key_id}").url
|
47
|
-
dot_or_f = delete_response.code == 204 ? "\e[32m.\e[0m" : "\e[31mF\e[0m"
|
48
|
-
print dot_or_f
|
49
|
-
end
|
50
|
-
end
|
51
|
-
|
52
|
-
def fetch_test_ssh_key_ids(user_id)
|
53
|
-
get_keys_response = get Runtime::API::Request.new(@api_client, "/users/#{user_id}/keys").url
|
54
|
-
JSON.parse(get_keys_response.body)
|
55
|
-
.select { |key| (key["title"].include?('key for ssh tests') || key["title"].include?('key for audit event test')) }
|
56
|
-
.map { |key| key['id'] }
|
57
|
-
.uniq
|
58
|
-
end
|
59
|
-
end
|
60
|
-
end
|
61
|
-
end
|
@@ -1,301 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'securerandom'
|
4
|
-
require 'faker'
|
5
|
-
require 'yaml'
|
6
|
-
require_relative '../../qa'
|
7
|
-
# This script generates testdata for Performance Testing.
|
8
|
-
# Required environment variables: GITLAB_QA_ACCESS_TOKEN and GITLAB_ADDRESS
|
9
|
-
# This job creates a urls.txt which contains a hash of all the URLs needed for Performance Testing
|
10
|
-
# Run `rake generate_perf_testdata`
|
11
|
-
|
12
|
-
module QA
|
13
|
-
module Tools
|
14
|
-
class GeneratePerfTestdata
|
15
|
-
include Support::Api
|
16
|
-
|
17
|
-
def initialize
|
18
|
-
raise ArgumentError, "Please provide GITLAB_ADDRESS" unless ENV['GITLAB_ADDRESS']
|
19
|
-
raise ArgumentError, "Please provide GITLAB_QA_ACCESS_TOKEN" unless ENV['GITLAB_QA_ACCESS_TOKEN']
|
20
|
-
|
21
|
-
@api_client = Runtime::API::Client.new(ENV['GITLAB_ADDRESS'], personal_access_token: ENV['GITLAB_QA_ACCESS_TOKEN'])
|
22
|
-
@group_name = ENV['GROUP_NAME'] || "gitlab-qa-perf-sandbox-#{SecureRandom.hex(8)}"
|
23
|
-
@project_name = ENV['PROJECT_NAME'] || "my-test-project-#{SecureRandom.hex(8)}"
|
24
|
-
@visibility = "public"
|
25
|
-
@urls = { host: ENV['GITLAB_ADDRESS'] }
|
26
|
-
end
|
27
|
-
|
28
|
-
def all
|
29
|
-
STDOUT.puts 'Running...'
|
30
|
-
group_id = create_group
|
31
|
-
create_project(group_id)
|
32
|
-
|
33
|
-
create_many_branches
|
34
|
-
create_many_new_files
|
35
|
-
create_mr_with_many_commits
|
36
|
-
create_many_issues
|
37
|
-
|
38
|
-
methods_arr = [
|
39
|
-
method(:create_many_labels),
|
40
|
-
method(:create_many_todos),
|
41
|
-
method(:create_many_merge_requests),
|
42
|
-
method(:create_an_issue_with_many_discussions),
|
43
|
-
method(:create_an_mr_with_large_files_and_many_mr_discussions)
|
44
|
-
]
|
45
|
-
|
46
|
-
threads_arr = []
|
47
|
-
|
48
|
-
methods_arr.each do |m|
|
49
|
-
threads_arr << Thread.new { m.call }
|
50
|
-
end
|
51
|
-
|
52
|
-
threads_arr.each(&:join)
|
53
|
-
STDOUT.puts "\nURLs: #{@urls}"
|
54
|
-
File.open("urls.yml", "w") { |file| file.puts @urls.stringify_keys.to_yaml }
|
55
|
-
STDOUT.puts "\nDone"
|
56
|
-
end
|
57
|
-
|
58
|
-
def create_group
|
59
|
-
group_search_response = create_a_group_api_req(@group_name, @visibility)
|
60
|
-
group = JSON.parse(group_search_response.body)
|
61
|
-
@urls[:group_page] = group["web_url"]
|
62
|
-
STDOUT.puts "Created a group: #{@urls[:group_page]}"
|
63
|
-
group["id"]
|
64
|
-
end
|
65
|
-
|
66
|
-
def create_project(group_id)
|
67
|
-
create_project_response = create_a_project_api_req(@project_name, group_id, @visibility)
|
68
|
-
@urls[:project_page] = JSON.parse(create_project_response.body)["web_url"]
|
69
|
-
STDOUT.puts "Created a project: #{@urls[:project_page]}"
|
70
|
-
end
|
71
|
-
|
72
|
-
def create_many_issues
|
73
|
-
30.times do |i|
|
74
|
-
create_an_issue_api_req("#{@group_name}%2F#{@project_name}", "issue#{i}", "desc#{i}")
|
75
|
-
end
|
76
|
-
@urls[:issues_list_page] = @urls[:project_page] + "/issues"
|
77
|
-
STDOUT.puts "Created many issues: #{@urls[:issues_list_page]}"
|
78
|
-
end
|
79
|
-
|
80
|
-
def create_many_todos
|
81
|
-
30.times do |i|
|
82
|
-
create_a_todo_api_req("#{@group_name}%2F#{@project_name}", "#{i + 1}")
|
83
|
-
end
|
84
|
-
@urls[:todos_page] = ENV['GITLAB_ADDRESS'] + "/dashboard/todos"
|
85
|
-
STDOUT.puts "Created many todos: #{@urls[:todos_page]}"
|
86
|
-
end
|
87
|
-
|
88
|
-
def create_many_labels
|
89
|
-
30.times do |i|
|
90
|
-
create_a_label_api_req("#{@group_name}%2F#{@project_name}", "label#{i}", "#{Faker::Color.hex_color}")
|
91
|
-
end
|
92
|
-
@urls[:labels_page] = @urls[:project_page] + "/labels"
|
93
|
-
STDOUT.puts "Created many labels: #{@urls[:labels_page]}"
|
94
|
-
end
|
95
|
-
|
96
|
-
def create_many_merge_requests
|
97
|
-
30.times do |i|
|
98
|
-
create_a_merge_request_api_req("#{@group_name}%2F#{@project_name}", "branch#{i}", "master", "MR#{i}")
|
99
|
-
end
|
100
|
-
@urls[:mr_list_page] = @urls[:project_page] + "/merge_requests"
|
101
|
-
STDOUT.puts "Created many MRs: #{@urls[:mr_list_page]}"
|
102
|
-
end
|
103
|
-
|
104
|
-
def create_many_new_files
|
105
|
-
create_a_new_file_api_req("hello.txt", "master", "#{@group_name}%2F#{@project_name}", "hello", "my new content")
|
106
|
-
30.times do |i|
|
107
|
-
create_a_new_file_api_req("hello#{i}.txt", "master", "#{@group_name}%2F#{@project_name}", "hello", "my new content")
|
108
|
-
create_a_new_file_api_req("hello#{i}.txt", "branch#{i}", "#{@group_name}%2F#{@project_name}", "hello", "my new content")
|
109
|
-
end
|
110
|
-
|
111
|
-
@urls[:files_page] = @urls[:project_page] + "/tree/master"
|
112
|
-
STDOUT.puts "Added many new files: #{@urls[:files_page]}"
|
113
|
-
end
|
114
|
-
|
115
|
-
def create_many_branches
|
116
|
-
30.times do |i|
|
117
|
-
create_a_branch_api_req("branch#{i}", "#{@group_name}%2F#{@project_name}")
|
118
|
-
end
|
119
|
-
@urls[:branches_page] = @urls[:project_page] + "/-/branches"
|
120
|
-
STDOUT.puts "Created many branches: #{@urls[:branches_page]}"
|
121
|
-
end
|
122
|
-
|
123
|
-
def create_an_issue_with_many_discussions
|
124
|
-
issue_id = 1
|
125
|
-
500.times do
|
126
|
-
create_a_discussion_on_issue_api_req("#{@group_name}%2F#{@project_name}", issue_id, "Let us discuss")
|
127
|
-
end
|
128
|
-
|
129
|
-
labels_list = (0..15).map { |i| "label#{i}" }.join(',')
|
130
|
-
# Add description and labels
|
131
|
-
update_an_issue_api_req("#{@group_name}%2F#{@project_name}", issue_id, "#{Faker::Lorem.sentences(500).join(" ")}", labels_list)
|
132
|
-
@urls[:large_issue] = @urls[:project_page] + "/issues/#{issue_id}"
|
133
|
-
STDOUT.puts "Created an issue with many discussions: #{@urls[:large_issue]}"
|
134
|
-
end
|
135
|
-
|
136
|
-
def create_an_mr_with_large_files_and_many_mr_discussions
|
137
|
-
content_arr = []
|
138
|
-
16.times do |i|
|
139
|
-
faker_line_arr = Faker::Lorem.sentences(1500)
|
140
|
-
content = faker_line_arr.join("\n\r")
|
141
|
-
create_a_new_file_api_req("hello#{i + 100}.txt", "master", "#{@group_name}%2F#{@project_name}", "Add hello#{i + 100}.txt", content)
|
142
|
-
content_arr[i] = faker_line_arr
|
143
|
-
end
|
144
|
-
|
145
|
-
create_a_branch_api_req("performance", "#{@group_name}%2F#{@project_name}")
|
146
|
-
|
147
|
-
16.times do |i|
|
148
|
-
missed_line_array = content_arr[i].each_slice(2).map(&:first)
|
149
|
-
content = missed_line_array.join("\n\rIm new!:D \n\r ")
|
150
|
-
|
151
|
-
update_file_api_req("hello#{i + 100}.txt", "performance", "#{@group_name}%2F#{@project_name}", "Update hello#{i + 100}.txt", content)
|
152
|
-
end
|
153
|
-
|
154
|
-
create_mr_response = create_a_merge_request_api_req("#{@group_name}%2F#{@project_name}", "performance", "master", "Large_MR")
|
155
|
-
|
156
|
-
iid = JSON.parse(create_mr_response.body)["iid"]
|
157
|
-
diff_refs = JSON.parse(create_mr_response.body)["diff_refs"]
|
158
|
-
|
159
|
-
# Add discussions to diff tab and resolve a few!
|
160
|
-
should_resolve = false
|
161
|
-
16.times do |i|
|
162
|
-
1.upto(9) do |j|
|
163
|
-
create_diff_note(iid, i, j, diff_refs["head_sha"], diff_refs["start_sha"], diff_refs["base_sha"], "new_line")
|
164
|
-
create_diff_note_response = create_diff_note(iid, i, j, diff_refs["head_sha"], diff_refs["start_sha"], diff_refs["base_sha"], "old_line")
|
165
|
-
|
166
|
-
if should_resolve
|
167
|
-
discussion_id = JSON.parse(create_diff_note_response.body)["id"]
|
168
|
-
|
169
|
-
update_a_discussion_on_issue_api_req("#{@group_name}%2F#{@project_name}", iid, discussion_id, "true")
|
170
|
-
end
|
171
|
-
|
172
|
-
should_resolve ^= true
|
173
|
-
end
|
174
|
-
end
|
175
|
-
|
176
|
-
# Add discussions to main tab
|
177
|
-
100.times do
|
178
|
-
create_a_discussion_on_mr_api_req("#{@group_name}%2F#{@project_name}", iid, "Let us discuss")
|
179
|
-
end
|
180
|
-
@urls[:large_mr] = JSON.parse(create_mr_response.body)["web_url"]
|
181
|
-
STDOUT.puts "Created an MR with many discussions and many very large Files: #{@urls[:large_mr]}"
|
182
|
-
end
|
183
|
-
|
184
|
-
def create_diff_note(iid, file_count, line_count, head_sha, start_sha, base_sha, line_type)
|
185
|
-
post Runtime::API::Request.new(@api_client, "/projects/#{@group_name}%2F#{@project_name}/merge_requests/#{iid}/discussions").url,
|
186
|
-
"" "body=\"Let us discuss\"&
|
187
|
-
position[position_type]=text&
|
188
|
-
position[new_path]=hello#{file_count}.txt&
|
189
|
-
position[old_path]=hello#{file_count}.txt&
|
190
|
-
position[#{line_type}]=#{line_count * 100}&
|
191
|
-
position[head_sha]=#{head_sha}&
|
192
|
-
position[start_sha]=#{start_sha}&
|
193
|
-
position[base_sha]=#{base_sha}" ""
|
194
|
-
end
|
195
|
-
|
196
|
-
def create_mr_with_many_commits
|
197
|
-
project_path = "#{@group_name}%2F#{@project_name}"
|
198
|
-
branch_name = "branch_with_many_commits-#{SecureRandom.hex(8)}"
|
199
|
-
file_name = "file_for_many_commits.txt"
|
200
|
-
|
201
|
-
create_a_branch_api_req(branch_name, project_path)
|
202
|
-
create_a_new_file_api_req(file_name, branch_name, project_path, "Initial commit for new file", "Initial file content")
|
203
|
-
create_mr_response = create_a_merge_request_api_req(project_path, branch_name, "master", "MR with many commits-#{SecureRandom.hex(8)}")
|
204
|
-
@urls[:mr_with_many_commits] = JSON.parse(create_mr_response.body)["web_url"]
|
205
|
-
100.times do |i|
|
206
|
-
update_file_api_req(file_name, branch_name, project_path, Faker::Lorem.sentences(5).join(" "), Faker::Lorem.sentences(500).join("\n"))
|
207
|
-
end
|
208
|
-
STDOUT.puts "Using branch: #{branch_name}, created an MR with many commits: #{@urls[:mr_with_many_commits]}"
|
209
|
-
end
|
210
|
-
|
211
|
-
private
|
212
|
-
|
213
|
-
# API Requests
|
214
|
-
|
215
|
-
def create_a_discussion_on_issue_api_req(project_path_or_id, issue_id, body)
|
216
|
-
call_api(expected_response_code: 201) do
|
217
|
-
post Runtime::API::Request.new(@api_client, "/projects/#{project_path_or_id}/issues/#{issue_id}/discussions").url, "body=\"#{body}\""
|
218
|
-
end
|
219
|
-
end
|
220
|
-
|
221
|
-
def update_a_discussion_on_issue_api_req(project_path_or_id, mr_iid, discussion_id, resolved_status)
|
222
|
-
call_api(expected_response_code: 200) do
|
223
|
-
put Runtime::API::Request.new(@api_client, "/projects/#{project_path_or_id}/merge_requests/#{mr_iid}/discussions/#{discussion_id}").url, "resolved=#{resolved_status}"
|
224
|
-
end
|
225
|
-
end
|
226
|
-
|
227
|
-
def create_a_discussion_on_mr_api_req(project_path_or_id, mr_iid, body)
|
228
|
-
call_api(expected_response_code: 201) do
|
229
|
-
post Runtime::API::Request.new(@api_client, "/projects/#{project_path_or_id}/merge_requests/#{mr_iid}/discussions").url, "body=\"#{body}\""
|
230
|
-
end
|
231
|
-
end
|
232
|
-
|
233
|
-
def create_a_label_api_req(project_path_or_id, name, color)
|
234
|
-
call_api(expected_response_code: 201) do
|
235
|
-
post Runtime::API::Request.new(@api_client, "/projects/#{project_path_or_id}/labels").url, "name=#{name}&color=#{color}"
|
236
|
-
end
|
237
|
-
end
|
238
|
-
|
239
|
-
def create_a_todo_api_req(project_path_or_id, issue_id)
|
240
|
-
call_api(expected_response_code: 201) do
|
241
|
-
post Runtime::API::Request.new(@api_client, "/projects/#{project_path_or_id}/issues/#{issue_id}/todo").url, nil
|
242
|
-
end
|
243
|
-
end
|
244
|
-
|
245
|
-
def create_an_issue_api_req(project_path_or_id, title, description)
|
246
|
-
call_api(expected_response_code: 201) do
|
247
|
-
post Runtime::API::Request.new(@api_client, "/projects/#{project_path_or_id}/issues").url, "title=#{title}&description=#{description}"
|
248
|
-
end
|
249
|
-
end
|
250
|
-
|
251
|
-
def update_an_issue_api_req(project_path_or_id, issue_id, description, labels_list)
|
252
|
-
call_api(expected_response_code: 200) do
|
253
|
-
put Runtime::API::Request.new(@api_client, "/projects/#{project_path_or_id}/issues/#{issue_id}").url, "description=#{description}&labels=#{labels_list}"
|
254
|
-
end
|
255
|
-
end
|
256
|
-
|
257
|
-
def create_a_project_api_req(project_name, group_id, visibility)
|
258
|
-
call_api(expected_response_code: 201) do
|
259
|
-
post Runtime::API::Request.new(@api_client, "/projects").url, "name=#{project_name}&namespace_id=#{group_id}&visibility=#{visibility}"
|
260
|
-
end
|
261
|
-
end
|
262
|
-
|
263
|
-
def create_a_group_api_req(group_name, visibility)
|
264
|
-
call_api(expected_response_code: 201) do
|
265
|
-
post Runtime::API::Request.new(@api_client, "/groups").url, "name=#{group_name}&path=#{group_name}&visibility=#{visibility}"
|
266
|
-
end
|
267
|
-
end
|
268
|
-
|
269
|
-
def create_a_branch_api_req(branch_name, project_path_or_id)
|
270
|
-
call_api(expected_response_code: 201) do
|
271
|
-
post Runtime::API::Request.new(@api_client, "/projects/#{project_path_or_id}/repository/branches").url, "branch=#{branch_name}&ref=master"
|
272
|
-
end
|
273
|
-
end
|
274
|
-
|
275
|
-
def create_a_new_file_api_req(file_path, branch_name, project_path_or_id, commit_message, content)
|
276
|
-
call_api(expected_response_code: 201) do
|
277
|
-
post Runtime::API::Request.new(@api_client, "/projects/#{project_path_or_id}/repository/files/#{file_path}").url, "branch=#{branch_name}&commit_message=\"#{commit_message}\"&content=\"#{content}\""
|
278
|
-
end
|
279
|
-
end
|
280
|
-
|
281
|
-
def create_a_merge_request_api_req(project_path_or_id, source_branch, target_branch, mr_title)
|
282
|
-
call_api(expected_response_code: 201) do
|
283
|
-
post Runtime::API::Request.new(@api_client, "/projects/#{project_path_or_id}/merge_requests").url, "source_branch=#{source_branch}&target_branch=#{target_branch}&title=#{mr_title}"
|
284
|
-
end
|
285
|
-
end
|
286
|
-
|
287
|
-
def update_file_api_req(file_path, branch_name, project_path_or_id, commit_message, content)
|
288
|
-
call_api(expected_response_code: 200) do
|
289
|
-
put Runtime::API::Request.new(@api_client, "/projects/#{project_path_or_id}/repository/files/#{file_path}").url, "branch=#{branch_name}&commit_message=\"#{commit_message}\"&content=\"#{content}\""
|
290
|
-
end
|
291
|
-
end
|
292
|
-
|
293
|
-
def call_api(expected_response_code: 200)
|
294
|
-
response = yield
|
295
|
-
raise "API call failed with response code: #{response.code} and body: #{response.body}" unless response.code == expected_response_code
|
296
|
-
|
297
|
-
response
|
298
|
-
end
|
299
|
-
end
|
300
|
-
end
|
301
|
-
end
|