Commit graph

156 commits

Author SHA1 Message Date
Daniel Dourvaris
af4ba1eff5 codeblocks: add new code token rendering function that
supports diff and normal tokens.
2016-10-19 10:37:07 +03:00
Martin Bornhold
a9a4e32eed subprocess: Change all imports from subprocess -> subprocess32 2016-10-14 09:37:44 +02:00
Daniel Dourvaris
ea04026aa4 ux: fix bug where saving empty issue tracker form was causing
exception, fixes: #4278
2016-10-14 17:14:44 +03:00
Daniel Dourvaris
8f4e395877 annotations: replace annotated source code viewer with renderer
to allow soft wrapping of lines and viewing of annotation message
2016-10-12 18:55:18 +03:00
Daniel Dourvaris
323c951802 vcs: add equality testing for commits against non commits to allow
commit == None functionality
2016-10-13 13:30:06 +03:00
Martin Bornhold
88a384f13c tests: Fix error introduced by rebasing. 2016-10-11 13:27:51 +02:00
Martin Bornhold
2d6717d891 tests: Bring pyro4 protocol back to work as opt in. 2016-10-11 11:43:48 +02:00
Martin Bornhold
2b09ada931 tests: Make test work with either http or pyro4 protocol. 2016-10-10 14:32:46 +02:00
Martin Bornhold
acfd1ac604 pytest: Fix settings in test-ini files. 2016-10-07 10:39:14 +02:00
Martin Bornhold
efcfc61e67 tests: Fix test that expects the pyro4 scm app as default. 2016-10-07 10:32:28 +02:00
Martin Bornhold
dcedd37e25 tests: Use http backend in rhodecode test ini file. 2016-10-04 15:09:41 +02:00
Martin Bornhold
7870feb3da tests: Create new config files for vcsserver (http/pyro4) 2016-10-04 15:07:10 +02:00
Martin Bornhold
904bcf9607 tests: Move rhodecode ini file into tests directory 2016-10-04 15:06:09 +02:00
Martin Bornhold
c183e22410 tests: Remove unused command argument. 2016-10-04 14:48:21 +02:00
Martin Bornhold
30d2e31229 pytest: Use http as default backend in pytest configuration. 2016-10-04 14:37:48 +02:00
Martin Bornhold
8279f376a9 tests: Fix tests that depend on the default value of 'pyro4' as backend. 2016-10-04 14:37:09 +02:00
Martin Bornhold
d3fd4efbe1 tests: Specify protocol in case of pyro4.
Previously this was the default value of the argument.
2016-10-04 13:05:16 +02:00
Martin Bornhold
27139beaa3 tests: Change default settings in tests to 'http' 2016-10-04 13:04:40 +02:00
Martin Bornhold
cb1b19cfba tests: Fix infinite loop. 2016-10-04 12:44:03 +02:00
Daniel Dourvaris
25f2c0b8b2 tests: add test for pull request with multiple commits and reflect
peppercorn usage in other pull request tests
2016-10-12 08:27:31 +03:00
Martin Bornhold
ecc24326d7 vcs: Do not pass the backend key into the scm app instances.
We used the key as a value for a response header. Since this header is removed there
is no need to pass the backend key araound.
2016-10-06 16:25:27 +02:00
Martin Bornhold
c6466346b4 vcs: Remove custom response header which contains backend key.
We used this custom header to skip the error handling.
This is no linger needed since the VCS middleware is moved above of the error handling.
2016-10-06 16:10:40 +02:00
Martin Bornhold
861adffd82 tests: Add a way to deactivate exception re-raising in tests. 2016-10-07 09:15:43 +02:00
Marcin Kuzminski
39879f0dff webhooks: added variables into the call URL. Fixes #4211 2016-10-06 23:20:55 +02:00
Martin Bornhold
cc4ab6dae7 tests: Use only one place to define pr and shadow URL segments. 2016-09-28 13:40:01 +02:00
Martin Bornhold
974c9b8766 tests: Add tests to check the shadow-repo regular expression. 2016-09-28 13:26:30 +02:00
Martin Bornhold
ad14211248 tests: Adapt test to recent changes.
This argument was removed.
2016-09-27 09:48:59 +02:00
Martin Bornhold
0a34a8c1df tests: Fix tests which need the DB to run. 2016-09-27 09:48:42 +02:00
Martin Bornhold
7eeedebf7b tests: Add a `db` fixture that initializes the database.
This is quite useful if tests only need the database and not the whole app.
Then only this fixture is needed instead of the full blown pylonsapp/app fixtures.
2016-09-27 09:48:23 +02:00
Martin Bornhold
ae2b380d5b tests: Add tests to check the shadow repo exposure of the simplevcs class. 2016-09-26 14:55:30 +02:00
Martin Bornhold
16bac867f5 tests: Make return values of stub vcs controller editable. 2016-09-26 14:54:58 +02:00
Martin Bornhold
69f6006e28 tests: Add some tests to check that events/extensions are triggered on hook execution.
This also includes tests to check that events/extensions are NOT triggered
on requests to shadow repositories.
2016-09-23 16:23:08 +02:00
Martin Bornhold
3c6a97202a tests: Add new attribute is_shadow_repo to test dummy extra data. 2016-09-23 14:31:36 +02:00
Martin Bornhold
2a64079089 tests: Add missing key/value to vcs operation dummy dict. 2016-09-23 14:17:04 +02:00
Johannes Bornhold
08a2b45999 vcs: Minimal change to expose the shadow repository
Based on my original research, this was the "minimal" starting point. It shows
that three concepts are needed for the "repo_name":

* From the security standpoint we think of the shadow repository having the same
  ACL as the target repository of the pull request. This is because the pull
  request itself is considered to be a part of the target repository.

  Out of this thought, the variable "acl_repo_name" is used whenever we want to
  check permissions or when we need the database configuration of the
  repository. An alternative name would have been "db_repo_name", but the usage
  for ACL checking is the most important one.

* From the web interaction perspective, we need the URL which was originally
  used to get to the repository. This is because based on this base URL commands
  can be identified. Especially for Git this is important, so that the commands
  are correctly recognized.

  Since the URL is in the focus, this is called "url_repo_name".

* Finally we have to deal with the repository on the file system. This is what
  the VCS layer deal with normally, so this name is called "vcs_repo_name".


The original repository interaction is a special case where all three names are
the same.

When interacting with a pull request, these three names are typically all
different.

This change is minimal in a sense that it just makes the interaction with a
shadow repository barely work, without checking any special constraints yet.
This was the starting point for further work on this topic.
2016-09-18 20:01:19 +02:00
Marcin Lulek
295710d6b5 frontend: wrap our legacy js code inside polymer element 2016-09-29 17:24:34 +02:00
lisaq
db3f788080 ux: better tooltip for inline comment toggle 2016-09-29 12:32:25 +02:00
Daniel Dourvaris
b3e97c1715 reviewers: store reviewer reasons to database, fixes #4238 2016-09-27 02:34:15 +03:00
Daniel Dourvaris
f10e21cde9 jsonalchemy: add tests for using the json types in an sqlalchemy
context and make sure that the values returned are correctly
returned and stored in the database
2016-09-28 06:37:50 +03:00
Martin Bornhold
cf6af66533 tests: Adapt tests to recent changes in vcs lib. 2016-09-26 15:43:55 +02:00
Martin Bornhold
8e531005da pyro4: Add the custom header X-RhodeCode-Backend to the pyro4 backend responses.
This custom header sets the SCM backend which is in use. It is used to identify
VCS responses in the error handler. VCS responses are skipped during error handling.
2016-09-26 14:52:06 +02:00
Martin Bornhold
62f27a2f43 tests: Add a test that checks return type of pr title generate function. (has to be unicode) 2016-09-26 08:53:31 +02:00
lisaq
cde9d17915 tests: fixing changelog test for new notifications 2016-09-21 13:15:51 +02:00
Johannes Bornhold
fb5b1506a2 tests: Fix --without-vcsserver parameter
Ensuring now that we always disable the vcsserver auto start for the test suite,
since the test suite bootstraps its own vcsserver process.

Also enhanced TestINI.
2016-09-20 14:01:42 +02:00
Daniel Dourvaris
3469c46507 integrations: add recursive repo group scope to allow integrations
to cascade into all descendant repositories, fixes #4225
2016-09-14 05:38:21 +03:00
Daniel Dourvaris
091418c182 vcs: change way refs are retrieved for git so same name branch/tags
and remotes can be supported, fixes #298
2016-09-12 06:56:30 +03:00
Johannes Bornhold
c5898bf7ee summary: Avoid to re-fetch Node object 2016-09-08 13:05:55 +02:00
Johannes Bornhold
55b3018fc2 renderer: Clean up obsolete code
Removing now unused code from markup_renderer.
2016-09-08 11:13:33 +02:00
Johannes Bornhold
2ca27901e3 repo: Implement ReadmeFinder
It currently resembles the logic from the old markup renderer. The
implementation is based on get_nodes though, so that we should usually only have
one call or at most three calls if the directories "doc" and/or "docs" exist.

A difference is that we now ignore the case, this already simplifies the rule
definition.
2016-09-07 19:23:09 +02:00
Johannes Bornhold
5d40a9e6e8 tests: Add vcsbackend_stub as a new fixture
Corresponding to backend_stub.
2016-09-07 18:02:29 +02:00