forked from ietf-tools/datatracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: obviate ghostlinkd (ietf-tools#7336)
* wip: identify whats needed to obviate ghostlinkd * fix: hardlink new charter files to ftp directory * fix: hardlink new charter files to ftp directory (continued) * chore: bring settings comment up to date * chore: add archive and ftp dirs to setup of various environments * fix: test charter submits write to ftp dir * chore: remove debug * fix: test charter approval writes to ftp dir * fix: link review revisions into ftp dir * fix: link to all archive and ftp on submission post * chore: clean comments, move action to github issue * fix: link idindex files to all archive and ftp * chore: deflake * chore: remove TODO comment * fix: use settings * chore: rename new setting
- Loading branch information
Showing
19 changed files
with
172 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -87,6 +87,10 @@ def test_view_revisions(self): | |
class EditCharterTests(TestCase): | ||
settings_temp_path_overrides = TestCase.settings_temp_path_overrides + ['CHARTER_PATH'] | ||
|
||
def setUp(self): | ||
super().setUp() | ||
(Path(settings.FTP_DIR)/"charter").mkdir() | ||
|
||
def write_charter_file(self, charter): | ||
(Path(settings.CHARTER_PATH) / f"{charter.name}-{charter.rev}.txt").write_text("This is a charter.") | ||
|
||
|
@@ -506,13 +510,16 @@ def test_submit_charter(self): | |
self.assertEqual(charter.rev, next_revision(prev_rev)) | ||
self.assertTrue("new_revision" in charter.latest_event().type) | ||
|
||
file_contents = ( | ||
Path(settings.CHARTER_PATH) / (charter.name + "-" + charter.rev + ".txt") | ||
).read_text("utf-8") | ||
charter_path = Path(settings.CHARTER_PATH) / (charter.name + "-" + charter.rev + ".txt") | ||
file_contents = (charter_path).read_text("utf-8") | ||
self.assertEqual( | ||
file_contents, | ||
"Windows line\nMac line\nUnix line\n" + utf_8_snippet.decode("utf-8"), | ||
) | ||
ftp_charter_path = Path(settings.FTP_DIR) / "charter" / charter_path.name | ||
self.assertTrue(ftp_charter_path.exists()) | ||
self.assertTrue(charter_path.samefile(ftp_charter_path)) | ||
|
||
|
||
def test_submit_initial_charter(self): | ||
group = GroupFactory(type_id='wg',acronym='mars',list_email='[email protected]') | ||
|
@@ -808,9 +815,11 @@ def test_approve(self): | |
self.assertTrue(not charter.ballot_open("approve")) | ||
|
||
self.assertEqual(charter.rev, "01") | ||
self.assertTrue( | ||
(Path(settings.CHARTER_PATH) / ("charter-ietf-%s-%s.txt" % (group.acronym, charter.rev))).exists() | ||
) | ||
charter_path = Path(settings.CHARTER_PATH) / ("charter-ietf-%s-%s.txt" % (group.acronym, charter.rev)) | ||
charter_ftp_path = Path(settings.FTP_DIR) / "charter" / charter_path.name | ||
self.assertTrue(charter_path.exists()) | ||
self.assertTrue(charter_ftp_path.exists()) | ||
self.assertTrue(charter_path.samefile(charter_ftp_path)) | ||
|
||
self.assertEqual(len(outbox), 2) | ||
# | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.