Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: Yuri Shkuro <[email protected]>
  • Loading branch information
yurishkuro committed Jul 7, 2024
1 parent 309855e commit c5e368c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
10 changes: 5 additions & 5 deletions cmd/jaeger/internal/integration/e2e_integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,24 +139,24 @@ func createStorageCleanerConfig(t *testing.T, configFile string, storage string)
require.True(t, ok)
query, ok := extensions["jaeger_query"].(map[string]any)
require.True(t, ok)
trace_storage := query["trace_storage"].(string)
extensions["storage_cleaner"] = map[string]string{"trace_storage": trace_storage}
traceStorage := query["trace_storage"].(string)
extensions["storage_cleaner"] = map[string]string{"trace_storage": traceStorage}

jaegerStorage, ok := extensions["jaeger_storage"].(map[string]any)
require.True(t, ok)

switch storage {
case "elasticsearch":
elasticsearch, ok := jaegerStorage["elasticsearch"].(map[string]any)
require.True(t, ok)
esMain, ok := elasticsearch["es_main"].(map[string]any)
require.True(t, ok, "expecting 'elasticsearch'")
esMain, ok := elasticsearch["some_storage"].(map[string]any)
require.True(t, ok)
esMain["service_cache_ttl"] = "1ms"

case "opensearch":
opensearch, ok := jaegerStorage["opensearch"].(map[string]any)
require.True(t, ok)
osMain, ok := opensearch["os_main"].(map[string]any)
osMain, ok := opensearch["some_storage"].(map[string]any)
require.True(t, ok)
osMain["service_cache_ttl"] = "1ms"

Expand Down
7 changes: 7 additions & 0 deletions cmd/jaeger/internal/integration/e2e_integration_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package integration

import "testing"

func TestCreateStorageCleanerConfig(t *testing.T) {
createStorageCleanerConfig(t, "../../config-elasticsearch.yaml", "elasticsearch")
}
2 changes: 1 addition & 1 deletion scripts/es-integration-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ main() {
local es_version=$2
local j_version=$3

bring_up_storage "${distro}" "${es_version}"
# bring_up_storage "${distro}" "${es_version}"

if [[ "${j_version}" == "v2" ]]; then
STORAGE=${distro} SPAN_STORAGE_TYPE=${distro} make jaeger-v2-storage-integration-test
Expand Down

0 comments on commit c5e368c

Please sign in to comment.