Skip to content

Commit

Permalink
skipper: enable skipper_test package (#2419)
Browse files Browse the repository at this point in the history
* removes unexported testOptions
* exports run with shutdown channels for tests

Signed-off-by: Alexander Yastrebov <alexander.yastrebov@zalando.de>
  • Loading branch information
AlexanderYastrebov authored Jun 22, 2023
1 parent 171625c commit 0d5031e
Show file tree
Hide file tree
Showing 5 changed files with 580 additions and 553 deletions.
3 changes: 3 additions & 0 deletions export_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package skipper

var RunWithShutdown = run
14 changes: 7 additions & 7 deletions metricsinit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ func TestInitOrderAndDefault(t *testing.T) {
done := make(chan struct{})
go func() {
options := Options{
Address: fmt.Sprintf(":%d", port),
SupportListener: fmt.Sprintf(":%d", supportPort),
EnableRuntimeMetrics: true,
EnableSwarm: true,
SwarmRedisURLs: []string{fmt.Sprintf("localhost:%d", redisPort)},
EnableRatelimiters: true,
testOptions: testOptions{redisConnMetricsInterval: ringMetricsUpdatePeriod},
Address: fmt.Sprintf(":%d", port),
SupportListener: fmt.Sprintf(":%d", supportPort),
EnableRuntimeMetrics: true,
EnableSwarm: true,
SwarmRedisURLs: []string{fmt.Sprintf("localhost:%d", redisPort)},
EnableRatelimiters: true,
SwarmRedisConnMetricsInterval: ringMetricsUpdatePeriod,
}

tornDown := make(chan struct{})
Expand Down
Loading

0 comments on commit 0d5031e

Please sign in to comment.