Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add http_azure_private subscription callback transport #86

Merged
merged 2 commits into from
Jun 27, 2024
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
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,18 @@ A simple client library with:
- A fluent API with reduced repetition compared with vanilla swagger-go generated clients
- All the power and flexibility of Go!

## Contributing

Please include proof of running the full test suite over the Form3 API with the following variables set:
* `FORM3_CLIENT_ID`
* `FORM3_CLIENT_SECRET`
* `FORM3_ORGANISATION_ID`
* `FORM3_HOST`
* `FORM3_PRIVATE_KEY`
* `FORM3_PUBLIC_KEY_ID`

In case of external contributions, it is the responsibility of the reviewer to run those tests.

## Getting started

For interactive usage we recommend using [gore](https://github.com/motemen/gore).
Expand Down
4 changes: 1 addition & 3 deletions pkg/form3/auth_token_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ import (
)

func TestTokenAuth(t *testing.T) {
if os.Getenv("FORM3_CLIENT_ID") == "" || os.Getenv("FORM3_CLIENT_SECRET") == "" {
t.Skip("WARN: FORM3_CLIENT_ID or FORM3_CLIENT_SECRET not set, skipping test")
}
skipWhenCredentialsMissing(t)

u, err := uuid.Parse(os.Getenv("FORM3_CLIENT_ID"))
require.NoError(t, err)
Expand Down
12 changes: 12 additions & 0 deletions pkg/form3/helpers_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package form3_test

import (
"os"
"testing"
)

func skipWhenCredentialsMissing(t *testing.T) {
if os.Getenv("FORM3_CLIENT_ID") == "" || os.Getenv("FORM3_CLIENT_SECRET") == "" {
t.Skip("WARN: FORM3_CLIENT_ID or FORM3_CLIENT_SECRET not set, skipping test")
}
}
6 changes: 6 additions & 0 deletions pkg/form3/payments_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import (
)

func TestQueryPayments(t *testing.T) {
skipWhenCredentialsMissing(t)

f3, err := form3.NewFromEnv()
require.NoError(t, err)

Expand All @@ -22,6 +24,8 @@ func TestQueryPayments(t *testing.T) {
}

func TestPaymentFromJsonFile(t *testing.T) {
skipWhenCredentialsMissing(t)

f3, err := form3.NewFromEnv()
require.NoError(t, err)

Expand All @@ -34,6 +38,8 @@ func TestPaymentFromJsonFile(t *testing.T) {
}

func TestPaymentToJson(t *testing.T) {
skipWhenCredentialsMissing(t)

f3, err := form3.NewFromEnv()
require.NoError(t, err)

Expand Down
4 changes: 4 additions & 0 deletions pkg/form3/subscriptions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ func TestCreateSubscriptionsNewCallbackUriParamsHttpAwsPrivate(t *testing.T) {
}

func testCreateAndUpdateSubscriptions(t *testing.T, attributes *models.SubscriptionAttributes) {
skipWhenCredentialsMissing(t)

f3, err := form3.NewFromEnv()
require.NoError(t, err)

Expand Down Expand Up @@ -103,6 +105,8 @@ func testCreateAndUpdateSubscriptions(t *testing.T, attributes *models.Subscript
}

func TestListSubscriptions(t *testing.T) {
skipWhenCredentialsMissing(t)

f3, err := form3.NewFromEnv()
require.NoError(t, err)

Expand Down
5 changes: 4 additions & 1 deletion pkg/generated/models/callback_transport.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading