mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-03 19:58:17 +00:00 
			
		
		
		
	Make hack/test-go.sh friendlier to OS X bash by not using a -1 array index.
Without this, everytime I run test-go.sh I get the following error: ./hack/test-go.sh: line 215: apiVersions: bad array subscript
This commit is contained in:
		@@ -207,12 +207,14 @@ reportCoverageToCoveralls() {
 | 
				
			|||||||
# Convert the CSV to an array of API versions to test
 | 
					# Convert the CSV to an array of API versions to test
 | 
				
			||||||
IFS=',' read -a apiVersions <<< "${KUBE_TEST_API_VERSIONS}"
 | 
					IFS=',' read -a apiVersions <<< "${KUBE_TEST_API_VERSIONS}"
 | 
				
			||||||
ETCD_PREFIX=${ETCD_STANDARD_PREFIX}
 | 
					ETCD_PREFIX=${ETCD_STANDARD_PREFIX}
 | 
				
			||||||
 | 
					LAST_API_VERSION=""
 | 
				
			||||||
for apiVersion in "${apiVersions[@]}"; do
 | 
					for apiVersion in "${apiVersions[@]}"; do
 | 
				
			||||||
  echo "Running tests for APIVersion: $apiVersion"
 | 
					  echo "Running tests for APIVersion: $apiVersion"
 | 
				
			||||||
 | 
					  LAST_API_VERSION=$apiVersion
 | 
				
			||||||
  KUBE_API_VERSION="${apiVersion}" ETCD_PREFIX=${ETCD_STANDARD_PREFIX} runTests "$@"
 | 
					  KUBE_API_VERSION="${apiVersion}" ETCD_PREFIX=${ETCD_STANDARD_PREFIX} runTests "$@"
 | 
				
			||||||
done
 | 
					done
 | 
				
			||||||
echo "Using custom etcd path prefix: ${ETCD_CUSTOM_PREFIX}"
 | 
					echo "Using custom etcd path prefix: ${ETCD_CUSTOM_PREFIX}"
 | 
				
			||||||
KUBE_API_VERSION="${apiVersions[-1]}" ETCD_PREFIX=${ETCD_CUSTOM_PREFIX} runTests "$@"
 | 
					KUBE_API_VERSION="${LAST_API_VERSION}" ETCD_PREFIX=${ETCD_CUSTOM_PREFIX} runTests "$@"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# We might run the tests for multiple versions, but we want to report only
 | 
					# We might run the tests for multiple versions, but we want to report only
 | 
				
			||||||
# one of them to coveralls. Here we report coverage from the last run.
 | 
					# one of them to coveralls. Here we report coverage from the last run.
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user