Skip to content

Commit

Permalink
Merge pull request #1180 from npamudika/4.1.x
Browse files Browse the repository at this point in the history
Fix test failures and add changes for 4.1.3 release
  • Loading branch information
npamudika authored Aug 20, 2024
2 parents 378a55e + 68579e2 commit d6d2f81
Show file tree
Hide file tree
Showing 14 changed files with 24 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
run: |
cd import-export-cli
go vet ./...
./build.sh -t apictl.go -v 4.1.2
./build.sh -t apictl.go -v 4.1.3
- name: Start APIM
run: |
Expand All @@ -69,4 +69,4 @@ jobs:
- name: Test
run: |
cd import-export-cli/integration
go test -p 1 -timeout 0 -archive apictl-4.1.2-linux-x64.tar.gz -race -coverprofile=coverage.txt -covermode=atomic ./pkg/...
go test -p 1 -timeout 0 -archive apictl-4.1.3-linux-x64.tar.gz -race -coverprofile=coverage.txt -covermode=atomic ./pkg/...
6 changes: 3 additions & 3 deletions import-export-cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Command Line tool for importing and exporting APIs/Applications/API Products in
- ### Building
`cd` into `product-apim-tooling/import-export-cli`

Execute `./build.sh -t apictl.go -v 4.1.2 -f` to build for all platforms.
Execute `./build.sh -t apictl.go -v 4.1.3 -f` to build for all platforms.

Created packages will be available at `build/target` directory

Expand Down Expand Up @@ -65,11 +65,11 @@ Command Line tool for importing and exporting APIs/Applications/API Products in

Usage: `docker build --build-arg version=<version> -t apictl:<version> .`

Example: `docker build --build-arg version=4.1.2.1 -t apictl:4.1.2.1 .`
Example: `docker build --build-arg version=4.1.3.1 -t apictl:4.1.3.1 .`

- ### Using the Docker Image

`docker run -it -v $(pwd):/git -v ~/.wso2apictl:/root/.wso2apictl -v ~/.wso2apictl.local:/root/.wso2apictl.local apictl:4.1.2.1 <apictl command>`
`docker run -it -v $(pwd):/git -v ~/.wso2apictl:/root/.wso2apictl -v ~/.wso2apictl.local:/root/.wso2apictl.local apictl:4.1.3.1 <apictl command>`

