mirror of
https://github.com/pomerium/pomerium.git
synced 2025-08-03 16:59:22 +02:00
Remove superfluous Options.Checksum type conversions (#522)
This commit is contained in:
parent
27909f22ce
commit
e666306ef8
6 changed files with 17 additions and 22 deletions
|
@ -15,19 +15,18 @@ func Test_SetConfigInfo(t *testing.T) {
|
|||
tests := []struct {
|
||||
name string
|
||||
success bool
|
||||
checksum string
|
||||
wantLastReload string
|
||||
wantLastReloadSuccess string
|
||||
}{
|
||||
{"success", true, "abcde", "{ { {service test_service} }&{1.", "{ { {service test_service} }&{1} }"},
|
||||
{"failed", false, "abcde", "", "{ { }&{0} }"},
|
||||
{"success", true, "{ { {service test_service} }&{1.", "{ { {service test_service} }&{1} }"},
|
||||
{"failed", false, "", "{ { }&{0} }"},
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
view.Unregister(InfoViews...)
|
||||
view.Register(InfoViews...)
|
||||
SetConfigInfo("test_service", tt.success, tt.checksum)
|
||||
SetConfigInfo("test_service", tt.success)
|
||||
|
||||
testDataRetrieval(ConfigLastReloadView, t, tt.wantLastReload)
|
||||
testDataRetrieval(ConfigLastReloadSuccessView, t, tt.wantLastReloadSuccess)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue