-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit 2a31091
Make tests for URL load check rule functions self contained
Several rules check whether URLs provided in project metadata load.
Previously, the handling of various HTTP response status codes of these rule functions was tested by using the
convenient httpstat.us site. Unfortunately the maintainers of that site shut it down months ago due to abuse. This
caused the spurious failure of the unit tests. Although the httpstat.us maintainers state that they plan to eventually
resume service, there hasn't been any indication of progress on that front.
So it will be best to make the tests self contained, without any dependence on an external site. This is accomplished by
creating a local HTTP server that responds with the intended status code. Unfortunately this does require the addition
of code to the test in order to generate test data on the fly in order to reference the arbitrary port of the test
server.1 parent c142981 commit 2a31091
File tree
10 files changed
+590
-212
lines changed- internal
- rule/rulefunction
- testdata
- libraries
- TestLibraryPropertiesUrlFieldDeadLink/src
- URL404
- packageindexes
- packages-help-online-dead
- packages-platforms-help-online-dead
- packages-platforms-url-dead
- packages-tools-systems-url-dead
- packages-websiteurl-dead
- util/test
10 files changed
+590
-212
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
18 | 18 |
| |
19 | 19 |
| |
20 | 20 |
| |
21 | + | ||
21 | 22 |
| |
22 | 23 |
| |
24 | + | ||
23 | 25 |
| |
24 | 26 |
| |
25 | 27 |
| |
26 | 28 |
| |
27 | 29 |
| |
28 | 30 |
| |
29 | 31 |
| |
32 | + | ||
30 | 33 |
| |
34 | + | ||
31 | 35 |
| |
32 | 36 |
| |
33 | 37 |
| |
| |||
780 | 784 |
| |
781 | 785 |
| |
782 | 786 |
| |
783 | - | ||
784 | - | ||
785 | 787 |
| |
786 | 788 |
| |
787 | 789 |
| |
790 | + | ||
791 | + | ||
792 | + | ||
793 | + | ||
794 | + | ||
795 | + | ||
796 | + | ||
797 | + | ||
798 | + | ||
799 | + | ||
800 | + | ||
801 | + | ||
802 | + | ||
803 | + | ||
804 | + | ||
805 | + | ||
806 | + | ||
807 | + | ||
808 | + | ||
809 | + | ||
810 | + | ||
811 | + | ||
812 | + | ||
813 | + | ||
814 | + | ||
815 | + | ||
816 | + | ||
817 | + | ||
818 | + | ||
819 | + | ||
820 | + | ||
821 | + | ||
822 | + | ||
823 | + | ||
824 | + | ||
825 | + | ||
826 | + | ||
827 | + | ||
828 | + | ||
829 | + | ||
830 | + | ||
831 | + | ||
832 | + | ||
833 | + | ||
834 | + | ||
835 | + | ||
836 | + | ||
837 | + | ||
838 | + | ||
839 | + | ||
840 | + | ||
841 | + | ||
842 | + | ||
843 | + | ||
844 | + | ||
845 | + | ||
846 | + | ||
847 | + | ||
848 | + | ||
849 | + | ||
850 | + | ||
851 | + | ||
852 | + | ||
853 | + | ||
854 | + | ||
855 | + | ||
788 | 856 |
| |
789 | 857 |
| |
790 | 858 |
| |
|
0 commit comments