mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-10-12 01:58:46 +02:00
fix(cli): carry the review fixes of the master port to v1.0
This commit is contained in:
1 parent
12ab2a0e71
commit
f52dfd0354
24 files changed
+993
-68
No files matched your search
@@ -1,6 +1,7 @@
|
||||
package cli
|
||||
|
||||
import (
|
||||
"slices"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
@@ -230,6 +231,21 @@ func Test_upstreamMonitorKeepsACustomNameOutOfTheJournal(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
// Test_journalUpstreamNamesBoundsEveryName covers the line that names several
|
||||
// upstreams at once. One operator key in the list must not reach the journal.
|
||||
func Test_journalUpstreamNamesBoundsEveryName(t *testing.T) {
|
||||
got := journalUpstreamNames([]string{
|
||||
upstreamPrefix + "0",
|
||||
upstreamPrefix + "dns.controld.com/org-v1-SECRET0123",
|
||||
upstreamOS,
|
||||
})
|
||||
|
||||
want := []string{upstreamPrefix + "0", upstreamPrefix + "custom", upstreamOS}
|
||||
if !slices.Equal(got, want) {
|
||||
t.Fatalf("journalUpstreamNames = %v, want %v", got, want)
|
||||
}
|
||||
}
|
||||
|
||||
func Test_upstreamMonitorCountDown(t *testing.T) {
|
||||
captureDebugMainLog(t)
|
||||
um := newUpstreamMonitor(&ctrld.Config{})
|
||||
|
||||
Reference in new issue
Block a user