Skip to content

Commit

Permalink
chore: minor updates
Browse files Browse the repository at this point in the history
  • Loading branch information
dstrates committed Jul 4, 2024
1 parent 1dd4f26 commit 5b057e9
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
4 changes: 0 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ default: help
testacc: ## Run acceptance tests
TF_ACC=1 go test ./... -v $(TESTARGS) -timeout 120m

.PHONY: test-container
test-container: ## Run acceptance tests using test-containers
${DOCKER_COMPOSE_RUN} -w /app/api --entrypoint "make testacc" schema-registry

.PHONY: build ## Build the provider for all supported architectures
build: build-amd64 build-arm64

Expand Down
3 changes: 2 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ require (
dario.cat/mergo v1.0.0 // indirect
github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 // indirect
github.com/AlecAivazis/survey/v2 v2.3.7 // indirect
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect
github.com/BurntSushi/toml v1.2.1 // indirect
github.com/Kunde21/markdownfmt/v3 v3.1.0 // indirect
github.com/Masterminds/goutils v1.1.1 // indirect
Expand Down Expand Up @@ -186,6 +186,7 @@ require (
github.com/spf13/pflag v1.0.5 // indirect
github.com/stretchr/testify v1.9.0 // indirect
github.com/testcontainers/testcontainers-go v0.31.0 // indirect
github.com/testcontainers/testcontainers-go/modules/redpanda v0.31.0 // indirect
github.com/theupdateframework/notary v0.7.0 // indirect
github.com/tilt-dev/fsnotify v1.4.8-0.20220602155310-fff9c274a375 // indirect
github.com/tklauser/go-sysconf v0.3.12 // indirect
Expand Down
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ github.com/AlecAivazis/survey/v2 v2.3.7 h1:6I/u8FvytdGsgonrYsVn2t8t4QiRnh6QSTqkk
github.com/AlecAivazis/survey/v2 v2.3.7/go.mod h1:xUTIdE4KCOIjsBAE1JYsUPoCqYdZ1reCfTwbto0Fduo=
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8=
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E=
github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0=
github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/toml v1.2.1 h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak=
github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
Expand Down Expand Up @@ -625,6 +627,8 @@ github.com/testcontainers/testcontainers-go v0.31.0 h1:W0VwIhcEVhRflwL9as3dhY6jX
github.com/testcontainers/testcontainers-go v0.31.0/go.mod h1:D2lAoA0zUFiSY+eAflqK5mcUx/A5hrrORaEQrd0SefI=
github.com/testcontainers/testcontainers-go/modules/compose v0.31.0 h1:H74o3HisnApIDQx7sWibGzOl/Oo0By8DjyVeUf3qd6I=
github.com/testcontainers/testcontainers-go/modules/compose v0.31.0/go.mod h1:z1JAsvL2/pNFy40yJX0VX9Yk+hzOCIO5DydxBJHBbCY=
github.com/testcontainers/testcontainers-go/modules/redpanda v0.31.0 h1:8m4Y0nD2kOeeG8Pz/cNiMChwvX8rmxGWxpi3EfZeqLs=
github.com/testcontainers/testcontainers-go/modules/redpanda v0.31.0/go.mod h1:A/AZkXGMupSZVXdDDStciBHu3KXuiaocvGpJpqhLecI=
github.com/theupdateframework/notary v0.7.0 h1:QyagRZ7wlSpjT5N2qQAh/pN+DVqgekv4DzbAiAiEL3c=
github.com/theupdateframework/notary v0.7.0/go.mod h1:c9DRxcmhHmVLDay4/2fUYdISnHqbFDGRSlXPO0AhYWw=
github.com/tilt-dev/fsnotify v1.4.8-0.20220602155310-fff9c274a375 h1:QB54BJwA6x8QU9nHY3xJSZR2kX9bgpZekRKGkLTmEXA=
Expand Down
9 changes: 7 additions & 2 deletions internal/provider/data_source_schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,13 +156,18 @@ func (d *schemaDataSource) Read(ctx context.Context, req datasource.ReadRequest,
// Fetch schema and compatibility level
schema, err := d.fetchSchema(subject, version)
if err != nil {
resp.Diagnostics.AddError("Error Reading Schema", "Could not read schema: "+err.Error())
resp.Diagnostics.AddError(
"Error Reading Schema",
"Could not read schema: "+err.Error())
return
}

compatibilityLevel, err := d.fetchCompatibilityLevel(subject)
if err != nil {
resp.Diagnostics.AddError("Error Reading Compatibility Level", "Could not read compatibility level: "+err.Error())
resp.Diagnostics.AddError(
"Error Reading Compatibility Level",
"Could not read compatibility level: "+err.Error(),
)
return
}

Expand Down

0 comments on commit 5b057e9

Please sign in to comment.