-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OCM-7481 | test: package addtional security groups preparation func a…
…nd add vpc test suite
- Loading branch information
1 parent
3b462e2
commit 7d4e805
Showing
6 changed files
with
91 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package vpc_client | ||
|
||
import ( | ||
"testing" | ||
|
||
. "github.com/onsi/ginkgo/v2" | ||
. "github.com/onsi/gomega" | ||
) | ||
|
||
func TestHelper(t *testing.T) { | ||
RegisterFailHandler(Fail) | ||
RunSpecs(t, "Account Roles Suite") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package vpc_client | ||
|
||
import ( | ||
. "github.com/onsi/ginkgo/v2" | ||
. "github.com/onsi/gomega" | ||
con "github.com/openshift-online/ocm-common/pkg/aws/consts" | ||
) | ||
|
||
var _ = Describe("VPC Client Functions", func() { | ||
var vpcClient *VPC | ||
BeforeEach(func() { | ||
var err error | ||
vpcClient, err = PrepareVPC("ocm-common-test", con.DefaultAWSRegion, con.DefaultVPCCIDR, false) | ||
Expect(err).ToNot(HaveOccurred()) | ||
Expect(vpcClient.VpcID).ToNot(BeEmpty()) | ||
}) | ||
AfterEach(func() { | ||
vpcClient.DeleteVPCChain(true) | ||
}) | ||
It("Test Additional Security Groups Creation", func() { | ||
sgNumber := 3 | ||
sgs, err := vpcClient.CreateAdditionalSecurityGroups(sgNumber, "ocm-common-test", "") | ||
Expect(err).ToNot(HaveOccurred()) | ||
Expect(len(sgs)).To(Equal(sgNumber)) | ||
|
||
}) | ||
}) |