Skip to content

Commit

Permalink
fix depgraph tests
Browse files Browse the repository at this point in the history
  • Loading branch information
emosbaugh committed Jul 31, 2020
1 parent a403649 commit a08e9b2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions pkg/template/depgraph.go
Expand Up @@ -84,8 +84,8 @@ func (d *depGraph) AddKey(source, certName string) {

func (d *depGraph) resolveCertKeys() {
for source, certNameMap := range d.KeyItems {
for certName, _ := range certNameMap {
for certProvider, _ := range d.CertItems[certName] {
for certName := range certNameMap {
for certProvider := range d.CertItems[certName] {
if certProvider != source {
d.AddDep(source, certProvider)
}
Expand Down Expand Up @@ -114,7 +114,7 @@ func (d *depGraph) GetHeadNodes() ([]string, error) {
waitList := []string{}
for k, v := range d.Dependencies {
depsList := []string{}
for dep, _ := range v {
for dep := range v {
depsList = append(depsList, fmt.Sprintf("%q", dep))
}
waitItem := fmt.Sprintf(`%q depends on %s`, k, strings.Join(depsList, `, `))
Expand Down
2 changes: 1 addition & 1 deletion pkg/template/depgraph_test.go
Expand Up @@ -205,7 +205,7 @@ func buildTestConfigGroups(dependencies, certs, keys map[string][]string, prefix
"{{repl ConfigOptionIndex \"%s\" }}",
"{{repl ConfigOptionData \"%s\" }}",
"repl{{ ConfigOptionEquals \"%s\" \"abc\" }}",
"{{repl ConfigOptionNotEquals \"%s\" \"xyz\" }}{{repl DoesNotExistFunc }}",
"{{repl ConfigOptionNotEquals \"%s\" \"xyz\" }}",
}

if !rotate {
Expand Down

0 comments on commit a08e9b2

Please sign in to comment.