Skip to content

Commit

Permalink
test: add invalid test
Browse files Browse the repository at this point in the history
  • Loading branch information
Primexz committed Jan 7, 2025
1 parent 69e27bd commit d5c11d2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -564,3 +564,13 @@ func TestMainDnsstampDoHPath(t *testing.T) {
assert.Contains(t, err.Error(), "from https://cloudflare-dns.com:443/test")
}

func TestMainDnsstampInvalid(t *testing.T) {
_, err := run(
"@sdns://invalid",
"--all",
)

assert.NotNil(t, err)
assert.Contains(t, err.Error(), "converting DNS stamp to URL: illegal base64 data")
}

0 comments on commit d5c11d2

Please sign in to comment.