demoReorgToEaseTesting

This commit is contained in:
Jeffrey Regan
2018-05-15 15:43:02 -07:00
parent 831bd5df75
commit 9bc92f133f
33 changed files with 31 additions and 20 deletions

View File

@@ -3,17 +3,17 @@
These demos assume that `kustomize` is on your `$PATH`.
They are covered by pre-submit tests.
* [hello world](helloWorld.md) - Deploy multiple
* [hello world](helloWorld/README.md) - Deploy multiple
(differently configured) variants of a simple Hello
World server.
* [LDAP](ldap.md) - Deploy multiple
* [LDAP](ldap/README.md) - Deploy multiple
(differently configured) variants of a LDAP server.
* [mySql](mySql.md) - Create a MySQL production
* [mySql](mySql/README.md) - Create a MySQL production
configuration from scratch.
* [springboot](springboot.md) - Create a Spring Boot
* [springboot](springboot/README.md) - Create a Spring Boot
application production configuration from scratch.
* [configGeneration](configGeneration.md) -

View File

@@ -50,7 +50,7 @@ mkdir -p $BASE
curl -s -o "$BASE/#1.yaml" "https://raw.githubusercontent.com\
/kubernetes-sigs/kustomize\
/master/demos/data/helloWorld\
/master/demos/helloWorld\
/{configMap,deployment,kustomization,service}.yaml"
```

57
demos/integration_tests.sh Executable file
View File

@@ -0,0 +1,57 @@
#!/bin/bash
# Copyright 2018 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# This script run periodically by kubernetes test-infra.
# At time of writing, it's 'call point' was in
# https://github.com/kubernetes/test-infra/blob/master/jobs/config.json
function exit_with {
local msg=$1
echo >&2 ${msg}
exit 1
}
base_dir="$( cd "$(dirname "$0")/../../.." && pwd )"
cd "$base_dir" || {
exit_with "Cannot cd to ${base_dir}. Aborting."
}
go install github.com/kubernetes-sigs/kustomize || \
{ exit_with "Failed to install kustomize"; }
export PATH=$GOPATH/bin:$PATH
home=`pwd`
### LDAP TEST ###
demo_dir="./demos/ldap"
if [ ! -d ${demo_dir} ]; then
exit_with "directory ${demo_dir} doesn't exist"
fi
test_script="${demo_dir}/integration_test.sh"
if [ -x "${test_script}" ]; then
${test_script} ${demo_dir}/base
if [ $? -eq 0 ]; then
echo "testing ${demo_dir} passed."
else
exit_with "testing ${demo_dir} failed."
fi
else
exit_with "Unable to run ${test_script}"
fi
#################

View File

@@ -45,7 +45,7 @@ mkdir -p $BASE
CONTENT="https://raw.githubusercontent.com\
/kubernetes-sigs/kustomize\
/master/demos/data/ldap"
/master/demos/ldap"
curl -s -o "$BASE/#1" "$CONTENT/base\
/{deployment.yaml,kustomization.yaml,service.yaml,env.startup.txt}"

View File

@@ -29,7 +29,7 @@ Download them:
```
curl -s -o "$DEMO_HOME/#1.yaml" "https://raw.githubusercontent.com\
/kubernetes-sigs/kustomize\
/master/demos/data/mySql\
/master/demos/mySql\
/{deployment,secret,service}.yaml"
```

View File

@@ -31,7 +31,7 @@ Download them:
```
CONTENT="https://raw.githubusercontent.com\
/kubernetes-sigs/kustomize\
/master/demos/data/springboot"
/master/demos/springboot"
curl -s -o "$DEMO_HOME/#1.yaml" \
"$CONTENT/base/{deployment,service}.yaml"