Skip to content

Commit

Permalink
Add test that gets 404 from Google (#107)
Browse files Browse the repository at this point in the history
  • Loading branch information
Erik Corry authored Jul 26, 2023
1 parent 5313013 commit 6a227f4
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions tests/google_404_test.toit
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// Copyright (C) 2023 Toitware ApS.
// Use of this source code is governed by a Zero-Clause BSD license that can
// be found in the tests/TESTS_LICENSE file.
import certificate_roots show *
import expect show *
import http
import net

HOST ::= "google.com"
PATH ::= "/nogood"
CODE ::= 404

main:
network := net.open
client := http.Client.tls network

client.root_certificates_.add GTS_ROOT_R1

response := client.get --host=HOST --path=PATH

expect_equals CODE response.status_code

0 comments on commit 6a227f4

Please sign in to comment.