Skip to content

Commit

Permalink
Merge branch 'v0.5.8' into ImprovedCI
Browse files Browse the repository at this point in the history
  • Loading branch information
bczoma committed Oct 3, 2023
2 parents 4ea59f3 + 008f905 commit 5cbd5fa
Show file tree
Hide file tree
Showing 29 changed files with 1,098 additions and 312 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/cli-build-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: workflow_call

jobs:
test:
name: Setup broker for CLI Integration Test
name: Run Generator tests
runs-on: ubuntu-latest
steps:
- name: Set up Go
Expand Down Expand Up @@ -117,11 +117,13 @@ jobs:
- name: Test generated terraform on broker
run: |
# Create
sed -i '/# username = "admin"/c\username = "admin"' messageVpn.tf
sed -i '/# password = "admin"/c\password = "admin"' messageVpn.tf
terraform plan
terraform apply -auto-approve
sleep 1
- name: Create custom messageVPN with 20 messageVpn queues (Paging Test)
- name: Create custom messageVPN with 21 messageVpn queues (Paging Test)
run: |
pushd ci/broker_vpn_q3
# Create
Expand All @@ -130,11 +132,11 @@ jobs:
sleep 1
popd
- name: Confirm all 20 queues are present with paging (Paging Test)
- name: Confirm all 21 queues are present with paging (Paging Test)
run: |
SOLACEBROKER_REGISTRY_OVERRIDE=registry.terraform.io/solaceproducts/solacebroker SOLACEBROKER_USERNAME=admin SOLACEBROKER_PASSWORD=admin terraform-provider-solacebroker generate --url=http://localhost:8080 solacebroker_msg_vpn.qn another messageVpn.tf
cat messageVpn.tf
grep -o 'solacebroker_msg_vpn_queue' messageVpn.tf | wc -l | grep 20
grep -o 'solacebroker_msg_vpn_queue ' messageVpn.tf | wc -l | grep 21
- name: Create custom messageVPN with large config
run: |
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/core-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,12 @@ jobs:

Plugin-Integration-Test:
needs: build
uses: ./.github/workflows/plugin-build-pipeline.yml
uses: ./.github/workflows/provider-build-pipeline.yml
secrets: inherit

Plugin-Acceptance-Test:
needs: build
uses: ./.github/workflows/provider-acceptance-test.yml
secrets: inherit

CLI-Integration-Test:
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/provider-acceptance-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Provider Acceptance Test

on: workflow_call


jobs:
test:
name: Run formal acceptance test
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: "1.20"

- name: Check out code
uses: actions/checkout@v3

- name: Acceptance test
run: |
make testacc
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: Terraform Plugin Pipeline
name: Terraform Provider Pipeline

on: workflow_call


jobs:
test:
name: Setup broker for terraform plugin pipeline
name: Run Provider setup and tests
runs-on: ubuntu-latest
steps:
- name: Set up Go
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ It is recommended to familiarize yourself with Solace technology and broker mana

### Requirements

