Skip to content

Commit

Permalink
Adjust tests to new structure
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Schrodi authored and Diaphteiros committed May 13, 2019
1 parent e9dfba9 commit 46adef4
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 42 deletions.
48 changes: 19 additions & 29 deletions test/acre.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,49 +4,39 @@ credentials:

############################################################################


landscape:
name: test-gardener-oq

versions:
gardener:
tag: (( env( "GARDENER_VERSION" ) || "1.18.1" ))
dashboard:
branch: master
apiserver:
image_tag: (( env( "GARDENER_VERSION" ) || "0.20.2" ))
controller_manager:
image_tag: (( env( "GARDENER_VERSION" ) || "0.20.2" ))
tag: (( env( "GARDENER_VERSION" ) || "0.20.2" ))

cluster:
kubeconfig: ./kubeconfig
domain: setup.oq.gcp.dev.k8s.ondemand.com
iaas: gcp
region: europe-west1
domain: setup.oq.gcp.dev.k8s.ondemand.com

networks:
nodes: 10.254.0.0/19
pods: 10.255.0.0/17
services: 10.255.128.0/17
cluster:
networks:
nodes: 10.254.0.0/19
pods: 10.255.0.0/17
services: 10.255.128.0/17

iaas:
region: (( cluster.region ))
type: gcp
region: europe-west1
zones:
- (( cluster.region "-b"))
- (( cluster.region "-c"))
- (( cluster.region "-d"))
credentials:
<<: (( .credentials ))

etcd:
backup:
type: gcs
region: europe-west1
credentials:
<<: (( .credentials ))

dns:
type: google-clouddns
- (( iaas.region "-b"))
- (( iaas.region "-c"))
- (( iaas.region "-d"))
credentials:
<<: (( .credentials ))

identity:
users:
- email: "[email protected]"
username: "example"
password: (( rand("A-Z", 10) ))
password: (( rand("A-Z", 10) ))

16 changes: 11 additions & 5 deletions test/scripts/create
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
#! /bin/bash -e

copy_state() {
mkdir -p $TM_SHARED_PATH/setup
cp -R ./state $TM_SHARED_PATH/setup
cp -R ./export $TM_SHARED_PATH/setup
cp -R ./gen $TM_SHARED_PATH/setup
}

SOURCE_PATH="$(realpath .)"

# change working directory and add garden-setup as crop
Expand All @@ -8,13 +15,12 @@ cd /tmp/garden
ln -s $SOURCE_PATH ./crop
cp $SOURCE_PATH/test/acre.yaml .

trap copy_state EXIT

sow order -A
sow deploy -A
sow -Dv deploy -A

cp -R ./export/kube-apiserver/kubeconfig $TM_KUBECONFIG_PATH/gardener.config

mkdir -p $TM_KUBECONFIG_PATH/setup
cp -R ./state $TM_KUBECONFIG_PATH/setup
cp -R ./export $TM_KUBECONFIG_PATH/setup
cp -R ./gen $TM_KUBECONFIG_PATH/setup
copy_state

3 changes: 2 additions & 1 deletion test/scripts/delete
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#! /bin/bash -e


SOURCE_PATH="$(realpath .)"

# change working directory and add garden-setup as crop
Expand All @@ -8,7 +9,7 @@ cd /tmp/garden
ln -s $SOURCE_PATH ./crop
cp $SOURCE_PATH/test/acre.yaml .

cp -R $TM_KUBECONFIG_PATH/setup/* .
cp -R $TM_SHARED_PATH/setup/* .

sow order -A
sow delete -A
15 changes: 10 additions & 5 deletions test/scripts/upgrade
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
#! /bin/bash -e

copy_state() {
mkdir -p $TM_SHARED_PATH/setup
cp -R ./state $TM_SHARED_PATH/setup
cp -R ./export $TM_SHARED_PATH/setup
cp -R ./gen $TM_SHARED_PATH/setup
}

SOURCE_PATH="$(realpath .)"

# change working directory and add garden-setup as crop
Expand All @@ -8,13 +15,11 @@ cd /tmp/garden
ln -s $SOURCE_PATH ./crop
cp $SOURCE_PATH/test/acre.yaml .

mv -v $TM_KUBECONFIG_PATH/setup/* .
mv -v $TM_SHARED_PATH/setup/* .

trap copy_state EXIT
sow order -A
sow deploy -A

mkdir -p $TM_KUBECONFIG_PATH/setup
cp -R ./state $TM_KUBECONFIG_PATH/setup
cp -R ./export $TM_KUBECONFIG_PATH/setup
cp -R ./gen $TM_KUBECONFIG_PATH/setup
copy_state

4 changes: 2 additions & 2 deletions test/testrun.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ spec:
config:
- name: GARDENER_VERSION
type: env
value: 0.18.1
value: 0.20.1
- name: host-kubeconfig
type: file
path: "/tmp/garden/kubeconfig"
Expand All @@ -36,7 +36,7 @@ spec:
config:
- name: GARDENER_VERSION
type: env
value: 0.19.1
value: 0.20.2
- name: host-kubeconfig
type: file
path: "/tmp/garden/kubeconfig"
Expand Down

0 comments on commit 46adef4

Please sign in to comment.