Skip to content

Commit

Permalink
Merge pull request #5 from CheckPointSW/no-default-values-in-tests
Browse files Browse the repository at this point in the history
acctests - no checkoing default values
  • Loading branch information
chkp-nadavt authored Jun 8, 2022
2 parents 1b2a32e + 15cdfbd commit 78f553e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 59 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
build:
name: Build
runs-on: ubuntu-latest
timeout-minutes: 5
timeout-minutes: 15
steps:

- name: Set up Go
Expand Down Expand Up @@ -53,7 +53,7 @@ jobs:
name: Test
needs: build
runs-on: ubuntu-latest
timeout-minutes: 25
timeout-minutes: 50
concurrency: acctests-${{ github.event_name }}
strategy:
max-parallel: 1
Expand Down Expand Up @@ -93,7 +93,7 @@ jobs:
- name: TF acceptance tests push
if: ${{ github.event_name == 'push' }}
timeout-minutes: 5
timeout-minutes: 10
env:
INEXT_CLIENT_ID: ${{ secrets.INEXT_CLIENT_ID_PUSH }}
INEXT_ACCESS_KEY: ${{ secrets.INEXT_ACCESS_KEY_PUSH }}
Expand All @@ -105,7 +105,7 @@ jobs:
- name: TF acceptance tests pull request
if: ${{ github.event_name == 'pull_request' }}
timeout-minutes: 5
timeout-minutes: 10
env:
INEXT_CLIENT_ID: ${{ secrets.INEXT_CLIENT_ID_PR }}
INEXT_ACCESS_KEY: ${{ secrets.INEXT_ACCESS_KEY_PR }}
Expand All @@ -117,7 +117,7 @@ jobs:
- name: TF acceptance tests schedule
if: ${{ github.event_name == 'schedule' }}
timeout-minutes: 5
timeout-minutes: 10
env:
INEXT_CLIENT_ID: ${{ secrets.INEXT_CLIENT_ID_SCHEDULE }}
INEXT_ACCESS_KEY: ${{ secrets.INEXT_ACCESS_KEY_SCHEDULE }}
Expand Down
33 changes: 6 additions & 27 deletions internal/resources/tests/web-api-asset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,35 +31,14 @@ func TestAccWebAPIAssetBasic(t *testing.T) {
Config: webAPIAssetBasicConfig(assetNameAttribute),
Check: resource.ComposeTestCheckFunc(
append(acctest.ComposeTestCheckResourceAttrsFromMap(assetResourceName, map[string]string{
"name": assetNameAttribute,
"urls.0": fmt.Sprintf("http://host/%s/path1", assetNameAttribute),
"urls.#": "1",
"proxy_setting.0.%": "3",
"source_identifier.0.values_ids.#": "0",
"category": "cloud",
"source_identifier.0.values.#": "0",
"upstream_url": "",
"%": "22",
"order": "",
"profiles.#": "0",
"read_only": "false",
"proxy_setting.0.value": "vault",
"class": "workload",
"practice.#": "0",
"trusted_sources.#": "0",
"urls_ids.#": "1",
"source_identifier.#": "0",
"proxy_setting.0.key": "certificateType",
"asset_type": "WebAPI",
"family": "Web API",
"kind": "",
"group": "",
"intelligence_tags": "",
"main_attributes": fmt.Sprintf("{\"applicationUrls\":\"http://host/%s/path1\"}", assetNameAttribute),
"proxy_setting.#": "1",
"name": assetNameAttribute,
"urls.0": fmt.Sprintf("http://host/%s/path1", assetNameAttribute),
"urls.#": "1",
"%": "22",
"urls_ids.#": "1",
"main_attributes": fmt.Sprintf("{\"applicationUrls\":\"http://host/%s/path1\"}", assetNameAttribute),
}),
resource.TestCheckResourceAttrSet(assetResourceName, "id"),
resource.TestCheckResourceAttrSet(assetResourceName, "proxy_setting.0.id"),
)...,
),
ExpectNonEmptyPlan: true,
Expand Down
33 changes: 6 additions & 27 deletions internal/resources/tests/web-app-asset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,35 +31,14 @@ func TestAccWebApplicationAssetBasic(t *testing.T) {
Config: webApplicationAssetBasicConfig(assetNameAttribute),
Check: resource.ComposeTestCheckFunc(
append(acctest.ComposeTestCheckResourceAttrsFromMap(assetResourceName, map[string]string{
"name": assetNameAttribute,
"urls.0": fmt.Sprintf("http://host/%s/path1", assetNameAttribute),
"urls.#": "1",
"proxy_setting.0.%": "3",
"source_identifier.0.values_ids.#": "0",
"category": "cloud",
"source_identifier.0.values.#": "0",
"upstream_url": "",
"%": "21",
"order": "",
"profiles.#": "0",
"read_only": "false",
"proxy_setting.0.value": "vault",
"class": "workload",
"practice.#": "0",
"trusted_sources.#": "0",
"urls_ids.#": "1",
"source_identifier.#": "0",
"proxy_setting.0.key": "certificateType",
"asset_type": "WebApplication",
"family": "Web Application",
"kind": "",
"group": "",
"intelligence_tags": "",
"main_attributes": fmt.Sprintf("{\"applicationUrls\":\"http://host/%s/path1\"}", assetNameAttribute),
"proxy_setting.#": "1",
"name": assetNameAttribute,
"urls.0": fmt.Sprintf("http://host/%s/path1", assetNameAttribute),
"urls.#": "1",
"%": "21",
"urls_ids.#": "1",
"main_attributes": fmt.Sprintf("{\"applicationUrls\":\"http://host/%s/path1\"}", assetNameAttribute),
}),
resource.TestCheckResourceAttrSet(assetResourceName, "id"),
resource.TestCheckResourceAttrSet(assetResourceName, "proxy_setting.0.id"),
)...,
),
ExpectNonEmptyPlan: true,
Expand Down

0 comments on commit 78f553e

Please sign in to comment.