From 297612e7c461d6f5a95cbc76547d5b7ba7104774 Mon Sep 17 00:00:00 2001 From: Umputun Date: Tue, 8 Jun 2021 03:53:16 -0500 Subject: [PATCH] add test --- app/discovery/discovery_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/discovery/discovery_test.go b/app/discovery/discovery_test.go index 83c33f0..933d3b3 100644 --- a/app/discovery/discovery_test.go +++ b/app/discovery/discovery_test.go @@ -112,8 +112,8 @@ func TestService_Match(t *testing.T) { {SrcMatch: *regexp.MustCompile("/path/"), Dst: "/var/web/path", ProviderID: PIDocker, MatchType: MTStatic}, {SrcMatch: *regexp.MustCompile("/www2/"), Dst: "/var/web2", ProviderID: PIDocker, MatchType: MTStatic, AssetsWebRoot: "/www2", AssetsLocation: "/var/web2", AssetsSPA: true}, - {SrcMatch: *regexp.MustCompile("/"), Dst: "/var/web0", ProviderID: PIDocker, MatchType: MTStatic, - AssetsWebRoot: "/", AssetsLocation: "/var/web0", AssetsSPA: false, Server: "m22.example.com"}, + {SrcMatch: *regexp.MustCompile(""), Dst: "", ProviderID: PIDocker, MatchType: MTStatic, + AssetsWebRoot: "/", AssetsLocation: "/var/web0", AssetsSPA: true, Server: "m22.example.com"}, }, nil }, } @@ -156,7 +156,7 @@ func TestService_Match(t *testing.T) { {"m1.example.com", "/www", Matches{MTStatic, []MatchedRoute{{Destination: "/www:/var/web/:norm", Alive: true}}}}, {"xyx.example.com", "/path/something", Matches{MTStatic, []MatchedRoute{{Destination: "/path:/var/web/path/:norm", Alive: true}}}}, {"m1.example.com", "/www2", Matches{MTStatic, []MatchedRoute{{Destination: "/www2:/var/web2/:spa", Alive: true}}}}, - {"m22.example.com", "/someplace/index.html", Matches{MTStatic, []MatchedRoute{{Destination: "/:/var/web0/:norm", Alive: true}}}}, + {"m22.example.com", "/someplace/index.html", Matches{MTStatic, []MatchedRoute{{Destination: "/:/var/web0/:spa", Alive: true}}}}, } for i, tt := range tbl {