Skip to content

Test failure: *mockselector.MockIAnalyzer does not implement selector.IAnalyzer (missing method GetContainer) #162

@xhd2015

Description

@xhd2015

when running test of chaosmeta-inject-operator/pkg/scopehandler/pod/handler_test.go, as the following:

cd chaosmeta-inject-operator 
go test -v ./pkg/scopehandler/pod

Error output:

# github.com/traas-stack/chaosmeta/chaosmeta-inject-operator/pkg/scopehandler/pod [github.com/traas-stack/chaosmeta/chaosmeta-inject-operator/pkg/scopehandler/pod.test]
pkg/scopehandler/pod/handler_test.go:101:10: cannot use analyzerMock (variable of type *mockselector.MockIAnalyzer) as "github.com/traas-stack/chaosmeta/chaosmeta-inject-operator/pkg/selector".IAnalyzer value in return statement: *mockselector.MockIAnalyzer does not implement "github.com/traas-stack/chaosmeta/chaosmeta-inject-operator/pkg/selector".IAnalyzer (missing method GetContainer)
FAIL    github.com/traas-stack/chaosmeta/chaosmeta-inject-operator/pkg/scopehandler/pod [build failed]
FAIL

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions