Skip to content

Commit

Permalink
fix(test): probe URI of exec target
Browse files Browse the repository at this point in the history
seealso: 2a947fc
  • Loading branch information
macrat committed Apr 10, 2021
1 parent 6cbaebd commit ceb1faf
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions probe/probe_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ func TestTargetURLNormalize(t *testing.T) {
{"dns:example.com", url.URL{Scheme: "dns", Opaque: "example.com"}},
{"dns://example.com:80/foo/bar?hoge=fuga#piyo", url.URL{Scheme: "dns", Opaque: "example.com"}},

{"exec:foo.sh", url.URL{Scheme: "exec", Path: "foo.sh"}},
{"exec:./foo.sh", url.URL{Scheme: "exec", Path: "./foo.sh"}},
{"exec:/foo/bar.sh", url.URL{Scheme: "exec", Path: "/foo/bar.sh"}},
{"exec:///foo/bar.sh", url.URL{Scheme: "exec", Path: "/foo/bar.sh"}},
{"exec:foo.sh?hoge=fuga#piyo", url.URL{Scheme: "exec", Path: "foo.sh", RawQuery: "hoge=fuga", Fragment: "piyo"}},
{"exec:/foo/bar.sh?hoge=fuga#piyo", url.URL{Scheme: "exec", Path: "/foo/bar.sh", RawQuery: "hoge=fuga", Fragment: "piyo"}},
{"exec:foo.sh", url.URL{Scheme: "exec", Opaque: "foo.sh"}},
{"exec:./foo.sh", url.URL{Scheme: "exec", Opaque: "./foo.sh"}},
{"exec:/foo/bar.sh", url.URL{Scheme: "exec", Opaque: "/foo/bar.sh"}},
{"exec:///foo/bar.sh", url.URL{Scheme: "exec", Opaque: "/foo/bar.sh"}},
{"exec:foo.sh?hoge=fuga#piyo", url.URL{Scheme: "exec", Opaque: "foo.sh", RawQuery: "hoge=fuga", Fragment: "piyo"}},
{"exec:/foo/bar.sh?hoge=fuga#piyo", url.URL{Scheme: "exec", Opaque: "/foo/bar.sh", RawQuery: "hoge=fuga", Fragment: "piyo"}},
}

for _, tt := range tests {
Expand Down

0 comments on commit ceb1faf

Please sign in to comment.