Skip to content

Commit 616ec6d

Browse files
authored
Cortex-ify project (#13)
1 parent 7f23bb0 commit 616ec6d

37 files changed

+41
-45
lines changed

.github/CODEOWNERS

Lines changed: 0 additions & 1 deletion
This file was deleted.

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
HOSTNAME=github.com
2-
NAMESPACE=bigcommerce
2+
NAMESPACE=cortexapps
33
NAME=cortex
44
BINARY=terraform-provider-${NAME}
5-
VERSION=0.2.2-dev
5+
VERSION=0.2.3-dev
66

7-
GOOS?=$(shell go tool dist env | grep GOOS | grep -o '".*"' | sed 's/"//g')
8-
GOARCH?=$(shell go tool dist env | grep GOARCH | grep -o '".*"' | sed 's/"//g')
7+
GOOS?=$(shell go env | grep GOOS | cut -d '=' -f2 | tr -d "'")
8+
GOARCH?=$(shell go env | grep GOARCH | cut -d '=' -f2 | tr -d "'")
99
OS_ARCH?=$(GOOS)_$(GOARCH)
1010

1111
TF_LOG ?= WARN

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ make testacc
9393
This provider uses [Go modules](https://github.com/golang/go/wiki/Modules).
9494
Please see the Go documentation for the most up to date information about using Go modules.
9595

96-
To add a new dependency `github.com/bigcommerce/dependency` to your Terraform provider:
96+
To add a new dependency `github.com/author/dependency` to your Terraform provider:
9797

9898
```shell
9999
go get github.com/author/dependency

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module github.com/bigcommerce/terraform-provider-cortex
1+
module github.com/cortexapps/terraform-provider-cortex
22

33
go 1.20
44

internal/cortex/api_error_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package cortex_test
22

33
import (
4-
"github.com/bigcommerce/terraform-provider-cortex/internal/cortex"
4+
"github.com/cortexapps/terraform-provider-cortex/internal/cortex"
55
"github.com/stretchr/testify/assert"
66
"testing"
77
)

internal/cortex/catalog_entities.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ func (c *CatalogEntitiesClient) Upsert(ctx context.Context, req UpsertCatalogEnt
220220
}
221221

222222
// coerce violations into an error
223-
if len(upsertResponse.Violations) > 0 {
223+
if !upsertResponse.Ok && len(upsertResponse.Violations) > 0 {
224224
o := ""
225225
for _, v := range upsertResponse.Violations {
226226
o += v.String() + "\n"
@@ -236,13 +236,10 @@ func (c *CatalogEntitiesClient) Upsert(ctx context.Context, req UpsertCatalogEnt
236236
* DELETE /api/v1/catalog/:tag - Delete a catalog entity
237237
**********************************************************************************************************************/
238238

239-
type DeleteCatalogEntityResponse struct{}
240-
241239
func (c *CatalogEntitiesClient) Delete(ctx context.Context, tag string) error {
242-
entityResponse := &DeleteCatalogEntityResponse{}
243240
apiError := &ApiError{}
244241

245-
response, err := c.Client().Delete(Route("catalog_entities", tag)).Receive(entityResponse, apiError)
242+
response, err := c.Client().Delete(Route("catalog_entities", tag)).Receive(nil, apiError)
246243
if err != nil {
247244
return errors.New("could not delete catalog entity: " + err.Error())
248245
}

internal/cortex/catalog_entities_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package cortex_test
22

33
import (
44
"context"
5-
"github.com/bigcommerce/terraform-provider-cortex/internal/cortex"
5+
"github.com/cortexapps/terraform-provider-cortex/internal/cortex"
66
"github.com/stretchr/testify/assert"
77
"testing"
88
)

internal/cortex/catalog_entity_custom_data_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package cortex_test
22

33
import (
44
"context"
5-
"github.com/bigcommerce/terraform-provider-cortex/internal/cortex"
5+
"github.com/cortexapps/terraform-provider-cortex/internal/cortex"
66
"github.com/stretchr/testify/assert"
77
"testing"
88
)

internal/cortex/departments_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package cortex_test
22

33
import (
44
"context"
5-
"github.com/bigcommerce/terraform-provider-cortex/internal/cortex"
5+
"github.com/cortexapps/terraform-provider-cortex/internal/cortex"
66
"github.com/stretchr/testify/assert"
77
"testing"
88
)

internal/cortex/http_client_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"context"
66
"encoding/json"
77
"fmt"
8-
"github.com/bigcommerce/terraform-provider-cortex/internal/cortex"
8+
"github.com/cortexapps/terraform-provider-cortex/internal/cortex"
99
"github.com/stretchr/testify/assert"
1010
"gopkg.in/yaml.v3"
1111
"io"

0 commit comments

Comments
 (0)