Skip to content

Commit

Permalink
Add examples on how to run a test
Browse files Browse the repository at this point in the history
  • Loading branch information
zabil committed Oct 18, 2024
1 parent 6c2259a commit e9d3fdb
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 7 deletions.
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,33 @@ Build binary:
make build
```

## Testing

- Install unleash server on the cluster or configure the provider to use an existing server.
- Modify `examples/provider/secrets.yaml` with the correct values.

Apply the manifest:

```
k apply -f examples/providerconfig/secrets.yaml
k apply -f examples/providerconfig/providerconfig.yaml
```

Apply the example token manifest:

```
k apply -f examples/token/token.yaml
```

## Report a Bug

For filing bugs, suggesting improvements, or requesting new features, please
open an [issue](https://github.com/sahajsoft/provider-unleash/issues).

## Examples

You can find provider config and token configuration examples in the [examples](./examples) directory.

## Notes

This was automatically generated using [Upjet](https://github.com/crossplane/upjet/blob/main/docs/generating-a-provider.md)
6 changes: 3 additions & 3 deletions examples/providerconfig/providerconfig.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
apiVersion: unleash.upbound.io/v1beta1
apiVersion: unleash.crossplane.io/v1beta1
kind: ProviderConfig
metadata:
name: default
spec:
credentials:
source: Secret
secretRef:
name: example-creds
namespace: crossplane-system
name: unleash-creds
namespace: default
key: credentials
8 changes: 4 additions & 4 deletions examples/providerconfig/secret.yaml.tmpl
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
apiVersion: v1
kind: Secret
metadata:
name: example-creds
namespace: crossplane-system
name: unleash-creds
namespace: default
type: Opaque
stringData:
credentials: |
{
"username": "admin",
"password": "t0ps3cr3t11"
"base_url": "http://my-unleash:4242",
"authorization": "$TOKEN"
}
1 change: 1 addition & 0 deletions examples/token.yaml → examples/token/token.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ metadata:
labels:
testing.upbound.io/example-name: client_token
name: unleash-client-token
namespace: default
spec:
forProvider:
environment: development
Expand Down

0 comments on commit e9d3fdb

Please sign in to comment.