Skip to content

Commit 7c46442

Browse files
committed
remove debug, activate endpoint, reactivate all tests
1 parent 85c40f2 commit 7c46442

File tree

2 files changed

+24
-25
lines changed

2 files changed

+24
-25
lines changed

.github/workflows/qiita-ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ jobs:
9595
export QIITA_ROOTCA_CERT=`pwd`/qiita-dev/qiita_core/support_files/ci_rootca.crt
9696
export QIITA_CONFIG_FP=`pwd`/qiita-dev/qiita_core/support_files/config_test_local.cfg
9797
sed "s#/home/runner/work/qiita/qiita#${PWD}/qiita-dev#g" `pwd`/qiita-dev/qiita_core/support_files/config_test.cfg > ${QIITA_CONFIG_FP}
98+
sed -i "s/ENABLE_HTTPS_PLUGIN_FILETRANSFER = False/ENABLE_HTTPS_PLUGIN_FILETRANSFER = True/" ${QIITA_CONFIG_FP}
9899
99100
export REDBIOM_HOST="http://localhost:7379"
100101

qiita_client/tests/test_qiita_client.py

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -412,35 +412,33 @@ def test_fetch_file_from_central(self):
412412
self.tester._plugincoupling = 'https'
413413
prefix = join(expanduser("~"), 'kurt')
414414
self.clean_up_files.append(prefix + fp)
415-
print("STEFAN", fp, prefix)
416415
fp_obs = self.tester.fetch_file_from_central(fp, prefix=prefix)
417-
print("STEFAN2", fp_obs)
418416
self.assertEqual(prefix + fp, fp_obs)
419417
self.assertTrue(filecmp.cmp(fp, fp_obs, shallow=False))
420418

421-
# def test_push_file_to_central(self):
422-
# self.tester._plugincoupling = 'filesystem'
423-
424-
# ainfo = self.tester.get("/qiita_db/artifacts/%s/" % 1)
425-
# fp = ainfo['files']['raw_forward_seqs'][0]['filepath']
426-
427-
# # mode: filesystem
428-
# fp_obs = self.tester.push_file_to_central(fp)
429-
# self.assertEqual(fp, fp_obs)
430-
431-
# # non existing mode
432-
# with self.assertRaises(ValueError):
433-
# self.tester._plugincoupling = 'foo'
434-
# self.tester.push_file_to_central(fp)
435-
436-
# # change transfer mode to https
437-
# self.tester._plugincoupling = 'https'
438-
# fp_source = 'foo.bar'
439-
# with open(fp_source, 'w') as f:
440-
# f.write("this is a test\n")
441-
# self.clean_up_files.append(fp_source)
442-
# fp_obs = self.tester.push_file_to_central(fp_source)
443-
# self.assertEqual(fp_source, fp_obs)
419+
def test_push_file_to_central(self):
420+
self.tester._plugincoupling = 'filesystem'
421+
422+
ainfo = self.tester.get("/qiita_db/artifacts/%s/" % 1)
423+
fp = ainfo['files']['raw_forward_seqs'][0]['filepath']
424+
425+
# mode: filesystem
426+
fp_obs = self.tester.push_file_to_central(fp)
427+
self.assertEqual(fp, fp_obs)
428+
429+
# non existing mode
430+
with self.assertRaises(ValueError):
431+
self.tester._plugincoupling = 'foo'
432+
self.tester.push_file_to_central(fp)
433+
434+
# change transfer mode to https
435+
self.tester._plugincoupling = 'https'
436+
fp_source = 'foo.bar'
437+
with open(fp_source, 'w') as f:
438+
f.write("this is a test\n")
439+
self.clean_up_files.append(fp_source)
440+
fp_obs = self.tester.push_file_to_central(fp_source)
441+
self.assertEqual(fp_source, fp_obs)
444442

445443

446444
if __name__ == '__main__':

0 commit comments

Comments
 (0)