Remove redundant, flakey specs

According to the flakey builds, current_progress.results
was occassionally nil (though I rant them 300 times
locally and never saw an error).

I don't think it's worth testing insecure hosts at this
level since the logic is contained in canvas_http.rb and
adequately tested in canvas_http_spec.rb.

closes MAT-61
flag=none

test plan: jenkins build passes

Change-Id: Ic9178e9315da6e0f6bd3f258b45607b03fceaa33
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/264954
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Ed Schiebel <eschiebel@instructure.com>
Product-Review: Nate Armstrong <narmstrong@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
This commit is contained in:
Nate Armstrong 2021-05-13 15:58:00 -06:00
parent 36d6d3b68c
commit 1ec8b21122
1 changed files with 0 additions and 27 deletions

View File

@ -168,33 +168,6 @@ describe CourseLinkValidator do
end
end
describe "insecure hosts" do
def test_url(url)
course_factory
topic = @course.discussion_topics.create!(:message => %{<a href="#{url}">kekeke</a>}, :title => "title")
expect(CanvasHttp).to_not receive(:connection_for_uri) # don't try to continue after failing validation
CourseLinkValidator.queue_course(@course)
run_jobs
issues = CourseLinkValidator.current_progress(@course).results[:issues]
expect(issues.first[:invalid_links].first[:reason]).to eq :unreachable
end
it "should not try to access local ips" do
skip('for flakiness and fix with MAT-61')
test_url("http://localhost:3000/haxxed")
test_url("http://127.0.0.1/haxxedagain")
end
it "should be able to set the ip filter" do
skip('for flakiness and fix with MAT-61')
Setting.set('http_blocked_ip_ranges', '42.42.42.42/8,24.24.24.24')
test_url("http://42.42.0.1/haxxedtheplanet")
test_url("http://24.24.24.24/haxxedforever")
end
end
it "should check for deleted/unpublished objects" do
course_factory
active = @course.assignments.create!(:title => "blah")