Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
atoulme committed Oct 6, 2023
1 parent 2ccc7c3 commit 526e6a7
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 309 deletions.
26 changes: 16 additions & 10 deletions e2e_tests/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,16 +94,7 @@ func Test_E2E(t *testing.T) {
}, 3*time.Minute, 30*time.Second)
}

require.Eventually(t, func() bool {
di, err := clientset.AppsV1().Deployments("default").List(context.Background(), metav1.ListOptions{})
require.NoError(t, err)
for _, d := range di.Items {
if d.Status.ReadyReplicas != d.Status.Replicas {
return false
}
}
return true
}, 5*time.Minute, 10*time.Second)
waitForAllDeploymentsToStart(t, clientset)

deployments := clientset.AppsV1().Deployments("default")

Expand All @@ -115,6 +106,8 @@ func Test_E2E(t *testing.T) {
_, err = deployments.Create(context.Background(), deployment.(*appsv1.Deployment), metav1.CreateOptions{})
require.NoError(t, err)

waitForAllDeploymentsToStart(t, clientset)

tracesConsumer := new(consumertest.TracesSink)
metricsConsumer := new(consumertest.MetricsSink)
logsConsumer := new(consumertest.LogsSink)
Expand Down Expand Up @@ -208,6 +201,19 @@ func Test_E2E(t *testing.T) {
)
}

func waitForAllDeploymentsToStart(t *testing.T, clientset *kubernetes.Clientset) {
require.Eventually(t, func() bool {
di, err := clientset.AppsV1().Deployments("default").List(context.Background(), metav1.ListOptions{})
require.NoError(t, err)
for _, d := range di.Items {
if d.Status.ReadyReplicas != d.Status.Replicas {
return false
}
}
return true
}, 5*time.Minute, 10*time.Second)
}

func waitForData(t *testing.T, entriesNum int, tc *consumertest.TracesSink, mc *consumertest.MetricsSink, lc *consumertest.LogsSink) {
f := otlpreceiver.NewFactory()
cfg := f.CreateDefaultConfig().(*otlpreceiver.Config)
Expand Down
115 changes: 0 additions & 115 deletions e2e_tests/normalize_timestamps.go

This file was deleted.

184 changes: 0 additions & 184 deletions e2e_tests/sort_metrics.go

This file was deleted.

0 comments on commit 526e6a7

Please sign in to comment.