# Copyright 2008 Google Inc.
#
# 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.

# Common environment variable checker code for all three test scripts.

if [ "${KS_TICKET_PRODUCT_ID:=undefined}" != "com.google.hasselhoff" ]; then
  echo "KS_TICKET_PRODUCT_ID has unexpected value: '${KS_TICKET_PRODUCT_ID}'"
  result=1
fi

if [ "${KS_TICKET_SERVER_URL:=undefined}" != "http://google.com" ]; then
  echo "KS_TICKET_SERVER_URL has unexpected value: '${KS_TICKET_SERVER_URL}'"
  result=1
fi

if [ "${KS_TICKET_VERSION:=undefined}" != "3.14.15.9" ]; then
  echo "KS_TICKET_VERSION has unexpected value: '${KS_TICKET_VERSION}'"
  result=1
fi

if [ "${KS_TICKET_XC_PATH:=undefined}" != "/oombly/foombly" ]; then
  echo "KS_TICKET_XC_PATH has unexpected value: '${KS_TICKET_XC_PATH}'"
  result=1
fi

if [ "${KS_USER_INITIATED:=undefined}" != "NO" ]; then
  echo "KS_USER_INITIATED has unexpected value: '${KS_USER_INITIATED}'"
  result=1
fi

if [ "${KS_kServerCodeHash:=undefined}" != "zzz" ]; then
  echo "KS_kServerCodeHash has unexpected value: '${KS_kServerCodeHash}'"
  result=1
fi

if [ "${KS_kServerCodeSize:=undefined}" != "2" ]; then
  echo "KS_kServerCodeSize has unexpected value: '${KS_kServerCodeSize}'"
  result=1
fi

if [ "${KS_kServerCodebaseURL:=undefined}" != "a://a" ]; then
  echo "KS_kServerCodebaseURL has unexpected value: '${KS_kServerCodebaseURL}'"
  result=1
fi

if [ "${KS_kServerDisplayVersion:=undefined}" != "1.3.2 (with pudding)" ]; then
  echo "KS_kServerDisplayVersion has unexpected value: '${KS_kServerDisplayVersion}'"
  result=1
fi

if [ "${KS_kServerLocalizationBundle:=undefined}" != "/Hassel/Hoff" ]; then
  echo "KS_kServerLocalizationBundle has unexpected value: '${KS_kServerLocalizationBundle}'"
  result=1
fi

if [ "${KS_kServerMoreInfoURLString:=undefined}" != "a://b" ]; then
  echo "KS_kServerMoreInfoURLString has unexpected value: '${KS_kServerMoreInfoURLString}'"
  result=1
fi

if [ "${KS_kServerProductID:=undefined}" != "com.google.hasselhoff" ]; then
  echo "KS_kServerProductID has unexpected value: '${KS_kServerProductID}'"
  result=1
fi

if [ "${KS_kServerPromptUser:=undefined}" != "1" ]; then
  echo "KS_kServerPromptUser has unexpected value: '${KS_kServerPromptUser}'"
  result=1
fi

if [ "${KS_kServerRequireReboot:=undefined}" != "1" ]; then
  echo "KS_kServerRequireReboot has unexpected value: '${KS_kServerRequireReboot}'"
  result=1
fi
