Skip to content

Commit 594f0b5

Browse files
committed
Generate new vars store before running unit tests
- This will increase current test runs (approx. ~4min) by one minute, but should reduce the likelyhood of tests ballooning up to 9+ minutes. - Will monitor this change over a week to see if any significant changes show up. [finishes #170886776](https://www.pivotaltracker.com/story/show/170886776)
1 parent f9aea81 commit 594f0b5

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@ deployment-vars.yml
22
tmp
33
*hidden*
44
.idea
5+
6+
/* vars-store for unit tests */
7+
units/test-vars-store.yml

units/helpers/check_interpolation.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ func checkInterpolate(cfDeploymentHome, operationsSubDir, opsFileName string, op
121121
}
122122

123123
func createTempVarsStore(cfDeploymentHome string) (string, error) {
124-
varsStorePath := filepath.Join(cfDeploymentHome, "scripts", "fixtures", "unit-test-vars-store.yml")
124+
varsStorePath := filepath.Join(cfDeploymentHome, "units", "test-vars-store.yml")
125125

126126
varsStoreFile, err := os.Open(varsStorePath)
127127
if err != nil {

units/test

+6
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,11 @@ function suites() {
1818
}
1919

2020
pushd "$(dirname "$0")" > /dev/null
21+
if [ ! -f "test-vars-store.yml" ]; then
22+
echo "Generating vars-store..."
23+
bosh interpolate ../cf-deployment.yml --vars-store test-vars-store.yml > /dev/null
24+
fi
25+
26+
echo "Starting unit tests..."
2127
go test "$@" $(suites) -mod=vendor
2228
popd > /dev/null

0 commit comments

Comments
 (0)