Project

General

Profile

Feature #8670

Feature #6298: Write more automated tests

Feature #6307: Write tests for Git

Write tests for Git over SSH

Added by anonym about 5 years ago. Updated almost 5 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Test suite
Target version:
Start date:
01/10/2015
Due date:
% Done:

100%

Feature Branch:
kytv:test/8670-git-over-ssh
Type of work:
Code
Blueprint:
Starter:
Affected tool:

Related issues

Blocked by Tails - Bug #8644: Setup a Git repo for automated Git tests Resolved 01/09/2015
Blocked by Tails - Feature #8669: Write tests for anonymous Git Resolved 01/10/2015

Associated revisions

Revision 406d2b6c
Added by Tails developers almost 5 years ago

Merge remote-tracking branch 'kytv/test/8670-git-over-ssh' into testing

Fix-committed: #8670

History

#1 Updated by anonym about 5 years ago

  • Blocked by Bug #8644: Setup a Git repo for automated Git tests added

#2 Updated by kytv about 5 years ago

  • Assignee changed from kytv to anonym
  • % Done changed from 0 to 40
  • QA Check set to Ready for QA
  • Feature Branch set to kytv:test/8670-git-over-ssh

#3 Updated by kytv about 5 years ago

  • Assignee deleted (anonym)

#4 Updated by intrigeri about 5 years ago

  • Assignee set to anonym

#5 Updated by kytv about 5 years ago

  • Status changed from Confirmed to In Progress

#6 Updated by intrigeri almost 5 years ago

#7 Updated by intrigeri almost 5 years ago

  • Related to deleted (Feature #8669: Write tests for anonymous Git)

#8 Updated by intrigeri almost 5 years ago

#9 Updated by intrigeri almost 5 years ago

FTR, this branch is forked of the one for #8669.

#10 Updated by intrigeri almost 5 years ago

  • Assignee changed from anonym to kytv
  • QA Check changed from Ready for QA to Dev Needed
  • Feature Branch changed from kytv:test/8670-git-over-ssh to test/8670-git-over-ssh

I've pushed a bunch of improvements to test/8670-git-over-ssh. However, the added tests depend on the TAILS_TEST_SECRET_KEY envvar, and I see nowhere documented that one needs to define it, nor how => looks like something is still missing for that branch to be ready to be merged.

#11 Updated by anonym almost 5 years ago

intrigeri wrote:

I've pushed a bunch of improvements to test/8670-git-over-ssh. However, the added tests depend on the TAILS_TEST_SECRET_KEY envvar, and I see nowhere documented that one needs to define it, nor how => looks like something is still missing for that branch to be ready to be merged.

Indeed, but I think there's been a misunderstanding here. Now the secret key can be stored in the clear in the Tails Git repo. The secret key is already stored in the clear for the world to see in the :myprivatekeyispublic/testing Git repo used in the "Cloning git repository over SSH" scenario added in this branch. So we can do:

--- a/features/step_definitions/git.rb
+++ b/features/step_definitions/git.rb
@@ -8,8 +8,36 @@ end
 Given /^I have the SSH key pair for a Git repository$/ do
   next if @skip_steps_while_restoring_background
   @vm.execute_successfully("install -m 0700 -d '/home/#{$live_user}/.ssh/'", $live_user)
-  secret_key=ENV['TAILS_TEST_SECRET_KEY']
-  public_key=ENV['TAILS_TEST_PUBLIC_KEY']
+  secret_key=<<EOF
+-----BEGIN RSA PRIVATE KEY-----
+MIIEowIBAAKCAQEAvMUNgUUM/kyuo26m+Xw7igG6zgGFMFbS3u8m5StGsJOn7zLi
+J8P5Mml/R+4tdOS6owVU4RaZTPsNZZK/ClYmOPhmNvJ04pVChk2DZ8AARg/TANj3
+qjKs3D+MeKbk1bt6EsA55kgGsTUky5Ti8cc2Wna25jqjagIiyM822PGG9mmI6/zL
+YR6QLUizNaciXrRM3Q4R4sQkEreVlHeonPEiGUs9zx0swCpLtPM5UIYte1PVHgkw
+ePsU6vM8UqVTK/VwtLLgLanXnsMFuzq7DTAXPq49+XSFNq4JlxbEF6+PQXZvYZ5N
+eW00Gq7NSpPP8uoHr6f1J+mMxxnM85jzYtRx+QIDAQABAoIBAA8Bs1MlhCTrP67q
+awfGYo1UGd+qq0XugREL/hGV4SbEdkNDzkrO/46MaHv1aVOzo0q2b8r9Gu7NvoDm
+q51Mv/kjdizEFZq1tvYqT1n+H4dyVpnopbe4E5nmy2oECokbQFchRPkTnMSVrvko
+OupxpdaHPX8MBlW1GcLRBlE00j/gfK1SXX5rcxkF5EHVND1b6iHddTPearDbU8yr
+wga1XO6WeohAYzqmGtMD0zk6lOk0LmnTNG6WvHiFTAc/0yTiKub6rNOIEMS/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fDuKAbrOAYUwVtLe7yblK0awk6fvMuInw/kyaX9H7i105LqjBVThFplM+w1lkr8KViY4+GY28nTilUKGTYNnwABGD9MA2PeqMqzcP4x4puTVu3oSwDnmSAaxNSTLlOLxxzZadrbmOqNqAiLIzzbY8Yb2aYjr/MthHpAtSLM1pyJetEzdDhHixCQSt5WUd6ic8SIZSz3PHSzAKku08zlQhi17U9UeCTB4+xTq8zxSpVMr9XC0suAtqdeewwW7OrsNMBc+rj35dIU2rgmXFsQXr49Bdm9hnk15bTQars1Kk8/y6gevp/Un6YzHGczzmPNi1HH5 amnesia@amnesia" 
   assert(!secret_key.nil? && secret_key.length > 0)
   assert(!public_key.nil? && public_key.length > 0)
   @vm.execute_successfully("echo '#{secret_key}' > '/home/#{$live_user}/.ssh/id_rsa'", $live_user)

Or they can be put in features/support/config.rb. Once #8188 is fixed we can store them in the mechanism added there. All still in the clear and we don't care.

#12 Updated by kytv almost 5 years ago

  • Target version changed from Tails_1.4 to Tails_1.3

#13 Updated by kytv almost 5 years ago

  • Assignee changed from kytv to anonym
  • % Done changed from 40 to 50
  • QA Check changed from Dev Needed to Ready for QA
  • Feature Branch changed from test/8670-git-over-ssh to kytv:test/8670-git-over-ssh

#14 Updated by Tails almost 5 years ago

  • Status changed from In Progress to 11
  • % Done changed from 50 to 100

Applied in changeset commit:ad31741f162e3cd93a0298e66faee1cca2a51066.

#15 Updated by anonym almost 5 years ago

  • Assignee deleted (anonym)
  • QA Check changed from Ready for QA to Pass

Merged!

#16 Updated by BitingBird almost 5 years ago

  • Status changed from 11 to Resolved

Also available in: Atom PDF