Skip to content

Commit

Permalink
merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuminyi committed Jan 23, 2024
1 parent 8b45de6 commit 3461741
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 0 additions & 2 deletions pkg/collector/corechecks/containers/docker/check_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ import (
"regexp"
"testing"

"github.com/DataDog/datadog-agent/pkg/util/containers/metrics"
"github.com/DataDog/datadog-agent/pkg/util/pointer"
dockerTypes "github.com/docker/docker/api/types"
"github.com/stretchr/testify/assert"
"go.uber.org/fx"
Expand Down
11 changes: 10 additions & 1 deletion test/integration/corechecks/docker/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,12 @@ func TestMain(m *testing.M) {
}
}

type testDeps struct {
fx.In
store workloadmeta.Component
taggerComp tagger.Component
}

// Called before for first test run: compose up
func setup() (workloadmeta.Component, error) {
// Setup global conf
Expand All @@ -111,7 +117,8 @@ func setup() (workloadmeta.Component, error) {
config.SetFeaturesNoCleanup(config.Docker)

// Note: workloadmeta will be started by fx with the App
fxApp, _, err = fxutil.TestApp[tagger.Component](fx.Options(
var deps testDeps
fxApp, deps, err = fxutil.TestApp[testDeps](fx.Options(
fx.Supply(compcfg.NewAgentParams(
"", compcfg.WithConfigMissingOK(true))),
compcfg.Module(),
Expand All @@ -123,6 +130,8 @@ func setup() (workloadmeta.Component, error) {
tagger.Module(),
fx.Supply(tagger.NewTaggerParams()),
))
store := deps.store
workloadmeta.SetGlobalStore(store)

// Start compose recipes
for projectName, file := range defaultCatalog.composeFilesByProjects {
Expand Down

0 comments on commit 3461741

Please sign in to comment.