Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jondot committed May 7, 2021
1 parent 1eb99a4 commit a364438
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ var CLI struct {

Drift struct {
Providers []string `arg optional name:"providers" help:"A list of providers to check for drift"`
} `cmd help:"Scans your codebase for sensitive keys"`
} `cmd help:"Detect secret and value drift between providers"`
}

var (
Expand Down
4 changes: 2 additions & 2 deletions pkg/core/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ type EnvEntryLookup struct {
func (ee *EnvEntryLookup) EnvBy(key, provider, path, dflt string) string {
for i := range ee.Entries {
e := ee.Entries[i]
if e.Key == key && e.Provider == provider && e.ResolvedPath == path {
if e.Key == key && e.ProviderName == provider && e.ResolvedPath == path {
return e.Value
}
}
Expand All @@ -112,7 +112,7 @@ func (ee *EnvEntryLookup) EnvByKey(key, dflt string) string {
func (ee *EnvEntryLookup) EnvByKeyAndProvider(key, provider, dflt string) string {
for i := range ee.Entries {
e := ee.Entries[i]
if e.Key == key && e.Provider == provider {
if e.Key == key && e.ProviderName == provider {
return e.Value
}

Expand Down
5 changes: 0 additions & 5 deletions pkg/teller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,11 +228,6 @@ func TestTellerPorcelainNonInteractive(t *testing.T) {

func TestTellerDrift(t *testing.T) {
tl := Teller{
Entries: []core.EnvEntry{},
Providers: &BuiltinProviders{},
}

tl = Teller{
Entries: []core.EnvEntry{
{Key: "k", Value: "v", Source: "s1", Provider: "test-provider", ProviderName: "test-provider", ResolvedPath: "path/kv"},
{Key: "k", Value: "v", Sink: "s1", Provider: "test-provider", ProviderName: "test-provider2", ResolvedPath: "path/kv"},
Expand Down

0 comments on commit a364438

Please sign in to comment.