From 5b058125aec83257e5e1105e04c7595219eafe91 Mon Sep 17 00:00:00 2001 From: Sam Therapy Date: Fri, 9 Dec 2022 16:35:03 +0100 Subject: [PATCH] add tests Co-authored-by: grumbulon Signed-off-by: Sam Therapy --- main_test.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/main_test.go b/main_test.go index 949230c..66e5840 100644 --- a/main_test.go +++ b/main_test.go @@ -27,6 +27,17 @@ func TestRun(t *testing.T) { } } +func TestTrace(t *testing.T) { + domains := []string{"git.froth.zone", "google.com", "amazon.com", "freecumextremist.com", "dns.froth.zone", "sleepy.cafe", "pkg.go.dev"} + + for i := range domains { + args := []string{"awl", "+trace", domains[i], "@1.1.1.1"} + _, code, err := run(args) + assert.NilError(t, err) + assert.Equal(t, code, 0) + } +} + func TestHelp(t *testing.T) { // t.Parallel() args := []string{"awl", "-h"}