Support configurable TLS probes in the API and dashboard
This commit is contained in:
1 parent
0bde5627f0
commit
c7fdd2c430
38 files changed
+495
-203
No files matched your search
@@ -45,7 +45,7 @@ func TestSetInboundChecksRejectsPortOutOfRange(t *testing.T) {
|
||||
t.Fatalf("bootstrap: %v", err)
|
||||
}
|
||||
for _, p := range []int{0, -1, 65536, 70000} {
|
||||
if err := d.SetInboundChecks(ctx, []int{p}, false); !errors.Is(err, ErrValidation) {
|
||||
if err := d.SetInboundChecks(ctx, []int{p}, false, nil); !errors.Is(err, ErrValidation) {
|
||||
t.Fatalf("port %d: expected ErrValidation, got %v", p, err)
|
||||
}
|
||||
}
|
||||
@@ -56,7 +56,7 @@ func TestSetInboundChecksRejectsDuplicatePorts(t *testing.T) {
|
||||
if err := d.BootstrapFromConfig(ctx, &config.ControlAPI{}); err != nil {
|
||||
t.Fatalf("bootstrap: %v", err)
|
||||
}
|
||||
if err := d.SetInboundChecks(ctx, []int{22, 80, 22}, false); !errors.Is(err, ErrValidation) {
|
||||
if err := d.SetInboundChecks(ctx, []int{22, 80, 22}, false, nil); !errors.Is(err, ErrValidation) {
|
||||
t.Fatalf("expected ErrValidation for duplicate port, got %v", err)
|
||||
}
|
||||
}
|
||||
@@ -74,7 +74,7 @@ func TestGetSetInboundChecksRoundTrip(t *testing.T) {
|
||||
t.Fatalf("expected default {[] false}, got %+v", before)
|
||||
}
|
||||
|
||||
if err := d.SetInboundChecks(ctx, []int{22, 443, 8080}, true); err != nil {
|
||||
if err := d.SetInboundChecks(ctx, []int{22, 443, 8080}, true, nil); err != nil {
|
||||
t.Fatalf("set inbound checks: %v", err)
|
||||
}
|
||||
after, err := d.GetInboundChecks(ctx)
|
||||
@@ -90,7 +90,7 @@ func TestGetSetInboundChecksRoundTrip(t *testing.T) {
|
||||
|
||||
// Setting an empty port list + icmp:false is legal — it's the "disable
|
||||
// all inbound checks without touching sites" configuration.
|
||||
if err := d.SetInboundChecks(ctx, nil, false); err != nil {
|
||||
if err := d.SetInboundChecks(ctx, nil, false, nil); err != nil {
|
||||
t.Fatalf("set empty inbound checks: %v", err)
|
||||
}
|
||||
cleared, err := d.GetInboundChecks(ctx)
|
||||
|
||||
Reference in new issue
Block a user