Skip to content

Commit

Permalink
fix: return empty slice for missing_tests
Browse files Browse the repository at this point in the history
  • Loading branch information
BrendanThompson committed Nov 3, 2023
1 parent 3ff2eae commit cb99580
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 1.0.1

### Fixes
- Return empty slice for `missing_tests`


## 1.0.0

FEATURES:
Expand Down
3 changes: 1 addition & 2 deletions internal/provider/examples_validation_data_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ func findMissingTests(examplesDirectory string, testsDirectory string, filter st
var sourceFilter = `source = "./examples`
var examples []string
var tests []string
var missing []string
var missing []string = []string{}

files, err := os.ReadDir(examplesDirectory)
if err != nil {
Expand All @@ -129,7 +129,6 @@ func findMissingTests(examplesDirectory string, testsDirectory string, filter st

for _, file := range files {
if file.IsDir() {
// tflog.Info(ctx, file.Name())
examples = append(examples, file.Name())
}
}
Expand Down

0 comments on commit cb99580

Please sign in to comment.