* [Terraform](https://www.terraform.io/downloads) (>= 0.12)
* [Go](https://go.dev/doc/install) (1.19)
* [Terraform](https://www.terraform.io/downloads) (>= 1.0)
* [Go](https://go.dev/doc/install) (1.20)
* [Make](https://www.gnu.org/software/make/)

### Building
Expand Down Expand Up @@ -69,6 +69,6 @@ This project is licensed under the Apache License, Version 2.0. - See the [LICEN

For more information about Solace technology in general please visit these resources:

- Understanding [Solace technology](https://solace.com/products/platform/)
- Understanding [Solace technology](https://docs.solace.com/Get-Started/Solace-PubSub-Platform.htm)
- The Solace Developer Portal website at: [solace.dev](https://solace.dev/)
- Ask the [Solace community](https://solace.community/).
66 changes: 64 additions & 2 deletions ci/broker_vpn_q3/testconfig3.tf
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,27 @@ resource "solacebroker_msg_vpn_queue" "ok" {
max_msg_size = 54321
}

resource "solacebroker_msg_vpn_queue_subscription" "foo" {
msg_vpn_name = solacebroker_msg_vpn_queue.ok.msg_vpn_name
queue_name = solacebroker_msg_vpn_queue.ok.queue_name
subscription_topic = "foo/one"
}


resource "solacebroker_msg_vpn_queue" "ok2" {
msg_vpn_name = solacebroker_msg_vpn.another.msg_vpn_name
queue_name = "two"
ingress_enabled = true
egress_enabled = true
max_msg_size = 54321
}

resource "solacebroker_msg_vpn_queue_subscription" "ok2" {
msg_vpn_name = solacebroker_msg_vpn_queue.ok2.msg_vpn_name
queue_name = solacebroker_msg_vpn_queue.ok2.queue_name
subscription_topic = "foo/ok2"
}

resource "solacebroker_msg_vpn_queue" "ok3" {
msg_vpn_name = solacebroker_msg_vpn.another.msg_vpn_name
queue_name = "three"
Expand All @@ -135,6 +149,13 @@ resource "solacebroker_msg_vpn_queue" "ok3" {
max_msg_size = 54321
}

resource "solacebroker_msg_vpn_queue_subscription" "ok3" {
msg_vpn_name = solacebroker_msg_vpn_queue.ok3.msg_vpn_name
queue_name = solacebroker_msg_vpn_queue.ok3.queue_name
subscription_topic = "foo/ok3"
}


resource "solacebroker_msg_vpn_queue" "ok4" {
msg_vpn_name = solacebroker_msg_vpn.another.msg_vpn_name
queue_name = "four"
Expand All @@ -143,6 +164,13 @@ resource "solacebroker_msg_vpn_queue" "ok4" {
max_msg_size = 54321
}

resource "solacebroker_msg_vpn_queue_subscription" "ok4" {
msg_vpn_name = solacebroker_msg_vpn_queue.ok4.msg_vpn_name
queue_name = solacebroker_msg_vpn_queue.ok4.queue_name
subscription_topic = "foo/ok4"
}


resource "solacebroker_msg_vpn_queue" "ok5" {
msg_vpn_name = solacebroker_msg_vpn.another.msg_vpn_name
queue_name = "five"
Expand All @@ -151,22 +179,43 @@ resource "solacebroker_msg_vpn_queue" "ok5" {
max_msg_size = 54321
}

resource "solacebroker_msg_vpn_queue_subscription" "ok5" {
msg_vpn_name = solacebroker_msg_vpn_queue.ok5.msg_vpn_name
queue_name = solacebroker_msg_vpn_queue.ok5.queue_name
subscription_topic = "foo/ok5"
}


resource "solacebroker_msg_vpn_queue" "ok6" {
msg_vpn_name = solacebroker_msg_vpn.another.msg_vpn_name
queue_name = "five"
queue_name = "six"
ingress_enabled = true
egress_enabled = true
max_msg_size = 54321
}

resource "solacebroker_msg_vpn_queue_subscription" "ok6" {
msg_vpn_name = solacebroker_msg_vpn_queue.ok6.msg_vpn_name
queue_name = solacebroker_msg_vpn_queue.ok6.queue_name
subscription_topic = "foo/ok6"
}

resource "solacebroker_msg_vpn_queue" "ok7" {
msg_vpn_name = solacebroker_msg_vpn.another.msg_vpn_name
queue_name = "six"
queue_name = "seven"
ingress_enabled = true
egress_enabled = true
max_msg_size = 54321
}

resource "solacebroker_msg_vpn_queue_subscription" "ok7" {
msg_vpn_name = solacebroker_msg_vpn_queue.ok7.msg_vpn_name
queue_name = solacebroker_msg_vpn_queue.ok7.queue_name
subscription_topic = "foo/ok7"
}



resource "solacebroker_msg_vpn_queue" "ok8" {
msg_vpn_name = solacebroker_msg_vpn.another.msg_vpn_name
queue_name = "eight"
Expand All @@ -175,10 +224,23 @@ resource "solacebroker_msg_vpn_queue" "ok8" {
max_msg_size = 54321
}

resource "solacebroker_msg_vpn_queue_subscription" "ok8" {
msg_vpn_name = solacebroker_msg_vpn_queue.ok8.msg_vpn_name
queue_name = solacebroker_msg_vpn_queue.ok8.queue_name
subscription_topic = "foo/ok8"
}


resource "solacebroker_msg_vpn_queue" "ok9" {
msg_vpn_name = solacebroker_msg_vpn.another.msg_vpn_name
queue_name = "nine"
ingress_enabled = true
egress_enabled = true
max_msg_size = 54321
}

resource "solacebroker_msg_vpn_queue_subscription" "ok9" {
msg_vpn_name = solacebroker_msg_vpn_queue.ok9.msg_vpn_name
queue_name = solacebroker_msg_vpn_queue.ok9.queue_name
subscription_topic = "foo/ok9"
}
15 changes: 15 additions & 0 deletions cmd/broker/client.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
// terraform-provider-solacebroker
//
// Copyright 2023 Solace Corporation. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package broker

import (
Expand Down
Loading

0 comments on commit 5cbd5fa

Please sign in to comment.