Skip to content

Commit a60c6c1

Browse files
authored
Merge pull request #723 from s1113950/fixTests
Fixes tests
2 parents a18be5a + bacc752 commit a60c6c1

File tree

3 files changed

+13
-15
lines changed

3 files changed

+13
-15
lines changed

.ci/azure-pipelines.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ jobs:
1313
strategy:
1414
matrix:
1515
Mito27_27:
16-
python.version: '2.7'
16+
python.version: '2.7.18'
1717
MODE: mitogen
1818
Ans288_27:
19-
python.version: '2.7'
19+
python.version: '2.7.18'
2020
MODE: localhost_ansible
2121
VER: 2.8.8
2222

.ci/localhost_ansible_tests.py

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
#!/usr/bin/env python
22
# Run tests/ansible/all.yml under Ansible and Ansible-Mitogen
33

4-
import glob
54
import os
6-
import shutil
75
import sys
86

97
import ci_lib
@@ -31,16 +29,17 @@
3129

3230

3331
with ci_lib.Fold('machine_prep'):
34-
ssh_dir = os.path.expanduser('~/.ssh')
35-
if not os.path.exists(ssh_dir):
36-
os.makedirs(ssh_dir, int('0700', 8))
37-
38-
key_path = os.path.expanduser('~/.ssh/id_rsa')
39-
shutil.copy(KEY_PATH, key_path)
40-
41-
auth_path = os.path.expanduser('~/.ssh/authorized_keys')
42-
os.system('ssh-keygen -y -f %s >> %s' % (key_path, auth_path))
43-
os.chmod(auth_path, int('0600', 8))
32+
# generate a new ssh key for localhost ssh
33+
os.system("ssh-keygen -P '' -m pem -f ~/.ssh/id_rsa")
34+
os.system("cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys")
35+
# also generate it for the sudo user
36+
os.system("sudo ssh-keygen -P '' -m pem -f /var/root/.ssh/id_rsa")
37+
os.system("sudo cat /var/root/.ssh/id_rsa.pub | sudo tee -a /var/root/.ssh/authorized_keys")
38+
os.chmod(os.path.expanduser('~/.ssh'), int('0700', 8))
39+
os.chmod(os.path.expanduser('~/.ssh/authorized_keys'), int('0600', 8))
40+
# run chmod through sudo since it's owned by root
41+
os.system('sudo chmod 600 /var/root/.ssh')
42+
os.system('sudo chmod 600 /var/root/.ssh/authorized_keys')
4443

4544
if os.path.expanduser('~mitogen__user1') == '~mitogen__user1':
4645
os.chdir(IMAGE_PREP_DIR)

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
# Mitogen
32

43
<!-- [![Build Status](https://travis-ci.org/dw/mitogen.png?branch=master)](https://travis-ci.org/dw/mitogen}) -->

0 commit comments

Comments
 (0)