Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/unit-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ jobs:
- uses: actions/setup-go@v2
with:
go-version: '1.20.5'
- name: Setup Terraform
uses: hashicorp/setup-terraform@v3
with:
terraform_version: latest
terraform_wrapper: false
- run: chmod -R +x ./scripts
- run: bash scripts/gogetcookie.sh
- run: make test
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## v0.16.1
BUG FIXES:
- Fix a bug the azapi examples are not correctly loaded.

## v0.16.0

ENHANCEMENTS:
Expand Down
4 changes: 2 additions & 2 deletions coverage/coverage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1264,7 +1264,7 @@ func TestCoverage_DataFactoryPipelines(t *testing.T) {
resourceType: "Microsoft.DataFactory/factories/pipelines@2018-06-01",
method: "PUT",
expectedCoveredCount: 13,
expectedTotalCount: 7243,
expectedTotalCount: 7253,
apiPath: "/subscriptions/12345678-1234-1234-1234-12345678abc/resourceGroups/exampleResourceGroup/providers/Microsoft.DataFactory/factories/exampleFactoryName/pipelines/examplePipeline",
rawRequest: []string{
`{
Expand Down Expand Up @@ -1362,7 +1362,7 @@ func TestCoverage_DataFactoryLinkedServices(t *testing.T) {
resourceType: "Microsoft.DataFactory/factories/linkedServices@2018-06-01",
method: "PUT",
expectedCoveredCount: 3,
expectedTotalCount: 3470,
expectedTotalCount: 3540,
apiPath: "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/rg1/providers/Microsoft.DataFactory/factories/factory1/linkedServices/linked",
rawRequest: []string{
`{
Expand Down
6 changes: 6 additions & 0 deletions dependency/azapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,16 @@ func LoadAzapiDependencies() ([]Dependency, error) {
return nil, err
}
for _, entry := range entries {
if !entry.IsDir() {
continue
}
filename := path.Join(dir, entry.Name(), "main.tf")
if _, err := StaticFiles.Open(filename); os.IsNotExist(err) {
filename = path.Join(dir, entry.Name(), "basic", "main.tf")
}
if _, err := StaticFiles.Open(filename); os.IsNotExist(err) {
continue
}
data, err := StaticFiles.ReadFile(filename)
if err != nil {
return nil, err
Expand Down