Skip to content

Commit 2f4b90c

Browse files
authored
fix: tar command failing due to symlinks in the repos (#895)
1 parent 8d91a2d commit 2f4b90c

File tree

4 files changed

+41
-42
lines changed

4 files changed

+41
-42
lines changed

.secrets.baseline

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"files": "go.sum|^.secrets.baseline$",
44
"lines": null
55
},
6-
"generated_at": "2025-12-09T14:19:41Z",
6+
"generated_at": "2025-12-16T14:44:30Z",
77
"plugins_used": [
88
{
99
"name": "AWSKeyDetector"
@@ -82,7 +82,7 @@
8282
"hashed_secret": "8196b86ede820e665b2b8af9c648f4996be99838",
8383
"is_secret": false,
8484
"is_verified": false,
85-
"line_number": 93,
85+
"line_number": 94,
8686
"type": "Secret Keyword",
8787
"verified_result": null
8888
}

modules/kube-audit/scripts/install-binaries.sh

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,18 @@ curl --silent \
2626
--output "${DIRECTORY}/common-bash.tar.gz" \
2727
"https://github.com/terraform-ibm-modules/common-bash-library/archive/refs/tags/$TAG.tar.gz"
2828

29-
mkdir -p "${DIRECTORY}/common-bash-library"
30-
tar -xzf "${DIRECTORY}/common-bash.tar.gz" --strip-components=1 -C "${DIRECTORY}/common-bash-library"
29+
tar -xzf "${DIRECTORY}/common-bash.tar.gz" -C "${DIRECTORY}"
3130
rm -f "${DIRECTORY}/common-bash.tar.gz"
3231

3332
# The file doesn’t exist at the time shellcheck runs, so this check is skipped.
34-
# shellcheck disable=SC1091
35-
source "${DIRECTORY}/common-bash-library/common/common.sh"
33+
# shellcheck disable=SC1091,SC1090
34+
source "${DIRECTORY}/common-bash-library-${TAG#v}/common/common.sh"
3635

3736
echo "Installing jq."
3837
install_jq "latest" "${DIRECTORY}" "true"
3938
echo "Installing kubectl."
4039
install_kubectl "latest" "${DIRECTORY}" "true"
4140

42-
rm -rf "${DIRECTORY}/common-bash-library"
41+
rm -rf "${DIRECTORY}/common-bash-library-${TAG#v}"
4342

4443
echo "Installation complete successfully"

tests/other_test.go

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -14,34 +14,10 @@ import (
1414
)
1515

1616
const advancedExampleDir = "examples/advanced"
17-
const basicExampleDir = "examples/basic"
1817
const fscloudExampleDir = "examples/fscloud"
1918
const crossKmsSupportExampleDir = "examples/cross_kms_support"
2019
const openshiftLandingZoneExampleDir = "examples/containerized_app_landing_zone"
2120

22-
func setupOptions(t *testing.T, prefix string, terraformDir string, ocpVersion string) *testhelper.TestOptions {
23-
options := testhelper.TestOptionsDefaultWithVars(&testhelper.TestOptions{
24-
Testing: t,
25-
TerraformDir: terraformDir,
26-
Prefix: prefix,
27-
ResourceGroup: resourceGroup,
28-
CloudInfoService: sharedInfoSvc,
29-
IgnoreUpdates: testhelper.Exemptions{ // Ignore for consistency check
30-
List: []string{
31-
"module.logs_agents.helm_release.logs_agent",
32-
},
33-
},
34-
TerraformVars: map[string]interface{}{
35-
"ocp_version": ocpVersion,
36-
"access_tags": permanentResources["accessTags"],
37-
"ocp_entitlement": "cloud_pak",
38-
},
39-
CheckApplyResultForUpgrade: true,
40-
})
41-
42-
return options
43-
}
44-
4521
func getClusterIngress(options *testhelper.TestOptions) error {
4622

4723
// Get output of the last apply
@@ -61,17 +37,6 @@ func getClusterIngress(options *testhelper.TestOptions) error {
6137
return nil
6238
}
6339

64-
func TestRunBasicExample(t *testing.T) {
65-
t.Parallel()
66-
67-
options := setupOptions(t, "base-ocp", basicExampleDir, ocpVersion4)
68-
69-
output, err := options.RunTestConsistency()
70-
71-
assert.Nil(t, err, "This should not have errored")
72-
assert.NotNil(t, output, "Expected some output")
73-
}
74-
7540
func TestRunMultiClusterExample(t *testing.T) {
7641
t.Parallel()
7742
options := testhelper.TestOptionsDefaultWithVars(&testhelper.TestOptions{

tests/pr_test.go

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import (
2626

2727
const fullyConfigurableTerraformDir = "solutions/fully-configurable"
2828
const customsgExampleDir = "examples/custom_sg"
29+
const basicExampleDir = "examples/basic"
2930
const quickStartTerraformDir = "solutions/quickstart"
3031
const resourceGroup = "geretain-test-base-ocp-vpc"
3132

@@ -353,3 +354,37 @@ func TestRoksAddonDefaultConfiguration(t *testing.T) {
353354
err := options.RunAddonTest()
354355
require.NoError(t, err)
355356
}
357+
358+
func setupOptions(t *testing.T, prefix string, terraformDir string, ocpVersion string) *testhelper.TestOptions {
359+
options := testhelper.TestOptionsDefaultWithVars(&testhelper.TestOptions{
360+
Testing: t,
361+
TerraformDir: terraformDir,
362+
Prefix: prefix,
363+
ResourceGroup: resourceGroup,
364+
CloudInfoService: sharedInfoSvc,
365+
IgnoreUpdates: testhelper.Exemptions{ // Ignore for consistency check
366+
List: []string{
367+
"module.logs_agents.helm_release.logs_agent",
368+
},
369+
},
370+
TerraformVars: map[string]interface{}{
371+
"ocp_version": ocpVersion,
372+
"access_tags": permanentResources["accessTags"],
373+
"ocp_entitlement": "cloud_pak",
374+
},
375+
CheckApplyResultForUpgrade: true,
376+
})
377+
378+
return options
379+
}
380+
381+
func TestRunBasicExample(t *testing.T) {
382+
t.Parallel()
383+
384+
options := setupOptions(t, "base-ocp", basicExampleDir, ocpVersion4)
385+
386+
output, err := options.RunTestConsistency()
387+
388+
assert.Nil(t, err, "This should not have errored")
389+
assert.NotNil(t, output, "Expected some output")
390+
}

0 commit comments

Comments
 (0)