mirror of
https://github.com/trufflesecurity/trufflehog.git
synced 2024-11-15 01:17:34 +00:00
4b6957df66
* Refresh EndpointCustomizer for more explicit configuration Also add CloudProvider interface. * WIP: Update EndpointSetter * Updated detectors with new endpoint customizer * Fixed linter * Added check for appending cloud endpoints --------- Co-authored-by: Miccah Castorina <m.castorina93@gmail.com>
16 lines
404 B
Go
16 lines
404 B
Go
package detectors
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestEmbeddedEndpointSetter(t *testing.T) {
|
|
type Scanner struct{ EndpointSetter }
|
|
var s Scanner
|
|
assert.Equal(t, []string{"baz"}, s.Endpoints("baz"))
|
|
assert.NoError(t, s.SetConfiguredEndpoints("foo", "bar"))
|
|
assert.Error(t, s.SetConfiguredEndpoints())
|
|
assert.Equal(t, []string{"foo", "bar"}, s.Endpoints("baz"))
|
|
}
|