You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2013/07/24 17:03:01 UTC

[1/2] git commit: [#6463] use separate test project from ForgeSVN's tests

Updated Branches:
  refs/heads/master 61d0ca575 -> 515dea070


[#6463] use separate test project from ForgeSVN's tests


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/2b7de72e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/2b7de72e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/2b7de72e

Branch: refs/heads/master
Commit: 2b7de72ef67d3a7216902cfc6073760336d9d67a
Parents: 61d0ca5
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Wed Jul 24 14:55:28 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Wed Jul 24 14:55:51 2013 +0000

----------------------------------------------------------------------
 .../forgeimporters/google/tests/test_code.py     | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/2b7de72e/ForgeImporters/forgeimporters/google/tests/test_code.py
----------------------------------------------------------------------
diff --git a/ForgeImporters/forgeimporters/google/tests/test_code.py b/ForgeImporters/forgeimporters/google/tests/test_code.py
index 660bc83..a738b8b 100644
--- a/ForgeImporters/forgeimporters/google/tests/test_code.py
+++ b/ForgeImporters/forgeimporters/google/tests/test_code.py
@@ -2,7 +2,13 @@ from unittest import TestCase
 from mock import Mock, patch
 
 from allura.tests import TestController
-from forgesvn.tests import with_svn
+from allura.tests.decorators import with_tool
+
+
+# important to be distinct from 'test' which ForgeSVN uses, so that the tests can run in parallel and not clobber each other
+test_project_with_repo = 'test2'
+with_svn = with_tool(test_project_with_repo, 'SVN', 'src', 'SVN')
+
 
 from forgeimporters.google.code import (
         get_repo_url,
@@ -67,7 +73,7 @@ class TestGoogleRepoImportController(TestController, TestCase):
 
     @with_svn
     def test_index(self):
-        r = self.app.get('/p/test/admin/src/_importer/')
+        r = self.app.get('/p/{}/admin/src/_importer/'.format(test_project_with_repo))
         self.assertIsNotNone(r.html.find(attrs=dict(name="gc_project_name")))
         self.assertIsNotNone(r.html.find(attrs=dict(name="mount_label")))
         self.assertIsNotNone(r.html.find(attrs=dict(name="mount_point")))
@@ -77,15 +83,16 @@ class TestGoogleRepoImportController(TestController, TestCase):
     def test_create(self, gri):
         from allura import model as M
         gri.import_tool.return_value = Mock()
-        gri.import_tool.return_value.url.return_value = '/p/test/mymount'
+        gri.import_tool.return_value.url.return_value = '/p/{}/mymount'.format(test_project_with_repo)
         params = dict(gc_project_name='poop',
                 mount_label='mylabel',
                 mount_point='mymount',
                 )
-        r = self.app.post('/p/test/admin/src/_importer/create', params,
+        r = self.app.post('/p/{}/admin/src/_importer/create'.format(test_project_with_repo),
+                params,
                 status=302)
-        project = M.Project.query.get(shortname='test')
-        self.assertEqual(r.location, 'http://localhost/p/test/mymount')
+        project = M.Project.query.get(shortname=test_project_with_repo)
+        self.assertEqual(r.location, 'http://localhost/p/{}/mymount'.format(test_project_with_repo))
         self.assertEqual(project.get_tool_data('google-code', 'project_name'),
                 'poop')
         self.assertEqual(project._id, gri.import_tool.call_args[0][0]._id)


[2/2] git commit: [#6463] add license to new files

Posted by br...@apache.org.
[#6463] add license to new files


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/515dea07
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/515dea07
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/515dea07

Branch: refs/heads/master
Commit: 515dea070df582f0c9af8d3bf7b9f739800ea2f4
Parents: 2b7de72
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Wed Jul 24 14:56:59 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Wed Jul 24 14:56:59 2013 +0000

----------------------------------------------------------------------
 .../google/templates/code/index.html              | 18 ++++++++++++++++++
 .../forgeimporters/google/tests/test_code.py      | 17 +++++++++++++++++
 2 files changed, 35 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/515dea07/ForgeImporters/forgeimporters/google/templates/code/index.html
----------------------------------------------------------------------
diff --git a/ForgeImporters/forgeimporters/google/templates/code/index.html b/ForgeImporters/forgeimporters/google/templates/code/index.html
index 7eb1e47..7bace3a 100644
--- a/ForgeImporters/forgeimporters/google/templates/code/index.html
+++ b/ForgeImporters/forgeimporters/google/templates/code/index.html
@@ -1,3 +1,21 @@
+{#-
+       Licensed to the Apache Software Foundation (ASF) under one
+       or more contributor license agreements.  See the NOTICE file
+       distributed with this work for additional information
+       regarding copyright ownership.  The ASF licenses this file
+       to you under the Apache License, Version 2.0 (the
+       "License"); you may not use this file except in compliance
+       with the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+       Unless required by applicable law or agreed to in writing,
+       software distributed under the License is distributed on an
+       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+       KIND, either express or implied.  See the License for the
+       specific language governing permissions and limitations
+       under the License.
+-#}
 {% extends g.theme.master %}
 
 {% block title %}

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/515dea07/ForgeImporters/forgeimporters/google/tests/test_code.py
----------------------------------------------------------------------
diff --git a/ForgeImporters/forgeimporters/google/tests/test_code.py b/ForgeImporters/forgeimporters/google/tests/test_code.py
index a738b8b..cc91178 100644
--- a/ForgeImporters/forgeimporters/google/tests/test_code.py
+++ b/ForgeImporters/forgeimporters/google/tests/test_code.py
@@ -1,3 +1,20 @@
+#       Licensed to the Apache Software Foundation (ASF) under one
+#       or more contributor license agreements.  See the NOTICE file
+#       distributed with this work for additional information
+#       regarding copyright ownership.  The ASF licenses this file
+#       to you under the Apache License, Version 2.0 (the
+#       "License"); you may not use this file except in compliance
+#       with the License.  You may obtain a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#       Unless required by applicable law or agreed to in writing,
+#       software distributed under the License is distributed on an
+#       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#       KIND, either express or implied.  See the License for the
+#       specific language governing permissions and limitations
+#       under the License.
+
 from unittest import TestCase
 from mock import Mock, patch