From 395e5968227108a9510a251e3fb8b786387c9f13 Mon Sep 17 00:00:00 2001 From: Varac Date: Wed, 14 Jun 2017 14:21:57 +0200 Subject: Remove pixelated from unstable --- .../puppet/modules/pixelated/.fixtures-latest.yml | 11 - .../modules/pixelated/.fixtures-leap-pinned.yml | 14 - files/puppet/modules/pixelated/.fixtures.yml | 8 - files/puppet/modules/pixelated/.gitignore | 15 - files/puppet/modules/pixelated/.gitrepo | 11 - files/puppet/modules/pixelated/.rspec | 2 - files/puppet/modules/pixelated/Gemfile | 13 - files/puppet/modules/pixelated/Gemfile.lock | 99 --- files/puppet/modules/pixelated/LICENSE | 661 --------------------- files/puppet/modules/pixelated/README.md | 121 ---- files/puppet/modules/pixelated/Rakefile | 21 - files/puppet/modules/pixelated/circle.yml | 21 - ...1542472DC0E3_packages@pixelated-project.org.asc | 28 - .../files/Debian/51unattended-upgrades_pixelated | 7 - .../files/check_mk/check_pixelated_user_agent.sh | 11 - .../pixelated/files/check_mk/user-agent.cfg | 60 -- .../pixelated/files/functional-tests/__init__.py | 18 - .../files/functional-tests/account.feature | 47 -- .../checkboxes_and_mailboxes.feature | 33 - .../compose_save_draft_and_send.feature | 32 - .../files/functional-tests/environment.py | 87 --- .../functional-tests/forward_trash_archive.feature | 35 -- .../login_and_send_an_email.feature | 32 - .../functional-tests/page_objects/__init__.py | 29 - .../page_objects/base_page_object.py | 87 --- .../functional-tests/page_objects/compose_box.py | 78 --- .../page_objects/leap_login_page.py | 39 -- .../functional-tests/page_objects/login_page.py | 61 -- .../functional-tests/page_objects/mail_list.py | 65 -- .../functional-tests/page_objects/mail_page.py | 83 --- .../page_objects/maillist_actions.py | 51 -- .../functional-tests/page_objects/notification.py | 35 -- .../page_objects/pixelated_page.py | 56 -- .../functional-tests/page_objects/tag_list.py | 66 -- .../page_objects/user_agent_pages.py | 72 --- .../functional-tests/search_and_destroy.feature | 32 - .../files/functional-tests/send_mail.feature | 47 -- .../files/functional-tests/steps/__init__.py | 89 --- .../files/functional-tests/steps/account.py | 86 --- .../files/functional-tests/steps/common.py | 79 --- .../files/functional-tests/steps/compose.py | 41 -- .../files/functional-tests/steps/delete_mail.py | 38 -- .../files/functional-tests/steps/login.py | 26 - .../files/functional-tests/steps/mail_list.py | 145 ----- .../files/functional-tests/steps/mail_view.py | 98 --- .../files/functional-tests/steps/search.py | 35 -- .../functional-tests/steps/send_email_to_self.py | 28 - .../files/functional-tests/steps/send_mail.py | 122 ---- .../files/functional-tests/steps/tag_list.py | 50 -- .../files/functional-tests/tag_and_reply.feature | 34 -- .../files/functional-tests/test_requirements.txt | 4 - files/puppet/modules/pixelated/files/leap_test.rb | 18 - files/puppet/modules/pixelated/files/phantomjs | Bin 67932064 -> 0 bytes .../modules/pixelated/files/syslog/pixelated | 9 - .../modules/pixelated/files/webapp/locales/en.yml | 2 - .../webapp/views/common/_download_button.html.haml | 0 files/puppet/modules/pixelated/manifests/agent.pp | 82 --- .../modules/pixelated/manifests/apt/preferences.pp | 28 - .../puppet/modules/pixelated/manifests/check_mk.pp | 10 - files/puppet/modules/pixelated/manifests/init.pp | 5 - .../puppet/modules/pixelated/manifests/install.pp | 48 -- files/puppet/modules/pixelated/manifests/remove.pp | 9 - files/puppet/modules/pixelated/manifests/syslog.pp | 18 - files/puppet/modules/pixelated/manifests/tests.pp | 72 --- .../pixelated/manifests/unattended_upgrades.pp | 10 - ...ate_data_from_dispatcher_to_multi_user_agent.sh | 36 -- .../modules/pixelated/spec/classes/agent_spec.rb | 48 -- .../pixelated/spec/classes/apt_preferences_spec.rb | 26 - .../pixelated/spec/classes/pixelated_spec.rb | 30 - .../modules/pixelated/spec/classes/remove_spec.rb | 6 - .../modules/pixelated/spec/classes/syslog_spec.rb | 24 - .../modules/pixelated/spec/classes/tests_spec.rb | 47 -- .../pixelated/spec/fixtures/hiera/hiera.yaml | 7 - .../pixelated/spec/fixtures/hiera/multi_node.yaml | 9 - .../pixelated/spec/fixtures/hiera/single_node.yaml | 11 - .../pixelated/spec/fixtures/hiera/with_nagios.yaml | 9 - files/puppet/modules/pixelated/spec/spec_helper.rb | 12 - .../pixelated/templates/05-pixelated.conf.erb | 7 - .../pixelated/templates/pixelated-apache.conf.erb | 60 -- .../pixelated/templates/pixelated-server-default | 9 - .../pixelated/templates/webapp/show.html.haml.erb | 6 - files/puppet/modules/pixelated/vagrant_platform.sh | 20 - hiera/aardwolf.yaml | 1 + hiera/cat.yaml | 1 + hiera/donkey.yaml | 2 - hiera/tuatara.yaml | 1 + nodes/donkey.json | 3 +- 87 files changed, 4 insertions(+), 3745 deletions(-) delete mode 100644 files/puppet/modules/pixelated/.fixtures-latest.yml delete mode 100644 files/puppet/modules/pixelated/.fixtures-leap-pinned.yml delete mode 100644 files/puppet/modules/pixelated/.fixtures.yml delete mode 100644 files/puppet/modules/pixelated/.gitignore delete mode 100644 files/puppet/modules/pixelated/.gitrepo delete mode 100644 files/puppet/modules/pixelated/.rspec delete mode 100644 files/puppet/modules/pixelated/Gemfile delete mode 100644 files/puppet/modules/pixelated/Gemfile.lock delete mode 100644 files/puppet/modules/pixelated/LICENSE delete mode 100644 files/puppet/modules/pixelated/README.md delete mode 100644 files/puppet/modules/pixelated/Rakefile delete mode 100644 files/puppet/modules/pixelated/circle.yml delete mode 100644 files/puppet/modules/pixelated/files/0x287A1542472DC0E3_packages@pixelated-project.org.asc delete mode 100644 files/puppet/modules/pixelated/files/Debian/51unattended-upgrades_pixelated delete mode 100644 files/puppet/modules/pixelated/files/check_mk/check_pixelated_user_agent.sh delete mode 100644 files/puppet/modules/pixelated/files/check_mk/user-agent.cfg delete mode 100644 files/puppet/modules/pixelated/files/functional-tests/__init__.py delete mode 100644 files/puppet/modules/pixelated/files/functional-tests/account.feature delete mode 100644 files/puppet/modules/pixelated/files/functional-tests/checkboxes_and_mailboxes.feature delete mode 100644 files/puppet/modules/pixelated/files/functional-tests/compose_save_draft_and_send.feature delete mode 100644 files/puppet/modules/pixelated/files/functional-tests/environment.py delete mode 100644 files/puppet/modules/pixelated/files/functional-tests/forward_trash_archive.feature delete mode 100644 files/puppet/modules/pixelated/files/functional-tests/login_and_send_an_email.feature delete mode 100644 files/puppet/modules/pixelated/files/functional-tests/page_objects/__init__.py delete mode 100644 files/puppet/modules/pixelated/files/functional-tests/page_objects/base_page_object.py delete mode 100644 files/puppet/modules/pixelated/files/functional-tests/page_objects/compose_box.py delete mode 100644 files/puppet/modules/pixelated/files/functional-tests/page_objects/leap_login_page.py delete mode 100644 files/puppet/modules/pixelated/files/functional-tests/page_objects/login_page.py delete mode 100644 files/puppet/modules/pixelated/files/functional-tests/page_objects/mail_list.py delete mode 100644 files/puppet/modules/pixelated/files/functional-tests/page_objects/mail_page.py delete mode 100644 files/puppet/modules/pixelated/files/functional-tests/page_objects/maillist_actions.py delete mode 100644 files/puppet/modules/pixelated/files/functional-tests/page_objects/notification.py delete mode 100644 files/puppet/modules/pixelated/files/functional-tests/page_objects/pixelated_page.py delete mode 100644 files/puppet/modules/pixelated/files/functional-tests/page_objects/tag_list.py delete mode 100644 files/puppet/modules/pixelated/files/functional-tests/page_objects/user_agent_pages.py delete mode 100644 files/puppet/modules/pixelated/files/functional-tests/search_and_destroy.feature delete mode 100644 files/puppet/modules/pixelated/files/functional-tests/send_mail.feature delete mode 100644 files/puppet/modules/pixelated/files/functional-tests/steps/__init__.py delete mode 100644 files/puppet/modules/pixelated/files/functional-tests/steps/account.py delete mode 100644 files/puppet/modules/pixelated/files/functional-tests/steps/common.py delete mode 100644 files/puppet/modules/pixelated/files/functional-tests/steps/compose.py delete mode 100644 files/puppet/modules/pixelated/files/functional-tests/steps/delete_mail.py delete mode 100644 files/puppet/modules/pixelated/files/functional-tests/steps/login.py delete mode 100644 files/puppet/modules/pixelated/files/functional-tests/steps/mail_list.py delete mode 100644 files/puppet/modules/pixelated/files/functional-tests/steps/mail_view.py delete mode 100644 files/puppet/modules/pixelated/files/functional-tests/steps/search.py delete mode 100644 files/puppet/modules/pixelated/files/functional-tests/steps/send_email_to_self.py delete mode 100644 files/puppet/modules/pixelated/files/functional-tests/steps/send_mail.py delete mode 100644 files/puppet/modules/pixelated/files/functional-tests/steps/tag_list.py delete mode 100644 files/puppet/modules/pixelated/files/functional-tests/tag_and_reply.feature delete mode 100644 files/puppet/modules/pixelated/files/functional-tests/test_requirements.txt delete mode 100644 files/puppet/modules/pixelated/files/leap_test.rb delete mode 100755 files/puppet/modules/pixelated/files/phantomjs delete mode 100644 files/puppet/modules/pixelated/files/syslog/pixelated delete mode 100644 files/puppet/modules/pixelated/files/webapp/locales/en.yml delete mode 100644 files/puppet/modules/pixelated/files/webapp/views/common/_download_button.html.haml delete mode 100644 files/puppet/modules/pixelated/manifests/agent.pp delete mode 100644 files/puppet/modules/pixelated/manifests/apt/preferences.pp delete mode 100644 files/puppet/modules/pixelated/manifests/check_mk.pp delete mode 100644 files/puppet/modules/pixelated/manifests/init.pp delete mode 100644 files/puppet/modules/pixelated/manifests/install.pp delete mode 100644 files/puppet/modules/pixelated/manifests/remove.pp delete mode 100644 files/puppet/modules/pixelated/manifests/syslog.pp delete mode 100644 files/puppet/modules/pixelated/manifests/tests.pp delete mode 100644 files/puppet/modules/pixelated/manifests/unattended_upgrades.pp delete mode 100755 files/puppet/modules/pixelated/migrate_data_from_dispatcher_to_multi_user_agent.sh delete mode 100644 files/puppet/modules/pixelated/spec/classes/agent_spec.rb delete mode 100644 files/puppet/modules/pixelated/spec/classes/apt_preferences_spec.rb delete mode 100644 files/puppet/modules/pixelated/spec/classes/pixelated_spec.rb delete mode 100644 files/puppet/modules/pixelated/spec/classes/remove_spec.rb delete mode 100644 files/puppet/modules/pixelated/spec/classes/syslog_spec.rb delete mode 100644 files/puppet/modules/pixelated/spec/classes/tests_spec.rb delete mode 100644 files/puppet/modules/pixelated/spec/fixtures/hiera/hiera.yaml delete mode 100644 files/puppet/modules/pixelated/spec/fixtures/hiera/multi_node.yaml delete mode 100644 files/puppet/modules/pixelated/spec/fixtures/hiera/single_node.yaml delete mode 100644 files/puppet/modules/pixelated/spec/fixtures/hiera/with_nagios.yaml delete mode 100644 files/puppet/modules/pixelated/spec/spec_helper.rb delete mode 100644 files/puppet/modules/pixelated/templates/05-pixelated.conf.erb delete mode 100644 files/puppet/modules/pixelated/templates/pixelated-apache.conf.erb delete mode 100644 files/puppet/modules/pixelated/templates/pixelated-server-default delete mode 100644 files/puppet/modules/pixelated/templates/webapp/show.html.haml.erb delete mode 100755 files/puppet/modules/pixelated/vagrant_platform.sh diff --git a/files/puppet/modules/pixelated/.fixtures-latest.yml b/files/puppet/modules/pixelated/.fixtures-latest.yml deleted file mode 100644 index acee2b6..0000000 --- a/files/puppet/modules/pixelated/.fixtures-latest.yml +++ /dev/null @@ -1,11 +0,0 @@ -fixtures: - symlinks: - pixelated: "#{source_dir}" - repositories: - lsb: "https://leap.se/git/puppet_lsb" - common: "https://leap.se/git/puppet_common" - rsyslog: "https://leap.se/git/puppet_rsyslog" - concat: "https://leap.se/git/puppet_concat" - apache: "https://leap.se/git/puppet_apache" - stdlib: " https://leap.se/git/puppet_stdlib" - templatewlv: "https://github.com/duritong/puppet-templatewlv" diff --git a/files/puppet/modules/pixelated/.fixtures-leap-pinned.yml b/files/puppet/modules/pixelated/.fixtures-leap-pinned.yml deleted file mode 100644 index acad52f..0000000 --- a/files/puppet/modules/pixelated/.fixtures-leap-pinned.yml +++ /dev/null @@ -1,14 +0,0 @@ -fixtures: - symlinks: - pixelated: "#{source_dir}" - lsb: "#{source_dir}/spec/fixtures/modules/leap_platform/puppet/modules/lsb" - common: "#{source_dir}/spec/fixtures/modules/leap_platform/puppet/modules/common" - rsyslog: "#{source_dir}/spec/fixtures/modules/leap_platform/puppet/modules/rsyslog" - concat: "#{source_dir}/spec/fixtures/modules/leap_platform/puppet/modules/concat" - apache: "#{source_dir}/spec/fixtures/modules/leap_platform/puppet/modules/apache" - templatewlv: "#{source_dir}/spec/fixtures/modules/leap_platform/puppet/modules/templatewlv" - repositories: - leap_platform: - repo: "https://0xacab.org/pixelated/platform.git" - flags: "--recursive" - diff --git a/files/puppet/modules/pixelated/.fixtures.yml b/files/puppet/modules/pixelated/.fixtures.yml deleted file mode 100644 index cd5881c..0000000 --- a/files/puppet/modules/pixelated/.fixtures.yml +++ /dev/null @@ -1,8 +0,0 @@ -fixtures: - symlinks: - pixelated: "#{source_dir}" - repositories: - lsb: "https://leap.se/git/puppet_lsb" - common: "https://leap.se/git/puppet_common" - rsyslog: "https://leap.se/git/puppet_rsyslog" - concat: "https://leap.se/git/puppet_concat" diff --git a/files/puppet/modules/pixelated/.gitignore b/files/puppet/modules/pixelated/.gitignore deleted file mode 100644 index a60a8bc..0000000 --- a/files/puppet/modules/pixelated/.gitignore +++ /dev/null @@ -1,15 +0,0 @@ -# ignore rake spec module checkouts -**/spec/fixtures/modules/ -**/spec/fixtures/manifests/ -# deployed by vagrant_platform.sh -/leap_platform -# ignore files created by functional test -files/functional-tests/*.log -files/functional-tests/*.html -*.pyc -# ignore bundles -.bundle/ -vendor/ -# ignore rbenv files -.ruby-version -.rbenv-gemsets diff --git a/files/puppet/modules/pixelated/.gitrepo b/files/puppet/modules/pixelated/.gitrepo deleted file mode 100644 index 4e8dd8b..0000000 --- a/files/puppet/modules/pixelated/.gitrepo +++ /dev/null @@ -1,11 +0,0 @@ -; DO NOT EDIT (unless you know what you are doing) -; -; This subdirectory is a git "subrepo", and this file is maintained by the -; git-subrepo command. See https://github.com/git-commands/git-subrepo#readme -; -[subrepo] - remote = https://github.com/pixelated/puppet-pixelated.git - branch = master - commit = ec289deff5c4c466560699bc261481fe68cab605 - parent = 5dd10513e7273926f466a47faecb37e6edc10ef5 - cmdver = 0.3.1 diff --git a/files/puppet/modules/pixelated/.rspec b/files/puppet/modules/pixelated/.rspec deleted file mode 100644 index 16f9cdb..0000000 --- a/files/puppet/modules/pixelated/.rspec +++ /dev/null @@ -1,2 +0,0 @@ ---color ---format documentation diff --git a/files/puppet/modules/pixelated/Gemfile b/files/puppet/modules/pixelated/Gemfile deleted file mode 100644 index 6c1defa..0000000 --- a/files/puppet/modules/pixelated/Gemfile +++ /dev/null @@ -1,13 +0,0 @@ -source "https://rubygems.org" - -group :test do - gem "safe_yaml" - gem "rake",'< 11' - gem "puppet", ENV['PUPPET_VERSION'] || '~> 3.8.0' - gem "rspec", '< 3.2.0' - gem "rspec-puppet" - gem "puppetlabs_spec_helper" - gem "metadata-json-lint" - gem "rspec-puppet-facts" - gem "rspec-puppet-utils" -end diff --git a/files/puppet/modules/pixelated/Gemfile.lock b/files/puppet/modules/pixelated/Gemfile.lock deleted file mode 100644 index b49c145..0000000 --- a/files/puppet/modules/pixelated/Gemfile.lock +++ /dev/null @@ -1,99 +0,0 @@ -GEM - remote: https://rubygems.org/ - specs: - CFPropertyList (2.2.8) - diff-lcs (1.3) - facter (2.4.6) - CFPropertyList (~> 2.2.6) - facterdb (0.3.9) - facter - jgrep - fast_gettext (1.1.0) - gettext (3.2.2) - locale (>= 2.0.5) - text (>= 1.3.0) - gettext-setup (0.13) - fast_gettext (~> 1.1.0) - gettext (>= 3.0.2) - locale - hiera (1.3.4) - json_pure - jgrep (1.4.1) - json - json (2.0.3) - json_pure (2.0.3) - locale (2.1.2) - mcollective-client (2.9.1) - json - stomp - systemu - metaclass (0.0.4) - metadata-json-lint (1.0.0) - json - semantic_puppet (>= 0.1.2, < 2.0.0) - spdx-licenses (~> 1.0) - mocha (1.2.1) - metaclass (~> 0.0.1) - puppet (3.8.7) - facter (> 1.6, < 3) - hiera (~> 1.0) - json_pure - puppet-lint (2.1.1) - puppet-syntax (2.3.0) - rake - puppetlabs_spec_helper (2.0.1) - mocha (~> 1.0) - puppet-lint (~> 2.0) - puppet-syntax (~> 2.0) - rspec-puppet (~> 2.0) - rake (10.5.0) - rspec (3.1.0) - rspec-core (~> 3.1.0) - rspec-expectations (~> 3.1.0) - rspec-mocks (~> 3.1.0) - rspec-core (3.1.7) - rspec-support (~> 3.1.0) - rspec-expectations (3.1.2) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.1.0) - rspec-mocks (3.1.3) - rspec-support (~> 3.1.0) - rspec-puppet (2.5.0) - rspec - rspec-puppet-facts (1.7.1) - facter - facterdb (>= 0.3.0) - json - mcollective-client - puppet - rspec-puppet-utils (3.1.0) - mocha - puppet (>= 3) - puppetlabs_spec_helper - rspec - rspec-puppet - rspec-support (3.1.2) - safe_yaml (1.0.4) - semantic_puppet (0.1.4) - gettext-setup (>= 0.3) - spdx-licenses (1.1.0) - stomp (1.4.3) - systemu (2.6.5) - text (1.3.1) - -PLATFORMS - ruby - -DEPENDENCIES - metadata-json-lint - puppet (~> 3.8.0) - puppetlabs_spec_helper - rake (< 11) - rspec (< 3.2.0) - rspec-puppet - rspec-puppet-facts - rspec-puppet-utils - safe_yaml - -BUNDLED WITH - 1.13.7 diff --git a/files/puppet/modules/pixelated/LICENSE b/files/puppet/modules/pixelated/LICENSE deleted file mode 100644 index dba13ed..0000000 --- a/files/puppet/modules/pixelated/LICENSE +++ /dev/null @@ -1,661 +0,0 @@ - GNU AFFERO GENERAL PUBLIC LICENSE - Version 3, 19 November 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU Affero General Public License is a free, copyleft license for -software and other kinds of works, specifically designed to ensure -cooperation with the community in the case of network server software. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -our General Public Licenses are intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - Developers that use our General Public Licenses protect your rights -with two steps: (1) assert copyright on the software, and (2) offer -you this License which gives you legal permission to copy, distribute -and/or modify the software. - - A secondary benefit of defending all users' freedom is that -improvements made in alternate versions of the program, if they -receive widespread use, become available for other developers to -incorporate. Many developers of free software are heartened and -encouraged by the resulting cooperation. However, in the case of -software used on network servers, this result may fail to come about. -The GNU General Public License permits making a modified version and -letting the public access it on a server without ever releasing its -source code to the public. - - The GNU Affero General Public License is designed specifically to -ensure that, in such cases, the modified source code becomes available -to the community. It requires the operator of a network server to -provide the source code of the modified version running there to the -users of that server. Therefore, public use of a modified version, on -a publicly accessible server, gives the public access to the source -code of the modified version. - - An older license, called the Affero General Public License and -published by Affero, was designed to accomplish similar goals. This is -a different license, not a version of the Affero GPL, but Affero has -released a new version of the Affero GPL which permits relicensing under -this license. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU Affero General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Remote Network Interaction; Use with the GNU General Public License. - - Notwithstanding any other provision of this License, if you modify the -Program, your modified version must prominently offer all users -interacting with it remotely through a computer network (if your version -supports such interaction) an opportunity to receive the Corresponding -Source of your version by providing access to the Corresponding Source -from a network server at no charge, through some standard or customary -means of facilitating copying of software. This Corresponding Source -shall include the Corresponding Source for any work covered by version 3 -of the GNU General Public License that is incorporated pursuant to the -following paragraph. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the work with which it is combined will remain governed by version -3 of the GNU General Public License. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU Affero General Public License from time to time. Such new versions -will be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU Affero General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU Affero General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU Affero General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If your software can interact with users remotely through a computer -network, you should also make sure that it provides a way for users to -get its source. For example, if your program is a web application, its -interface could display a "Source" link that leads users to an archive -of the code. There are many ways you could offer source, and different -solutions will be better for different programs; see section 13 for the -specific requirements. - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU AGPL, see -. diff --git a/files/puppet/modules/pixelated/README.md b/files/puppet/modules/pixelated/README.md deleted file mode 100644 index d44ad37..0000000 --- a/files/puppet/modules/pixelated/README.md +++ /dev/null @@ -1,121 +0,0 @@ -puppet-pixelated -================ - -[![Build Status](https://snap-ci.com/pixelated/puppet-pixelated/branch/master/build_image)](https://snap-ci.com/pixelated/puppet-pixelated/branch/master) - -**Pixelated is in an early stage of development! Things may not work to their full extent yet** - -This puppet module provides a simple way to add Pixelated to a running [LEAP Platform](https://leap.se/en/docs/platform). -It sets up the [Pixelated User-Agent](https://github.com/pixelated/pixelated-user-agent). - -### High level Architecture -#### Pixelated Platform - -![High-level Architecture](https://raw.githubusercontent.com/pixelated/website/master/assets/images/pixelated-user-agent.png) - - -Testing Pixelated -================= - -If you want to have a look at pixelated, the easiest way ist to run everything inside [vagrant](https://www.vagrantup.com/). The following command -installs a working LEAP Platform, the pixelated-user-agent. You can create accounts -by visiting the LEAP Webapp at and see Pixelated in action at . -Be aware that you will not be able to send mails outside, but you can test sending mails internally from one user to another. - -```bash - curl https://raw.githubusercontent.com/pixelated/puppet-pixelated/master/vagrant_platform.sh | sh -``` - -Manual installation -=================== - -## 1 Creating a LEAP Provider - -Pixelated is built on top of LEAP, so in order to have a Pixelated Platform, you need to have a LEAP Platform. - -In this example, we use a single node setup. Please refer to for help with setting up a LEAP provider. -We assume that you have the LEAP platform and the configuration for your LEAP node on your local workstation. If you followed the tutorial you should have the following directories: - -* `~/leap/leap_plaform`: the LEAP platform itself -* `~/leap/example`: the configuration for your LEAP provider node - -Ideally you have run `leap deploy` and `leap test` to set up the node on a server and verify that the installation actually works. - - -### 2 Adding Pixelated to your existing LEAP configuration - -This puppet module take care of (almost) everything. It will install the pixelated-user-agent. - -Please note that currently, you need proper DNS entries for your provider domain and all of its subdomains (`hostname1.DOMAIN`, `DOMAIN`, `api.DOMAIN` and `nicknym.DOMAIN`). -You can access your LEAP provider with only local DNS overrides, but you cannot do this for the pixelated user agent. - -Add the pixelated-platform files to `files/puppet` inside your LEAP configuration folder. - -```bash - cd ~/leap/example - mkdir -p files/puppet/modules -``` - - -The documentation for the installation of the LEAP Platform suggests that you make the configuration folder (`~/leap/example` is the name they suggest) versioned using Git to make it easier to track and undo any changes on the configuration. If you followed this suggestion of the tutorial, the easiest way to get the Pixelated platform is to add it as a submodule. - -```bash - git submodule add https://github.com/pixelated/puppet-pixelated.git files/puppet/modules/pixelated -``` - -If you haven't added version control to your LEAP configuration, you can simply clone the Pixelated platform files into your node configuration. - -```bash - git clone https://github.com/pixelated/puppet-pixelated.git files/puppet/modules/pixelated -``` - -Include the `::pixelated` class in the `custom` class, which gets automatically applied by the leap_platform. - -```bash - mkdir -p files/puppet/modules/custom/manifests - echo '{}' > services/pixelated.json - echo 'class custom { include ::pixelated}' > files/puppet/modules/custom/manifests/init.pp -``` - - -### 3 Installing Pixelated on the LEAP provider node - -With Pixelated added to the configuration simply re-run the LEAP deployment. - - leap deploy - leap test - -When this completes Pixelated should be ready and available on port 8080 on your LEAP provider. - -Have fun! - - -### Running Funcional Tests (local) - -From: -```$cd files/functional-tests/``` - -Install python dependencies: -```$pip install -r test_requirements.txt``` - -Install phantomjs: -```$npm install phantomjs -g``` - -Setting staging host as pixelated-platform on the TESTHOST environment variable: -```$export TESTHOST=staging.pixelated-project.org``` - -And to run: -$behave - -To run a feature: -```$behave -t @mail_to_myself``` - -To run a set of tests: -```$behave -t @staging``` - -## Development - -### Run tests - - bundle install --path vendor/bundle - bundle exec rake test diff --git a/files/puppet/modules/pixelated/Rakefile b/files/puppet/modules/pixelated/Rakefile deleted file mode 100644 index 24277ce..0000000 --- a/files/puppet/modules/pixelated/Rakefile +++ /dev/null @@ -1,21 +0,0 @@ -require 'puppetlabs_spec_helper/rake_tasks' -require 'puppet-lint/tasks/puppet-lint' -PuppetLint.configuration.send('disable_80chars') -PuppetLint.configuration.send('disable_fileserver') -PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp", "vendor/**/*"] - -desc "Validate manifests, templates, and ruby files" -task :validate do - Dir['manifests/**/*.pp'].each do |manifest| - sh "puppet parser validate --noop #{manifest}" - end - Dir['spec/**/*.rb','lib/**/*.rb'].each do |ruby_file| - sh "ruby -c #{ruby_file}" unless ruby_file =~ /spec\/fixtures/ - end - Dir['templates/**/*.erb'].each do |template| - sh "erb -P -x -T '-' #{template} | ruby -c" - end -end - - -task :test => [:lint, :syntax , :validate, :spec] diff --git a/files/puppet/modules/pixelated/circle.yml b/files/puppet/modules/pixelated/circle.yml deleted file mode 100644 index aa12532..0000000 --- a/files/puppet/modules/pixelated/circle.yml +++ /dev/null @@ -1,21 +0,0 @@ -machine: - ruby: - version: - 2.1.8 - environment: - LC_ALL: 'en_US.UTF-8' - -dependencies: - override: - - sudo apt-get install rbenv - - rbenv rehash - - bundle install - -test: - override: - - bundle exec rake validate - - cp .fixtures-latest.yml .fixtures.yml - - bundle exec rake spec - - cp .fixtures-leap-pinned.yml .fixtures.yml - - bundle exec rake spec - diff --git a/files/puppet/modules/pixelated/files/0x287A1542472DC0E3_packages@pixelated-project.org.asc b/files/puppet/modules/pixelated/files/0x287A1542472DC0E3_packages@pixelated-project.org.asc deleted file mode 100644 index 0e903e6..0000000 --- a/files/puppet/modules/pixelated/files/0x287A1542472DC0E3_packages@pixelated-project.org.asc +++ /dev/null @@ -1,28 +0,0 @@ ------BEGIN PGP PUBLIC KEY BLOCK----- - -mQMuBFQFs9YRCACSwF49RDAnCE0UplrTTpymDjEEFA9G+34TLL3NNLBlY+ldkS94 -ZHFH5Gt8j3HqbPlDPaV9aUPl8f3CFSL8qWT3LbDk/jmIcIG+UHdMuYAEQayuFbWg -yWa3pHm57yJxaxHMrAddWffNMZswoc2Qu1M6S3ekMPN9Cow9XLhP5zGgrI2qR7sV -F5uqI1rX345BXRqqZqZ4mpDgEafb29YR3gQbGWlJZ1/Rjia2OdzW5RcfhIHuoZaB -NM2b8VCvQNanowz01EVLIZLI77oFsU0fnuHRiqcxwNlMBvO0dv/72anmx4Q4iAW+ -GqiMe6G7eu3InUNFYl+zU9JQjZSQCqGvfySjAQCUZmEjsj2hPMFn8juV4zIpzTEd -ruwmfwIFkf9NM8MvaQf/dTHa+UkPEwXKjDhYdmvb/PCQSHF4ghxDiNUAqZtSlDf5 -Wh/oZJ6hhZyyOwnbUgG0+WMFen7qzD146gxgx1go6YnYnPFDamYncyZfuISWHSeD -0C/54XhD1akdOHfI4aw9ZlQ2F9JKtXiFXa2g34vwNLiFtWtYCR29+1S40xOd+tv5 -5M2TYoPjEKWm92Wa7ZCF2L83qy/B8jZWgwSSWgXXWhBTrAu2S8Xi5adrCJLfSeoO -Vp8TN3eXJYIAbq1GFJlI9rv8+yNshzoyUbKGtptSezpAywKXoyVsHaSfoKHypQaw -LlNePVubweIcxPOJZAPmD/uafzAKEzUcjCAVNaBNbgf+ODSeI6WjITR0NH0os/vs -UjiUy3WZX+FQxaWaK5F+dpw0QutvFjiGr8k2jsTjekXvCUlX0Uh87+eHKlzc9iaW -m3cqVohVBeRyjHuNaS0e8e8WVaZIPyJS7eq5gJHjOsZpXjcR5wpt2QJFdcnbgG+m -cIro0uakMvkkSaRUnIuIywtbsUGi03CRBDXg3u9grwAEk6k7Af0iSvigblQ3cZKI -C87zHfAH3fJxp0xVfCkNBgBt2FL/tIRJLy6x5Jyas62k+n/xkymGlyLNTRXv28se -xFh2bOGKy2yL3LZuh255UWMum+7aI5EECnyB88Be1NrhwPbKeC5/f93SZ0QsFjmJ -e7RIUGl4ZWxhdGVkIFByb2plY3QgQXV0b21hdGljIFNpZ25pbmcgS2V5IDxwYWNr -YWdlc0BwaXhlbGF0ZWQtcHJvamVjdC5vcmc+iH8EExEKACcFAlQFs9YCGwMFCQHh -M4AFCwkIBwMFFQoJCAsFFgIDAQACHgECF4AACgkQKHoVQkctwOPmRgD+LGIfe3NJ -pbKU3j+beXHSk36kbtITskgsRnwoc8QQT/EA/jE2LMSSkI+aPA1kF0m6A+30TPDc -3twWBOaj2fhknvmViH8EExEKACcCGwMFCwkIBwMFFQoJCAsFFgIDAQACHgECF4AF -AlfNQJsFCQeJ88MACgkQKHoVQkctwOPgqAD8DrABUvBsu3xTH6pHZPpqtozM1425 -DANGvoyN59+RHd0A/0kk9gRu445VjtnW8xTywwAKq3qSsrJAtUPIip4/Q6Hb -=zJDU ------END PGP PUBLIC KEY BLOCK----- diff --git a/files/puppet/modules/pixelated/files/Debian/51unattended-upgrades_pixelated b/files/puppet/modules/pixelated/files/Debian/51unattended-upgrades_pixelated deleted file mode 100644 index 421dc27..0000000 --- a/files/puppet/modules/pixelated/files/Debian/51unattended-upgrades_pixelated +++ /dev/null @@ -1,7 +0,0 @@ -// this file is managed by puppet ! - -Unattended-Upgrade::Allowed-Origins { - "pixelated:stable"; - "pixelated:snapshots"; -} - diff --git a/files/puppet/modules/pixelated/files/check_mk/check_pixelated_user_agent.sh b/files/puppet/modules/pixelated/files/check_mk/check_pixelated_user_agent.sh deleted file mode 100644 index a2d81a9..0000000 --- a/files/puppet/modules/pixelated/files/check_mk/check_pixelated_user_agent.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -STATUS[0]='OK' -STATUS[1]='Critical' -STATUS[2]='Critical' -CHECKNAME='Dispatcher_Proxy' - -MESSAGE=$(/usr/lib/nagios/plugins/check_procs -a '/usr/bin/pixelated-user-agent' -c 1:1) -SERVICESTATUS=$? -echo "${SERVICESTATUS} ${CHECKNAME} running=1 ${MESSAGE}" - diff --git a/files/puppet/modules/pixelated/files/check_mk/user-agent.cfg b/files/puppet/modules/pixelated/files/check_mk/user-agent.cfg deleted file mode 100644 index b871f00..0000000 --- a/files/puppet/modules/pixelated/files/check_mk/user-agent.cfg +++ /dev/null @@ -1,60 +0,0 @@ -/var/log/pixelated/user-agent.log -# ignore requests that are fine -# ignore login with wrong credentials - I login\?error - I login\?auth-error - I Unauthorized login for - I throwExceptionIntoGenerator -# issue 904 - I -# issue 905 - I ERROR got exception when syncing - I _unauth_to_invalid_token_error - I leap.soledad.common.errors.InvalidAuthTokenError -# issue 957 - I Failure instance: Traceback: : Request.finish called on a request after its connection was lost; use Request.notifyFinish to keep track of this. - I exceptions.RuntimeError: Request.finish called on a request after its connection was lost; use Request.notifyFinish to keep track of this. -# issue 913 - I exception caught here - I exceptions.IOError:.*No such file or directory -# issue 372 - I exceptions.ValueError: No JSON object could be decoded -# issue 975 - I Failure instance: Traceback: -# issue 992 - I leap.bitmask.keymanager.errors.EncryptError -# issue 984 - I twisted.mail.smtp.SMTPDeliveryError -# issue 582 - I errors.RevisionConflict -# issue 1019 - I Failed to encrypt/decrypt: \[GNUPG:\] NODATA 2 - I Failure instance: Traceback: : must be string or buffer, not list -# issue https://github.com/pixelated/project-issues/issues/428 - I Failure instance: Traceback: : 'openpgp' - I -# issue 1036 - I 'NoneType' object has no attribute 'as_dict' -# issue leap/soledad#8799 - I 'NoneType' object has no attribute 'content' -# issue leap/soledad#8787 - I 'NoneType' object has no attribute 'commit' -# issue leap/soledad#8786 - I 'NoneType' object has no attribute 'cursor' -# issue leap/bitmask-dev#8820 - I 'NoneType' object has no attribute 'doc_id' -# issue 1055 - I No attachment with id None found! -# - I twisted.internet.error.ConnectionRefusedError: Connection was refused by other side: 111: Connection refused - I exceptions.AssertionError: Found more than one key for address - I column doc_id is not unique - I An error has ocurred adding attached key - W warning - C error - C failure - C requests.exceptions.SSLError - C u1db.errors - C exception - C BEGIN PGP PRIVATE KEY BLOCK - C exceptions.UnicodeEncodeError diff --git a/files/puppet/modules/pixelated/files/functional-tests/__init__.py b/files/puppet/modules/pixelated/files/functional-tests/__init__.py deleted file mode 100644 index 7a50bed..0000000 --- a/files/puppet/modules/pixelated/files/functional-tests/__init__.py +++ /dev/null @@ -1,18 +0,0 @@ -# -# Copyright (c) 2015 ThoughtWorks, Inc. -# -# Pixelated is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Pixelated is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with Pixelated. If not, see . - -# from page_objects import * -import page_objects diff --git a/files/puppet/modules/pixelated/files/functional-tests/account.feature b/files/puppet/modules/pixelated/files/functional-tests/account.feature deleted file mode 100644 index 0acca0a..0000000 --- a/files/puppet/modules/pixelated/files/functional-tests/account.feature +++ /dev/null @@ -1,47 +0,0 @@ -# -# Copyright (c) 2014 ThoughtWorks, Inc. -# -# Pixelated is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Pixelated is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with Pixelated. If not, see . -@staging -Feature: account - - @register - Scenario: user goes to signup-page - When I visit the signup-page - Then I should see a signup button - - @register - Scenario: user goes to signup-page and registers new account - When I visit the signup-page - And I register - Then I see the control-panel - - @login - Scenario: user goes to user-agent - When I visit the user-agent - Then I should see a login button - - @login - Scenario: user goes to user-agent and enters credentials - When I visit the user-agent - And I login - Then I see the inbox - - @logout - Scenario: user logs out - When I visit the user-agent - And I login - When I logout - And I visit the user-agent - Then I should see a login button diff --git a/files/puppet/modules/pixelated/files/functional-tests/checkboxes_and_mailboxes.feature b/files/puppet/modules/pixelated/files/functional-tests/checkboxes_and_mailboxes.feature deleted file mode 100644 index 5342f96..0000000 --- a/files/puppet/modules/pixelated/files/functional-tests/checkboxes_and_mailboxes.feature +++ /dev/null @@ -1,33 +0,0 @@ -# -# Copyright (c) 2014 ThoughtWorks, Inc. -# -# Pixelated is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Pixelated is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with Pixelated. If not, see . - - -@user_agent -Feature: Checkboxes - As a user of Pixelated - I want to use checkboxes to manage my emails - So I can manage more than one email at once - - Scenario: User has a list of emails in each mailboxes that needs to be managed - Given I'm logged in - When I mark the first unread email as read - And I delete the email - When I select the tag 'trash' - Then the deleted mail is there - When I check all emails - And I delete them permanently - Then I should not see any email - diff --git a/files/puppet/modules/pixelated/files/functional-tests/compose_save_draft_and_send.feature b/files/puppet/modules/pixelated/files/functional-tests/compose_save_draft_and_send.feature deleted file mode 100644 index 35b282f..0000000 --- a/files/puppet/modules/pixelated/files/functional-tests/compose_save_draft_and_send.feature +++ /dev/null @@ -1,32 +0,0 @@ -# -# Copyright (c) 2014 ThoughtWorks, Inc. -# -# Pixelated is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Pixelated is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with Pixelated. If not, see . - -@user_agent -Feature: compose mail, save draft and send mail - As a user of Pixelated - I want to save drafts - So I can review and send them later - - Scenario: user composes and email, save the draft, later sends the draft and checks the sent message - Given I'm logged in - When I compose a message to 'pixelated@friends.org' - When I select the tag 'drafts' - When I open the first mail in the mail list - And I send it - When I select the tag 'sent' - And I open the first mail in the mail list - Then I see that the subject reads 'Pixelated rocks!' - Then I see that the body reads 'You should definitely use it. Cheers, User.' diff --git a/files/puppet/modules/pixelated/files/functional-tests/environment.py b/files/puppet/modules/pixelated/files/functional-tests/environment.py deleted file mode 100644 index 907450d..0000000 --- a/files/puppet/modules/pixelated/files/functional-tests/environment.py +++ /dev/null @@ -1,87 +0,0 @@ -# -# Copyright (c) 2014 ThoughtWorks, Inc. -# -# Pixelated is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Pixelated is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with Pixelated. If not, see . -import os -from page_objects import SignUpPage -from selenium import webdriver -from steps.common import RandomUser -import subprocess - - -def before_all(context): - set_browser(context) - context.random_user = RandomUser - - -def after_step(context, step): - screenshot_filename = 'test_{step_name}.png' - screenshot_path = os.path.join('/var/log/pixelated', screenshot_filename) - - if step.status == 'failed': - take_screenshot(context, - screenshot_path.format(step_name=step.name)) - log_browser_console(context, step) - save_page_source(context, step) - - -def after_scenario(context, scenario): - context.browser.delete_all_cookies() - - -def after_all(context): - _delete_user(context, context.random_user.username) - if hasattr(context, 'browser'): - context.browser.quit() - - -def _delete_user(context, username): - try: - subprocess.check_call( - ['./destroy-user-db', '--destroy-identities', - '--username', username], cwd='/srv/leap/couchdb/scripts') - except Exception as e: - print(e.returncode, e.output) - - -def save_page_source(context, step): - page_source_filename = '{step_name}.html'.format(step_name=step.name) - with open(page_source_filename, 'w') as page_source: - page_source.write(context.browser.page_source) - - -def log_browser_console(context, step): - console_log_filename = '{step_name}.log'.format(step_name=step.name) - with open(console_log_filename, 'w') as console_log_file: - line = '{time} {level}: {message}\n' - log_lines = [] - for log in context.browser.get_log('browser'): - log_lines.append(line.format(time=log['timestamp'], - level=log['level'], - message=log['message'])) - console_log_file.writelines(log_lines) - - -def take_screenshot(context, path): - print('Screenshot saved to: {path}'.format(path=path)) - context.browser.save_screenshot(path) - - -def set_browser(context): - # context.browser = webdriver.Firefox() - #context.browser = webdriver.Chrome() - context.browser = webdriver.PhantomJS(service_args=['--ignore-ssl-errors=yes']) - context.browser.set_window_size(1280, 1024) - context.browser.implicitly_wait(10) - context.browser.set_page_load_timeout(60) diff --git a/files/puppet/modules/pixelated/files/functional-tests/forward_trash_archive.feature b/files/puppet/modules/pixelated/files/functional-tests/forward_trash_archive.feature deleted file mode 100644 index 8883170..0000000 --- a/files/puppet/modules/pixelated/files/functional-tests/forward_trash_archive.feature +++ /dev/null @@ -1,35 +0,0 @@ -# -# Copyright (c) 2014 ThoughtWorks, Inc. -# -# Pixelated is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Pixelated is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with Pixelated. If not, see . - -@user_agent -Feature: forward and deletion - As a user of Pixelated - I want to forward emails using CC and Bcc features - So I can take actions - - Scenario: User forwards a mail, add CC and BCC address, later trash the mail - Given I have a mail in my inbox - When I open the first mail in the 'inbox' - And I choose to forward this mail - When for the 'CC' field I enter 'pixelated@friends.org' - And for the 'Bcc' field I enter 'pixelated@family.org' - And I forward this mail - When I open the first mail in the 'sent' - Then I see the mail has a cc and a bcc recipient - When I choose to trash -# Then I see that mail under the 'trash' tag - When I select the tag 'trash' - And I open the first mail in the mail list diff --git a/files/puppet/modules/pixelated/files/functional-tests/login_and_send_an_email.feature b/files/puppet/modules/pixelated/files/functional-tests/login_and_send_an_email.feature deleted file mode 100644 index d4ac9cc..0000000 --- a/files/puppet/modules/pixelated/files/functional-tests/login_and_send_an_email.feature +++ /dev/null @@ -1,32 +0,0 @@ -# -# Copyright (c) 2015 ThoughtWorks, Inc. -# -# Pixelated is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Pixelated is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with Pixelated. If not, see . - -@try -Feature: login and send mail - - - Scenario Outline: user logs in, composes and send an email, then deletes it - Given I login as "" with password "" to an organization install of pixelated - When I send an email to myself - Then I see the email on the mail list - Then I delete the email - And I delete it permanently - - Examples: - | user | password | - | alice | WuSh3ohse4 | - | eve | Voh0ohghai | - | bob | quuojoo1Su | diff --git a/files/puppet/modules/pixelated/files/functional-tests/page_objects/__init__.py b/files/puppet/modules/pixelated/files/functional-tests/page_objects/__init__.py deleted file mode 100644 index 4ca3302..0000000 --- a/files/puppet/modules/pixelated/files/functional-tests/page_objects/__init__.py +++ /dev/null @@ -1,29 +0,0 @@ -# -# Copyright (c) 2015 ThoughtWorks, Inc. -# -# Pixelated is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Pixelated is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with Pixelated. If not, see . - - -from login_page import LoginPage -from compose_box import ComposeBox -from base_page_object import BasePageObject -from maillist_actions import MailListActions -from pixelated_page import PixelatedPage -from mail_page import MailPage -from user_agent_pages import SignUpPage -from user_agent_pages import ControlPanelPage -from mail_list import MailList -from tag_list import TagList -from notification import Notification -from leap_login_page import LeapLoginPage \ No newline at end of file diff --git a/files/puppet/modules/pixelated/files/functional-tests/page_objects/base_page_object.py b/files/puppet/modules/pixelated/files/functional-tests/page_objects/base_page_object.py deleted file mode 100644 index f809128..0000000 --- a/files/puppet/modules/pixelated/files/functional-tests/page_objects/base_page_object.py +++ /dev/null @@ -1,87 +0,0 @@ -# -# Copyright (c) 2015 ThoughtWorks, Inc. -# -# Pixelated is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Pixelated is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with Pixelated. If not, see . - -from selenium.webdriver.support import expected_conditions as EC -from selenium.webdriver.support.wait import WebDriverWait -from selenium.webdriver.common.by import By - - -class BasePageObject(object): - def __init__(self, context, timeout=10): - self.context = context - self.timeout = timeout - - def _find_element_containing_text(self, text, element_type='*'): - return self._find_element_by_xpath("//%s[contains(.,'%s')]" % (element_type, text)) - - def _find_element_by_css_locator(self, locator, timeout=None, dom_context=None): - locator_tuple = (By.CSS_SELECTOR, locator) - self._wait_until(EC.visibility_of_element_located(locator_tuple), timeout or self.timeout) - context = dom_context or self.context.browser - return context.find_element_by_css_selector(locator) - - def _find_element_by_id(self,id): - return self.context.browser.find_element_by_id(id) - - def _find_elements_by_css_locator(self, locator, timeout=None): - locator_tuple = (By.CSS_SELECTOR, locator) - self._wait_until(EC.visibility_of_element_located(locator_tuple), timeout or self.timeout) - return self.context.browser.find_elements_by_css_selector(locator) - - def _find_elements_by_xpath(self, xpath, timeout=None): - locator_tuple = (By.XPATH, xpath) - self._wait_until(EC.visibility_of_element_located(locator_tuple), timeout or self.timeout) - return self.context.browser.find_elements_by_xpath(xpath) - - def _find_element_by_xpath(self, xpath, timeout=None, dom_context=None): - locator_tuple = (By.XPATH, xpath) - self._wait_until(EC.visibility_of_element_located(locator_tuple), timeout or self.timeout) - context = dom_context or self.context.browser - return self.context.browser.find_element_by_xpath(xpath) - - def _wait_element_to_be_removed(self, locator, timeout=None): - locator_tuple = (By.CSS_SELECTOR, locator) - self._wait_until(EC.invisibility_of_element_located(locator_tuple), timeout or self.timeout) - - def _wait_element_to_be_removed_by_xpath(self, xpath, timeout=None): - locator_tuple = (By.XPATH, xpath) - self._wait_until(EC.invisibility_of_element_located(locator_tuple), timeout or self.timeout) - - def _wait_until(self, condition_function, timeout=None): - wait = WebDriverWait(self.context.browser, timeout or self.timeout) - wait.until(condition_function) - - def wait_until_element_is_visible_by_css_locator(self, locator): - wait = WebDriverWait(self.context.browser, 60) - wait.until(EC.visibility_of_element_located((By.CSS_SELECTOR, locator))) - return self.context.browser.find_element_by_selector(locator) - - def wait_until_elements_are_visible_by_css_locator(self, locator): - wait = WebDriverWait(self.context.browser, 60) - wait.until(EC.visibility_of_element_located((By.CSS_SELECTOR, locator))) - - def wait_until_element_is_visible_by_locator(self, locator): - wait = WebDriverWait(self.context.browser, 60) - by, locator = locator - wait.until(EC.visibility_of_element_located((by, locator))) - return self.context.browser.find_element(by, locator) - - def wait_until_element_is_invisible_by_locator(self, locator): - wait = WebDriverWait(self.context.browser, 60) - by, locator = locator - wait.until(EC.invisibility_of_element_located((by, locator))) - - diff --git a/files/puppet/modules/pixelated/files/functional-tests/page_objects/compose_box.py b/files/puppet/modules/pixelated/files/functional-tests/page_objects/compose_box.py deleted file mode 100644 index cade132..0000000 --- a/files/puppet/modules/pixelated/files/functional-tests/page_objects/compose_box.py +++ /dev/null @@ -1,78 +0,0 @@ -# -# Copyright (c) 2015 ThoughtWorks, Inc. -# -# Pixelated is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Pixelated is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with Pixelated. If not, see . - -from base_page_object import BasePageObject - - -class ComposeBox(BasePageObject): - def __init__(self, context, timeout=10): - self._locators = { - 'subject': 'input#subject', - 'body': 'textarea#text-box', - 'to': 'input.tt-input', - 'send_button': 'button#send-button', - 'compose_box': 'div#compose-box', - 'reply_subject': '#reply-subject' - } - super(ComposeBox, self).__init__(context, timeout) - - def enter_body(self, body): - self._body_field().send_keys(body) - return self - - def enter_subject(self, subject): - self._subject_field().send_keys(subject) - return self - - def enter_recipients(self, recipients): - if type(recipients) is list: - for recipient in recipients: - self.enter_recipient(recipient) - else: - self.enter_recipient(recipients) - return self - - def enter_recipient(self, recipient): - self._to_field().send_keys(recipient) - self._to_field().send_keys('\n') - return self - - def send_mail(self): - self._send_mail_button().click() - - def save_draft(self): - self._find_element_by_css_locator('button#draft-button').click() - - def choose_from_suggestions(self): - self._find_element_by_css_locator('.tt-dropdown-menu div div').click() - - def wait_compose_box_to_disappear(self): - self._wait_element_to_be_removed(self._locators['compose_box'], 120) - - def get_reply_subject(self): - return self._find_elements_by_css_locator(self._locators['reply_subject']) - - def _subject_field(self): - return self._find_element_by_css_locator(self._locators['subject']) - - def _body_field(self): - return self._find_element_by_css_locator(self._locators['body']) - - def _to_field(self): - return self._find_element_by_css_locator(self._locators['to']) - - def _send_mail_button(self): - return self._find_element_by_css_locator(self._locators['send_button']) diff --git a/files/puppet/modules/pixelated/files/functional-tests/page_objects/leap_login_page.py b/files/puppet/modules/pixelated/files/functional-tests/page_objects/leap_login_page.py deleted file mode 100644 index 74350fc..0000000 --- a/files/puppet/modules/pixelated/files/functional-tests/page_objects/leap_login_page.py +++ /dev/null @@ -1,39 +0,0 @@ -# -# Copyright (c) 2015 ThoughtWorks, Inc. -# -# Pixelated is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Pixelated is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with Pixelated. If not, see . -from selenium.webdriver.common.by import By - -from login_page import LoginPage -from steps import leap_login_url - - -class LeapLoginPage(LoginPage): - def __init__(self, context, timeout=10): - super(LeapLoginPage, self).__init__(context, timeout) - self._locators = { - 'username': 'input#srp_username', - 'password': 'input#srp_password', - 'login_button': 'button[type=submit]', - } - self.url = leap_login_url() - - def _visit_page(self): - self.context.browser.delete_all_cookies() - self.context.browser.get(self.url) - - def _login(self, username, password): - self._visit_page() - self.wait_until_element_is_visible_by_locator((By.CSS_SELECTOR, 'input#srp_username')) - self.enter_username(username).enter_password(password).login() diff --git a/files/puppet/modules/pixelated/files/functional-tests/page_objects/login_page.py b/files/puppet/modules/pixelated/files/functional-tests/page_objects/login_page.py deleted file mode 100644 index 8261477..0000000 --- a/files/puppet/modules/pixelated/files/functional-tests/page_objects/login_page.py +++ /dev/null @@ -1,61 +0,0 @@ -# -# Copyright (c) 2015 ThoughtWorks, Inc. -# -# Pixelated is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Pixelated is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with Pixelated. If not, see . - -from base_page_object import BasePageObject -from selenium.common.exceptions import TimeoutException - - -class LoginPage(BasePageObject): - def __init__(self, context, timeout=10): - self._locators = { - 'username': 'input[name=username]', - 'password': 'input[name=password]', - 'login_button': 'button[type=submit]', - 'hive_svg': 'svg#hive' - } - super(LoginPage, self).__init__(context, timeout) - - def enter_username(self, username): - self._username_field().send_keys(username) - return self - - def enter_password(self, password): - self._password_field().send_keys(password) - return self - - def login(self): - self._login_button().click() - return self - - def _username_field(self): - return self._find_element_by_css_locator(self._locators['username']) - - def _password_field(self): - return self._find_element_by_css_locator(self._locators['password']) - - def _login_button(self): - return self._find_element_by_css_locator(self._locators['login_button']) - - def wait_interstitial_page(self, time=180): - if self._is_interstitial_page_displayed(): - self._wait_element_to_be_removed(self._locators['hive_svg'], time) - - def _is_interstitial_page_displayed(self): - try: - self._find_element_by_css_locator(self._locators['hive_svg'], 2) - return True - except TimeoutException: - return False diff --git a/files/puppet/modules/pixelated/files/functional-tests/page_objects/mail_list.py b/files/puppet/modules/pixelated/files/functional-tests/page_objects/mail_list.py deleted file mode 100644 index 7ffb76d..0000000 --- a/files/puppet/modules/pixelated/files/functional-tests/page_objects/mail_list.py +++ /dev/null @@ -1,65 +0,0 @@ -# -# Copyright (c) 2015 ThoughtWorks, Inc. -# -# Pixelated is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Pixelated is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with Pixelated. If not, see . - -from base_page_object import BasePageObject -from selenium.common.exceptions import TimeoutException -from time import sleep - -class MailList(BasePageObject): - def __init__(self, context, timeout=10): - self._locators = { - 'mail_items': '//a[contains(@class, "mail-list-entry__item") and contains(., "{sender}") and contains(., "{subject}")]', - 'mailbox_mails': '.mail-list-entry__item[href*="{mailbox}"]', - 'all_mails': '.mail-list-entry', - 'checkboxes': '.mail-list-entry__checkbox input[type="checkbox"]' - } - super(MailList, self).__init__(context, timeout) - - def is_mail_on_list(self, sender, subject, timeout=None): - try: - self.select_mail(sender, subject, timeout) - return True - except TimeoutException: - return False - - def is_mail_not_on_the_list(self, sender, subject): - try: - xpath = self._locators['mail_items'].format( - sender=sender, - subject=subject) - self._wait_element_to_be_removed_by_xpath(xpath) - return True - except TimeoutException: - return False - - def is_there_emails(self): - return len(self.context.browser.find_elements_by_css_selector(self._locators['all_mails'])) > 0 - - def get_all_emails(self): - return self.context.browser.find_elements_by_css_selector(self._locators['all_mails']) - - def is_mailbox_loaded(self,context, mailbox): - self.wait_until_elements_are_visible_by_css_locator((self._locators['mailbox_mails']).format(mailbox=mailbox)) - - def select_mail(self, sender, subject, timeout=180): - xpath = self._locators['mail_items'].format(sender=sender, subject=subject) - self._find_element_by_xpath(xpath, timeout=timeout).click() - - def mark_nth_checkbox(self, position): - checkboxes = self._find_elements_by_css_locator(self._locators['checkboxes']) - checkboxes[position].click() - - diff --git a/files/puppet/modules/pixelated/files/functional-tests/page_objects/mail_page.py b/files/puppet/modules/pixelated/files/functional-tests/page_objects/mail_page.py deleted file mode 100644 index 786f9f7..0000000 --- a/files/puppet/modules/pixelated/files/functional-tests/page_objects/mail_page.py +++ /dev/null @@ -1,83 +0,0 @@ -# -# Copyright (c) 2015 ThoughtWorks, Inc. -# -# Pixelated is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Pixelated is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with Pixelated. If not, see . -from selenium.webdriver.common.keys import Keys - -from base_page_object import BasePageObject -from compose_box import ComposeBox - -class MailPage(BasePageObject): - def __init__(self, context, timeout=10): - self._locators = { - 'encrypted_flag': '.security-status__label--encrypted', - 'unencrypted_flag': '.security-status__label--not-encrypted', - 'undecryptable_flag': '.security-status__label--encryption-error', - 'subject': '#mail-view .subject', - 'body': '#mail-view .bodyArea', - 'tags': '#mail-view .tagsArea .tag', - 'add_tag_button': '#new-tag-button', - 'add_tag_input': '#new-tag-input', - 'reply_button': 'Reply', - 'forward_button': 'button#forward-button', - 'cc': '.msg-header .cc', - 'bcc': '.msg-header .bcc', - 'delete': 'span#delete-button-top', - 'more_actions': '#mail-view #view-more-actions' - } - super(MailPage, self).__init__(context, timeout) - - def check_mail_flag(self, flag): - self._find_element_by_css_locator(self._locators[flag]) - - def get_subject(self): - return self._find_element_by_css_locator(self._locators['subject']) - - def get_body(self): - return self._find_element_by_css_locator(self._locators['body']) - - def get_tags(self): - return self._find_elements_by_css_locator(self._locators['tags']) - - def add_tag(self, tag): - # import pdb; pdb.set_trace() - self._find_element_by_css_locator(self._locators['add_tag_button']).click() - self._find_element_by_css_locator(self._locators['add_tag_input']).send_keys(tag + Keys.ENTER) - - def press_reply_button(self): - self._find_element_containing_text(self._locators['reply_button'], 'button').click() - - def mail_has_cc_and_bcc(self): - cc = self._find_element_by_css_locator(self._locators['cc']).text - bcc = self._find_element_by_css_locator(self._locators['bcc']).text - - return (cc is not None) and (bcc is not None) - - def reply_mail(self): - self.press_reply_button() - compose_box = ComposeBox(self.context) - self.context.reply_subject = compose_box.get_reply_subject() - compose_box.send_mail() - - def forward_mail(self): - self._find_elements_by_css_locator(self._locators['forward_button']).click() - - def remove_tags(self): - tags = self._find_elements_by_css_locator(self._locators['tags']) - for tag in tags: - tag.click() - - def delete_mail(self): - self._find_element_by_css_locator(self._locators['more_actions']).click() - self._find_element_by_css_locator(self._locators['delete']).click() diff --git a/files/puppet/modules/pixelated/files/functional-tests/page_objects/maillist_actions.py b/files/puppet/modules/pixelated/files/functional-tests/page_objects/maillist_actions.py deleted file mode 100644 index 64c705a..0000000 --- a/files/puppet/modules/pixelated/files/functional-tests/page_objects/maillist_actions.py +++ /dev/null @@ -1,51 +0,0 @@ -# -# Copyright (c) 2015 ThoughtWorks, Inc. -# -# Pixelated is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Pixelated is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with Pixelated. If not, see . -from selenium.webdriver.common.keys import Keys - -from base_page_object import BasePageObject - - -class MailListActions(BasePageObject): - def __init__(self, context, timeout=10): - self._locators = { - 'compose_mail_button': 'div#compose-trigger', - 'delete_selected_button': 'input#delete-selected', - 'delete_successful_message': '//span[contains("Your messages were moved to trash!")]', - 'search': '#search-trigger input[type="search"]', - 'select_all_mails': '#toggle-check-all-emails' - } - super(MailListActions, self).__init__(context, timeout) - - def open_compose_box(self): - self._compose_mail_button().click() - - def delete_selected_mails(self): - self._delete_selected_button().click() - - def select_all_mails(self): - self._find_element_by_css_locator(self._locators['select_all_mails']).click() - - def do_search(self, search_term): - search_box = self._find_element_by_css_locator(self._locators['search']) - search_box.send_keys(search_term + Keys.ENTER) - - def _compose_mail_button(self): - return self._find_element_by_css_locator(self._locators['compose_mail_button']) - - def _delete_selected_button(self): - return self._find_element_by_css_locator(self._locators['delete_selected_button']) - - diff --git a/files/puppet/modules/pixelated/files/functional-tests/page_objects/notification.py b/files/puppet/modules/pixelated/files/functional-tests/page_objects/notification.py deleted file mode 100644 index 35042dd..0000000 --- a/files/puppet/modules/pixelated/files/functional-tests/page_objects/notification.py +++ /dev/null @@ -1,35 +0,0 @@ -# -# Copyright (c) 2015 ThoughtWorks, Inc. -# -# Pixelated is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Pixelated is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with Pixelated. If not, see . - -from base_page_object import BasePageObject -from selenium.webdriver.common.by import By - -class Notification(BasePageObject): - def __init__(self, context, timeout=10): - self._locators = { - 'message_sent': '#user-alerts:contains("Your message was sent!")', - 'message_deleted': '#user-alerts:contains("Your message was moved to trash!")' - } - super(Notification, self).__init__(context, timeout) - - def wait_for_notification(self, notification): - print "Waiting for message sent notification" - self._find_element_by_css_locator(self._locators[notification]) - print "Notification found" - return self - - def wait_until_notification_is_gone(self): - self.wait_until_element_is_invisible_by_locator(By.ID, 'user-alerts') \ No newline at end of file diff --git a/files/puppet/modules/pixelated/files/functional-tests/page_objects/pixelated_page.py b/files/puppet/modules/pixelated/files/functional-tests/page_objects/pixelated_page.py deleted file mode 100644 index 79c372f..0000000 --- a/files/puppet/modules/pixelated/files/functional-tests/page_objects/pixelated_page.py +++ /dev/null @@ -1,56 +0,0 @@ -# -# Copyright (c) 2015 ThoughtWorks, Inc. -# -# Pixelated is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Pixelated is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with Pixelated. If not, see . - -from compose_box import ComposeBox -from maillist_actions import MailListActions -from mail_list import MailList -from tag_list import TagList -import random -import string - - -class PixelatedPage(object): - def __init__(self, context, timeout=10): - self.maillist_actions = MailListActions(context) - self.compose_box = ComposeBox(context) - self.mail_list = MailList(context) - self.tag_list = TagList(context) - - def compose_and_send_email(self, mail_fields): - self.maillist_actions.open_compose_box() - self.compose_box.enter_subject(mail_fields['subject']).enter_body(mail_fields['body']).enter_recipients(mail_fields['recipients']) - self.compose_box.send_mail() - self.compose_box.wait_compose_box_to_disappear() - return self - - def delete_mail(self, sender, subject, timeout=None): - self.mail_list.select_mail(sender, subject, timeout) - self.maillist_actions.delete_selected_mails() - assert(self.mail_list.is_mail_not_on_the_list(sender, subject)) - return self - - def is_mail_on_list(self, sender, subject, timeout=None): - assert(self.mail_list.is_mail_on_list(sender, subject, timeout)) - - def go_to_trash(self): - self.tag_list.go_to_trash() - - def random_subject(self): - if 'random_subject_string' not in globals(): - global random_subject_string - random_string = ''.join(random.choice(string.lowercase) for i in range(8)) - random_subject_string = 'Automated test, TBD (To Be Deleted): '+ random_string - return random_subject_string diff --git a/files/puppet/modules/pixelated/files/functional-tests/page_objects/tag_list.py b/files/puppet/modules/pixelated/files/functional-tests/page_objects/tag_list.py deleted file mode 100644 index bc152da..0000000 --- a/files/puppet/modules/pixelated/files/functional-tests/page_objects/tag_list.py +++ /dev/null @@ -1,66 +0,0 @@ -# -# Copyright (c) 2015 ThoughtWorks, Inc. -# -# Pixelated is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Pixelated is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with Pixelated. If not, see . - -from base_page_object import BasePageObject - -from selenium.webdriver.common.by import By - - -class TagList(BasePageObject): - def __init__(self, context, timeout=10): - self._locators = { - 'inbox': 'li#tag-inbox', - 'trash': 'li#tag-trash', - 'draft': 'li#tag-draft', - 'sent': 'li#tag-sent' - } - super(TagList, self).__init__(context, timeout) - - def go_to_trash(self): - self._trash_tag().click() - - def go_to_drafts(self): - self._draft_tag().click() - - def go_to_inbox(self): - self._inbox_tag().click() - - def go_to_sent(self): - self._sent_tag().click() - - def go_to_mailbox(self, mailbox): - self._go_to_mailbox(mailbox).click() - - def _go_to_mailbox(self, mailbox): - if not self._locators.has_key(mailbox): - # user created tag - return self._find_element_by_css_locator('#tag-%s' % mailbox) - return self._find_element_by_css_locator(self._locators[mailbox]) - - def _trash_tag(self): - return self._find_element_by_css_locator(self._locators['trash']) - - def _draft_tag(self): - return self._find_element_by_css_locator(self._locators['draft']) - - def _inbox_tag(self): - return self._find_element_by_css_locator(self._locators['inbox']) - - def _inbox_tag(self): - return self._find_element_by_css_locator(self._locators['sent']) - - def is_pixelated_loaded(self): - self.wait_until_element_is_visible_by_locator((By.CSS_SELECTOR, self._locators['inbox'])) diff --git a/files/puppet/modules/pixelated/files/functional-tests/page_objects/user_agent_pages.py b/files/puppet/modules/pixelated/files/functional-tests/page_objects/user_agent_pages.py deleted file mode 100644 index 246b88e..0000000 --- a/files/puppet/modules/pixelated/files/functional-tests/page_objects/user_agent_pages.py +++ /dev/null @@ -1,72 +0,0 @@ -# -# Copyright (c) 2015 ThoughtWorks, Inc. -# -# Pixelated is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Pixelated is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with Pixelated. If not, see . -import os - -from base_page_object import BasePageObject - - -class SignUpPage(BasePageObject): - def __init__(self, context, timeout=10): - self._locators = { - 'username': 'input#srp_username', - 'pswd': 'input#srp_password', - 'pswd_confirmation': 'input#srp_password_confirmation', - 'invite': 'input#srp_invite_code' - } - super(SignUpPage, self).__init__(context, timeout) - - def enter_username(self, username): - self._fill_field('username', username) - return self - - def enter_invite_code(self, invite_code): - if invite_code: - self._enter_invite_code(invite_code) - return self - - def enter_password(self, password): - self._fill_field('pswd', password) - return self - - def enter_password_confirmation(self, password): - self._fill_field('pswd_confirmation', password) - return self - - def _enter_invite_code(self, invite_code): - self._fill_field('invite', invite_code) - return self - - def click_signup_button(self): - self._signup_button().click() - return self - - def _fill_field(self, locator_key, value): - field = self._find_element_by_css_locator(self._locators[locator_key]) - field.send_keys(value) - - def _signup_button(self): - return self.context.browser.find_element_by_name("button") - - -class ControlPanelPage(BasePageObject): - def __init__(self, context, timeout=10): - self._locators = { - 'home': "//h1[contains(.,'user control panel')]" - } - super(ControlPanelPage, self).__init__(context, timeout) - - def is_control_panel_home(self): - self.context.browser.find_element_by_xpath(self._locators['home']) \ No newline at end of file diff --git a/files/puppet/modules/pixelated/files/functional-tests/search_and_destroy.feature b/files/puppet/modules/pixelated/files/functional-tests/search_and_destroy.feature deleted file mode 100644 index 519ec8b..0000000 --- a/files/puppet/modules/pixelated/files/functional-tests/search_and_destroy.feature +++ /dev/null @@ -1,32 +0,0 @@ -# -# Copyright (c) 2014 ThoughtWorks, Inc. -# -# Pixelated is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Pixelated is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with Pixelated. If not, see . - - -# XXX: must implement with HTML content -@user_agent -Feature: search mail and deletion - As a user of pixelated - I want to search for emails - So I can manage them - - Scenario: User searches for a mail and deletes it - Given I'm logged in - When I search for a mail with the words "mail" - When I open the first mail in the mail list - Then I see one or more mails in the search results - When I try to delete the first mail - When I select the tag 'trash' - Then the deleted mail is there diff --git a/files/puppet/modules/pixelated/files/functional-tests/send_mail.feature b/files/puppet/modules/pixelated/files/functional-tests/send_mail.feature deleted file mode 100644 index 1e0495f..0000000 --- a/files/puppet/modules/pixelated/files/functional-tests/send_mail.feature +++ /dev/null @@ -1,47 +0,0 @@ -# -# Copyright (c) 2014 ThoughtWorks, Inc. -# -# Pixelated is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Pixelated is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with Pixelated. If not, see . - -@staging -Feature: send_mail - - @mail_to_myself - Scenario: user logs in end sends a mail to self - Given I'm logged in - When I send a mail to myself - When I open the email - Then I see a encrypted flag - - @unencrypted - Scenario: user receives an unencrypted email - Given I send an unencrypted email - When I login - When I open the unencrypted email - Then I see a unencrypted email flag - - @wip - @undecryptable - Scenario: user receives an email we cannot decrypt - Given I send an email encrypted to someone else - When I login - When I open the undecryptable email - Then I see a undecryptable flag - - @logout - Scenario: user logs out - Given I'm logged in - When I logout - And I visit the user-agent - Then I should see a login button diff --git a/files/puppet/modules/pixelated/files/functional-tests/steps/__init__.py b/files/puppet/modules/pixelated/files/functional-tests/steps/__init__.py deleted file mode 100644 index c68856b..0000000 --- a/files/puppet/modules/pixelated/files/functional-tests/steps/__init__.py +++ /dev/null @@ -1,89 +0,0 @@ -# -# Copyright (c) 2015 ThoughtWorks, Inc. -# -# Pixelated is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Pixelated is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with Pixelated. If not, see . -import os -import subprocess -import couchdb -import shutil -LEAP_HOME_FOLDER = os.environ.get('LEAP_HOME_FOLDER', '/var/lib/pixelated/.leap/') - - -def detect_hostname(): - return os.environ.get('TESTHOST') or subprocess.check_output(['hostname', '-d']).strip() - -hostname = detect_hostname() - -user_agent_address = 'https://%s' % hostname - - -def url_home(port=None): - if port is not None: - return '%s:%d' % (user_agent_address, port) - else: - return user_agent_address - - -def login_url(): - return url_home(port=8083) + '/login' - - -def logout_url(): - return url_home(port=8083) + '/logout' - - -def signup_url(): - return url_home() + '/signup' - - -def leap_login_url(): - return url_home() + '/login' - - -def _netrc_couch_credentials(): - with open('/etc/couchdb/couchdb.netrc', 'r') as netrc: - netrc_line = netrc.readline().strip().split(' ') - credentials = {} - for index in xrange(0, len(netrc_line), 2): - credentials[netrc_line[index]] = netrc_line[index+1] - return credentials - - -def _delete_identity(server, username): - email = '%s@%s' % (username, detect_hostname()) - filter_by_user_id = '''function(doc) { if (doc['address']=='%s') { emit(doc, null);} }''' % email - identities = server['identities'] - user_identities = identities.query(filter_by_user_id) - for ident in user_identities: - doc = identities.get(ident['id']) - identities.delete(doc) - - -def _delete_data(server, user_id): - user_db = 'user-%s' % user_id - if user_db in server: - del server[user_db] - - -def delete_soledad_server_db(user_id, username): - couch_credentials = _netrc_couch_credentials() - server = couchdb.Server("http://%(login)s:%(password)s@%(machine)s:5984" % couch_credentials) - _delete_identity(server, username) - _delete_data(server, user_id) - - -def delete_soledad_client_db(user_id): - soledad_folder = LEAP_HOME_FOLDER + user_id - if os.path.exists(soledad_folder): - shutil.rmtree(soledad_folder) diff --git a/files/puppet/modules/pixelated/files/functional-tests/steps/account.py b/files/puppet/modules/pixelated/files/functional-tests/steps/account.py deleted file mode 100644 index 17d6d86..0000000 --- a/files/puppet/modules/pixelated/files/functional-tests/steps/account.py +++ /dev/null @@ -1,86 +0,0 @@ -# -# Copyright (c) 2014 ThoughtWorks, Inc. -# -# Pixelated is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Pixelated is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with Pixelated. If not, see . - -import time - -from behave import * -from steps import login_url, logout_url, signup_url - -from common import * -from ..page_objects import ControlPanelPage -from ..page_objects import LoginPage -from ..page_objects import SignUpPage -from ..page_objects import TagList - - -@when(u'I visit the user-agent') -def step_impl(context): - context.browser.get(login_url()) - - -@then(u'I should see a login button') -def step_impl(context): - context.browser.find_element_by_css_selector('button[type=submit]') - - -@given(u'I\'m logged in') -@when(u'I login') -def step_impl(context): - context.browser.get(login_url()) - login_page = LoginPage(context) - login_page.enter_username(context.random_user.username).enter_password(context.random_user.password).login() - login_page.wait_interstitial_page() - - -@then(u'I see the inbox') -def step_impl(context): - # phantomjs can not deal with the interstitial. We need to load the - # website manually after the user-agent has started - time.sleep(30) - taglist = TagList(context) - taglist.is_pixelated_loaded() - - -@when(u'I logout') -def step_impl(context): - logout_button = context.browser.find_element_by_css_selector('ul#logout') - logout_button.click() - - -@when(u'I visit the signup-page') -def step_impl(context): - context.browser.get(signup_url()) - - -@then(u'I should see a signup button') -def step_impl(context): - context.browser.find_element_by_name('button') - - -@when(u'I register') -def step_impl(context): - signup_page = SignUpPage(context) - signup_page.enter_username(context.random_user.username) - signup_page.enter_password(context.random_user.password) - signup_page.enter_password_confirmation(context.random_user.password) - signup_page.enter_invite_code(get_invite_code()) - signup_page.click_signup_button() - - -@then(u'I see the control-panel') -def step_impl(context): - controlpanel_page = ControlPanelPage(context) - controlpanel_page.is_control_panel_home() diff --git a/files/puppet/modules/pixelated/files/functional-tests/steps/common.py b/files/puppet/modules/pixelated/files/functional-tests/steps/common.py deleted file mode 100644 index 29d34df..0000000 --- a/files/puppet/modules/pixelated/files/functional-tests/steps/common.py +++ /dev/null @@ -1,79 +0,0 @@ -# -# Copyright (c) 2014 ThoughtWorks, Inc. -# -# Pixelated is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Pixelated is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with Pixelated. If not, see . -import os -import subprocess - -from selenium.webdriver.common.by import By -from selenium.webdriver.support import expected_conditions as EC -from selenium.webdriver.support.wait import WebDriverWait -from email.mime.text import MIMEText -from steps import hostname - -import string -import random -import smtplib - - -MAX_WAIT_IN_S = 120 - - -class RandomUser(object): - username = 'test_user_' + ''.join(random.choice(string.lowercase) for i in range(16)) - password = ''.join(random.choice(string.lowercase) for i in range(16)) - email = '%s@%s' % (username, hostname) - - -def get_invite_code(): - if os.environ.get('INVITE_CODE_ENABLED') == 'true': - os.environ['RAILS_ENV'] = 'production' - return subprocess.check_output('/usr/bin/bundle exec rake generate_invites[1]'.split(), cwd='/srv/leap/webapp').strip() - - -def random_subject(): - if 'randomsubject' not in globals(): - global randomsubject - randomsubject=''.join(random.choice(string.lowercase) for i in range(16)) - return randomsubject - - -def wait_long_until_element_is_visible_by_locator(context, locator_tuple): - wait_emails_for = 600 - wait = WebDriverWait(context.browser, wait_emails_for) - wait.until(EC.visibility_of_element_located(locator_tuple)) - by, value = locator_tuple - return context.browser.find_element(by, value) - - -def save_source(context, filename='/tmp/source.html'): - with open(filename, 'w') as out: - out.write(context.browser.page_source.encode('utf8')) - - -def send_external_email(context, subject, body): - msg = MIMEText(body) - msg['Subject'] = subject - msg['From'] = context.random_user.email - msg['To'] = context.random_user.email - - s = smtplib.SMTP(hostname) - s.sendmail(context.random_user.email, [context.random_user.email], msg.as_string()) - s.quit() - - -def open_email(context, subject): - locator = '//ul[@id="mail-list"]//*[contains(.,"%s")]/parent::a' % subject - wait_long_until_element_is_visible_by_locator(context, (By.XPATH, locator)).click() - diff --git a/files/puppet/modules/pixelated/files/functional-tests/steps/compose.py b/files/puppet/modules/pixelated/files/functional-tests/steps/compose.py deleted file mode 100644 index 7863443..0000000 --- a/files/puppet/modules/pixelated/files/functional-tests/steps/compose.py +++ /dev/null @@ -1,41 +0,0 @@ -# -# Copyright (c) 2014 ThoughtWorks, Inc. -# -# Pixelated is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Pixelated is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with Pixelated. If not, see . - -from behave import when - -from ..page_objects import ComposeBox -from ..page_objects import MailListActions - -@when("I compose a message to '{recipient}'") -def impl(context, recipient): - compose_box = ComposeBox(context) - maillist_actions = MailListActions(context) - maillist_actions.open_compose_box() - - compose_box.enter_subject("Pixelated rocks!") - compose_box.enter_body("You should definitely use it. Cheers, User.") - compose_box.enter_recipients(recipient) - compose_box.save_draft() - - -@when('I send it') -def send_impl(context): - compose_box = ComposeBox(context) - compose_box.send_mail() - - - - diff --git a/files/puppet/modules/pixelated/files/functional-tests/steps/delete_mail.py b/files/puppet/modules/pixelated/files/functional-tests/steps/delete_mail.py deleted file mode 100644 index 6bccd6b..0000000 --- a/files/puppet/modules/pixelated/files/functional-tests/steps/delete_mail.py +++ /dev/null @@ -1,38 +0,0 @@ -# -# Copyright (c) 2015 ThoughtWorks, Inc. -# -# Pixelated is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Pixelated is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with Pixelated. If not, see . - -from behave import then -from ..page_objects import PixelatedPage - - -@then('I delete the email') -def impl(context): - pixelated_page = PixelatedPage(context) - pixelated_page.delete_mail(context.pixelated_email, pixelated_page.random_subject(), 240) - - -@then('I see it in the trash box') -def impl(context): - pixelated_page = PixelatedPage(context) - pixelated_page.go_to_trash() - pixelated_page.is_mail_on_list(context.pixelated_email, pixelated_page.random_subject()) - - -@then('I delete it permanently') -def impl(context): - pixelated_page = PixelatedPage(context) - pixelated_page.go_to_trash() - pixelated_page.delete_mail(context.pixelated_email, pixelated_page.random_subject()) diff --git a/files/puppet/modules/pixelated/files/functional-tests/steps/login.py b/files/puppet/modules/pixelated/files/functional-tests/steps/login.py deleted file mode 100644 index ae5d3cc..0000000 --- a/files/puppet/modules/pixelated/files/functional-tests/steps/login.py +++ /dev/null @@ -1,26 +0,0 @@ -# -# Copyright (c) 2015 ThoughtWorks, Inc. -# -# Pixelated is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Pixelated is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with Pixelated. If not, see . - -from behave import given -from ..page_objects import LoginPage - - -@given('I login as "{user}" with password "{password}" to an organization install of pixelated') -def impl(context, user, password): - context.pixelated_email = user + '@try.pixelated-project.org' - login_page = LoginPage(context) - login_page.enter_username(user).enter_password(password).login() - login_page.wait_interstitial_page() diff --git a/files/puppet/modules/pixelated/files/functional-tests/steps/mail_list.py b/files/puppet/modules/pixelated/files/functional-tests/steps/mail_list.py deleted file mode 100644 index 2f7cf40..0000000 --- a/files/puppet/modules/pixelated/files/functional-tests/steps/mail_list.py +++ /dev/null @@ -1,145 +0,0 @@ -# -# Copyright (c) 2015 ThoughtWorks, Inc. -# -# Pixelated is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Pixelated is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with Pixelated. If not, see . - -from selenium.webdriver.common.by import By -from behave import then -from ..page_objects import PixelatedPage -from ..page_objects import MailList -from ..page_objects import MailListActions - -#FROM USER AGENT REPO -from selenium.common.exceptions import NoSuchElementException -from time import sleep - - -@then('I see the email on the mail list') -def impl(context): - pixelated_page = PixelatedPage(context) - pixelated_page.is_mail_on_list(context.pixelated_email, pixelated_page.random_subject(), 240) - - -def find_current_mail(context): - return context.browser.find_element_by_id(context.current_mail_id) - - -def check_current_mail_is_visible(context): - find_current_mail(context) - - -def open_current_mail(context): - sleep(2) - e = find_current_mail(context) - e.click() - - -@then('I see that mail under the \'{tag}\' tag') -def impl(context, tag): - context.execute_steps("when I select the tag '%s'" % tag) - context.execute_steps(u'When I open the first mail in the mail list') - - -@when('I open that mail') -def impl(context): - sleep(3) - find_current_mail(context).click() - - -@when('I open the first mail in the mail list') -def impl(context): - # maillist = MailList(context) - context.current_mail_id = context.browser.find_element_by_css_selector("li[id^='mail']").get_attribute("id") - context.browser.find_element_by_css_selector("li[id^='mail'] a").click() - sleep(5) - - -@when('I open the first mail in the \'{tag}\'') -def impl(context, tag): - context.execute_steps(u"When I select the tag '%s'" % tag) - context.execute_steps(u'When I open the first mail in the mail list') - - -@when('I open the mail I previously tagged') -def impl(context): - open_current_mail(context) - - -@then('I see the mail I sent') -def impl(context): - src = context.browser.page_source - assert context.reply_subject in src - - -@then('the deleted mail is there') -def impl(context): - find_current_mail(context) - - -@given('I have mails') -def impl(context): - mail_list = MailList(context) - mails = mail_list.is_there_emails() - assert len(mails) > 0 - - -@when('I mark the first unread email as read') -def impl(context): - mail_list = MailList(context) - mails = mail_list.get_all_emails() - - for mail in mails: - if 'status-read' not in mail.get_attribute('class'): - mail.find_element_by_tag_name('input').click() - context.browser.find_element_by_id('mark-selected-as-read').click() - context.current_mail_id = mail.get_attribute('id') - break - sleep(5) - assert 'status-read' in context.browser.find_element_by_id(context.current_mail_id).get_attribute('class') - - -@when('I delete the email') -def impl(context): - maillist = MailList(context) - def last_email(): - return maillist.wait_until_element_is_visible_by_locator((By.CSS_SELECTOR, '#mail-list li')) - import pdb; pdb.set_trace() - context.current_mail_id = last_email().get_attribute('id') - last_email().find_element_by_tag_name('input').click() - maillist._find_element_by_id('delete-selected').click() - assert context.current_mail_id != maillist._find_elements_by_css_locator('#mail-list li span a')[0] - - -@when('I check all emails') -def impl(context): - maillist_action = MailListActions(context) - maillist_action.select_all_mails() - - -@when('I delete them permanently') -def impl(context): - maillist_actions = MailListActions(context) - maillist_actions.delete_selected_mails() - maillist_actions._find_element_by_id('delete-selected').click() - - -@then('I should not see any email') -def impl(context): - try: - context.browser.find_element(By.CSS_SELECTOR, '#mail-list li span a') - except NoSuchElementException: - assert True - except: - assert False - diff --git a/files/puppet/modules/pixelated/files/functional-tests/steps/mail_view.py b/files/puppet/modules/pixelated/files/functional-tests/steps/mail_view.py deleted file mode 100644 index c9ade4a..0000000 --- a/files/puppet/modules/pixelated/files/functional-tests/steps/mail_view.py +++ /dev/null @@ -1,98 +0,0 @@ -# -# Copyright (c) 2014 ThoughtWorks, Inc. -# -# Pixelated is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Pixelated is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with Pixelated. If not, see . -from selenium.webdriver.common.keys import Keys -from common import * - -from ..page_objects import ComposeBox -from ..page_objects import MailList -from ..page_objects import MailListActions -from ..page_objects import MailPage -from ..page_objects import Notification - - -@then('I see that the subject reads \'{subject_expected}\'') -def impl(context, subject_expected): - compose_box = ComposeBox(context) - subject_read = compose_box.get_reply_subject().text - assert subject_read == subject_expected - - -@then('I see that the body reads \'{body_expected}\'') -def impl(context, body_expected): - mail_page = MailPage(context) - body_read = mail_page.get_body().text - assert body_read == body_expected - - -@then('that email has the \'{tag}\' tag') -def impl(context, tag): - mail_page = MailPage(context) - elements = mail_page.get_tags() - tags = [e.text for e in elements] - assert tag in tags - - -@when('I add the tag \'{tag}\' to that mail') -def impl(context, tag): - mail_page = MailPage(context) - mail_page.add_tag(tag) - - -@when('I reply to it') -def impl(context): - mail_page = MailPage(context) - mail_page.reply_mail() - - -@when('I try to delete the first mail') -def impl(context): - context.execute_steps(u"When I open the first mail in the mail list") - mail_page = MailPage(context) - mail_page.delete_mail() - - # notification = Notification(context) - # notification.wait_for_notification("message_deleted") - -@when('I choose to forward this mail') -def impl(context): - mail_page = MailPage(context) - mail_page.forward_mail() - -@when('I forward this mail') -def impl(context): - compose_box = ComposeBox(context) - compose_box.send_mail() - - -@when('I remove all tags') -def impl(context): - mail_page = MailPage(context) - mail_page.remove_tags() - - -@when('I choose to trash') -def impl(context): - mail_list = MailList(context) - mail_list.mark_nth_checkbox(1) - maillist_actions = MailListActions(context) - maillist_actions.delete_selected_mails() - - -@then('I see the mail has a cc and a bcc recipient') -def impl(context): - mail_page = MailPage(context) - assert mail_page.mail_has_cc_and_bcc() == True - diff --git a/files/puppet/modules/pixelated/files/functional-tests/steps/search.py b/files/puppet/modules/pixelated/files/functional-tests/steps/search.py deleted file mode 100644 index f581ca5..0000000 --- a/files/puppet/modules/pixelated/files/functional-tests/steps/search.py +++ /dev/null @@ -1,35 +0,0 @@ -# -# Copyright (c) 2014 ThoughtWorks, Inc. -# -# Pixelated is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Pixelated is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with Pixelated. If not, see . -from time import sleep - -from selenium.webdriver.common.keys import Keys -from common import * - -from ..page_objects import MailListActions -from ..page_objects import MailList - - -@when('I search for a mail with the words "{search_term}"') -def impl(context, search_term): - maillist_action = MailListActions(context) - maillist_action.do_search(search_term) - sleep(1) - - -@then('I see one or more mails in the search results') -def impl(context): - maillist= MailList(context) - assert maillist.is_there_emails() diff --git a/files/puppet/modules/pixelated/files/functional-tests/steps/send_email_to_self.py b/files/puppet/modules/pixelated/files/functional-tests/steps/send_email_to_self.py deleted file mode 100644 index 48bae26..0000000 --- a/files/puppet/modules/pixelated/files/functional-tests/steps/send_email_to_self.py +++ /dev/null @@ -1,28 +0,0 @@ -# -# Copyright (c) 2015 ThoughtWorks, Inc. -# -# Pixelated is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Pixelated is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with Pixelated. If not, see . - -from behave import when -from ..page_objects import PixelatedPage - - -@when('I send an email to myself') -def impl(context): - pixelated_page = PixelatedPage(context) - pixelated_page.compose_and_send_email({ - 'subject': pixelated_page.random_subject(), - 'body': 'This is an automated test of Pixelated. Please do not delete this, it will be deleted automatically.', - 'recipients': context.pixelated_email - }) diff --git a/files/puppet/modules/pixelated/files/functional-tests/steps/send_mail.py b/files/puppet/modules/pixelated/files/functional-tests/steps/send_mail.py deleted file mode 100644 index b7e5a93..0000000 --- a/files/puppet/modules/pixelated/files/functional-tests/steps/send_mail.py +++ /dev/null @@ -1,122 +0,0 @@ -# -# Copyright (c) 2014 ThoughtWorks, Inc. -# -# Pixelated is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Pixelated is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with Pixelated. If not, see . - -from ..page_objects import LoginPage -from ..page_objects import ComposeBox -from ..page_objects import MailListActions -from ..page_objects import MailList -from ..page_objects import MailPage -from ..page_objects import Notification - -from behave import * -from common import * - - -@when(u'I send a mail to myself') -def step_impl(context): - email_to = context.random_user.email - compose_box = ComposeBox(context) - maillist_actions = MailListActions(context) - - maillist_actions.open_compose_box() - compose_box.enter_subject('email to myself %s' % random_subject()) - compose_box.enter_body('Hi, \n this is an email. To find this email, I add this strange string here:\n eisheeneejaih7eiw7heiLah') - compose_box.enter_recipient(email_to) - compose_box.send_mail() - - -@when(u'I open the email') -def step_impl(context): - subject = 'email to myself %s' % random_subject() - email_from = context.random_user.username - - maillist = MailList(context) - maillist.select_mail(email_from, subject) - - -@then(u'I see a encrypted flag') -def step_impl(context): - mail_page = MailPage(context) - mail_page.check_mail_flag('encrypted_flag') - - -@when(u'I see that the mail was sent') -def step_impl(context): - notification = Notification(context) - notification.wait_for_notification("message_sent") - - -@given(u'I send an email encrypted to someone else') -def step_impl(context): - send_external_email(context, 'undecryptable email %s' %random_subject(), encrypted_body()) - - -@when(u'I open the undecryptable email') -def step_impl(context): - subject = 'undecryptable email %s' % random_subject() - email_from = context.random_user.username - - maillist = MailList(context) - maillist.select_mail(email_from, subject) - - -@then(u'I see a undecryptable flag') -def step_impl(context): - mail_page = MailPage(context) - mail_page.check_mail_flag('undecryptable_flag') - - -@given(u'I send an unencrypted email') -def step_impl(context): - send_external_email(context, 'unencrypted email %s' %random_subject(), 'some body') - - -@when(u'I open the unencrypted email') -def step_impl(context): - subject = 'unencrypted email %s' % random_subject() - email_from = context.random_user.username - - maillist = MailList(context) - maillist.select_mail(email_from, subject) - - -@then(u'I see a unencrypted email flag') -def step_impl(context): - mail_page = MailPage(context) - mail_page.check_mail_flag('unencrypted_flag') - - -def encrypted_body(): - return """ ------BEGIN PGP MESSAGE----- -Comment: GPGTools - https://gpgtools.org - -hQIMA8Aza4SMPrUXARAAsiIM/+InP8FP77iI/Kuhlaj1JHkjomGdm3X/fc7W498e -njbLt58cLwiGdNJWEKCBWP8McjyKevA5b9CaE94qJJA2OHEPo2yG6mL+SbbhvHFw -X+815CwxeT/VsqJksRXxl7Y337t9PgniWvpnlAhmtkh4S8CskqQJjZCFmC0v2s9r -XuJv/XEgReG2xX7SktjMwVYFRb5ghpbz42JyP8ahUGOlyIpYVwRp4tzsYWhCJH90 -WPKqPwLBatJ0qHzYVky6KpsnjFdwTLjy9NM5yw1xPkuuUFjjB7pKZTCTdtfkAyX9 -qcH0iUdhmlzUhm0BIJpyFW4gfh6+mWTe0oWa+Lf3NIiJEmeNl8Z9nAKVcfjwgVOS -nrjaTM3lOh15MwBblOK5B0CM5YyEhJ6NG0gITM+dt+gItpbUi53QU/oRZJ6mCvNB -J/XX9lYua+FcSrgXygcGU0Lyx1vOwRjm4/BsJGXmYZ2dow0moJ4IVDRlcecpYzaz -j7M0fzajCmeS+JVaqrBVxecFE4LIw2cFbT27pYScO18Id1c3b7n/6TxJjyMYAgNa -cUeI6yCx1w6roGSkG53L3MQPHfjMNSHhRdG0PeprBVg2G4n2Wazfl3n9mqb0Mk4K -YyVbN9+LY+R8e3obfVGZsZAp5nHlSR/mhuq0EfS1S9a18XMSIIVv8p90su/SvD3S -TQE9zqA3EjY4OzrNe+FKVpLFjCo5VLxuCZdaCVbjuEhDk7i/X06T3dqPtqlvIErW -R2zZzupoH5OfjBazUB0ZqkRBZTO/VAAmVr8DCk+e -=htJr ------END PGP MESSAGE----- -""" diff --git a/files/puppet/modules/pixelated/files/functional-tests/steps/tag_list.py b/files/puppet/modules/pixelated/files/functional-tests/steps/tag_list.py deleted file mode 100644 index 829bb65..0000000 --- a/files/puppet/modules/pixelated/files/functional-tests/steps/tag_list.py +++ /dev/null @@ -1,50 +0,0 @@ -# -# Copyright (c) 2014 ThoughtWorks, Inc. -# -# Pixelated is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Pixelated is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with Pixelated. If not, see . -from common import * - -from ..page_objects import TagList -from ..page_objects import MailList - - -def click_first_element_with_class(context, classname): - elements = context.browser.find_elements_by_class_name(classname) - elements[0].click() - - -def is_side_nav_expanded(context): - e = context.browser.find_elements_by_class_name('content')[0].get_attribute('class').count(u'move-right') == 1 - return e - - -def expand_side_nav(context): - if is_side_nav_expanded(context): - return - - toggle = context.browser.find_elements_by_class_name('side-nav-toggle')[0] - toggle.click() - - -@when('I select the tag \'{mailbox}\'') -def impl(context, mailbox): - expand_side_nav(context) - tag_list = TagList(context) - - tag_list.go_to_mailbox(mailbox) - - mail_list = MailList(context) - mail_list.is_mailbox_loaded(context, mailbox) - - diff --git a/files/puppet/modules/pixelated/files/functional-tests/tag_and_reply.feature b/files/puppet/modules/pixelated/files/functional-tests/tag_and_reply.feature deleted file mode 100644 index 178ad20..0000000 --- a/files/puppet/modules/pixelated/files/functional-tests/tag_and_reply.feature +++ /dev/null @@ -1,34 +0,0 @@ -# -# Copyright (c) 2014 ThoughtWorks, Inc. -# -# Pixelated is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Pixelated is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with Pixelated. If not, see . - -@user_agent -Feature: Tag and reply - As a user of Pixelated - I want to tag my emails - So that I can easily find them - - Scenario: User tags a mail, replies to it then checks that mail is in the right tag - Given I'm logged in - When I open the first mail in the 'inbox' - When I add the tag 'website' to that mail - Then I see that mail under the 'website' tag - When I open the mail I previously tagged - #could not test beyond this because of the problem to send emails - And I reply to it - When I select the tag 'sent' - Then I see the mail I sent - - diff --git a/files/puppet/modules/pixelated/files/functional-tests/test_requirements.txt b/files/puppet/modules/pixelated/files/functional-tests/test_requirements.txt deleted file mode 100644 index 940a51f..0000000 --- a/files/puppet/modules/pixelated/files/functional-tests/test_requirements.txt +++ /dev/null @@ -1,4 +0,0 @@ -behave==1.2.4 -selenium==2.44.0 -pycurl==7.43.0 -couchdb \ No newline at end of file diff --git a/files/puppet/modules/pixelated/files/leap_test.rb b/files/puppet/modules/pixelated/files/leap_test.rb deleted file mode 100644 index 524297f..0000000 --- a/files/puppet/modules/pixelated/files/leap_test.rb +++ /dev/null @@ -1,18 +0,0 @@ -raise SkipTest unless service?(:webapp) - -require 'json' - -class Pixelated < LeapTest - depends_on "Network" - - def setup - end - def test_01_Are_daemons_running? - assert_running service: 'pixelated-server' - pass - end - def test_02_can_connect_to_useragent? - assert_tcp_socket('localhost', '8080') - pass - end -end diff --git a/files/puppet/modules/pixelated/files/phantomjs b/files/puppet/modules/pixelated/files/phantomjs deleted file mode 100755 index d72e801..0000000 Binary files a/files/puppet/modules/pixelated/files/phantomjs and /dev/null differ diff --git a/files/puppet/modules/pixelated/files/syslog/pixelated b/files/puppet/modules/pixelated/files/syslog/pixelated deleted file mode 100644 index 2ff4d36..0000000 --- a/files/puppet/modules/pixelated/files/syslog/pixelated +++ /dev/null @@ -1,9 +0,0 @@ -/var/log/pixelated/*.log { - rotate 7 - daily - compress - missingok - notifempty - copytruncate -} - diff --git a/files/puppet/modules/pixelated/files/webapp/locales/en.yml b/files/puppet/modules/pixelated/files/webapp/locales/en.yml deleted file mode 100644 index 0b0989d..0000000 --- a/files/puppet/modules/pixelated/files/webapp/locales/en.yml +++ /dev/null @@ -1,2 +0,0 @@ -en: - signup_info: Create a new user account. diff --git a/files/puppet/modules/pixelated/files/webapp/views/common/_download_button.html.haml b/files/puppet/modules/pixelated/files/webapp/views/common/_download_button.html.haml deleted file mode 100644 index e69de29..0000000 diff --git a/files/puppet/modules/pixelated/manifests/agent.pp b/files/puppet/modules/pixelated/manifests/agent.pp deleted file mode 100644 index 82a2ce0..0000000 --- a/files/puppet/modules/pixelated/manifests/agent.pp +++ /dev/null @@ -1,82 +0,0 @@ -# configure and install the pixelated user agent -class pixelated::agent { - include ::pixelated::apt::preferences - include ::pixelated::install - include ::pixelated::unattended_upgrades - include ::pixelated::syslog - include ::pixelated::check_mk - include ::pixelated::tests - - $domain_hash = hiera('domain') - $domain = $domain_hash['full_suffix'] - $services = hiera('services') - $default_file = '/etc/default/pixelated-server' - - service { 'pixelated-server': - ensure => running, - provider => 'systemd', - enable => true, - require => [ - Package['pixelated-server'], - Service['apache'] - ] - } - - file { $default_file: - content => template('pixelated/pixelated-server-default'), - mode => '0644', - owner => 'root', - group => 'root', - notify => Service['pixelated-server'], - require => Package['pixelated-server'], - } - - # make pixelated accessible at https://mail.domain/ - apache::vhost::file { 'pixelated': - content => template('pixelated/pixelated-apache.conf.erb'), - mod_security => false, - } - - # Allow traffic from outside to pixelated - file { '/etc/shorewall/macro.pixelated_user_agent': - content => 'PARAM - - tcp 8080', - notify => Service['shorewall'], - require => Package['shorewall'] - } - - shorewall::rule { - 'net2fw-pixelated-user-agent': - source => 'net', - destination => '$FW', - action => 'pixelated_user_agent(ACCEPT)', - order => 200; - } - - - # webapp customizations - file{ ['/srv/leap/webapp/config/customization/locales/','/srv/leap/webapp/config/customization/views','/srv/leap/webapp/config/customization/views/common','/srv/leap/webapp/config/customization/views/users']: - ensure => directory, - owner => 'leap-webapp', - group => 'leap-webapp', - require => Vcsrepo['/srv/leap/webapp'], - } - file{ '/srv/leap/webapp/config/customization/views/common/_download_button.html.haml': - source => 'puppet:///modules/pixelated/webapp/views/common/_download_button.html.haml', - owner => 'leap-webapp', - group => 'leap-webapp', - require => File['/srv/leap/webapp/config/customization/views/common'], - } - file{ '/srv/leap/webapp/config/customization/locales/en.yml': - source => 'puppet:///modules/pixelated/webapp/locales/en.yml', - owner => 'leap-webapp', - group => 'leap-webapp', - require => File['/srv/leap/webapp/config/customization/views/common'], - } - file{ '/srv/leap/webapp/config/customization/views/users/show.html.haml': - content => template('pixelated/webapp/show.html.haml.erb'), - owner => 'leap-webapp', - group => 'leap-webapp', - require => File['/srv/leap/webapp/config/customization/views/common'], - } - -} diff --git a/files/puppet/modules/pixelated/manifests/apt/preferences.pp b/files/puppet/modules/pixelated/manifests/apt/preferences.pp deleted file mode 100644 index badada3..0000000 --- a/files/puppet/modules/pixelated/manifests/apt/preferences.pp +++ /dev/null @@ -1,28 +0,0 @@ -# pin packages -class pixelated::apt::preferences { - - apt::preferences_snippet { ['python-urllib3', 'python-requests','python-six']: - release => "${::lsbdistcodename}-backports", - priority => 999 - } - - file { [ - '/etc/apt/preferences.d/soledad-client', - '/etc/apt/preferences.d/soledad-server', - '/etc/apt/preferences.d/soledad-common', - '/etc/apt/preferences.d/leap-keymanager', - '/etc/apt/preferences.d/leap-auth']: - ensure => absent - } - - - # Remove legacy apt repo resources - file { '/etc/apt/sources.list.d/pixelated.list': - ensure => absent, - notify => Exec[refresh_apt], - } - apt::preferences_snippet { 'pixelated': - ensure => absent, - } - -} diff --git a/files/puppet/modules/pixelated/manifests/check_mk.pp b/files/puppet/modules/pixelated/manifests/check_mk.pp deleted file mode 100644 index 52ab490..0000000 --- a/files/puppet/modules/pixelated/manifests/check_mk.pp +++ /dev/null @@ -1,10 +0,0 @@ -# tune check_mk_agent for pixelated specific stuff -# see https://github.com/pixelated-project/pixelated-platform/issues/20 -class pixelated::check_mk { - - file { '/etc/check_mk/logwatch.d/user-agent.cfg': - source => 'puppet:///modules/pixelated/check_mk/user-agent.cfg', - require => Package['check-mk-agent-logwatch']; - } - -} diff --git a/files/puppet/modules/pixelated/manifests/init.pp b/files/puppet/modules/pixelated/manifests/init.pp deleted file mode 100644 index 6d31f68..0000000 --- a/files/puppet/modules/pixelated/manifests/init.pp +++ /dev/null @@ -1,5 +0,0 @@ -# setup pixelated -class pixelated { - include pixelated::agent -} - diff --git a/files/puppet/modules/pixelated/manifests/install.pp b/files/puppet/modules/pixelated/manifests/install.pp deleted file mode 100644 index 732e55f..0000000 --- a/files/puppet/modules/pixelated/manifests/install.pp +++ /dev/null @@ -1,48 +0,0 @@ -# Installs pixelated-server and pixelated-user-agent -class pixelated::install ( - $release = '1.0_beta1', - $pixelated_server_deb = 'pixelated-server_0.2.162.gbpba0081_all.deb', - $pixelated_user_agent_deb = 'pixelated-user-agent_0.6.699.gbpc8f588_all.deb' -) { - - - - exec { 'fetch_pixelated_user_agent': - command => "/usr/bin/wget https://github.com/pixelated/pixelated-user-agent/releases/download/${release}/${pixelated_user_agent_deb}", - cwd => '/var/tmp', - creates => "/var/tmp/${pixelated_user_agent_deb}" - } - - exec { 'fetch_pixelated_server': - command => "/usr/bin/wget https://github.com/pixelated/pixelated-user-agent/releases/download/${release}/${pixelated_server_deb}", - cwd => '/var/tmp', - creates => "/var/tmp/${pixelated_server_deb}" - } - - package { - # Dependencies of pixelated-user-agent - [ 'libffi6', 'libsqlcipher0', 'python' ]: - ensure => installed; - 'pixelated-user-agent': - ensure => latest, - provider => 'dpkg', - source => "/var/tmp/${pixelated_user_agent_deb}", - require => [ - Exec['fetch_pixelated_user_agent'], - Package['libffi6'], - Package['libsqlcipher0'], - Package['libssl-dev'], - Package['python'], - ]; - # Dependencies of pixelated-server - [ 'python-sqlcipher', 'systemd' ]: - ensure => installed; - 'pixelated-server': - ensure => latest, - provider => 'dpkg', - source => "/var/tmp/${pixelated_server_deb}", - require => [ - Exec['fetch_pixelated_server'], - Package['pixelated-user-agent'] ] - } -} diff --git a/files/puppet/modules/pixelated/manifests/remove.pp b/files/puppet/modules/pixelated/manifests/remove.pp deleted file mode 100644 index 4fcfc9f..0000000 --- a/files/puppet/modules/pixelated/manifests/remove.pp +++ /dev/null @@ -1,9 +0,0 @@ -# remove obsolent stuff we deployed by earlier versions of -# this module - -# -class pixelated::remove { - tidy { - ['/etc/apt/preferences.d/leap-mx','/etc/apt/preferences.d/python-leap-common']:; - } -} diff --git a/files/puppet/modules/pixelated/manifests/syslog.pp b/files/puppet/modules/pixelated/manifests/syslog.pp deleted file mode 100644 index 1695a6f..0000000 --- a/files/puppet/modules/pixelated/manifests/syslog.pp +++ /dev/null @@ -1,18 +0,0 @@ -# -class pixelated::syslog { - File { - owner => root, - group => root, - mode => '0644', - } - - rsyslog::snippet { '05-pixelated': - content => template('pixelated/05-pixelated.conf.erb'), - } - - file { '/etc/logrotate.d/pixelated': - ensure => present, - source => 'puppet:///modules/pixelated/syslog/pixelated', - } - -} diff --git a/files/puppet/modules/pixelated/manifests/tests.pp b/files/puppet/modules/pixelated/manifests/tests.pp deleted file mode 100644 index 503ed4f..0000000 --- a/files/puppet/modules/pixelated/manifests/tests.pp +++ /dev/null @@ -1,72 +0,0 @@ -# Install functional test for Pixelated based on bahave and phantomjs -# The tetst are integrated in 'leap test' -class pixelated::tests { - include stdlib - $webapp = hiera('webapp') - $invite = $webapp['invite_required'] - File { - owner => root, - group => root, - mode => '0644', - } - - file { '/srv/leap/tests_custom': - ensure => directory, - mode => '0755', - } - file { '/srv/leap/tests_custom/pixelated.rb': - source => 'puppet:///modules/pixelated/leap_test.rb', - owner => 'root', - group => 'root', - mode => '0755', - } - - ensure_packages(['python-pip', 'curl', 'bzip2', 'python-enum','python-pycurl', 'moreutils']) - - package{['behave','selenium']: - ensure => installed, - provider => 'pip', - require => Package['python-pip'], - } - - file{'/usr/local/bin/phantomjs': - source => 'puppet:///modules/pixelated/phantomjs', - owner => 'root', - group => 'root', - mode => '0755' - } - - file{'/srv/leap/tests_custom/functional-tests': - ensure => directory, - recurse => true, - purge => true, - ignore => '*.pyc', - source => 'puppet:///modules/pixelated/functional-tests', - } - - cron {'run_functional_tests': - command => "(date; INVITE_CODE_ENABLED=${invite} /usr/bin/mk-job pixelated-functional-tests /usr/local/bin/behave --stop --tags @staging --tags ~@wip --no-capture -k /srv/leap/tests_custom/functional-tests/ | ts ) >> /var/log/check_mk_jobs.log 2>&1", - environment => 'PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - user => 'root', - minute => 27, - notify => Exec['dummy_register_job'], - require => Package['moreutils'] - } - - # You can remove this after january/2017 - cron {'run_smoke_tests': - ensure => absent, - } - - # You can remove this after january/2017 - file {'remove_smoke_tests_on_checkmk_folder': - ensure => absent, - path => '/var/lib/check_mk_agent/job/root/pixelated-smoke-tests' - } - - exec {'dummy_register_job': - command => '/usr/bin/mk-job pixelated-functional-tests /bin/true', - require => Class['::check_mk::agent::install'], - refreshonly => true, - } -} diff --git a/files/puppet/modules/pixelated/manifests/unattended_upgrades.pp b/files/puppet/modules/pixelated/manifests/unattended_upgrades.pp deleted file mode 100644 index dc50c26..0000000 --- a/files/puppet/modules/pixelated/manifests/unattended_upgrades.pp +++ /dev/null @@ -1,10 +0,0 @@ -# enable unattended upgrades for pixelated platform -class pixelated::unattended_upgrades { - apt::apt_conf { '51unattended-upgrades_pixelated': - source => [ - "puppet:///modules/pixelated/${::lsbdistid}/51unattended-upgrades_pixelated.${::lsbdistcodename}", - "puppet:///modules/pixelated/${::lsbdistid}/51unattended-upgrades_pixelated"], - require => Package['unattended-upgrades'], - refresh_apt => false, - } -} diff --git a/files/puppet/modules/pixelated/migrate_data_from_dispatcher_to_multi_user_agent.sh b/files/puppet/modules/pixelated/migrate_data_from_dispatcher_to_multi_user_agent.sh deleted file mode 100755 index 68dba6b..0000000 --- a/files/puppet/modules/pixelated/migrate_data_from_dispatcher_to_multi_user_agent.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash -# - -DISPATCHER_LEAP_FOLDER=/var/lib/pixelated/dispatcher -DESTINATION_LEAP_FOLDER=/var/lib/pixelated/.leap - -hash ls $DESTINATION_LEAP_FOLDER 2>/dev/null || mkdir -p $DESTINATION_LEAP_FOLDER -hash jq 2>/dev/null || apt-get install jq - -echo $all_users -echo 'about to copy user soledad client folders' -for user in $(ls $DISPATCHER_LEAP_FOLDER) -do - user_id=$(/usr/bin/curl -s --netrc-file /etc/couchdb/couchdb.netrc '127.0.0.1:5984/identities/_all_docs?include_docs=true' | grep 'address":"'$user'@' | jq -r '.doc.user_id' 2> /dev/null) - echo 'User '$user', User ID' $user_id - - # if no user id - if [ -z $user_id ] || [ $user_id = 'null' ]; then - echo 'skipping...' - continue - fi - - leap_folder=$DISPATCHER_LEAP_FOLDER/$user/data/$user_id - if [ -d $leap_folder ]; then - cp -r $leap_folder $DESTINATION_LEAP_FOLDER - else - data_folder=$DISPATCHER_LEAP_FOLDER/$user/data - mkdir -p $DESTINATION_LEAP_FOLDER/$user_id - cp -r $data_folder/providers $DESTINATION_LEAP_FOLDER/$user_id - cp -r $data_folder/search_index $DESTINATION_LEAP_FOLDER/$user_id - cp -r $data_folder/soledad $DESTINATION_LEAP_FOLDER/$user_id - fi - echo 'done with user' $user -done - -echo "******* data moved ********" \ No newline at end of file diff --git a/files/puppet/modules/pixelated/spec/classes/agent_spec.rb b/files/puppet/modules/pixelated/spec/classes/agent_spec.rb deleted file mode 100644 index 2ba956b..0000000 --- a/files/puppet/modules/pixelated/spec/classes/agent_spec.rb +++ /dev/null @@ -1,48 +0,0 @@ -require 'spec_helper' - describe 'pixelated::agent' do - after :each do - Facter.clear - Facter.clear_messages - end - - - - context 'single node' do - let(:facts) do - { - :operatingsystem => 'Debian', - :osfamily => 'Debian', - :lsbdistid => 'Debian', - :lsbdistcodename => 'jessie', - :testscenario => 'single_node', - } - end - let!(:ensure_packages) { MockFunction.new('ensure_packages',{:type => :statement}) } - let(:pre_condition) { [ - "class stdlib {}", - "define rsyslog::snippet($content) {}", - "define shorewall::rule($source,$destination,$action,$order) {}", - "define apache::vhost::file($content,$mod_security) {}", - "define apt::sources_list($content='deb url') {}", - "define apt::apt_conf($source='file url',$refresh_apt='true') {}", - "define apt::preferences_snippet($release='stable',$priority='999',$pin='release o=Debian',$package='*',$ensure='present') {}", - ] } - - it { should contain_class('pixelated::syslog') } - it { should contain_class('pixelated::tests') } - - it { should contain_service('pixelated-server')} - - # testing if shorewall::masq generates the files - it { should contain_shorewall__rule('net2fw-pixelated-user-agent').with_source('net') } - - it { should contain_apache__vhost__file('pixelated').with_content(/mail.example.com/)} - - it "should configure leap webapp" do - should contain_file('/srv/leap/webapp/config/customization/locales/en.yml').with( 'require' => 'File[/srv/leap/webapp/config/customization/views/common]',) - should contain_file('/srv/leap/webapp/config/customization/views/common/_download_button.html.haml') - should contain_file('/srv/leap/webapp/config/customization/views/users/show.html.haml').with_content(/mail.example.com/) - end - end - -end diff --git a/files/puppet/modules/pixelated/spec/classes/apt_preferences_spec.rb b/files/puppet/modules/pixelated/spec/classes/apt_preferences_spec.rb deleted file mode 100644 index 27297db..0000000 --- a/files/puppet/modules/pixelated/spec/classes/apt_preferences_spec.rb +++ /dev/null @@ -1,26 +0,0 @@ -require 'spec_helper' - -describe 'pixelated::apt::preferences' do - let(:facts) do - { - :operatingsystem => 'Debian', - :lsbdistid => 'Debian', - :lsbdistcodename => 'jessie', - } - end - - let(:pre_condition) { [ - "class apt {}", - "define apt::sources_list($content='deb url') {}", - "define apt::preferences_snippet($release='stable',$priority='999',$pin='release o=Debian',$package='*',$ensure='present') {}", - ] } - - %w( soledad-server soledad-client soledad-common leap-keymanager leap-auth).each do | file | - it { should contain_file("/etc/apt/preferences.d/#{file}").with_ensure('absent')} - end - - %w( python-urllib3 python-requests python-six).each do | package | - it { should contain_apt__preferences_snippet("#{package}").with_release(/jessie/) } - end - -end diff --git a/files/puppet/modules/pixelated/spec/classes/pixelated_spec.rb b/files/puppet/modules/pixelated/spec/classes/pixelated_spec.rb deleted file mode 100644 index 4d9386e..0000000 --- a/files/puppet/modules/pixelated/spec/classes/pixelated_spec.rb +++ /dev/null @@ -1,30 +0,0 @@ -require 'spec_helper' - -describe 'pixelated' do - context 'single node' do - let(:facts) do - { - :operatingsystem => 'Debian', - :osfamily => 'Debian', - :lsbdistid => 'Debian', - :lsbdistcodename => 'jessie', - :testscenario => 'single_node', - } - end - - let!(:ensure_packages) { MockFunction.new('ensure_packages',{:type => :statement}) } - let(:pre_condition) { [ - "class stdlib {}", - "class apt {}", - "define rsyslog::snippet($content) {}", - "define shorewall::rule($source,$destination,$action,$order) {}", - "define apache::vhost::file($content,$mod_security) {}", - "define apt::sources_list($content='deb url') {}", - "define apt::apt_conf($source='file url',$refresh_apt='true') {}", - "define apt::preferences_snippet($release='stable',$priority='999',$pin='release o=Debian',$package='*',$ensure='present') {}", - ] } - - it { should contain_class('pixelated::agent') } - end -end - diff --git a/files/puppet/modules/pixelated/spec/classes/remove_spec.rb b/files/puppet/modules/pixelated/spec/classes/remove_spec.rb deleted file mode 100644 index 5e5567d..0000000 --- a/files/puppet/modules/pixelated/spec/classes/remove_spec.rb +++ /dev/null @@ -1,6 +0,0 @@ -require 'spec_helper' - -describe 'pixelated::remove' do - it { should compile } -end - diff --git a/files/puppet/modules/pixelated/spec/classes/syslog_spec.rb b/files/puppet/modules/pixelated/spec/classes/syslog_spec.rb deleted file mode 100644 index b4aacbf..0000000 --- a/files/puppet/modules/pixelated/spec/classes/syslog_spec.rb +++ /dev/null @@ -1,24 +0,0 @@ -require 'spec_helper' - -describe 'pixelated::syslog' do - let(:facts) do - { - :operatingsystem => 'Debian', - :osfamily => 'Debian', - :lsbdistcodename => 'jessie', - } - end - let(:pre_condition) { [ - "class stdlib {}", - "define rsyslog::snippet($content) {}", - "define shorewall::rule($source,$destination,$action,$order) {}", - "define apache::vhost::file($content,$mod_security) {}", - "define apt::sources_list($content='deb url') {}", - "define apt::apt_conf($source='file url') {}", - "define apt::preferences_snippet($release='stable',$priority='999',$pin='release o=Debian',$package='*',$ensure='present') {}", - ] } - - - it { should contain_rsyslog__snippet('05-pixelated')} - it { should contain_file('/etc/logrotate.d/pixelated')} -end diff --git a/files/puppet/modules/pixelated/spec/classes/tests_spec.rb b/files/puppet/modules/pixelated/spec/classes/tests_spec.rb deleted file mode 100644 index cc3e9b7..0000000 --- a/files/puppet/modules/pixelated/spec/classes/tests_spec.rb +++ /dev/null @@ -1,47 +0,0 @@ -require 'spec_helper' - -describe 'pixelated::tests' do - context 'single node' do - let(:facts) do - { - :operatingsystem => 'Debian', - :osfamily => 'Debian', - :lsbdistid => 'Debian', - :lsbdistcodename => 'jessie', - :testscenario => 'single_node', - } - end - - let!(:ensure_packages) { MockFunction.new('ensure_packages',{:type => :statement}) } - let(:pre_condition) { [ - "class stdlib {}", - ] } - - it do - should contain_file('/srv/leap/tests_custom').with( - 'ensure' => 'directory', - 'mode' => '0755', - ) - end - it do - should contain_file('/srv/leap/tests_custom/functional-tests').with( - 'ensure' => 'directory', - 'recurse' => 'true', - ) - end - - it { should contain_file('/srv/leap/tests_custom/pixelated.rb')} - it { should contain_file('/usr/local/bin/phantomjs')} - - it do - should contain_exec('dummy_register_job').with( - "require" => "Class[::Check_mk::Agent::Install]" - ) - end - it do - should contain_cron('run_functional_tests').with( - "command" => """(date; INVITE_CODE_ENABLED=true /usr/bin/mk-job pixelated-functional-tests /usr/local/bin/behave --stop --tags @staging --tags ~@wip --no-capture -k /srv/leap/tests_custom/functional-tests/ | ts ) >> /var/log/check_mk_jobs.log 2>&1" - ) - end - end -end diff --git a/files/puppet/modules/pixelated/spec/fixtures/hiera/hiera.yaml b/files/puppet/modules/pixelated/spec/fixtures/hiera/hiera.yaml deleted file mode 100644 index 2d001ec..0000000 --- a/files/puppet/modules/pixelated/spec/fixtures/hiera/hiera.yaml +++ /dev/null @@ -1,7 +0,0 @@ ---- -:backends: - - yaml -:hierarchy: - - "%{::testscenario}" -:yaml: - :datadir: 'spec/fixtures/hiera' diff --git a/files/puppet/modules/pixelated/spec/fixtures/hiera/multi_node.yaml b/files/puppet/modules/pixelated/spec/fixtures/hiera/multi_node.yaml deleted file mode 100644 index c8bf5c7..0000000 --- a/files/puppet/modules/pixelated/spec/fixtures/hiera/multi_node.yaml +++ /dev/null @@ -1,9 +0,0 @@ ---- -domain: - full: pixelated.example.com - full_suffix: example.com - internal: pixelated.example.i - internal_suffix: example.i - name: pixelated.example.com -services: ["pixelated"] - diff --git a/files/puppet/modules/pixelated/spec/fixtures/hiera/single_node.yaml b/files/puppet/modules/pixelated/spec/fixtures/hiera/single_node.yaml deleted file mode 100644 index 0759bdf..0000000 --- a/files/puppet/modules/pixelated/spec/fixtures/hiera/single_node.yaml +++ /dev/null @@ -1,11 +0,0 @@ ---- -domain: - full: pixelated.example.com - full_suffix: example.com - internal: pixelated.example.i - internal_suffix: example.i - name: pixelated.example.com -services: ["mx","pixelated"] - -webapp: - invite_required: true diff --git a/files/puppet/modules/pixelated/spec/fixtures/hiera/with_nagios.yaml b/files/puppet/modules/pixelated/spec/fixtures/hiera/with_nagios.yaml deleted file mode 100644 index 74b9031..0000000 --- a/files/puppet/modules/pixelated/spec/fixtures/hiera/with_nagios.yaml +++ /dev/null @@ -1,9 +0,0 @@ ---- -domain: - full: pixelated.example.com - full_suffix: example.com - internal: pixelated.example.i - internal_suffix: example.i - name: pixelated.example.com -services: ["pixelated","monitor"] - diff --git a/files/puppet/modules/pixelated/spec/spec_helper.rb b/files/puppet/modules/pixelated/spec/spec_helper.rb deleted file mode 100644 index fb6ab97..0000000 --- a/files/puppet/modules/pixelated/spec/spec_helper.rb +++ /dev/null @@ -1,12 +0,0 @@ -require 'rspec-puppet' -require 'rspec-puppet-utils' -require 'puppetlabs_spec_helper/module_spec_helper' -require 'puppetlabs_spec_helper/puppetlabs_spec_helper' - -fixture_path = File.expand_path(File.join(__FILE__, '..', 'fixtures')) - -RSpec.configure do |c| - c.module_path = File.join(fixture_path, 'modules') - c.manifest_dir = File.join(fixture_path, 'manifests') - c.hiera_config = 'spec/fixtures/hiera/hiera.yaml' -end diff --git a/files/puppet/modules/pixelated/templates/05-pixelated.conf.erb b/files/puppet/modules/pixelated/templates/05-pixelated.conf.erb deleted file mode 100644 index edcf299..0000000 --- a/files/puppet/modules/pixelated/templates/05-pixelated.conf.erb +++ /dev/null @@ -1,7 +0,0 @@ -# This file is managed by Puppet, changes may be overwritten -if $syslogtag contains_i 'user-agent' then { -action(type="omfile" file="/var/log/pixelated/user-agent.log" template="RSYSLOG_TraditionalFileFormat") - stop -} - - diff --git a/files/puppet/modules/pixelated/templates/pixelated-apache.conf.erb b/files/puppet/modules/pixelated/templates/pixelated-apache.conf.erb deleted file mode 100644 index 9f71420..0000000 --- a/files/puppet/modules/pixelated/templates/pixelated-apache.conf.erb +++ /dev/null @@ -1,60 +0,0 @@ - - ServerName mail.<%= scope.lookupvar('::pixelated::agent::domain') %> - RewriteEngine On - RewriteRule ^.*$ https://mail.<%= scope.lookupvar('::pixelated::agent::domain') %>%{REQUEST_URI} [R=permanent,L] - CustomLog ${APACHE_LOG_DIR}/mail.<%= scope.lookupvar('::pixelated::agent::domain') %>.log common - - - - ServerName mail.<%= scope.lookupvar('::pixelated::agent::domain') %> - CustomLog ${APACHE_LOG_DIR}/mail.<%= scope.lookupvar('::pixelated::agent::domain') %>.log common - - SSLCACertificatePath /etc/ssl/certs - SSLCertificateChainFile /usr/local/share/ca-certificates/leap_commercial_ca.crt - SSLCertificateKeyFile /etc/x509/keys/leap_commercial.key - SSLCertificateFile /etc/x509/certs/leap_commercial.crt - - Include include.d/ssl_common.inc - - - Header always unset X-Powered-By - Header always unset X-Runtime - Header set X-Frame-Options SAMEORIGIN - - - DocumentRoot /srv/leap/webapp/public - - SSLProxyEngine on - ProxyPass / https://<%= scope.lookupvar('::pixelated::agent::domain') %>:8080/ - ProxyPassReverse / https://<%= scope.lookupvar('::pixelated::agent::domain') %>:8080/ - - - -Listen 8083 - - ServerName mail.<%= scope.lookupvar('::pixelated::agent::domain') %> - CustomLog ${APACHE_LOG_DIR}/mail.<%= scope.lookupvar('::pixelated::agent::domain') %>.log common - - SSLCACertificatePath /etc/ssl/certs - SSLCertificateChainFile /usr/local/share/ca-certificates/leap_commercial_ca.crt - SSLCertificateKeyFile /etc/x509/keys/leap_commercial.key - SSLCertificateFile /etc/x509/certs/leap_commercial.crt - - Include include.d/ssl_common.inc - - - Header always unset X-Powered-By - Header always unset X-Runtime - - - DocumentRoot /srv/leap/webapp/public - - SSLProxyEngine on - ProxyPass / https://<%= scope.lookupvar('::pixelated::agent::domain') %>:8080/ - ProxyPassReverse / https://<%= scope.lookupvar('::pixelated::agent::domain') %>:8080/ - Header unset Content-Security-Policy - Header unset X-Content-Security-Policy - Header unset X-Webkit-Csp - - - diff --git a/files/puppet/modules/pixelated/templates/pixelated-server-default b/files/puppet/modules/pixelated/templates/pixelated-server-default deleted file mode 100644 index efe91dd..0000000 --- a/files/puppet/modules/pixelated/templates/pixelated-server-default +++ /dev/null @@ -1,9 +0,0 @@ -# managed by puppet - -FEEDBACK_URL= -HOME=/var/lib/pixelated -LEAP_PROVIDER=<%= @domain %> -SSL_KEY=/etc/x509/keys/leap_commercial.key -SSL_CERT=/etc/x509/certs/leap_commercial.crt -LEAP_CA=/etc/ssl/certs/ca-certificates.crt -EXTRA_OPTS="--banner /etc/pixelated/pixelated_banner.html" diff --git a/files/puppet/modules/pixelated/templates/webapp/show.html.haml.erb b/files/puppet/modules/pixelated/templates/webapp/show.html.haml.erb deleted file mode 100644 index 0ede372..0000000 --- a/files/puppet/modules/pixelated/templates/webapp/show.html.haml.erb +++ /dev/null @@ -1,6 +0,0 @@ -= render 'overview' -.container-fluid - .row-fluid - %br - %h4 - = link_to 'Go to your Pixelated inbox', 'https://mail.<%= scope.lookupvar('::pixelated::agent::domain') %>' diff --git a/files/puppet/modules/pixelated/vagrant_platform.sh b/files/puppet/modules/pixelated/vagrant_platform.sh deleted file mode 100755 index 7f40363..0000000 --- a/files/puppet/modules/pixelated/vagrant_platform.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -# -# Issues: -# - homebrew version of git does not work nicely with submodules - -hash vagrant 2>/dev/null || { echo >&2 "Vagrant is not installed. Aborting."; exit 1; } - -if [ -d ./leap_platform ] -then - cd leap_platform - /usr/bin/git pull - /usr/bin/git submodule update --init -else - /usr/bin/git clone --branch develop --recursive https://leap.se/git/leap_platform.git - cd leap_platform -fi - -cd tests/example-provider -vagrant up pixelated --no-provision || vagrant reload -vagrant provision diff --git a/hiera/aardwolf.yaml b/hiera/aardwolf.yaml index bb442d2..c2a4105 100644 --- a/hiera/aardwolf.yaml +++ b/hiera/aardwolf.yaml @@ -35,6 +35,7 @@ couch: development: site_config: true dns: + aliases: [] public: true domain: full: aardwolf.unstable.bitmask.net diff --git a/hiera/cat.yaml b/hiera/cat.yaml index 56c0505..2982903 100644 --- a/hiera/cat.yaml +++ b/hiera/cat.yaml @@ -11,6 +11,7 @@ couchdb_port: 4000 development: site_config: true dns: + aliases: [] public: true domain: full: cat.unstable.bitmask.net diff --git a/hiera/donkey.yaml b/hiera/donkey.yaml index 0f8b71d..11d2ace 100644 --- a/hiera/donkey.yaml +++ b/hiera/donkey.yaml @@ -435,7 +435,6 @@ nagios: ip_address: "199.119.112.207" services: - monitor - - pixelated - webapp ssh_port: 22 dotterel: @@ -564,7 +563,6 @@ platform: service_type: public_service services: - monitor - - pixelated - webapp sources: apt: diff --git a/hiera/tuatara.yaml b/hiera/tuatara.yaml index bca7595..773a91f 100644 --- a/hiera/tuatara.yaml +++ b/hiera/tuatara.yaml @@ -4,6 +4,7 @@ contacts: development: site_config: true dns: + aliases: [] public: true domain: full: tuatara.unstable.bitmask.net diff --git a/nodes/donkey.json b/nodes/donkey.json index 4d13161..88022d6 100644 --- a/nodes/donkey.json +++ b/nodes/donkey.json @@ -2,8 +2,7 @@ "ip_address": "199.119.112.207", "services": [ "monitor", - "webapp", - "pixelated" + "webapp" ], "tags": [ "dc", -- cgit v1.2.3