Skip to content

Commit 48f4339

Browse files
committed
test(endpoint): move BenchmarkEndpoint_Type to file endpoint_bench_test.go
1 parent dfbfab9 commit 48f4339

File tree

2 files changed

+19
-14
lines changed

2 files changed

+19
-14
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package endpoint
2+
3+
import (
4+
"testing"
5+
)
6+
7+
func BenchmarkEndpoint_Type(b *testing.B) {
8+
for b.Loop() {
9+
for _, tt := range testEndpoint_typeData {
10+
endpoint := Endpoint{
11+
URL: tt.args.URL,
12+
DNSConfig: tt.args.DNS,
13+
}
14+
if got := endpoint.Type(); got != tt.want {
15+
b.Errorf("Endpoint.Type() = %v, want %v", got, tt.want)
16+
}
17+
}
18+
}
19+
}

config/endpoint/endpoint_test.go

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -431,20 +431,6 @@ func TestEndpoint_Type(t *testing.T) {
431431
}
432432
}
433433

434-
func BenchmarkEndpoint_Type(b *testing.B) {
435-
for b.Loop() {
436-
for _, tt := range testEndpoint_typeData {
437-
endpoint := Endpoint{
438-
URL: tt.args.URL,
439-
DNSConfig: tt.args.DNS,
440-
}
441-
if got := endpoint.Type(); got != tt.want {
442-
b.Errorf("Endpoint.Type() = %v, want %v", got, tt.want)
443-
}
444-
}
445-
}
446-
}
447-
448434
func TestEndpoint_ValidateAndSetDefaults(t *testing.T) {
449435
endpoint := Endpoint{
450436
Name: "website-health",

0 commit comments

Comments
 (0)