***

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ data:
subscriptionAvailability: CURRENT_TENANT
subscriptionAvailableTenants: []
additionalProperties: []
audiences: []
accessControl: NONE
accessControlRoles: []
businessInformation:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ data:
subscriptionAvailability: CURRENT_TENANT
subscriptionAvailableTenants: []
additionalProperties: []
audiences: []
accessControl: NONE
accessControlRoles: []
businessInformation: {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ data:
subscriptionAvailability: CURRENT_TENANT
subscriptionAvailableTenants: []
additionalProperties: []
audiences: []
accessControl: NONE
accessControlRoles: []
businessInformation:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ data:
subscriptionAvailability: CURRENT_TENANT
subscriptionAvailableTenants: []
additionalProperties: []
audiences: []
accessControl: NONE
accessControlRoles: []
businessInformation: {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ data:
subscriptionAvailability: ALL_TENANTS
subscriptionAvailableTenants: []
additionalProperties: []
audiences: []
businessInformation: {}
corsConfiguration:
corsConfigurationEnabled: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ data:
subscriptionAvailability: CURRENT_TENANT
subscriptionAvailableTenants: []
additionalProperties: []
audiences: []
accessControl: NONE
accessControlRoles: []
businessInformation:
Expand Down
10 changes: 5 additions & 5 deletions import-export-cli/integration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ devops-rest-api-version: v0
The version of the apictl that is being integration tested.

```
apictl-version: 4.1.2
apictl-version: 4.1.3
```


Expand Down Expand Up @@ -95,7 +95,7 @@ apictl-version: 4.1.2
```
go test -p 1 -timeout 0 -archive <apictl archive name>
example: go test -p 1 -timeout 0 -archive apictl-4.1.2-linux-x64.tar.gz
example: go test -p 1 -timeout 0 -archive apictl-4.1.3-linux-x64.tar.gz
```
Expand All @@ -104,23 +104,23 @@ example: go test -p 1 -timeout 0 -archive apictl-4.1.2-linux-x64.tar.gz
```
go test -p 1 -timeout 0 -archive <apictl archive name> -run <Test function name or partial name regex>
example: go test -p 1 -timeout 0 -archive apictl-4.1.2-linux-x64.tar.gz -run TestVersion
example: go test -p 1 -timeout 0 -archive apictl-4.1.3-linux-x64.tar.gz -run TestVersion
```

- Print verbose output

```
go test -p 1 -timeout 0 -archive <apictl archive name> -v
example: go test -p 1 -timeout 0 -archive apictl-4.1.2-linux-x64.tar.gz -v
example: go test -p 1 -timeout 0 -archive apictl-4.1.3-linux-x64.tar.gz -v
```

- Print http transport request/responses

```
go test -p 1 -timeout 0 -archive <apictl archive name> -logtransport
example: go test -p 1 -timeout 0 -archive apictl-4.1.2-linux-x64.tar.gz -logtransport
example: go test -p 1 -timeout 0 -archive apictl-4.1.3-linux-x64.tar.gz -logtransport
```

---
Expand Down
1 change: 1 addition & 0 deletions import-export-cli/integration/apim/apiDTO.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ type API struct {
IsRevision bool `json:"isRevision" yaml:"isRevision"`
RevisionID int `json:"revisionId" yaml:"revisionId"`
EnableSchemaValidation bool `json:"enableSchemaValidation,omitempty" yaml:"enableSchemaValidation,omitempty"`
Audiences []string `json:"audiences,omitempty" yaml:"audiences,omitempty"`
Type string `json:"type,omitempty" yaml:"type,omitempty"`
Transport []string `json:"transport,omitempty" yaml:"transport,omitempty"`
Tags []string `json:"tags,omitempty" yaml:"tags,omitempty"`
Expand Down
2 changes: 1 addition & 1 deletion import-export-cli/integration/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ admin-rest-api-version: v3
devportal-rest-api-version: v2
publisher-rest-api-version: v3
devops-rest-api-version: v0
apictl-version: 4.1.2
apictl-version: 4.1.3

1 change: 1 addition & 0 deletions import-export-cli/integration/testdata/sample-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ data: # Contains the meta data of the API
subscriptionAvailableTenants: [] # Subscription available tenants as a list
additionalProperties: [] # List of custom properties of the API
additionalPropertiesMap: [] # Map of additional properties of the API
audiences: []
accessControl: NONE # Is the API is restricted to certain set of publishers or creators or is it visible to all the publishers and creators? If the accessControl restriction is none, this API can be modified by all the publishers and creators, if not it can only be viewable/modifiable by certain set of publishers and creators, based on the restriction
accessControlRoles: [] # The user roles that are able to view/modify as API publisher or creator
businessInformation: # Business information of the API
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ data: # Contains the meta data of the API
subscriptionAvailableTenants: [] # Subscription available tenants as a list
additionalProperties: [] # List of custom properties of the API
additionalPropertiesMap: [] # Map of additional properties of the API
audiences: []
accessControl: NONE # Is the API is restricted to certain set of publishers or creators or is it visible to all the publishers and creators? If the accessControl restriction is none, this API can be modified by all the publishers and creators, if not it can only be viewable/modifiable by certain set of publishers and creators, based on the restriction
accessControlRoles: [] # The user roles that are able to view/modify as API publisher or creator
businessInformation: # Business information of the API
Expand Down
8 changes: 4 additions & 4 deletions import-export-cli/mi/integration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
```
go test -archive <apictl archive name>
example: go test -archive apictl-4.1.2-linux-x64.tar.gz
example: go test -archive apictl-4.1.3-linux-x64.tar.gz
```

Expand All @@ -71,21 +71,21 @@ example: go test -archive apictl-4.1.2-linux-x64.tar.gz
```
go test -archive <apictl archive name> -test.run <Test function name or partial name regex>
example: go test -archive apictl-4.1.2-linux-x64.tar.gz -test.run TestGetConnectors
example: go test -archive apictl-4.1.3-linux-x64.tar.gz -test.run TestGetConnectors
```

- Print verbose output

```
go test -archive <apictl archive name> -test.v
example: go test -archive apictl-4.1.2-linux-x64.tar.gz -test.v
example: go test -archive apictl-4.1.3-linux-x64.tar.gz -test.v
```

- Print http transport request/responses

```
go test -archive <apictl archive name> -logtransport
example: go test -archive apictl-4.1.2-linux-x64.tar.gz -logtransport
example: go test -archive apictl-4.1.3-linux-x64.tar.gz -logtransport
```

0 comments on commit d6d2f81

Please sign in to comment.