Skip to content

Commit

Permalink
Merge pull request #197 from jfrog/prep-for-release
Browse files Browse the repository at this point in the history
Prep for release
  • Loading branch information
alexhung authored May 29, 2024
2 parents 43bce3f + 5128c5a commit ceef247
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 16 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 2.8.0 (May 30, 2024)

IMPROVEMENTS:

* resource/xray_security_policy: Add `package_name`, `package_type`, and `package_versions` attributes to support package security policy. PR: [#189](https://github.com/jfrog/terraform-provider-xray/pull/189)

## 2.7.1 (May 29, 2024). Tested on Artifactory 7.84.12 and Xray 3.96.1

IMPROVEMENTS:
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ require (
github.com/hashicorp/terraform-plugin-log v0.9.0
github.com/hashicorp/terraform-plugin-mux v0.16.0
github.com/hashicorp/terraform-plugin-sdk/v2 v2.34.0
github.com/hashicorp/terraform-plugin-testing v1.5.1
github.com/hashicorp/terraform-plugin-testing v1.8.0
github.com/jfrog/terraform-provider-shared v1.25.3
github.com/samber/lo v1.39.0
golang.org/x/exp v0.0.0-20230809150735-7b3493d9a819
Expand Down Expand Up @@ -43,7 +43,7 @@ require (
github.com/hashicorp/go-checkpoint v0.5.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 // indirect
github.com/hashicorp/go-hclog v1.6.2 // indirect
github.com/hashicorp/go-hclog v1.6.3 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-plugin v1.6.0 // indirect
github.com/hashicorp/go-uuid v1.0.3 // indirect
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9n
github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48=
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 h1:1/D3zfFHttUKaCaGKZ/dR2roBXv0vKbSCnssIldfQdI=
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320/go.mod h1:EiZBMaudVLy8fmjf9Npq1dq9RalhveqZG5w/yz3mHWs=
github.com/hashicorp/go-hclog v1.6.2 h1:NOtoftovWkDheyUM/8JW3QMiXyxJK3uHRK7wV04nD2I=
github.com/hashicorp/go-hclog v1.6.2/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M=
github.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB11/k=
github.com/hashicorp/go-hclog v1.6.3/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M=
github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk=
github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo=
github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM=
Expand Down Expand Up @@ -115,8 +115,8 @@ github.com/hashicorp/terraform-plugin-mux v0.16.0 h1:RCzXHGDYwUwwqfYYWJKBFaS3fQs
github.com/hashicorp/terraform-plugin-mux v0.16.0/go.mod h1:PF79mAsPc8CpusXPfEVa4X8PtkB+ngWoiUClMrNZlYo=
github.com/hashicorp/terraform-plugin-sdk/v2 v2.34.0 h1:kJiWGx2kiQVo97Y5IOGR4EMcZ8DtMswHhUuFibsCQQE=
github.com/hashicorp/terraform-plugin-sdk/v2 v2.34.0/go.mod h1:sl/UoabMc37HA6ICVMmGO+/0wofkVIRxf+BMb/dnoIg=
github.com/hashicorp/terraform-plugin-testing v1.5.1 h1:T4aQh9JAhmWo4+t1A7x+rnxAJHCDIYW9kXyo4sVO92c=
github.com/hashicorp/terraform-plugin-testing v1.5.1/go.mod h1:dg8clO6K59rZ8w9EshBmDp1CxTIPu3yA4iaDpX1h5u0=
github.com/hashicorp/terraform-plugin-testing v1.8.0 h1:wdYIgwDk4iO933gC4S8KbKdnMQShu6BXuZQPScmHvpk=
github.com/hashicorp/terraform-plugin-testing v1.8.0/go.mod h1:o2kOgf18ADUaZGhtOl0YCkfIxg01MAiMATT2EtIHlZk=
github.com/hashicorp/terraform-registry-address v0.2.3 h1:2TAiKJ1A3MAkZlH1YI/aTVcLZRu7JseiXNRHbOAyoTI=
github.com/hashicorp/terraform-registry-address v0.2.3/go.mod h1:lFHA76T8jfQteVfT7caREqguFrW3c4MFSPhZB7HHgUM=
github.com/hashicorp/terraform-svchost v0.1.1 h1:EZZimZ1GxdqFRinZ1tpJwVxxt49xc/S52uzrw4x0jKQ=
Expand Down
10 changes: 5 additions & 5 deletions pkg/xray/resource/resource_xray_binary_manager_builds_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func uploadBuild(t *testing.T, name, number, projectKey string) error {
return nil
}

func deleteBuild(t *testing.T, name, number, projectKey string) error {
func deleteBuild(t *testing.T, name, projectKey string) error {
type Build struct {
Name string `json:"buildName"`
BuildRepo string `json:"buildRepo"`
Expand Down Expand Up @@ -137,11 +137,11 @@ func TestAccBinaryManagerBuilds_full(t *testing.T) {
},
},
CheckDestroy: func(*terraform.State) error {
if err := deleteBuild(t, build1Name, "1", ""); err != nil {
if err := deleteBuild(t, build1Name, ""); err != nil {
return err
}

if err := deleteBuild(t, build2Name, "1", ""); err != nil {
if err := deleteBuild(t, build2Name, ""); err != nil {
return nil
}

Expand Down Expand Up @@ -238,11 +238,11 @@ func TestAccBinaryManagerBuilds_project_full(t *testing.T) {
},
},
CheckDestroy: func(*terraform.State) error {
if err := deleteBuild(t, build1Name, "1", projectKey); err != nil {
if err := deleteBuild(t, build1Name, projectKey); err != nil {
return err
}

if err := deleteBuild(t, build2Name, "1", projectKey); err != nil {
if err := deleteBuild(t, build2Name, projectKey); err != nil {
return nil
}

Expand Down
4 changes: 2 additions & 2 deletions pkg/xray/resource/resource_xray_binary_manager_repos_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func TestAccBinaryManagerRepos_full(t *testing.T) {
"package_type": "Docker",
}),
),
ConfigPlanChecks: testutil.ConfigPlanChecks(""),
ConfigPlanChecks: testutil.ConfigPlanChecks("xray_binary_manager_repos"),
},
{
ResourceName: fqrn,
Expand Down Expand Up @@ -321,7 +321,7 @@ func TestAccBinaryManagerRepos_project_full(t *testing.T) {
"package_type": "Docker",
}),
),
ConfigPlanChecks: testutil.ConfigPlanChecks(""),
ConfigPlanChecks: testutil.ConfigPlanChecks("xray_binary_manager_repos"),
},
{
ResourceName: fqrn,
Expand Down
6 changes: 3 additions & 3 deletions pkg/xray/resource/resource_xray_security_policy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,7 @@ func TestAccSecurityPolicy_Packages(t *testing.T) {

resource.Test(t, resource.TestCase{
PreCheck: func() { acctest.PreCheck(t) },
CheckDestroy: acctest.VerifyDeleted(fqrn, acctest.CheckPolicy),
CheckDestroy: acctest.VerifyDeleted(fqrn, "", acctest.CheckPolicy),
ProtoV6ProviderFactories: acctest.ProtoV6MuxProviderFactories,
Steps: []resource.TestStep{
{
Expand Down Expand Up @@ -813,7 +813,7 @@ func TestAccSecurityPolicy_PackagesIncorrectVersionRangeFails(t *testing.T) {

resource.Test(t, resource.TestCase{
PreCheck: func() { acctest.PreCheck(t) },
CheckDestroy: acctest.VerifyDeleted(fqrn, acctest.CheckPolicy),
CheckDestroy: acctest.VerifyDeleted(fqrn, "", acctest.CheckPolicy),
ProtoV6ProviderFactories: acctest.ProtoV6MuxProviderFactories,
Steps: []resource.TestStep{
{
Expand Down Expand Up @@ -841,7 +841,7 @@ func TestAccSecurityPolicy_createPackagesFail(t *testing.T) {

resource.Test(t, resource.TestCase{
PreCheck: func() { acctest.PreCheck(t) },
CheckDestroy: acctest.VerifyDeleted(fqrn, acctest.CheckPolicy),
CheckDestroy: acctest.VerifyDeleted(fqrn, "", acctest.CheckPolicy),
ProtoV6ProviderFactories: acctest.ProtoV6MuxProviderFactories,
Steps: []resource.TestStep{
{
Expand Down

0 comments on commit ceef247

Please sign in to comment.