// Code generated by go-bindata.
// sources:
// examples/db-templates/mariadb-ephemeral-template.json
// examples/db-templates/mariadb-persistent-template.json
// examples/db-templates/mongodb-ephemeral-template.json
// examples/db-templates/mongodb-persistent-template.json
// examples/db-templates/mysql-ephemeral-template.json
// examples/db-templates/mysql-persistent-template.json
// examples/db-templates/postgresql-ephemeral-template.json
// examples/db-templates/postgresql-persistent-template.json
// examples/db-templates/redis-ephemeral-template.json
// examples/db-templates/redis-persistent-template.json
// examples/image-streams/image-streams-centos7.json
// examples/image-streams/image-streams-rhel7.json
// examples/sample-app/application-template-dockerbuild.json
// examples/sample-app/application-template-pullspecbuild.json
// examples/sample-app/application-template-stibuild.json
// examples/sample-app/cleanup.sh
// examples/sample-app/github-webhook-example.json
// examples/quickstarts/cakephp-mysql-persistent.json
// examples/quickstarts/cakephp-mysql.json
// examples/quickstarts/dancer-mysql-persistent.json
// examples/quickstarts/dancer-mysql.json
// examples/quickstarts/django-postgresql-persistent.json
// examples/quickstarts/django-postgresql.json
// examples/quickstarts/dotnet-pgsql-persistent.json
// examples/quickstarts/dotnet.json
// examples/quickstarts/httpd.json
// examples/quickstarts/nginx.json
// examples/quickstarts/nodejs-mongodb-persistent.json
// examples/quickstarts/nodejs-mongodb.json
// examples/quickstarts/rails-postgresql-persistent.json
// examples/quickstarts/rails-postgresql.json
// examples/hello-openshift/Dockerfile
// examples/hello-openshift/hello-pod.json
// examples/hello-openshift/hello-project.json
// examples/jenkins/application-template.json
// examples/jenkins/jenkins-ephemeral-template.json
// examples/jenkins/jenkins-persistent-template.json
// examples/jenkins/pipeline/bluegreen-pipeline.yaml
// examples/jenkins/pipeline/maven-pipeline.yaml
// examples/jenkins/pipeline/nodejs-sample-pipeline.yaml
// examples/jenkins/pipeline/openshift-client-plugin-pipeline.yaml
// examples/jenkins/pipeline/samplepipeline.yaml
// examples/quickstarts/cakephp-mysql.json
// test/extended/testdata/aggregator/kube-system-auth-reader.yaml
// test/extended/testdata/aggregator/sample-apiserver-apiservice.yaml
// test/extended/testdata/aggregator/sample-apiserver-authdelegator.yaml
// test/extended/testdata/aggregator/sample-apiserver-authreader.yaml
// test/extended/testdata/aggregator/sample-apiserver-rc.yaml
// test/extended/testdata/aggregator/sample-apiserver-sa.yaml
// test/extended/testdata/aggregator/sample-apiserver-service.yaml
// test/extended/testdata/builds/application-template-custombuild.json
// test/extended/testdata/builds/build-postcommit/docker.yaml
// test/extended/testdata/builds/build-postcommit/imagestreams.yaml
// test/extended/testdata/builds/build-postcommit/sti.yaml
// test/extended/testdata/builds/build-pruning/default-group-build-config.yaml
// test/extended/testdata/builds/build-pruning/default-legacy-build-config.yaml
// test/extended/testdata/builds/build-pruning/errored-build-config.yaml
// test/extended/testdata/builds/build-pruning/failed-build-config.yaml
// test/extended/testdata/builds/build-pruning/failed-pipeline.yaml
// test/extended/testdata/builds/build-pruning/imagestream.yaml
// test/extended/testdata/builds/build-pruning/successful-build-config.yaml
// test/extended/testdata/builds/build-pruning/successful-pipeline.yaml
// test/extended/testdata/builds/build-quota/.s2i/bin/assemble
// test/extended/testdata/builds/build-quota/Dockerfile
// test/extended/testdata/builds/build-secrets/Dockerfile
// test/extended/testdata/builds/build-secrets/s2i-binary-dir/.s2i/bin/assemble
// test/extended/testdata/builds/build-secrets/s2i-binary-dir/.s2i/bin/run
// test/extended/testdata/builds/build-secrets/s2i-binary-dir/Gemfile
// test/extended/testdata/builds/build-secrets/s2i-binary-dir/config.ru
// test/extended/testdata/builds/build-secrets/test-configmap-2.json
// test/extended/testdata/builds/build-secrets/test-configmap.json
// test/extended/testdata/builds/build-secrets/test-docker-build.json
// test/extended/testdata/builds/build-secrets/test-is.json
// test/extended/testdata/builds/build-secrets/test-s2i-build.json
// test/extended/testdata/builds/build-secrets/test-secret-2.json
// test/extended/testdata/builds/build-secrets/test-secret.json
// test/extended/testdata/builds/build-timing/Dockerfile
// test/extended/testdata/builds/build-timing/s2i-binary-dir/.s2i/bin/assemble
// test/extended/testdata/builds/build-timing/s2i-binary-dir/.s2i/bin/run
// test/extended/testdata/builds/build-timing/s2i-binary-dir/Gemfile
// test/extended/testdata/builds/build-timing/s2i-binary-dir/config.ru
// test/extended/testdata/builds/build-timing/test-docker-build.json
// test/extended/testdata/builds/build-timing/test-is.json
// test/extended/testdata/builds/build-timing/test-s2i-build.json
// test/extended/testdata/builds/cluster-config/invalid-build-cluster-config.yaml
// test/extended/testdata/builds/cluster-config/registry-blacklist.yaml
// test/extended/testdata/builds/cluster-config/registry-whitelist.yaml
// test/extended/testdata/builds/cluster-config.yaml
// test/extended/testdata/builds/custom-build/Dockerfile
// test/extended/testdata/builds/custom-build/Dockerfile.sample
// test/extended/testdata/builds/custom-build/build.sh
// test/extended/testdata/builds/docker-add/Dockerfile
// test/extended/testdata/builds/incremental-auth-build.json
// test/extended/testdata/builds/pullsecret/linked-nodejs-bc.yaml
// test/extended/testdata/builds/pullsecret/pullsecret-nodejs-bc.yaml
// test/extended/testdata/builds/s2i-environment-build-app/.s2i/environment
// test/extended/testdata/builds/s2i-environment-build-app/Gemfile
// test/extended/testdata/builds/s2i-environment-build-app/config.ru
// test/extended/testdata/builds/statusfail-assemble/.s2i/bin/assemble
// test/extended/testdata/builds/statusfail-badcontextdirs2i.yaml
// test/extended/testdata/builds/statusfail-failedassemble.yaml
// test/extended/testdata/builds/statusfail-fetchbuilderimage.yaml
// test/extended/testdata/builds/statusfail-fetchsourcedocker.yaml
// test/extended/testdata/builds/statusfail-fetchsources2i.yaml
// test/extended/testdata/builds/statusfail-genericreason.yaml
// test/extended/testdata/builds/statusfail-oomkilled.yaml
// test/extended/testdata/builds/statusfail-postcommithook.yaml
// test/extended/testdata/builds/statusfail-pushtoregistry.yaml
// test/extended/testdata/builds/test-auth-build.yaml
// test/extended/testdata/builds/test-bc-with-pr-ref.yaml
// test/extended/testdata/builds/test-build-app/Dockerfile
// test/extended/testdata/builds/test-build-app/Gemfile
// test/extended/testdata/builds/test-build-app/config.ru
// test/extended/testdata/builds/test-build-cluster-config.yaml
// test/extended/testdata/builds/test-build-podsvc.json
// test/extended/testdata/builds/test-build-proxy.yaml
// test/extended/testdata/builds/test-build-revision.json
// test/extended/testdata/builds/test-build.yaml
// test/extended/testdata/builds/test-buildconfigsecretinjector.yaml
// test/extended/testdata/builds/test-cds-dockerbuild.json
// test/extended/testdata/builds/test-cds-sourcebuild.json
// test/extended/testdata/builds/test-context-build.json
// test/extended/testdata/builds/test-custom-build.yaml
// test/extended/testdata/builds/test-docker-app/Dockerfile
// test/extended/testdata/builds/test-docker-build-pullsecret.json
// test/extended/testdata/builds/test-docker-build.json
// test/extended/testdata/builds/test-docker-no-outputname.json
// test/extended/testdata/builds/test-env-build.json
// test/extended/testdata/builds/test-imagechangetriggers.yaml
// test/extended/testdata/builds/test-imageresolution-custom-build.yaml
// test/extended/testdata/builds/test-imageresolution-docker-build.yaml
// test/extended/testdata/builds/test-imageresolution-s2i-build.yaml
// test/extended/testdata/builds/test-imagesource-buildconfig.yaml
// test/extended/testdata/builds/test-nosrc-build.json
// test/extended/testdata/builds/test-s2i-build-quota.json
// test/extended/testdata/builds/test-s2i-build.json
// test/extended/testdata/builds/test-s2i-no-outputname.json
// test/extended/testdata/builds/test-symlink-build.yaml
// test/extended/testdata/builds/valuefrom/failed-docker-build-value-from-config.yaml
// test/extended/testdata/builds/valuefrom/failed-sti-build-value-from-config.yaml
// test/extended/testdata/builds/valuefrom/successful-docker-build-value-from-config.yaml
// test/extended/testdata/builds/valuefrom/successful-sti-build-value-from-config.yaml
// test/extended/testdata/builds/valuefrom/test-configmap.yaml
// test/extended/testdata/builds/valuefrom/test-is.json
// test/extended/testdata/builds/valuefrom/test-secret.yaml
// test/extended/testdata/builds/webhook/bitbucket/testdata/pushevent-not-master.json
// test/extended/testdata/builds/webhook/bitbucket/testdata/pushevent.json
// test/extended/testdata/builds/webhook/bitbucket/testdata/pushevent54-not-master.json
// test/extended/testdata/builds/webhook/bitbucket/testdata/pushevent54.json
// test/extended/testdata/builds/webhook/generic/testdata/post-receive-git.json
// test/extended/testdata/builds/webhook/generic/testdata/push-generic-envs.json
// test/extended/testdata/builds/webhook/generic/testdata/push-generic-envs.yaml
// test/extended/testdata/builds/webhook/generic/testdata/push-generic.json
// test/extended/testdata/builds/webhook/generic/testdata/push-gitlab.json
// test/extended/testdata/builds/webhook/github/testdata/pingevent.json
// test/extended/testdata/builds/webhook/github/testdata/pushevent-not-master-branch.json
// test/extended/testdata/builds/webhook/github/testdata/pushevent.json
// test/extended/testdata/builds/webhook/gitlab/testdata/pushevent-not-master-branch.json
// test/extended/testdata/builds/webhook/gitlab/testdata/pushevent.json
// test/extended/testdata/cli/pod-with-two-containers.yaml
// test/extended/testdata/cluster/master-vert.yaml
// test/extended/testdata/cluster/quickstarts/cakephp-mysql.json
// test/extended/testdata/cluster/quickstarts/dancer-mysql.json
// test/extended/testdata/cluster/quickstarts/django-postgresql.json
// test/extended/testdata/cluster/quickstarts/nodejs-mongodb.json
// test/extended/testdata/cluster/quickstarts/rails-postgresql.json
// test/extended/testdata/cmd/hack/lib/cmd.sh
// test/extended/testdata/cmd/hack/lib/compress.awk
// test/extended/testdata/cmd/hack/lib/constants.sh
// test/extended/testdata/cmd/hack/lib/init.sh
// test/extended/testdata/cmd/hack/lib/log/output.sh
// test/extended/testdata/cmd/hack/lib/log/stacktrace.sh
// test/extended/testdata/cmd/hack/lib/log/system.sh
// test/extended/testdata/cmd/hack/lib/test/junit.sh
// test/extended/testdata/cmd/hack/lib/util/environment.sh
// test/extended/testdata/cmd/hack/lib/util/misc.sh
// test/extended/testdata/cmd/hack/lib/util/text.sh
// test/extended/testdata/cmd/hack/lib/util/trap.sh
// test/extended/testdata/cmd/test/cmd/admin.sh
// test/extended/testdata/cmd/test/cmd/annotations.sh
// test/extended/testdata/cmd/test/cmd/apiresources.sh
// test/extended/testdata/cmd/test/cmd/authentication.sh
// test/extended/testdata/cmd/test/cmd/basicresources.sh
// test/extended/testdata/cmd/test/cmd/builds.sh
// test/extended/testdata/cmd/test/cmd/completions.sh
// test/extended/testdata/cmd/test/cmd/config.sh
// test/extended/testdata/cmd/test/cmd/convert.sh
// test/extended/testdata/cmd/test/cmd/create.sh
// test/extended/testdata/cmd/test/cmd/debug.sh
// test/extended/testdata/cmd/test/cmd/deployments.sh
// test/extended/testdata/cmd/test/cmd/describer.sh
// test/extended/testdata/cmd/test/cmd/edit.sh
// test/extended/testdata/cmd/test/cmd/env.sh
// test/extended/testdata/cmd/test/cmd/framework-test.sh
// test/extended/testdata/cmd/test/cmd/get.sh
// test/extended/testdata/cmd/test/cmd/help.sh
// test/extended/testdata/cmd/test/cmd/idle.sh
// test/extended/testdata/cmd/test/cmd/image-lookup.sh
// test/extended/testdata/cmd/test/cmd/images.sh
// test/extended/testdata/cmd/test/cmd/login.sh
// test/extended/testdata/cmd/test/cmd/migrate.sh
// test/extended/testdata/cmd/test/cmd/newapp.sh
// test/extended/testdata/cmd/test/cmd/observe.sh
// test/extended/testdata/cmd/test/cmd/policy-storage-admin.sh
// test/extended/testdata/cmd/test/cmd/policy.sh
// test/extended/testdata/cmd/test/cmd/printer.sh
// test/extended/testdata/cmd/test/cmd/projects.sh
// test/extended/testdata/cmd/test/cmd/quota.sh
// test/extended/testdata/cmd/test/cmd/registry.sh
// test/extended/testdata/cmd/test/cmd/routes.sh
// test/extended/testdata/cmd/test/cmd/rsync.sh
// test/extended/testdata/cmd/test/cmd/run.sh
// test/extended/testdata/cmd/test/cmd/secrets.sh
// test/extended/testdata/cmd/test/cmd/services.sh
// test/extended/testdata/cmd/test/cmd/set-data.sh
// test/extended/testdata/cmd/test/cmd/set-image.sh
// test/extended/testdata/cmd/test/cmd/set-liveness-probe.sh
// test/extended/testdata/cmd/test/cmd/setbuildhook.sh
// test/extended/testdata/cmd/test/cmd/setbuildsecret.sh
// test/extended/testdata/cmd/test/cmd/status.sh
// test/extended/testdata/cmd/test/cmd/templates.sh
// test/extended/testdata/cmd/test/cmd/testdata/app-scenarios/docker-compose/complex/app/Dockerfile
// test/extended/testdata/cmd/test/cmd/testdata/app-scenarios/docker-compose/complex/docker-compose.generated.yaml
// test/extended/testdata/cmd/test/cmd/testdata/app-scenarios/docker-compose/complex/docker-compose.imported.yaml
// test/extended/testdata/cmd/test/cmd/testdata/app-scenarios/docker-compose/complex/docker-compose.yml
// test/extended/testdata/cmd/test/cmd/testdata/app-scenarios/docker-compose/complex/nginx/Dockerfile
// test/extended/testdata/cmd/test/cmd/testdata/app-scenarios/docker-compose/wordpress/docker-compose.yml
// test/extended/testdata/cmd/test/cmd/testdata/app-scenarios/k8s-lonely-pod.json
// test/extended/testdata/cmd/test/cmd/testdata/app-scenarios/k8s-sample-app.json
// test/extended/testdata/cmd/test/cmd/testdata/app-scenarios/k8s-service-pod-no-rc.json
// test/extended/testdata/cmd/test/cmd/testdata/app-scenarios/k8s-service-with-nothing.json
// test/extended/testdata/cmd/test/cmd/testdata/app-scenarios/k8s-unserviced-rc.json
// test/extended/testdata/cmd/test/cmd/testdata/app-scenarios/new-project-deployed-app.yaml
// test/extended/testdata/cmd/test/cmd/testdata/app-scenarios/new-project-no-build.yaml
// test/extended/testdata/cmd/test/cmd/testdata/app-scenarios/new-project-one-build.yaml
// test/extended/testdata/cmd/test/cmd/testdata/app-scenarios/new-project-two-deployment-configs.yaml
// test/extended/testdata/cmd/test/cmd/testdata/app-scenarios/petset.yaml
// test/extended/testdata/cmd/test/cmd/testdata/application-template-custombuild.json
// test/extended/testdata/cmd/test/cmd/testdata/application-template-dockerbuild.json
// test/extended/testdata/cmd/test/cmd/testdata/application-template-stibuild.json
// test/extended/testdata/cmd/test/cmd/testdata/convert/job-v1.yaml
// test/extended/testdata/cmd/test/cmd/testdata/convert/job-v2.json
// test/extended/testdata/cmd/test/cmd/testdata/external-service.yaml
// test/extended/testdata/cmd/test/cmd/testdata/hello-openshift/hello-pod.json
// test/extended/testdata/cmd/test/cmd/testdata/idling-dc.yaml
// test/extended/testdata/cmd/test/cmd/testdata/idling-svc-route.yaml
// test/extended/testdata/cmd/test/cmd/testdata/image-streams/image-streams-centos7.json
// test/extended/testdata/cmd/test/cmd/testdata/jenkins/jenkins-ephemeral-template.json
// test/extended/testdata/cmd/test/cmd/testdata/mixed-api-versions.yaml
// test/extended/testdata/cmd/test/cmd/testdata/modified-ruby-imagestream.json
// test/extended/testdata/cmd/test/cmd/testdata/multiport-service.yaml
// test/extended/testdata/cmd/test/cmd/testdata/new-app/bc-from-imagestreamimage.json
// test/extended/testdata/cmd/test/cmd/testdata/new-app/build-arg-dockerfile/Dockerfile
// test/extended/testdata/cmd/test/cmd/testdata/new-app/circular-is.yaml
// test/extended/testdata/cmd/test/cmd/testdata/new-app/circular.yaml
// test/extended/testdata/cmd/test/cmd/testdata/new-app/imagestream-ref.yaml
// test/extended/testdata/cmd/test/cmd/testdata/new-app/installable-stream.yaml
// test/extended/testdata/cmd/test/cmd/testdata/new-app/invalid-build-strategy.yaml
// test/extended/testdata/cmd/test/cmd/testdata/new-app/invalid.json
// test/extended/testdata/cmd/test/cmd/testdata/new-app/template-minimal-expose.json
// test/extended/testdata/cmd/test/cmd/testdata/new-app/template-with-app-label.json
// test/extended/testdata/cmd/test/cmd/testdata/new-app/template-with-crd.yaml
// test/extended/testdata/cmd/test/cmd/testdata/new-app/template-with-namespaces.json
// test/extended/testdata/cmd/test/cmd/testdata/new-app/template-without-app-label.json
// test/extended/testdata/cmd/test/cmd/testdata/new-app/template_multiple_resource_gvs.yaml
// test/extended/testdata/cmd/test/cmd/testdata/new-app/test-cmd-newapp-env.env
// test/extended/testdata/cmd/test/cmd/testdata/new-app/test-cmd-newapp-params.env
// test/extended/testdata/cmd/test/cmd/testdata/oauthaccesstoken.yaml
// test/extended/testdata/cmd/test/cmd/testdata/old-template.json
// test/extended/testdata/cmd/test/cmd/testdata/resource-builder/directory/json-no-extension-in-directory
// test/extended/testdata/cmd/test/cmd/testdata/resource-builder/directory/json-with-extension.json
// test/extended/testdata/cmd/test/cmd/testdata/resource-builder/directory/non-api-file
// test/extended/testdata/cmd/test/cmd/testdata/resource-builder/directory/yml-with-extension.yml
// test/extended/testdata/cmd/test/cmd/testdata/resource-builder/json-no-extension
// test/extended/testdata/cmd/test/cmd/testdata/resource-builder/yml-no-extension
// test/extended/testdata/cmd/test/cmd/testdata/roles/empty-role.yaml
// test/extended/testdata/cmd/test/cmd/testdata/roles/policy-clusterroles.yaml
// test/extended/testdata/cmd/test/cmd/testdata/roles/policy-roles.yaml
// test/extended/testdata/cmd/test/cmd/testdata/rollingupdate-daemonset.yaml
// test/extended/testdata/cmd/test/cmd/testdata/services.yaml
// test/extended/testdata/cmd/test/cmd/testdata/simple-deployment.yaml
// test/extended/testdata/cmd/test/cmd/testdata/stable-busybox.yaml
// test/extended/testdata/cmd/test/cmd/testdata/statefulset.yaml
// test/extended/testdata/cmd/test/cmd/testdata/templateinstance_objectkinds.yaml
// test/extended/testdata/cmd/test/cmd/testdata/templates/basic-users-binding.json
// test/extended/testdata/cmd/test/cmd/testdata/templates/guestbook.env
// test/extended/testdata/cmd/test/cmd/testdata/templates/guestbook.json
// test/extended/testdata/cmd/test/cmd/testdata/templates/guestbook_list.json
// test/extended/testdata/cmd/test/cmd/testdata/templates/multiline.txt
// test/extended/testdata/cmd/test/cmd/testdata/templates/template-type-precision.json
// test/extended/testdata/cmd/test/cmd/testdata/templates/template_required_params.env
// test/extended/testdata/cmd/test/cmd/testdata/templates/template_required_params.yaml
// test/extended/testdata/cmd/test/cmd/testdata/test-bc.yaml
// test/extended/testdata/cmd/test/cmd/testdata/test-buildcli.json
// test/extended/testdata/cmd/test/cmd/testdata/test-deployment-config.yaml
// test/extended/testdata/cmd/test/cmd/testdata/test-docker-build.json
// test/extended/testdata/cmd/test/cmd/testdata/test-image-stream.json
// test/extended/testdata/cmd/test/cmd/testdata/test-image.json
// test/extended/testdata/cmd/test/cmd/testdata/test-multiarch-stream.yaml
// test/extended/testdata/cmd/test/cmd/testdata/test-replication-controller.yaml
// test/extended/testdata/cmd/test/cmd/testdata/test-route.json
// test/extended/testdata/cmd/test/cmd/testdata/test-s2i-build.json
// test/extended/testdata/cmd/test/cmd/testdata/test-service.json
// test/extended/testdata/cmd/test/cmd/testdata/test-stream.yaml
// test/extended/testdata/cmd/test/cmd/timeout.sh
// test/extended/testdata/cmd/test/cmd/triggers.sh
// test/extended/testdata/cmd/test/cmd/volumes.sh
// test/extended/testdata/cmd/test/cmd/whoami.sh
// test/extended/testdata/config-map-jenkins-slave-pods.yaml
// test/extended/testdata/csi/aws-ebs/install-template.yaml
// test/extended/testdata/csi/aws-ebs/manifest.yaml
// test/extended/testdata/csi/aws-ebs/storageclass.yaml
// test/extended/testdata/custom-secret-builder/Dockerfile
// test/extended/testdata/custom-secret-builder/build.sh
// test/extended/testdata/deployments/custom-deployment.yaml
// test/extended/testdata/deployments/deployment-example.yaml
// test/extended/testdata/deployments/deployment-history-limit.yaml
// test/extended/testdata/deployments/deployment-ignores-deployer.yaml
// test/extended/testdata/deployments/deployment-image-resolution-is.yaml
// test/extended/testdata/deployments/deployment-image-resolution.yaml
// test/extended/testdata/deployments/deployment-min-ready-seconds.yaml
// test/extended/testdata/deployments/deployment-simple.yaml
// test/extended/testdata/deployments/deployment-trigger.yaml
// test/extended/testdata/deployments/deployment-with-ref-env.yaml
// test/extended/testdata/deployments/failing-pre-hook.yaml
// test/extended/testdata/deployments/generation-test.yaml
// test/extended/testdata/deployments/multi-ict-deployment.yaml
// test/extended/testdata/deployments/paused-deployment.yaml
// test/extended/testdata/deployments/readiness-test.yaml
// test/extended/testdata/deployments/tag-images-deployment.yaml
// test/extended/testdata/deployments/test-deployment-broken.yaml
// test/extended/testdata/deployments/test-deployment-test.yaml
// test/extended/testdata/disaster-recovery/restore-etcd.sh
// test/extended/testdata/disaster-recovery/rollback-A.yaml
// test/extended/testdata/disaster-recovery/rollback-B.yaml
// test/extended/testdata/disaster-recovery/ssh-bastion/clusterrole.yaml
// test/extended/testdata/disaster-recovery/ssh-bastion/clusterrolebinding.yaml
// test/extended/testdata/disaster-recovery/ssh-bastion/deployment.yaml
// test/extended/testdata/disaster-recovery/ssh-bastion/namespace.yaml
// test/extended/testdata/disaster-recovery/ssh-bastion/role.yaml
// test/extended/testdata/disaster-recovery/ssh-bastion/rolebinding.yaml
// test/extended/testdata/disaster-recovery/ssh-bastion/service.yaml
// test/extended/testdata/disaster-recovery/ssh-bastion/serviceaccount.yaml
// test/extended/testdata/disaster-recovery/ssh-bastion/sshd_config
// test/extended/testdata/disaster-recovery/update_route_53.py
// test/extended/testdata/forcepull-test.json
// test/extended/testdata/gssapi/config/kubeconfig
// test/extended/testdata/gssapi/config/oauth_config.json
// test/extended/testdata/gssapi/fedora/base/Dockerfile
// test/extended/testdata/gssapi/fedora/kerberos/Dockerfile
// test/extended/testdata/gssapi/fedora/kerberos_configured/Dockerfile
// test/extended/testdata/gssapi/proxy/Dockerfile
// test/extended/testdata/gssapi/proxy/configure.sh
// test/extended/testdata/gssapi/proxy/gssapiproxy-buildconfig.yaml
// test/extended/testdata/gssapi/proxy/gssapiproxy-deploymentconfig.yaml
// test/extended/testdata/gssapi/proxy/gssapiproxy-imagestream.yaml
// test/extended/testdata/gssapi/proxy/gssapiproxy-service.yaml
// test/extended/testdata/gssapi/proxy/healthz
// test/extended/testdata/gssapi/proxy/kadm5.acl
// test/extended/testdata/gssapi/proxy/kdc.conf
// test/extended/testdata/gssapi/proxy/krb5.conf
// test/extended/testdata/gssapi/proxy/proxy.conf
// test/extended/testdata/gssapi/scripts/gssapi-tests.sh
// test/extended/testdata/gssapi/scripts/test-wrapper.sh
// test/extended/testdata/gssapi/ubuntu/base/Dockerfile
// test/extended/testdata/gssapi/ubuntu/kerberos/Dockerfile
// test/extended/testdata/gssapi/ubuntu/kerberos_configured/Dockerfile
// test/extended/testdata/hello-builder/Dockerfile
// test/extended/testdata/hello-builder/scripts/assemble
// test/extended/testdata/hello-builder/scripts/run
// test/extended/testdata/idling-echo-server-rc.yaml
// test/extended/testdata/idling-echo-server.yaml
// test/extended/testdata/image/deployment-with-annotation-trigger.yaml
// test/extended/testdata/image/test-image.json
// test/extended/testdata/image-pull-secrets/dc-with-new-pull-secret.yaml
// test/extended/testdata/image-pull-secrets/dc-with-old-pull-secret.yaml
// test/extended/testdata/image-pull-secrets/pod-with-new-pull-secret.yaml
// test/extended/testdata/image-pull-secrets/pod-with-no-pull-secret.yaml
// test/extended/testdata/image-pull-secrets/pod-with-old-pull-secret.yaml
// test/extended/testdata/image_ecosystem/perl-hotdeploy/index.pl
// test/extended/testdata/image_ecosystem/perl-hotdeploy/lib/My/Test.pm
// test/extended/testdata/image_ecosystem/perl-hotdeploy/perl.json
// test/extended/testdata/imagestream-jenkins-slave-pods.yaml
// test/extended/testdata/imagestreamtag-jenkins-slave-pods.yaml
// test/extended/testdata/jenkins-plugin/build-job-clone.xml
// test/extended/testdata/jenkins-plugin/build-job-slave.xml
// test/extended/testdata/jenkins-plugin/build-job.xml
// test/extended/testdata/jenkins-plugin/build-with-env-job.xml
// test/extended/testdata/jenkins-plugin/build-with-exec-steps.xml
// test/extended/testdata/jenkins-plugin/create-job.xml
// test/extended/testdata/jenkins-plugin/delete-job-keys.xml
// test/extended/testdata/jenkins-plugin/delete-job-labels.xml
// test/extended/testdata/jenkins-plugin/delete-job.xml
// test/extended/testdata/jenkins-plugin/imagestream-scm-dsl-job.xml
// test/extended/testdata/jenkins-plugin/imagestream-scm-job.xml
// test/extended/testdata/jenkins-plugin/multitag-job.xml
// test/extended/testdata/jenkins-plugin/multitag-template.json
// test/extended/testdata/jenkins-plugin/shared-resources-template.json
// test/extended/testdata/jenkins-slave-template.yaml
// test/extended/testdata/jobs/v1.yaml
// test/extended/testdata/ldap/groupsync.sh
// test/extended/testdata/ldap/ldapserver-config-cm.yaml
// test/extended/testdata/ldap/ldapserver-deployment.yaml
// test/extended/testdata/ldap/ldapserver-scripts-cm.yaml
// test/extended/testdata/ldap/ldapserver-service.yaml
// test/extended/testdata/long_names/Dockerfile
// test/extended/testdata/long_names/fixture.json
// test/extended/testdata/marketplace/csc/02-csc.yaml
// test/extended/testdata/marketplace/opsrc/02-opsrc.yaml
// test/extended/testdata/multi-namespace-pipeline.yaml
// test/extended/testdata/multi-namespace-template.yaml
// test/extended/testdata/oauthserver/cabundle-cm.yaml
// test/extended/testdata/oauthserver/oauth-network.yaml
// test/extended/testdata/oauthserver/oauth-pod.yaml
// test/extended/testdata/oauthserver/oauth-sa.yaml
// test/extended/testdata/olm/etcd-subscription.yaml
// test/extended/testdata/olm/operatorgroup.yaml
// test/extended/testdata/openshift-secret-to-jenkins-credential.yaml
// test/extended/testdata/releases/payload-1/etcd-operator/image-references
// test/extended/testdata/releases/payload-1/etcd-operator/manifest.yaml
// test/extended/testdata/releases/payload-1/image-registry/10_image-registry_crd.yaml
// test/extended/testdata/releases/payload-1/image-registry/image-references
// test/extended/testdata/releases/payload-1/image-registry/manifest.yaml
// test/extended/testdata/roles/empty-role.yaml
// test/extended/testdata/roles/policy-clusterroles.yaml
// test/extended/testdata/roles/policy-roles.yaml
// test/extended/testdata/router/ingress.yaml
// test/extended/testdata/router/reencrypt-serving-cert.yaml
// test/extended/testdata/router/router-common.yaml
// test/extended/testdata/router/router-config-manager.yaml
// test/extended/testdata/router/router-http-echo-server.yaml
// test/extended/testdata/router/router-metrics.yaml
// test/extended/testdata/router/router-override-domains.yaml
// test/extended/testdata/router/router-override.yaml
// test/extended/testdata/router/router-scoped.yaml
// test/extended/testdata/router/weighted-router.yaml
// test/extended/testdata/run_policy/parallel-bc.yaml
// test/extended/testdata/run_policy/serial-bc.yaml
// test/extended/testdata/run_policy/serial-latest-only-bc.yaml
// test/extended/testdata/s2i-dropcaps/root-access-build.yaml
// test/extended/testdata/s2i-dropcaps/rootable-ruby/Dockerfile
// test/extended/testdata/s2i-dropcaps/rootable-ruby/adduser
// test/extended/testdata/s2i-dropcaps/rootable-ruby/assemble
// test/extended/testdata/sample-image-stream.json
// test/extended/testdata/samplepipeline-withenvs.yaml
// test/extended/testdata/service-serving-cert/nginx-serving-cert.conf
// test/extended/testdata/signer-buildconfig.yaml
// test/extended/testdata/templates/crunchydata-pod.json
// test/extended/testdata/templates/guestbook.json
// test/extended/testdata/templates/guestbook_list.json
// test/extended/testdata/templates/templateinstance_badobject.yaml
// test/extended/testdata/templates/templateinstance_objectkinds.yaml
// test/extended/testdata/templates/templateinstance_readiness.yaml
// test/extended/testdata/templates/templateservicebroker_bind.yaml
// test/extended/testdata/test-cli-debug.yaml
// test/extended/testdata/test-env-pod.json
// test/extended/testdata/test-gitserver.yaml
// test/extended/testdata/test-secret.json
// test/extended/testdata/verifyservice-pipeline-template.yaml
// test/integration/testdata/project-request-template-with-quota.yaml
// test/integration/testdata/test-buildcli-beta2.json
// test/integration/testdata/test-buildcli.json
// test/integration/testdata/test-deployment-config.yaml
// test/integration/testdata/test-image-stream-mapping.json
// test/integration/testdata/test-image-stream.json
// test/integration/testdata/test-image.json
// test/integration/testdata/test-replication-controller.yaml
// test/integration/testdata/test-route.json
// test/integration/testdata/test-service-with-finalizer.json
// test/integration/testdata/test-service.json
// DO NOT EDIT!

package testdata

import (
	"fmt"
	"io/ioutil"
	"os"
	"path/filepath"
	"strings"
	"time"
)
type asset struct {
	bytes []byte
	info  os.FileInfo
}

type bindataFileInfo struct {
	name    string
	size    int64
	mode    os.FileMode
	modTime time.Time
}

func (fi bindataFileInfo) Name() string {
	return fi.name
}
func (fi bindataFileInfo) Size() int64 {
	return fi.size
}
func (fi bindataFileInfo) Mode() os.FileMode {
	return fi.mode
}
func (fi bindataFileInfo) ModTime() time.Time {
	return fi.modTime
}
func (fi bindataFileInfo) IsDir() bool {
	return false
}
func (fi bindataFileInfo) Sys() interface{} {
	return nil
}

var _examplesDbTemplatesMariadbEphemeralTemplateJson = []byte(`{
    "apiVersion": "v1",
    "kind": "Template",
    "labels": {
        "template": "mariadb-ephemeral-template"
    },
    "message": "The following service(s) have been created in your project: ${DATABASE_SERVICE_NAME}.\n\n       Username: ${MYSQL_USER}\n       Password: ${MYSQL_PASSWORD}\n  Database Name: ${MYSQL_DATABASE}\n Connection URL: mysql://${DATABASE_SERVICE_NAME}:3306/\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/blob/master/10.2/root/usr/share/container-scripts/mysql/README.md.",
    "metadata": {
        "annotations": {
            "description": "MariaDB database service, without persistent storage. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/blob/master/10.2/root/usr/share/container-scripts/mysql/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing",
            "iconClass": "icon-mariadb",
            "openshift.io/display-name": "MariaDB (Ephemeral)",
            "openshift.io/documentation-url": "https://github.com/sclorg/mariadb-container/blob/master/10.2/root/usr/share/container-scripts/mysql/README.md",
            "openshift.io/long-description": "This template provides a standalone MariaDB server with a database created.  The database is not stored on persistent storage, so any restart of the service will result in all data being lost.  The database name, username, and password are chosen via parameters when provisioning this service.",
            "openshift.io/provider-display-name": "Red Hat, Inc.",
            "openshift.io/support-url": "https://access.redhat.com",
            "tags": "database,mariadb"
        },
        "name": "mariadb-ephemeral"
    },
    "objects": [
        {
            "apiVersion": "v1",
            "kind": "Secret",
            "metadata": {
                "annotations": {
                    "template.openshift.io/expose-database_name": "{.data['database-name']}",
                    "template.openshift.io/expose-password": "{.data['database-password']}",
                    "template.openshift.io/expose-root_password": "{.data['database-root-password']}",
                    "template.openshift.io/expose-username": "{.data['database-user']}"
                },
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "stringData": {
                "database-name": "${MYSQL_DATABASE}",
                "database-password": "${MYSQL_PASSWORD}",
                "database-root-password": "${MYSQL_ROOT_PASSWORD}",
                "database-user": "${MYSQL_USER}"
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Service",
            "metadata": {
                "annotations": {
                    "template.openshift.io/expose-uri": "mysql://{.spec.clusterIP}:{.spec.ports[?(.name==\"mariadb\")].port}"
                },
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "spec": {
                "ports": [
                    {
                        "name": "mariadb",
                        "port": 3306
                    }
                ],
                "selector": {
                    "name": "${DATABASE_SERVICE_NAME}"
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "DeploymentConfig",
            "metadata": {
                "annotations": {
                    "template.alpha.openshift.io/wait-for-ready": "true"
                },
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "spec": {
                "replicas": 1,
                "selector": {
                    "name": "${DATABASE_SERVICE_NAME}"
                },
                "strategy": {
                    "type": "Recreate"
                },
                "template": {
                    "metadata": {
                        "labels": {
                            "name": "${DATABASE_SERVICE_NAME}"
                        }
                    },
                    "spec": {
                        "containers": [
                            {
                                "env": [
                                    {
                                        "name": "MYSQL_USER",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-user",
                                                "name": "${DATABASE_SERVICE_NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "MYSQL_PASSWORD",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-password",
                                                "name": "${DATABASE_SERVICE_NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "MYSQL_ROOT_PASSWORD",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-root-password",
                                                "name": "${DATABASE_SERVICE_NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "MYSQL_DATABASE",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-name",
                                                "name": "${DATABASE_SERVICE_NAME}"
                                            }
                                        }
                                    }
                                ],
                                "image": " ",
                                "imagePullPolicy": "IfNotPresent",
                                "livenessProbe": {
                                    "initialDelaySeconds": 30,
                                    "tcpSocket": {
                                        "port": 3306
                                    },
                                    "timeoutSeconds": 1
                                },
                                "name": "mariadb",
                                "ports": [
                                    {
                                        "containerPort": 3306
                                    }
                                ],
                                "readinessProbe": {
                                    "exec": {
                                        "command": [
                                            "/bin/sh",
                                            "-i",
                                            "-c",
                                            "MYSQL_PWD=\"$MYSQL_PASSWORD\" mysql -h 127.0.0.1 -u $MYSQL_USER -D $MYSQL_DATABASE -e 'SELECT 1'"
                                        ]
                                    },
                                    "initialDelaySeconds": 5,
                                    "timeoutSeconds": 1
                                },
                                "resources": {
                                    "limits": {
                                        "memory": "${MEMORY_LIMIT}"
                                    }
                                },
                                "volumeMounts": [
                                    {
                                        "mountPath": "/var/lib/mysql/data",
                                        "name": "${DATABASE_SERVICE_NAME}-data"
                                    }
                                ]
                            }
                        ],
                        "volumes": [
                            {
                                "emptyDir": {
                                    "medium": ""
                                },
                                "name": "${DATABASE_SERVICE_NAME}-data"
                            }
                        ]
                    }
                },
                "triggers": [
                    {
                        "imageChangeParams": {
                            "automatic": true,
                            "containerNames": [
                                "mariadb"
                            ],
                            "from": {
                                "kind": "ImageStreamTag",
                                "name": "mariadb:${MARIADB_VERSION}",
                                "namespace": "${NAMESPACE}"
                            }
                        },
                        "type": "ImageChange"
                    },
                    {
                        "type": "ConfigChange"
                    }
                ]
            }
        }
    ],
    "parameters": [
        {
            "description": "Maximum amount of memory the container can use.",
            "displayName": "Memory Limit",
            "name": "MEMORY_LIMIT",
            "required": true,
            "value": "512Mi"
        },
        {
            "description": "The OpenShift Namespace where the ImageStream resides.",
            "displayName": "Namespace",
            "name": "NAMESPACE",
            "value": "openshift"
        },
        {
            "description": "The name of the OpenShift Service exposed for the database.",
            "displayName": "Database Service Name",
            "name": "DATABASE_SERVICE_NAME",
            "required": true,
            "value": "mariadb"
        },
        {
            "description": "Username for MariaDB user that will be used for accessing the database.",
            "displayName": "MariaDB Connection Username",
            "from": "user[A-Z0-9]{3}",
            "generate": "expression",
            "name": "MYSQL_USER",
            "required": true
        },
        {
            "description": "Password for the MariaDB connection user.",
            "displayName": "MariaDB Connection Password",
            "from": "[a-zA-Z0-9]{16}",
            "generate": "expression",
            "name": "MYSQL_PASSWORD",
            "required": true
        },
        {
            "description": "Password for the MariaDB root user.",
            "displayName": "MariaDB root Password",
            "from": "[a-zA-Z0-9]{16}",
            "generate": "expression",
            "name": "MYSQL_ROOT_PASSWORD",
            "required": true
        },
        {
            "description": "Name of the MariaDB database accessed.",
            "displayName": "MariaDB Database Name",
            "name": "MYSQL_DATABASE",
            "required": true,
            "value": "sampledb"
        },
        {
            "description": "Version of MariaDB image to be used (10.2 or latest).",
            "displayName": "Version of MariaDB Image",
            "name": "MARIADB_VERSION",
            "required": true,
            "value": "10.2"
        }
    ]
}`)

func examplesDbTemplatesMariadbEphemeralTemplateJsonBytes() ([]byte, error) {
	return _examplesDbTemplatesMariadbEphemeralTemplateJson, nil
}

func examplesDbTemplatesMariadbEphemeralTemplateJson() (*asset, error) {
	bytes, err := examplesDbTemplatesMariadbEphemeralTemplateJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "examples/db-templates/mariadb-ephemeral-template.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _examplesDbTemplatesMariadbPersistentTemplateJson = []byte(`{
    "apiVersion": "v1",
    "kind": "Template",
    "labels": {
        "template": "mariadb-persistent-template"
    },
    "message": "The following service(s) have been created in your project: ${DATABASE_SERVICE_NAME}.\n\n       Username: ${MYSQL_USER}\n       Password: ${MYSQL_PASSWORD}\n  Database Name: ${MYSQL_DATABASE}\n Connection URL: mysql://${DATABASE_SERVICE_NAME}:3306/\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/blob/master/10.2/root/usr/share/container-scripts/mysql/README.md.",
    "metadata": {
        "annotations": {
            "description": "MariaDB database service, with persistent storage. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/blob/master/10.2/root/usr/share/container-scripts/mysql/README.md.\n\nNOTE: Scaling to more than one replica is not supported. You must have persistent volumes available in your cluster to use this template.",
            "iconClass": "icon-mariadb",
            "openshift.io/display-name": "MariaDB",
            "openshift.io/documentation-url": "https://github.com/sclorg/mariadb-container/blob/master/10.2/root/usr/share/container-scripts/mysql/README.md",
            "openshift.io/long-description": "This template provides a standalone MariaDB server with a database created.  The database is stored on persistent storage.  The database name, username, and password are chosen via parameters when provisioning this service.",
            "openshift.io/provider-display-name": "Red Hat, Inc.",
            "openshift.io/support-url": "https://access.redhat.com",
            "tags": "database,mariadb"
        },
        "name": "mariadb-persistent"
    },
    "objects": [
        {
            "apiVersion": "v1",
            "kind": "Secret",
            "metadata": {
                "annotations": {
                    "template.openshift.io/expose-database_name": "{.data['database-name']}",
                    "template.openshift.io/expose-password": "{.data['database-password']}",
                    "template.openshift.io/expose-root_password": "{.data['database-root-password']}",
                    "template.openshift.io/expose-username": "{.data['database-user']}"
                },
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "stringData": {
                "database-name": "${MYSQL_DATABASE}",
                "database-password": "${MYSQL_PASSWORD}",
                "database-root-password": "${MYSQL_ROOT_PASSWORD}",
                "database-user": "${MYSQL_USER}"
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Service",
            "metadata": {
                "annotations": {
                    "template.openshift.io/expose-uri": "mysql://{.spec.clusterIP}:{.spec.ports[?(.name==\"mariadb\")].port}"
                },
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "spec": {
                "ports": [
                    {
                        "name": "mariadb",
                        "port": 3306
                    }
                ],
                "selector": {
                    "name": "${DATABASE_SERVICE_NAME}"
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "PersistentVolumeClaim",
            "metadata": {
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "spec": {
                "accessModes": [
                    "ReadWriteOnce"
                ],
                "resources": {
                    "requests": {
                        "storage": "${VOLUME_CAPACITY}"
                    }
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "DeploymentConfig",
            "metadata": {
                "annotations": {
                    "template.alpha.openshift.io/wait-for-ready": "true"
                },
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "spec": {
                "replicas": 1,
                "selector": {
                    "name": "${DATABASE_SERVICE_NAME}"
                },
                "strategy": {
                    "type": "Recreate"
                },
                "template": {
                    "metadata": {
                        "labels": {
                            "name": "${DATABASE_SERVICE_NAME}"
                        }
                    },
                    "spec": {
                        "containers": [
                            {
                                "env": [
                                    {
                                        "name": "MYSQL_USER",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-user",
                                                "name": "${DATABASE_SERVICE_NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "MYSQL_PASSWORD",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-password",
                                                "name": "${DATABASE_SERVICE_NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "MYSQL_ROOT_PASSWORD",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-root-password",
                                                "name": "${DATABASE_SERVICE_NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "MYSQL_DATABASE",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-name",
                                                "name": "${DATABASE_SERVICE_NAME}"
                                            }
                                        }
                                    }
                                ],
                                "image": " ",
                                "imagePullPolicy": "IfNotPresent",
                                "livenessProbe": {
                                    "initialDelaySeconds": 30,
                                    "tcpSocket": {
                                        "port": 3306
                                    },
                                    "timeoutSeconds": 1
                                },
                                "name": "mariadb",
                                "ports": [
                                    {
                                        "containerPort": 3306
                                    }
                                ],
                                "readinessProbe": {
                                    "exec": {
                                        "command": [
                                            "/bin/sh",
                                            "-i",
                                            "-c",
                                            "MYSQL_PWD=\"$MYSQL_PASSWORD\" mysql -h 127.0.0.1 -u $MYSQL_USER -D $MYSQL_DATABASE -e 'SELECT 1'"
                                        ]
                                    },
                                    "initialDelaySeconds": 5,
                                    "timeoutSeconds": 1
                                },
                                "resources": {
                                    "limits": {
                                        "memory": "${MEMORY_LIMIT}"
                                    }
                                },
                                "volumeMounts": [
                                    {
                                        "mountPath": "/var/lib/mysql/data",
                                        "name": "${DATABASE_SERVICE_NAME}-data"
                                    }
                                ]
                            }
                        ],
                        "volumes": [
                            {
                                "name": "${DATABASE_SERVICE_NAME}-data",
                                "persistentVolumeClaim": {
                                    "claimName": "${DATABASE_SERVICE_NAME}"
                                }
                            }
                        ]
                    }
                },
                "triggers": [
                    {
                        "imageChangeParams": {
                            "automatic": true,
                            "containerNames": [
                                "mariadb"
                            ],
                            "from": {
                                "kind": "ImageStreamTag",
                                "name": "mariadb:${MARIADB_VERSION}",
                                "namespace": "${NAMESPACE}"
                            }
                        },
                        "type": "ImageChange"
                    },
                    {
                        "type": "ConfigChange"
                    }
                ]
            }
        }
    ],
    "parameters": [
        {
            "description": "Maximum amount of memory the container can use.",
            "displayName": "Memory Limit",
            "name": "MEMORY_LIMIT",
            "required": true,
            "value": "512Mi"
        },
        {
            "description": "The OpenShift Namespace where the ImageStream resides.",
            "displayName": "Namespace",
            "name": "NAMESPACE",
            "value": "openshift"
        },
        {
            "description": "The name of the OpenShift Service exposed for the database.",
            "displayName": "Database Service Name",
            "name": "DATABASE_SERVICE_NAME",
            "required": true,
            "value": "mariadb"
        },
        {
            "description": "Username for MariaDB user that will be used for accessing the database.",
            "displayName": "MariaDB Connection Username",
            "from": "user[A-Z0-9]{3}",
            "generate": "expression",
            "name": "MYSQL_USER",
            "required": true
        },
        {
            "description": "Password for the MariaDB connection user.",
            "displayName": "MariaDB Connection Password",
            "from": "[a-zA-Z0-9]{16}",
            "generate": "expression",
            "name": "MYSQL_PASSWORD",
            "required": true
        },
        {
            "description": "Password for the MariaDB root user.",
            "displayName": "MariaDB root Password",
            "from": "[a-zA-Z0-9]{16}",
            "generate": "expression",
            "name": "MYSQL_ROOT_PASSWORD",
            "required": true
        },
        {
            "description": "Name of the MariaDB database accessed.",
            "displayName": "MariaDB Database Name",
            "name": "MYSQL_DATABASE",
            "required": true,
            "value": "sampledb"
        },
        {
            "description": "Version of MariaDB image to be used (10.2 or latest).",
            "displayName": "Version of MariaDB Image",
            "name": "MARIADB_VERSION",
            "required": true,
            "value": "10.2"
        },
        {
            "description": "Volume space available for data, e.g. 512Mi, 2Gi.",
            "displayName": "Volume Capacity",
            "name": "VOLUME_CAPACITY",
            "required": true,
            "value": "1Gi"
        }
    ]
}`)

func examplesDbTemplatesMariadbPersistentTemplateJsonBytes() ([]byte, error) {
	return _examplesDbTemplatesMariadbPersistentTemplateJson, nil
}

func examplesDbTemplatesMariadbPersistentTemplateJson() (*asset, error) {
	bytes, err := examplesDbTemplatesMariadbPersistentTemplateJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "examples/db-templates/mariadb-persistent-template.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _examplesDbTemplatesMongodbEphemeralTemplateJson = []byte(`{
    "apiVersion": "v1",
    "kind": "Template",
    "labels": {
        "template": "mongodb-ephemeral-template"
    },
    "message": "The following service(s) have been created in your project: ${DATABASE_SERVICE_NAME}.\n\n       Username: ${MONGODB_USER}\n       Password: ${MONGODB_PASSWORD}\n  Database Name: ${MONGODB_DATABASE}\n Connection URL: mongodb://${MONGODB_USER}:${MONGODB_PASSWORD}@${DATABASE_SERVICE_NAME}/${MONGODB_DATABASE}\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/mongodb-container/blob/master/3.2/README.md.",
    "metadata": {
        "annotations": {
            "description": "MongoDB database service, without persistent storage. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/mongodb-container/blob/master/3.2/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing",
            "iconClass": "icon-mongodb",
            "openshift.io/display-name": "MongoDB (Ephemeral)",
            "openshift.io/documentation-url": "https://docs.okd.io/latest/using_images/db_images/mongodb.html",
            "openshift.io/long-description": "This template provides a standalone MongoDB server with a database created.  The database is not stored on persistent storage, so any restart of the service will result in all data being lost.  The database name, username, and password are chosen via parameters when provisioning this service.",
            "openshift.io/provider-display-name": "Red Hat, Inc.",
            "openshift.io/support-url": "https://access.redhat.com",
            "tags": "database,mongodb"
        },
        "name": "mongodb-ephemeral"
    },
    "objects": [
        {
            "apiVersion": "v1",
            "kind": "Secret",
            "metadata": {
                "annotations": {
                    "template.openshift.io/expose-admin_password": "{.data['database-admin-password']}",
                    "template.openshift.io/expose-database_name": "{.data['database-name']}",
                    "template.openshift.io/expose-password": "{.data['database-password']}",
                    "template.openshift.io/expose-username": "{.data['database-user']}"
                },
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "stringData": {
                "database-admin-password": "${MONGODB_ADMIN_PASSWORD}",
                "database-name": "${MONGODB_DATABASE}",
                "database-password": "${MONGODB_PASSWORD}",
                "database-user": "${MONGODB_USER}"
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Service",
            "metadata": {
                "annotations": {
                    "template.openshift.io/expose-uri": "mongodb://{.spec.clusterIP}:{.spec.ports[?(.name==\"mongo\")].port}"
                },
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "spec": {
                "ports": [
                    {
                        "name": "mongo",
                        "nodePort": 0,
                        "port": 27017,
                        "protocol": "TCP",
                        "targetPort": 27017
                    }
                ],
                "selector": {
                    "name": "${DATABASE_SERVICE_NAME}"
                },
                "sessionAffinity": "None",
                "type": "ClusterIP"
            },
            "status": {
                "loadBalancer": {}
            }
        },
        {
            "apiVersion": "v1",
            "kind": "DeploymentConfig",
            "metadata": {
                "annotations": {
                    "template.alpha.openshift.io/wait-for-ready": "true"
                },
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "spec": {
                "replicas": 1,
                "selector": {
                    "name": "${DATABASE_SERVICE_NAME}"
                },
                "strategy": {
                    "type": "Recreate"
                },
                "template": {
                    "metadata": {
                        "labels": {
                            "name": "${DATABASE_SERVICE_NAME}"
                        }
                    },
                    "spec": {
                        "containers": [
                            {
                                "capabilities": {},
                                "env": [
                                    {
                                        "name": "MONGODB_USER",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-user",
                                                "name": "${DATABASE_SERVICE_NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "MONGODB_PASSWORD",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-password",
                                                "name": "${DATABASE_SERVICE_NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "MONGODB_ADMIN_PASSWORD",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-admin-password",
                                                "name": "${DATABASE_SERVICE_NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "MONGODB_DATABASE",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-name",
                                                "name": "${DATABASE_SERVICE_NAME}"
                                            }
                                        }
                                    }
                                ],
                                "image": " ",
                                "imagePullPolicy": "IfNotPresent",
                                "livenessProbe": {
                                    "initialDelaySeconds": 30,
                                    "tcpSocket": {
                                        "port": 27017
                                    },
                                    "timeoutSeconds": 1
                                },
                                "name": "mongodb",
                                "ports": [
                                    {
                                        "containerPort": 27017,
                                        "protocol": "TCP"
                                    }
                                ],
                                "readinessProbe": {
                                    "exec": {
                                        "command": [
                                            "/bin/sh",
                                            "-i",
                                            "-c",
                                            "mongo 127.0.0.1:27017/$MONGODB_DATABASE -u $MONGODB_USER -p $MONGODB_PASSWORD --eval=\"quit()\""
                                        ]
                                    },
                                    "initialDelaySeconds": 3,
                                    "timeoutSeconds": 1
                                },
                                "resources": {
                                    "limits": {
                                        "memory": "${MEMORY_LIMIT}"
                                    }
                                },
                                "securityContext": {
                                    "capabilities": {},
                                    "privileged": false
                                },
                                "terminationMessagePath": "/dev/termination-log",
                                "volumeMounts": [
                                    {
                                        "mountPath": "/var/lib/mongodb/data",
                                        "name": "${DATABASE_SERVICE_NAME}-data"
                                    }
                                ]
                            }
                        ],
                        "dnsPolicy": "ClusterFirst",
                        "restartPolicy": "Always",
                        "volumes": [
                            {
                                "emptyDir": {
                                    "medium": ""
                                },
                                "name": "${DATABASE_SERVICE_NAME}-data"
                            }
                        ]
                    }
                },
                "triggers": [
                    {
                        "imageChangeParams": {
                            "automatic": true,
                            "containerNames": [
                                "mongodb"
                            ],
                            "from": {
                                "kind": "ImageStreamTag",
                                "name": "mongodb:${MONGODB_VERSION}",
                                "namespace": "${NAMESPACE}"
                            },
                            "lastTriggeredImage": ""
                        },
                        "type": "ImageChange"
                    },
                    {
                        "type": "ConfigChange"
                    }
                ]
            },
            "status": {}
        }
    ],
    "parameters": [
        {
            "description": "Maximum amount of memory the container can use.",
            "displayName": "Memory Limit",
            "name": "MEMORY_LIMIT",
            "required": true,
            "value": "512Mi"
        },
        {
            "description": "The OpenShift Namespace where the ImageStream resides.",
            "displayName": "Namespace",
            "name": "NAMESPACE",
            "value": "openshift"
        },
        {
            "description": "The name of the OpenShift Service exposed for the database.",
            "displayName": "Database Service Name",
            "name": "DATABASE_SERVICE_NAME",
            "required": true,
            "value": "mongodb"
        },
        {
            "description": "Username for MongoDB user that will be used for accessing the database.",
            "displayName": "MongoDB Connection Username",
            "from": "user[A-Z0-9]{3}",
            "generate": "expression",
            "name": "MONGODB_USER",
            "required": true
        },
        {
            "description": "Password for the MongoDB connection user.",
            "displayName": "MongoDB Connection Password",
            "from": "[a-zA-Z0-9]{16}",
            "generate": "expression",
            "name": "MONGODB_PASSWORD",
            "required": true
        },
        {
            "description": "Name of the MongoDB database accessed.",
            "displayName": "MongoDB Database Name",
            "name": "MONGODB_DATABASE",
            "required": true,
            "value": "sampledb"
        },
        {
            "description": "Password for the database admin user.",
            "displayName": "MongoDB Admin Password",
            "from": "[a-zA-Z0-9]{16}",
            "generate": "expression",
            "name": "MONGODB_ADMIN_PASSWORD",
            "required": true
        },
        {
            "description": "Version of MongoDB image to be used (3.6 or latest).",
            "displayName": "Version of MongoDB Image",
            "name": "MONGODB_VERSION",
            "required": true,
            "value": "3.6"
        }
    ]
}`)

func examplesDbTemplatesMongodbEphemeralTemplateJsonBytes() ([]byte, error) {
	return _examplesDbTemplatesMongodbEphemeralTemplateJson, nil
}

func examplesDbTemplatesMongodbEphemeralTemplateJson() (*asset, error) {
	bytes, err := examplesDbTemplatesMongodbEphemeralTemplateJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "examples/db-templates/mongodb-ephemeral-template.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _examplesDbTemplatesMongodbPersistentTemplateJson = []byte(`{
    "apiVersion": "v1",
    "kind": "Template",
    "labels": {
        "template": "mongodb-persistent-template"
    },
    "message": "The following service(s) have been created in your project: ${DATABASE_SERVICE_NAME}.\n\n       Username: ${MONGODB_USER}\n       Password: ${MONGODB_PASSWORD}\n  Database Name: ${MONGODB_DATABASE}\n Connection URL: mongodb://${MONGODB_USER}:${MONGODB_PASSWORD}@${DATABASE_SERVICE_NAME}/${MONGODB_DATABASE}\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/mongodb-container/blob/master/3.2/README.md.",
    "metadata": {
        "annotations": {
            "description": "MongoDB database service, with persistent storage. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/mongodb-container/blob/master/3.2/README.md.\n\nNOTE: Scaling to more than one replica is not supported. You must have persistent volumes available in your cluster to use this template.",
            "iconClass": "icon-mongodb",
            "openshift.io/display-name": "MongoDB",
            "openshift.io/documentation-url": "https://docs.okd.io/latest/using_images/db_images/mongodb.html",
            "openshift.io/long-description": "This template provides a standalone MongoDB server with a database created.  The database is stored on persistent storage.  The database name, username, and password are chosen via parameters when provisioning this service.",
            "openshift.io/provider-display-name": "Red Hat, Inc.",
            "openshift.io/support-url": "https://access.redhat.com",
            "tags": "database,mongodb"
        },
        "name": "mongodb-persistent"
    },
    "objects": [
        {
            "apiVersion": "v1",
            "kind": "Secret",
            "metadata": {
                "annotations": {
                    "template.openshift.io/expose-admin_password": "{.data['database-admin-password']}",
                    "template.openshift.io/expose-database_name": "{.data['database-name']}",
                    "template.openshift.io/expose-password": "{.data['database-password']}",
                    "template.openshift.io/expose-username": "{.data['database-user']}"
                },
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "stringData": {
                "database-admin-password": "${MONGODB_ADMIN_PASSWORD}",
                "database-name": "${MONGODB_DATABASE}",
                "database-password": "${MONGODB_PASSWORD}",
                "database-user": "${MONGODB_USER}"
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Service",
            "metadata": {
                "annotations": {
                    "template.openshift.io/expose-uri": "mongodb://{.spec.clusterIP}:{.spec.ports[?(.name==\"mongo\")].port}"
                },
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "spec": {
                "ports": [
                    {
                        "name": "mongo",
                        "nodePort": 0,
                        "port": 27017,
                        "protocol": "TCP",
                        "targetPort": 27017
                    }
                ],
                "selector": {
                    "name": "${DATABASE_SERVICE_NAME}"
                },
                "sessionAffinity": "None",
                "type": "ClusterIP"
            },
            "status": {
                "loadBalancer": {}
            }
        },
        {
            "apiVersion": "v1",
            "kind": "PersistentVolumeClaim",
            "metadata": {
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "spec": {
                "accessModes": [
                    "ReadWriteOnce"
                ],
                "resources": {
                    "requests": {
                        "storage": "${VOLUME_CAPACITY}"
                    }
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "DeploymentConfig",
            "metadata": {
                "annotations": {
                    "template.alpha.openshift.io/wait-for-ready": "true"
                },
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "spec": {
                "replicas": 1,
                "selector": {
                    "name": "${DATABASE_SERVICE_NAME}"
                },
                "strategy": {
                    "type": "Recreate"
                },
                "template": {
                    "metadata": {
                        "labels": {
                            "name": "${DATABASE_SERVICE_NAME}"
                        }
                    },
                    "spec": {
                        "containers": [
                            {
                                "capabilities": {},
                                "env": [
                                    {
                                        "name": "MONGODB_USER",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-user",
                                                "name": "${DATABASE_SERVICE_NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "MONGODB_PASSWORD",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-password",
                                                "name": "${DATABASE_SERVICE_NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "MONGODB_ADMIN_PASSWORD",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-admin-password",
                                                "name": "${DATABASE_SERVICE_NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "MONGODB_DATABASE",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-name",
                                                "name": "${DATABASE_SERVICE_NAME}"
                                            }
                                        }
                                    }
                                ],
                                "image": " ",
                                "imagePullPolicy": "IfNotPresent",
                                "livenessProbe": {
                                    "initialDelaySeconds": 30,
                                    "tcpSocket": {
                                        "port": 27017
                                    },
                                    "timeoutSeconds": 1
                                },
                                "name": "mongodb",
                                "ports": [
                                    {
                                        "containerPort": 27017,
                                        "protocol": "TCP"
                                    }
                                ],
                                "readinessProbe": {
                                    "exec": {
                                        "command": [
                                            "/bin/sh",
                                            "-i",
                                            "-c",
                                            "mongo 127.0.0.1:27017/$MONGODB_DATABASE -u $MONGODB_USER -p $MONGODB_PASSWORD --eval=\"quit()\""
                                        ]
                                    },
                                    "initialDelaySeconds": 3,
                                    "timeoutSeconds": 1
                                },
                                "resources": {
                                    "limits": {
                                        "memory": "${MEMORY_LIMIT}"
                                    }
                                },
                                "securityContext": {
                                    "capabilities": {},
                                    "privileged": false
                                },
                                "terminationMessagePath": "/dev/termination-log",
                                "volumeMounts": [
                                    {
                                        "mountPath": "/var/lib/mongodb/data",
                                        "name": "${DATABASE_SERVICE_NAME}-data"
                                    }
                                ]
                            }
                        ],
                        "dnsPolicy": "ClusterFirst",
                        "restartPolicy": "Always",
                        "volumes": [
                            {
                                "name": "${DATABASE_SERVICE_NAME}-data",
                                "persistentVolumeClaim": {
                                    "claimName": "${DATABASE_SERVICE_NAME}"
                                }
                            }
                        ]
                    }
                },
                "triggers": [
                    {
                        "imageChangeParams": {
                            "automatic": true,
                            "containerNames": [
                                "mongodb"
                            ],
                            "from": {
                                "kind": "ImageStreamTag",
                                "name": "mongodb:${MONGODB_VERSION}",
                                "namespace": "${NAMESPACE}"
                            },
                            "lastTriggeredImage": ""
                        },
                        "type": "ImageChange"
                    },
                    {
                        "type": "ConfigChange"
                    }
                ]
            },
            "status": {}
        }
    ],
    "parameters": [
        {
            "description": "Maximum amount of memory the container can use.",
            "displayName": "Memory Limit",
            "name": "MEMORY_LIMIT",
            "required": true,
            "value": "512Mi"
        },
        {
            "description": "The OpenShift Namespace where the ImageStream resides.",
            "displayName": "Namespace",
            "name": "NAMESPACE",
            "value": "openshift"
        },
        {
            "description": "The name of the OpenShift Service exposed for the database.",
            "displayName": "Database Service Name",
            "name": "DATABASE_SERVICE_NAME",
            "required": true,
            "value": "mongodb"
        },
        {
            "description": "Username for MongoDB user that will be used for accessing the database.",
            "displayName": "MongoDB Connection Username",
            "from": "user[A-Z0-9]{3}",
            "generate": "expression",
            "name": "MONGODB_USER",
            "required": true
        },
        {
            "description": "Password for the MongoDB connection user.",
            "displayName": "MongoDB Connection Password",
            "from": "[a-zA-Z0-9]{16}",
            "generate": "expression",
            "name": "MONGODB_PASSWORD",
            "required": true
        },
        {
            "description": "Name of the MongoDB database accessed.",
            "displayName": "MongoDB Database Name",
            "name": "MONGODB_DATABASE",
            "required": true,
            "value": "sampledb"
        },
        {
            "description": "Password for the database admin user.",
            "displayName": "MongoDB Admin Password",
            "from": "[a-zA-Z0-9]{16}",
            "generate": "expression",
            "name": "MONGODB_ADMIN_PASSWORD",
            "required": true
        },
        {
            "description": "Volume space available for data, e.g. 512Mi, 2Gi.",
            "displayName": "Volume Capacity",
            "name": "VOLUME_CAPACITY",
            "required": true,
            "value": "1Gi"
        },
        {
            "description": "Version of MongoDB image to be used (3.6 or latest).",
            "displayName": "Version of MongoDB Image",
            "name": "MONGODB_VERSION",
            "required": true,
            "value": "3.6"
        }
    ]
}`)

func examplesDbTemplatesMongodbPersistentTemplateJsonBytes() ([]byte, error) {
	return _examplesDbTemplatesMongodbPersistentTemplateJson, nil
}

func examplesDbTemplatesMongodbPersistentTemplateJson() (*asset, error) {
	bytes, err := examplesDbTemplatesMongodbPersistentTemplateJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "examples/db-templates/mongodb-persistent-template.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _examplesDbTemplatesMysqlEphemeralTemplateJson = []byte(`{
    "apiVersion": "v1",
    "kind": "Template",
    "labels": {
        "template": "mysql-ephemeral-template"
    },
    "message": "The following service(s) have been created in your project: ${DATABASE_SERVICE_NAME}.\n\n       Username: ${MYSQL_USER}\n       Password: ${MYSQL_PASSWORD}\n  Database Name: ${MYSQL_DATABASE}\n Connection URL: mysql://${DATABASE_SERVICE_NAME}:3306/\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/5.7/root/usr/share/container-scripts/mysql/README.md.",
    "metadata": {
        "annotations": {
            "description": "MySQL database service, without persistent storage. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/5.7/root/usr/share/container-scripts/mysql/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing",
            "iconClass": "icon-mysql-database",
            "openshift.io/display-name": "MySQL (Ephemeral)",
            "openshift.io/documentation-url": "https://docs.okd.io/latest/using_images/db_images/mysql.html",
            "openshift.io/long-description": "This template provides a standalone MySQL server with a database created.  The database is not stored on persistent storage, so any restart of the service will result in all data being lost.  The database name, username, and password are chosen via parameters when provisioning this service.",
            "openshift.io/provider-display-name": "Red Hat, Inc.",
            "openshift.io/support-url": "https://access.redhat.com",
            "tags": "database,mysql"
        },
        "name": "mysql-ephemeral"
    },
    "objects": [
        {
            "apiVersion": "v1",
            "kind": "Secret",
            "metadata": {
                "annotations": {
                    "template.openshift.io/expose-database_name": "{.data['database-name']}",
                    "template.openshift.io/expose-password": "{.data['database-password']}",
                    "template.openshift.io/expose-root_password": "{.data['database-root-password']}",
                    "template.openshift.io/expose-username": "{.data['database-user']}"
                },
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "stringData": {
                "database-name": "${MYSQL_DATABASE}",
                "database-password": "${MYSQL_PASSWORD}",
                "database-root-password": "${MYSQL_ROOT_PASSWORD}",
                "database-user": "${MYSQL_USER}"
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Service",
            "metadata": {
                "annotations": {
                    "template.openshift.io/expose-uri": "mysql://{.spec.clusterIP}:{.spec.ports[?(.name==\"mysql\")].port}"
                },
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "spec": {
                "ports": [
                    {
                        "name": "mysql",
                        "nodePort": 0,
                        "port": 3306,
                        "protocol": "TCP",
                        "targetPort": 3306
                    }
                ],
                "selector": {
                    "name": "${DATABASE_SERVICE_NAME}"
                },
                "sessionAffinity": "None",
                "type": "ClusterIP"
            },
            "status": {
                "loadBalancer": {}
            }
        },
        {
            "apiVersion": "v1",
            "kind": "DeploymentConfig",
            "metadata": {
                "annotations": {
                    "template.alpha.openshift.io/wait-for-ready": "true"
                },
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "spec": {
                "replicas": 1,
                "selector": {
                    "name": "${DATABASE_SERVICE_NAME}"
                },
                "strategy": {
                    "type": "Recreate"
                },
                "template": {
                    "metadata": {
                        "labels": {
                            "name": "${DATABASE_SERVICE_NAME}"
                        }
                    },
                    "spec": {
                        "containers": [
                            {
                                "capabilities": {},
                                "env": [
                                    {
                                        "name": "MYSQL_USER",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-user",
                                                "name": "${DATABASE_SERVICE_NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "MYSQL_PASSWORD",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-password",
                                                "name": "${DATABASE_SERVICE_NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "MYSQL_ROOT_PASSWORD",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-root-password",
                                                "name": "${DATABASE_SERVICE_NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "MYSQL_DATABASE",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-name",
                                                "name": "${DATABASE_SERVICE_NAME}"
                                            }
                                        }
                                    }
                                ],
                                "image": " ",
                                "imagePullPolicy": "IfNotPresent",
                                "livenessProbe": {
                                    "initialDelaySeconds": 30,
                                    "tcpSocket": {
                                        "port": 3306
                                    },
                                    "timeoutSeconds": 1
                                },
                                "name": "mysql",
                                "ports": [
                                    {
                                        "containerPort": 3306,
                                        "protocol": "TCP"
                                    }
                                ],
                                "readinessProbe": {
                                    "exec": {
                                        "command": [
                                            "/bin/sh",
                                            "-i",
                                            "-c",
                                            "MYSQL_PWD=\"$MYSQL_PASSWORD\" mysql -h 127.0.0.1 -u $MYSQL_USER -D $MYSQL_DATABASE -e 'SELECT 1'"
                                        ]
                                    },
                                    "initialDelaySeconds": 5,
                                    "timeoutSeconds": 1
                                },
                                "resources": {
                                    "limits": {
                                        "memory": "${MEMORY_LIMIT}"
                                    }
                                },
                                "securityContext": {
                                    "capabilities": {},
                                    "privileged": false
                                },
                                "terminationMessagePath": "/dev/termination-log",
                                "volumeMounts": [
                                    {
                                        "mountPath": "/var/lib/mysql/data",
                                        "name": "${DATABASE_SERVICE_NAME}-data"
                                    }
                                ]
                            }
                        ],
                        "dnsPolicy": "ClusterFirst",
                        "restartPolicy": "Always",
                        "volumes": [
                            {
                                "emptyDir": {
                                    "medium": ""
                                },
                                "name": "${DATABASE_SERVICE_NAME}-data"
                            }
                        ]
                    }
                },
                "triggers": [
                    {
                        "imageChangeParams": {
                            "automatic": true,
                            "containerNames": [
                                "mysql"
                            ],
                            "from": {
                                "kind": "ImageStreamTag",
                                "name": "mysql:${MYSQL_VERSION}",
                                "namespace": "${NAMESPACE}"
                            },
                            "lastTriggeredImage": ""
                        },
                        "type": "ImageChange"
                    },
                    {
                        "type": "ConfigChange"
                    }
                ]
            },
            "status": {}
        }
    ],
    "parameters": [
        {
            "description": "Maximum amount of memory the container can use.",
            "displayName": "Memory Limit",
            "name": "MEMORY_LIMIT",
            "required": true,
            "value": "512Mi"
        },
        {
            "description": "The OpenShift Namespace where the ImageStream resides.",
            "displayName": "Namespace",
            "name": "NAMESPACE",
            "value": "openshift"
        },
        {
            "description": "The name of the OpenShift Service exposed for the database.",
            "displayName": "Database Service Name",
            "name": "DATABASE_SERVICE_NAME",
            "required": true,
            "value": "mysql"
        },
        {
            "description": "Username for MySQL user that will be used for accessing the database.",
            "displayName": "MySQL Connection Username",
            "from": "user[A-Z0-9]{3}",
            "generate": "expression",
            "name": "MYSQL_USER",
            "required": true
        },
        {
            "description": "Password for the MySQL connection user.",
            "displayName": "MySQL Connection Password",
            "from": "[a-zA-Z0-9]{16}",
            "generate": "expression",
            "name": "MYSQL_PASSWORD",
            "required": true
        },
        {
            "description": "Password for the MySQL root user.",
            "displayName": "MySQL root user Password",
            "from": "[a-zA-Z0-9]{16}",
            "generate": "expression",
            "name": "MYSQL_ROOT_PASSWORD",
            "required": true
        },
        {
            "description": "Name of the MySQL database accessed.",
            "displayName": "MySQL Database Name",
            "name": "MYSQL_DATABASE",
            "required": true,
            "value": "sampledb"
        },
        {
            "description": "Version of MySQL image to be used (5.7, or latest).",
            "displayName": "Version of MySQL Image",
            "name": "MYSQL_VERSION",
            "required": true,
            "value": "5.7"
        }
    ]
}`)

func examplesDbTemplatesMysqlEphemeralTemplateJsonBytes() ([]byte, error) {
	return _examplesDbTemplatesMysqlEphemeralTemplateJson, nil
}

func examplesDbTemplatesMysqlEphemeralTemplateJson() (*asset, error) {
	bytes, err := examplesDbTemplatesMysqlEphemeralTemplateJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "examples/db-templates/mysql-ephemeral-template.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _examplesDbTemplatesMysqlPersistentTemplateJson = []byte(`{
    "apiVersion": "v1",
    "kind": "Template",
    "labels": {
        "template": "mysql-persistent-template"
    },
    "message": "The following service(s) have been created in your project: ${DATABASE_SERVICE_NAME}.\n\n       Username: ${MYSQL_USER}\n       Password: ${MYSQL_PASSWORD}\n  Database Name: ${MYSQL_DATABASE}\n Connection URL: mysql://${DATABASE_SERVICE_NAME}:3306/\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/5.7/root/usr/share/container-scripts/mysql/README.md.",
    "metadata": {
        "annotations": {
            "description": "MySQL database service, with persistent storage. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/5.7/root/usr/share/container-scripts/mysql/README.md.\n\nNOTE: Scaling to more than one replica is not supported. You must have persistent volumes available in your cluster to use this template.",
            "iconClass": "icon-mysql-database",
            "openshift.io/display-name": "MySQL",
            "openshift.io/documentation-url": "https://docs.okd.io/latest/using_images/db_images/mysql.html",
            "openshift.io/long-description": "This template provides a standalone MySQL server with a database created.  The database is stored on persistent storage.  The database name, username, and password are chosen via parameters when provisioning this service.",
            "openshift.io/provider-display-name": "Red Hat, Inc.",
            "openshift.io/support-url": "https://access.redhat.com",
            "tags": "database,mysql"
        },
        "name": "mysql-persistent"
    },
    "objects": [
        {
            "apiVersion": "v1",
            "kind": "Secret",
            "metadata": {
                "annotations": {
                    "template.openshift.io/expose-database_name": "{.data['database-name']}",
                    "template.openshift.io/expose-password": "{.data['database-password']}",
                    "template.openshift.io/expose-root_password": "{.data['database-root-password']}",
                    "template.openshift.io/expose-username": "{.data['database-user']}"
                },
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "stringData": {
                "database-name": "${MYSQL_DATABASE}",
                "database-password": "${MYSQL_PASSWORD}",
                "database-root-password": "${MYSQL_ROOT_PASSWORD}",
                "database-user": "${MYSQL_USER}"
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Service",
            "metadata": {
                "annotations": {
                    "template.openshift.io/expose-uri": "mysql://{.spec.clusterIP}:{.spec.ports[?(.name==\"mysql\")].port}"
                },
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "spec": {
                "ports": [
                    {
                        "name": "mysql",
                        "port": 3306
                    }
                ],
                "selector": {
                    "name": "${DATABASE_SERVICE_NAME}"
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "PersistentVolumeClaim",
            "metadata": {
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "spec": {
                "accessModes": [
                    "ReadWriteOnce"
                ],
                "resources": {
                    "requests": {
                        "storage": "${VOLUME_CAPACITY}"
                    }
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "DeploymentConfig",
            "metadata": {
                "annotations": {
                    "template.alpha.openshift.io/wait-for-ready": "true"
                },
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "spec": {
                "replicas": 1,
                "selector": {
                    "name": "${DATABASE_SERVICE_NAME}"
                },
                "strategy": {
                    "type": "Recreate"
                },
                "template": {
                    "metadata": {
                        "labels": {
                            "name": "${DATABASE_SERVICE_NAME}"
                        }
                    },
                    "spec": {
                        "containers": [
                            {
                                "env": [
                                    {
                                        "name": "MYSQL_USER",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-user",
                                                "name": "${DATABASE_SERVICE_NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "MYSQL_PASSWORD",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-password",
                                                "name": "${DATABASE_SERVICE_NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "MYSQL_ROOT_PASSWORD",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-root-password",
                                                "name": "${DATABASE_SERVICE_NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "MYSQL_DATABASE",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-name",
                                                "name": "${DATABASE_SERVICE_NAME}"
                                            }
                                        }
                                    }
                                ],
                                "image": " ",
                                "imagePullPolicy": "IfNotPresent",
                                "livenessProbe": {
                                    "initialDelaySeconds": 30,
                                    "tcpSocket": {
                                        "port": 3306
                                    },
                                    "timeoutSeconds": 1
                                },
                                "name": "mysql",
                                "ports": [
                                    {
                                        "containerPort": 3306
                                    }
                                ],
                                "readinessProbe": {
                                    "exec": {
                                        "command": [
                                            "/bin/sh",
                                            "-i",
                                            "-c",
                                            "MYSQL_PWD=\"$MYSQL_PASSWORD\" mysql -h 127.0.0.1 -u $MYSQL_USER -D $MYSQL_DATABASE -e 'SELECT 1'"
                                        ]
                                    },
                                    "initialDelaySeconds": 5,
                                    "timeoutSeconds": 1
                                },
                                "resources": {
                                    "limits": {
                                        "memory": "${MEMORY_LIMIT}"
                                    }
                                },
                                "volumeMounts": [
                                    {
                                        "mountPath": "/var/lib/mysql/data",
                                        "name": "${DATABASE_SERVICE_NAME}-data"
                                    }
                                ]
                            }
                        ],
                        "volumes": [
                            {
                                "name": "${DATABASE_SERVICE_NAME}-data",
                                "persistentVolumeClaim": {
                                    "claimName": "${DATABASE_SERVICE_NAME}"
                                }
                            }
                        ]
                    }
                },
                "triggers": [
                    {
                        "imageChangeParams": {
                            "automatic": true,
                            "containerNames": [
                                "mysql"
                            ],
                            "from": {
                                "kind": "ImageStreamTag",
                                "name": "mysql:${MYSQL_VERSION}",
                                "namespace": "${NAMESPACE}"
                            }
                        },
                        "type": "ImageChange"
                    },
                    {
                        "type": "ConfigChange"
                    }
                ]
            }
        }
    ],
    "parameters": [
        {
            "description": "Maximum amount of memory the container can use.",
            "displayName": "Memory Limit",
            "name": "MEMORY_LIMIT",
            "required": true,
            "value": "512Mi"
        },
        {
            "description": "The OpenShift Namespace where the ImageStream resides.",
            "displayName": "Namespace",
            "name": "NAMESPACE",
            "value": "openshift"
        },
        {
            "description": "The name of the OpenShift Service exposed for the database.",
            "displayName": "Database Service Name",
            "name": "DATABASE_SERVICE_NAME",
            "required": true,
            "value": "mysql"
        },
        {
            "description": "Username for MySQL user that will be used for accessing the database.",
            "displayName": "MySQL Connection Username",
            "from": "user[A-Z0-9]{3}",
            "generate": "expression",
            "name": "MYSQL_USER",
            "required": true
        },
        {
            "description": "Password for the MySQL connection user.",
            "displayName": "MySQL Connection Password",
            "from": "[a-zA-Z0-9]{16}",
            "generate": "expression",
            "name": "MYSQL_PASSWORD",
            "required": true
        },
        {
            "description": "Password for the MySQL root user.",
            "displayName": "MySQL root user Password",
            "from": "[a-zA-Z0-9]{16}",
            "generate": "expression",
            "name": "MYSQL_ROOT_PASSWORD",
            "required": true
        },
        {
            "description": "Name of the MySQL database accessed.",
            "displayName": "MySQL Database Name",
            "name": "MYSQL_DATABASE",
            "required": true,
            "value": "sampledb"
        },
        {
            "description": "Volume space available for data, e.g. 512Mi, 2Gi.",
            "displayName": "Volume Capacity",
            "name": "VOLUME_CAPACITY",
            "required": true,
            "value": "1Gi"
        },
        {
            "description": "Version of MySQL image to be used (5.7, or latest).",
            "displayName": "Version of MySQL Image",
            "name": "MYSQL_VERSION",
            "required": true,
            "value": "5.7"
        }
    ]
}`)

func examplesDbTemplatesMysqlPersistentTemplateJsonBytes() ([]byte, error) {
	return _examplesDbTemplatesMysqlPersistentTemplateJson, nil
}

func examplesDbTemplatesMysqlPersistentTemplateJson() (*asset, error) {
	bytes, err := examplesDbTemplatesMysqlPersistentTemplateJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "examples/db-templates/mysql-persistent-template.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _examplesDbTemplatesPostgresqlEphemeralTemplateJson = []byte(`{
    "apiVersion": "v1",
    "kind": "Template",
    "labels": {
        "template": "postgresql-ephemeral-template"
    },
    "message": "The following service(s) have been created in your project: ${DATABASE_SERVICE_NAME}.\n\n       Username: ${POSTGRESQL_USER}\n       Password: ${POSTGRESQL_PASSWORD}\n  Database Name: ${POSTGRESQL_DATABASE}\n Connection URL: postgresql://${DATABASE_SERVICE_NAME}:5432/\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/.",
    "metadata": {
        "annotations": {
            "description": "PostgreSQL database service, without persistent storage. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing",
            "iconClass": "icon-postgresql",
            "openshift.io/display-name": "PostgreSQL (Ephemeral)",
            "openshift.io/documentation-url": "https://docs.okd.io/latest/using_images/db_images/postgresql.html",
            "openshift.io/long-description": "This template provides a standalone PostgreSQL server with a database created.  The database is not stored on persistent storage, so any restart of the service will result in all data being lost.  The database name, username, and password are chosen via parameters when provisioning this service.",
            "openshift.io/provider-display-name": "Red Hat, Inc.",
            "openshift.io/support-url": "https://access.redhat.com",
            "tags": "database,postgresql"
        },
        "name": "postgresql-ephemeral"
    },
    "objects": [
        {
            "apiVersion": "v1",
            "kind": "Secret",
            "metadata": {
                "annotations": {
                    "template.openshift.io/expose-database_name": "{.data['database-name']}",
                    "template.openshift.io/expose-password": "{.data['database-password']}",
                    "template.openshift.io/expose-username": "{.data['database-user']}"
                },
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "stringData": {
                "database-name": "${POSTGRESQL_DATABASE}",
                "database-password": "${POSTGRESQL_PASSWORD}",
                "database-user": "${POSTGRESQL_USER}"
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Service",
            "metadata": {
                "annotations": {
                    "template.openshift.io/expose-uri": "postgres://{.spec.clusterIP}:{.spec.ports[?(.name==\"postgresql\")].port}"
                },
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "spec": {
                "ports": [
                    {
                        "name": "postgresql",
                        "nodePort": 0,
                        "port": 5432,
                        "protocol": "TCP",
                        "targetPort": 5432
                    }
                ],
                "selector": {
                    "name": "${DATABASE_SERVICE_NAME}"
                },
                "sessionAffinity": "None",
                "type": "ClusterIP"
            },
            "status": {
                "loadBalancer": {}
            }
        },
        {
            "apiVersion": "v1",
            "kind": "DeploymentConfig",
            "metadata": {
                "annotations": {
                    "template.alpha.openshift.io/wait-for-ready": "true"
                },
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "spec": {
                "replicas": 1,
                "selector": {
                    "name": "${DATABASE_SERVICE_NAME}"
                },
                "strategy": {
                    "type": "Recreate"
                },
                "template": {
                    "metadata": {
                        "labels": {
                            "name": "${DATABASE_SERVICE_NAME}"
                        }
                    },
                    "spec": {
                        "containers": [
                            {
                                "capabilities": {},
                                "env": [
                                    {
                                        "name": "POSTGRESQL_USER",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-user",
                                                "name": "${DATABASE_SERVICE_NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "POSTGRESQL_PASSWORD",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-password",
                                                "name": "${DATABASE_SERVICE_NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "POSTGRESQL_DATABASE",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-name",
                                                "name": "${DATABASE_SERVICE_NAME}"
                                            }
                                        }
                                    }
                                ],
                                "image": " ",
                                "imagePullPolicy": "IfNotPresent",
                                "livenessProbe": {
                                    "exec": {
                                        "command": [
                                            "/usr/libexec/check-container",
                                            "--live"
                                        ]
                                    },
                                    "initialDelaySeconds": 120,
                                    "timeoutSeconds": 10
                                },
                                "name": "postgresql",
                                "ports": [
                                    {
                                        "containerPort": 5432,
                                        "protocol": "TCP"
                                    }
                                ],
                                "readinessProbe": {
                                    "exec": {
                                        "command": [
                                            "/usr/libexec/check-container"
                                        ]
                                    },
                                    "initialDelaySeconds": 5,
                                    "timeoutSeconds": 1
                                },
                                "resources": {
                                    "limits": {
                                        "memory": "${MEMORY_LIMIT}"
                                    }
                                },
                                "securityContext": {
                                    "capabilities": {},
                                    "privileged": false
                                },
                                "terminationMessagePath": "/dev/termination-log",
                                "volumeMounts": [
                                    {
                                        "mountPath": "/var/lib/pgsql/data",
                                        "name": "${DATABASE_SERVICE_NAME}-data"
                                    }
                                ]
                            }
                        ],
                        "dnsPolicy": "ClusterFirst",
                        "restartPolicy": "Always",
                        "volumes": [
                            {
                                "emptyDir": {
                                    "medium": ""
                                },
                                "name": "${DATABASE_SERVICE_NAME}-data"
                            }
                        ]
                    }
                },
                "triggers": [
                    {
                        "imageChangeParams": {
                            "automatic": true,
                            "containerNames": [
                                "postgresql"
                            ],
                            "from": {
                                "kind": "ImageStreamTag",
                                "name": "postgresql:${POSTGRESQL_VERSION}",
                                "namespace": "${NAMESPACE}"
                            },
                            "lastTriggeredImage": ""
                        },
                        "type": "ImageChange"
                    },
                    {
                        "type": "ConfigChange"
                    }
                ]
            },
            "status": {}
        }
    ],
    "parameters": [
        {
            "description": "Maximum amount of memory the container can use.",
            "displayName": "Memory Limit",
            "name": "MEMORY_LIMIT",
            "required": true,
            "value": "512Mi"
        },
        {
            "description": "The OpenShift Namespace where the ImageStream resides.",
            "displayName": "Namespace",
            "name": "NAMESPACE",
            "value": "openshift"
        },
        {
            "description": "The name of the OpenShift Service exposed for the database.",
            "displayName": "Database Service Name",
            "name": "DATABASE_SERVICE_NAME",
            "required": true,
            "value": "postgresql"
        },
        {
            "description": "Username for PostgreSQL user that will be used for accessing the database.",
            "displayName": "PostgreSQL Connection Username",
            "from": "user[A-Z0-9]{3}",
            "generate": "expression",
            "name": "POSTGRESQL_USER",
            "required": true
        },
        {
            "description": "Password for the PostgreSQL connection user.",
            "displayName": "PostgreSQL Connection Password",
            "from": "[a-zA-Z0-9]{16}",
            "generate": "expression",
            "name": "POSTGRESQL_PASSWORD",
            "required": true
        },
        {
            "description": "Name of the PostgreSQL database accessed.",
            "displayName": "PostgreSQL Database Name",
            "name": "POSTGRESQL_DATABASE",
            "required": true,
            "value": "sampledb"
        },
        {
            "description": "Version of PostgreSQL image to be used (10 or latest).",
            "displayName": "Version of PostgreSQL Image",
            "name": "POSTGRESQL_VERSION",
            "required": true,
            "value": "10"
        }
    ]
}`)

func examplesDbTemplatesPostgresqlEphemeralTemplateJsonBytes() ([]byte, error) {
	return _examplesDbTemplatesPostgresqlEphemeralTemplateJson, nil
}

func examplesDbTemplatesPostgresqlEphemeralTemplateJson() (*asset, error) {
	bytes, err := examplesDbTemplatesPostgresqlEphemeralTemplateJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "examples/db-templates/postgresql-ephemeral-template.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _examplesDbTemplatesPostgresqlPersistentTemplateJson = []byte(`{
    "apiVersion": "v1",
    "kind": "Template",
    "labels": {
        "template": "postgresql-persistent-template"
    },
    "message": "The following service(s) have been created in your project: ${DATABASE_SERVICE_NAME}.\n\n       Username: ${POSTGRESQL_USER}\n       Password: ${POSTGRESQL_PASSWORD}\n  Database Name: ${POSTGRESQL_DATABASE}\n Connection URL: postgresql://${DATABASE_SERVICE_NAME}:5432/\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/.",
    "metadata": {
        "annotations": {
            "description": "PostgreSQL database service, with persistent storage. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/.\n\nNOTE: Scaling to more than one replica is not supported. You must have persistent volumes available in your cluster to use this template.",
            "iconClass": "icon-postgresql",
            "openshift.io/display-name": "PostgreSQL",
            "openshift.io/documentation-url": "https://docs.okd.io/latest/using_images/db_images/postgresql.html",
            "openshift.io/long-description": "This template provides a standalone PostgreSQL server with a database created.  The database is stored on persistent storage.  The database name, username, and password are chosen via parameters when provisioning this service.",
            "openshift.io/provider-display-name": "Red Hat, Inc.",
            "openshift.io/support-url": "https://access.redhat.com",
            "tags": "database,postgresql"
        },
        "name": "postgresql-persistent"
    },
    "objects": [
        {
            "apiVersion": "v1",
            "kind": "Secret",
            "metadata": {
                "annotations": {
                    "template.openshift.io/expose-database_name": "{.data['database-name']}",
                    "template.openshift.io/expose-password": "{.data['database-password']}",
                    "template.openshift.io/expose-username": "{.data['database-user']}"
                },
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "stringData": {
                "database-name": "${POSTGRESQL_DATABASE}",
                "database-password": "${POSTGRESQL_PASSWORD}",
                "database-user": "${POSTGRESQL_USER}"
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Service",
            "metadata": {
                "annotations": {
                    "template.openshift.io/expose-uri": "postgres://{.spec.clusterIP}:{.spec.ports[?(.name==\"postgresql\")].port}"
                },
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "spec": {
                "ports": [
                    {
                        "name": "postgresql",
                        "nodePort": 0,
                        "port": 5432,
                        "protocol": "TCP",
                        "targetPort": 5432
                    }
                ],
                "selector": {
                    "name": "${DATABASE_SERVICE_NAME}"
                },
                "sessionAffinity": "None",
                "type": "ClusterIP"
            },
            "status": {
                "loadBalancer": {}
            }
        },
        {
            "apiVersion": "v1",
            "kind": "PersistentVolumeClaim",
            "metadata": {
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "spec": {
                "accessModes": [
                    "ReadWriteOnce"
                ],
                "resources": {
                    "requests": {
                        "storage": "${VOLUME_CAPACITY}"
                    }
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "DeploymentConfig",
            "metadata": {
                "annotations": {
                    "template.alpha.openshift.io/wait-for-ready": "true"
                },
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "spec": {
                "replicas": 1,
                "selector": {
                    "name": "${DATABASE_SERVICE_NAME}"
                },
                "strategy": {
                    "type": "Recreate"
                },
                "template": {
                    "metadata": {
                        "labels": {
                            "name": "${DATABASE_SERVICE_NAME}"
                        }
                    },
                    "spec": {
                        "containers": [
                            {
                                "capabilities": {},
                                "env": [
                                    {
                                        "name": "POSTGRESQL_USER",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-user",
                                                "name": "${DATABASE_SERVICE_NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "POSTGRESQL_PASSWORD",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-password",
                                                "name": "${DATABASE_SERVICE_NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "POSTGRESQL_DATABASE",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-name",
                                                "name": "${DATABASE_SERVICE_NAME}"
                                            }
                                        }
                                    }
                                ],
                                "image": " ",
                                "imagePullPolicy": "IfNotPresent",
                                "livenessProbe": {
                                    "exec": {
                                        "command": [
                                            "/usr/libexec/check-container",
                                            "--live"
                                        ]
                                    },
                                    "initialDelaySeconds": 120,
                                    "timeoutSeconds": 10
                                },
                                "name": "postgresql",
                                "ports": [
                                    {
                                        "containerPort": 5432,
                                        "protocol": "TCP"
                                    }
                                ],
                                "readinessProbe": {
                                    "exec": {
                                        "command": [
                                            "/usr/libexec/check-container"
                                        ]
                                    },
                                    "initialDelaySeconds": 5,
                                    "timeoutSeconds": 1
                                },
                                "resources": {
                                    "limits": {
                                        "memory": "${MEMORY_LIMIT}"
                                    }
                                },
                                "securityContext": {
                                    "capabilities": {},
                                    "privileged": false
                                },
                                "terminationMessagePath": "/dev/termination-log",
                                "volumeMounts": [
                                    {
                                        "mountPath": "/var/lib/pgsql/data",
                                        "name": "${DATABASE_SERVICE_NAME}-data"
                                    }
                                ]
                            }
                        ],
                        "dnsPolicy": "ClusterFirst",
                        "restartPolicy": "Always",
                        "volumes": [
                            {
                                "name": "${DATABASE_SERVICE_NAME}-data",
                                "persistentVolumeClaim": {
                                    "claimName": "${DATABASE_SERVICE_NAME}"
                                }
                            }
                        ]
                    }
                },
                "triggers": [
                    {
                        "imageChangeParams": {
                            "automatic": true,
                            "containerNames": [
                                "postgresql"
                            ],
                            "from": {
                                "kind": "ImageStreamTag",
                                "name": "postgresql:${POSTGRESQL_VERSION}",
                                "namespace": "${NAMESPACE}"
                            },
                            "lastTriggeredImage": ""
                        },
                        "type": "ImageChange"
                    },
                    {
                        "type": "ConfigChange"
                    }
                ]
            },
            "status": {}
        }
    ],
    "parameters": [
        {
            "description": "Maximum amount of memory the container can use.",
            "displayName": "Memory Limit",
            "name": "MEMORY_LIMIT",
            "required": true,
            "value": "512Mi"
        },
        {
            "description": "The OpenShift Namespace where the ImageStream resides.",
            "displayName": "Namespace",
            "name": "NAMESPACE",
            "value": "openshift"
        },
        {
            "description": "The name of the OpenShift Service exposed for the database.",
            "displayName": "Database Service Name",
            "name": "DATABASE_SERVICE_NAME",
            "required": true,
            "value": "postgresql"
        },
        {
            "description": "Username for PostgreSQL user that will be used for accessing the database.",
            "displayName": "PostgreSQL Connection Username",
            "from": "user[A-Z0-9]{3}",
            "generate": "expression",
            "name": "POSTGRESQL_USER",
            "required": true
        },
        {
            "description": "Password for the PostgreSQL connection user.",
            "displayName": "PostgreSQL Connection Password",
            "from": "[a-zA-Z0-9]{16}",
            "generate": "expression",
            "name": "POSTGRESQL_PASSWORD",
            "required": true
        },
        {
            "description": "Name of the PostgreSQL database accessed.",
            "displayName": "PostgreSQL Database Name",
            "name": "POSTGRESQL_DATABASE",
            "required": true,
            "value": "sampledb"
        },
        {
            "description": "Volume space available for data, e.g. 512Mi, 2Gi.",
            "displayName": "Volume Capacity",
            "name": "VOLUME_CAPACITY",
            "required": true,
            "value": "1Gi"
        },
        {
            "description": "Version of PostgreSQL image to be used (10 or latest).",
            "displayName": "Version of PostgreSQL Image",
            "name": "POSTGRESQL_VERSION",
            "required": true,
            "value": "10"
        }
    ]
}`)

func examplesDbTemplatesPostgresqlPersistentTemplateJsonBytes() ([]byte, error) {
	return _examplesDbTemplatesPostgresqlPersistentTemplateJson, nil
}

func examplesDbTemplatesPostgresqlPersistentTemplateJson() (*asset, error) {
	bytes, err := examplesDbTemplatesPostgresqlPersistentTemplateJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "examples/db-templates/postgresql-persistent-template.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _examplesDbTemplatesRedisEphemeralTemplateJson = []byte(`{
    "apiVersion": "v1",
    "kind": "Template",
    "labels": {
        "template": "redis-ephemeral-template"
    },
    "message": "The following service(s) have been created in your project: ${DATABASE_SERVICE_NAME}.\n\n       Password: ${REDIS_PASSWORD}\n Connection URL: redis://${DATABASE_SERVICE_NAME}:6379/\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/redis-container/blob/master/3.2.",
    "metadata": {
        "annotations": {
            "description": "Redis in-memory data structure store, without persistent storage. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/redis-container/blob/master/3.2.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing",
            "iconClass": "icon-redis",
            "openshift.io/display-name": "Redis (Ephemeral)",
            "openshift.io/documentation-url": "https://github.com/sclorg/redis-container/tree/master/3.2",
            "openshift.io/long-description": "This template provides a standalone Redis server.  The data is not stored on persistent storage, so any restart of the service will result in all data being lost.",
            "openshift.io/provider-display-name": "Red Hat, Inc.",
            "openshift.io/support-url": "https://access.redhat.com",
            "tags": "database,redis"
        },
        "name": "redis-ephemeral"
    },
    "objects": [
        {
            "apiVersion": "v1",
            "kind": "Secret",
            "metadata": {
                "annotations": {
                    "template.openshift.io/expose-password": "{.data['database-password']}"
                },
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "stringData": {
                "database-password": "${REDIS_PASSWORD}"
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Service",
            "metadata": {
                "annotations": {
                    "template.openshift.io/expose-uri": "redis://{.spec.clusterIP}:{.spec.ports[?(.name==\"redis\")].port}"
                },
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "spec": {
                "ports": [
                    {
                        "name": "redis",
                        "nodePort": 0,
                        "port": 6379,
                        "protocol": "TCP",
                        "targetPort": 6379
                    }
                ],
                "selector": {
                    "name": "${DATABASE_SERVICE_NAME}"
                },
                "sessionAffinity": "None",
                "type": "ClusterIP"
            },
            "status": {
                "loadBalancer": {}
            }
        },
        {
            "apiVersion": "v1",
            "kind": "DeploymentConfig",
            "metadata": {
                "annotations": {
                    "template.alpha.openshift.io/wait-for-ready": "true"
                },
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "spec": {
                "replicas": 1,
                "selector": {
                    "name": "${DATABASE_SERVICE_NAME}"
                },
                "strategy": {
                    "type": "Recreate"
                },
                "template": {
                    "metadata": {
                        "labels": {
                            "name": "${DATABASE_SERVICE_NAME}"
                        }
                    },
                    "spec": {
                        "containers": [
                            {
                                "capabilities": {},
                                "env": [
                                    {
                                        "name": "REDIS_PASSWORD",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-password",
                                                "name": "${DATABASE_SERVICE_NAME}"
                                            }
                                        }
                                    }
                                ],
                                "image": " ",
                                "imagePullPolicy": "IfNotPresent",
                                "livenessProbe": {
                                    "initialDelaySeconds": 30,
                                    "tcpSocket": {
                                        "port": 6379
                                    },
                                    "timeoutSeconds": 1
                                },
                                "name": "redis",
                                "ports": [
                                    {
                                        "containerPort": 6379,
                                        "protocol": "TCP"
                                    }
                                ],
                                "readinessProbe": {
                                    "exec": {
                                        "command": [
                                            "/bin/sh",
                                            "-i",
                                            "-c",
                                            "test \"$(redis-cli -h 127.0.0.1 -a $REDIS_PASSWORD ping)\" == \"PONG\""
                                        ]
                                    },
                                    "initialDelaySeconds": 5,
                                    "timeoutSeconds": 1
                                },
                                "resources": {
                                    "limits": {
                                        "memory": "${MEMORY_LIMIT}"
                                    }
                                },
                                "securityContext": {
                                    "capabilities": {},
                                    "privileged": false
                                },
                                "terminationMessagePath": "/dev/termination-log",
                                "volumeMounts": [
                                    {
                                        "mountPath": "/var/lib/redis/data",
                                        "name": "${DATABASE_SERVICE_NAME}-data"
                                    }
                                ]
                            }
                        ],
                        "dnsPolicy": "ClusterFirst",
                        "restartPolicy": "Always",
                        "volumes": [
                            {
                                "emptyDir": {
                                    "medium": ""
                                },
                                "name": "${DATABASE_SERVICE_NAME}-data"
                            }
                        ]
                    }
                },
                "triggers": [
                    {
                        "imageChangeParams": {
                            "automatic": true,
                            "containerNames": [
                                "redis"
                            ],
                            "from": {
                                "kind": "ImageStreamTag",
                                "name": "redis:${REDIS_VERSION}",
                                "namespace": "${NAMESPACE}"
                            },
                            "lastTriggeredImage": ""
                        },
                        "type": "ImageChange"
                    },
                    {
                        "type": "ConfigChange"
                    }
                ]
            },
            "status": {}
        }
    ],
    "parameters": [
        {
            "description": "Maximum amount of memory the container can use.",
            "displayName": "Memory Limit",
            "name": "MEMORY_LIMIT",
            "required": true,
            "value": "512Mi"
        },
        {
            "description": "The OpenShift Namespace where the ImageStream resides.",
            "displayName": "Namespace",
            "name": "NAMESPACE",
            "value": "openshift"
        },
        {
            "description": "The name of the OpenShift Service exposed for the database.",
            "displayName": "Database Service Name",
            "name": "DATABASE_SERVICE_NAME",
            "required": true,
            "value": "redis"
        },
        {
            "description": "Password for the Redis connection user.",
            "displayName": "Redis Connection Password",
            "from": "[a-zA-Z0-9]{16}",
            "generate": "expression",
            "name": "REDIS_PASSWORD",
            "required": true
        },
        {
            "description": "Version of Redis image to be used (3.2 or latest).",
            "displayName": "Version of Redis Image",
            "name": "REDIS_VERSION",
            "required": true,
            "value": "3.2"
        }
    ]
}`)

func examplesDbTemplatesRedisEphemeralTemplateJsonBytes() ([]byte, error) {
	return _examplesDbTemplatesRedisEphemeralTemplateJson, nil
}

func examplesDbTemplatesRedisEphemeralTemplateJson() (*asset, error) {
	bytes, err := examplesDbTemplatesRedisEphemeralTemplateJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "examples/db-templates/redis-ephemeral-template.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _examplesDbTemplatesRedisPersistentTemplateJson = []byte(`{
    "apiVersion": "v1",
    "kind": "Template",
    "labels": {
        "template": "redis-persistent-template"
    },
    "message": "The following service(s) have been created in your project: ${DATABASE_SERVICE_NAME}.\n\n       Password: ${REDIS_PASSWORD}\n Connection URL: redis://${DATABASE_SERVICE_NAME}:6379/\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/redis-container/blob/master/3.2.",
    "metadata": {
        "annotations": {
            "description": "Redis in-memory data structure store, with persistent storage. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/redis-container/blob/master/3.2.\n\nNOTE: You must have persistent volumes available in your cluster to use this template.",
            "iconClass": "icon-redis",
            "openshift.io/display-name": "Redis",
            "openshift.io/documentation-url": "https://github.com/sclorg/redis-container/tree/master/3.2",
            "openshift.io/long-description": "This template provides a standalone Redis server.  The data is stored on persistent storage.",
            "openshift.io/provider-display-name": "Red Hat, Inc.",
            "openshift.io/support-url": "https://access.redhat.com",
            "tags": "database,redis"
        },
        "name": "redis-persistent"
    },
    "objects": [
        {
            "apiVersion": "v1",
            "kind": "Secret",
            "metadata": {
                "annotations": {
                    "template.openshift.io/expose-password": "{.data['database-password']}"
                },
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "stringData": {
                "database-password": "${REDIS_PASSWORD}"
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Service",
            "metadata": {
                "annotations": {
                    "template.openshift.io/expose-uri": "redis://{.spec.clusterIP}:{.spec.ports[?(.name==\"redis\")].port}"
                },
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "spec": {
                "ports": [
                    {
                        "name": "redis",
                        "nodePort": 0,
                        "port": 6379,
                        "protocol": "TCP",
                        "targetPort": 6379
                    }
                ],
                "selector": {
                    "name": "${DATABASE_SERVICE_NAME}"
                },
                "sessionAffinity": "None",
                "type": "ClusterIP"
            },
            "status": {
                "loadBalancer": {}
            }
        },
        {
            "apiVersion": "v1",
            "kind": "PersistentVolumeClaim",
            "metadata": {
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "spec": {
                "accessModes": [
                    "ReadWriteOnce"
                ],
                "resources": {
                    "requests": {
                        "storage": "${VOLUME_CAPACITY}"
                    }
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "DeploymentConfig",
            "metadata": {
                "annotations": {
                    "template.alpha.openshift.io/wait-for-ready": "true"
                },
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "spec": {
                "replicas": 1,
                "selector": {
                    "name": "${DATABASE_SERVICE_NAME}"
                },
                "strategy": {
                    "type": "Recreate"
                },
                "template": {
                    "metadata": {
                        "labels": {
                            "name": "${DATABASE_SERVICE_NAME}"
                        }
                    },
                    "spec": {
                        "containers": [
                            {
                                "capabilities": {},
                                "env": [
                                    {
                                        "name": "REDIS_PASSWORD",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-password",
                                                "name": "${DATABASE_SERVICE_NAME}"
                                            }
                                        }
                                    }
                                ],
                                "image": " ",
                                "imagePullPolicy": "IfNotPresent",
                                "livenessProbe": {
                                    "initialDelaySeconds": 30,
                                    "tcpSocket": {
                                        "port": 6379
                                    },
                                    "timeoutSeconds": 1
                                },
                                "name": "redis",
                                "ports": [
                                    {
                                        "containerPort": 6379,
                                        "protocol": "TCP"
                                    }
                                ],
                                "readinessProbe": {
                                    "exec": {
                                        "command": [
                                            "/bin/sh",
                                            "-i",
                                            "-c",
                                            "test \"$(redis-cli -h 127.0.0.1 -a $REDIS_PASSWORD ping)\" == \"PONG\""
                                        ]
                                    },
                                    "initialDelaySeconds": 5,
                                    "timeoutSeconds": 1
                                },
                                "resources": {
                                    "limits": {
                                        "memory": "${MEMORY_LIMIT}"
                                    }
                                },
                                "securityContext": {
                                    "capabilities": {},
                                    "privileged": false
                                },
                                "terminationMessagePath": "/dev/termination-log",
                                "volumeMounts": [
                                    {
                                        "mountPath": "/var/lib/redis/data",
                                        "name": "${DATABASE_SERVICE_NAME}-data"
                                    }
                                ]
                            }
                        ],
                        "dnsPolicy": "ClusterFirst",
                        "restartPolicy": "Always",
                        "volumes": [
                            {
                                "name": "${DATABASE_SERVICE_NAME}-data",
                                "persistentVolumeClaim": {
                                    "claimName": "${DATABASE_SERVICE_NAME}"
                                }
                            }
                        ]
                    }
                },
                "triggers": [
                    {
                        "imageChangeParams": {
                            "automatic": true,
                            "containerNames": [
                                "redis"
                            ],
                            "from": {
                                "kind": "ImageStreamTag",
                                "name": "redis:${REDIS_VERSION}",
                                "namespace": "${NAMESPACE}"
                            },
                            "lastTriggeredImage": ""
                        },
                        "type": "ImageChange"
                    },
                    {
                        "type": "ConfigChange"
                    }
                ]
            },
            "status": {}
        }
    ],
    "parameters": [
        {
            "description": "Maximum amount of memory the container can use.",
            "displayName": "Memory Limit",
            "name": "MEMORY_LIMIT",
            "required": true,
            "value": "512Mi"
        },
        {
            "description": "The OpenShift Namespace where the ImageStream resides.",
            "displayName": "Namespace",
            "name": "NAMESPACE",
            "value": "openshift"
        },
        {
            "description": "The name of the OpenShift Service exposed for the database.",
            "displayName": "Database Service Name",
            "name": "DATABASE_SERVICE_NAME",
            "required": true,
            "value": "redis"
        },
        {
            "description": "Password for the Redis connection user.",
            "displayName": "Redis Connection Password",
            "from": "[a-zA-Z0-9]{16}",
            "generate": "expression",
            "name": "REDIS_PASSWORD",
            "required": true
        },
        {
            "description": "Volume space available for data, e.g. 512Mi, 2Gi.",
            "displayName": "Volume Capacity",
            "name": "VOLUME_CAPACITY",
            "required": true,
            "value": "1Gi"
        },
        {
            "description": "Version of Redis image to be used (3.2 or latest).",
            "displayName": "Version of Redis Image",
            "name": "REDIS_VERSION",
            "required": true,
            "value": "3.2"
        }
    ]
}`)

func examplesDbTemplatesRedisPersistentTemplateJsonBytes() ([]byte, error) {
	return _examplesDbTemplatesRedisPersistentTemplateJson, nil
}

func examplesDbTemplatesRedisPersistentTemplateJson() (*asset, error) {
	bytes, err := examplesDbTemplatesRedisPersistentTemplateJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "examples/db-templates/redis-persistent-template.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _examplesImageStreamsImageStreamsCentos7Json = []byte(`{
  "kind": "ImageStreamList",
  "apiVersion": "v1",
  "items": [
    {
      "apiVersion": "v1",
      "kind": "ImageStream",
      "metadata": {
        "annotations": {
          "openshift.io/display-name": ".NET Core"
        },
        "name": "dotnet"
      },
      "spec": {
        "tags": [
          {
            "annotations": {
              "description": "Build and run .NET Core applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore/tree/master/2.1/build/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of .NET Core available on OpenShift, including major versions updates.",
              "iconClass": "icon-dotnet",
              "openshift.io/display-name": ".NET Core (Latest)",
              "sampleContextDir": "app",
              "sampleRef": "dotnetcore-2.1",
              "sampleRepo": "https://github.com/redhat-developer/s2i-dotnetcore-ex.git",
              "supports": "dotnet",
              "tags": "builder,.net,dotnet,dotnetcore"
            },
            "from": {
              "kind": "ImageStreamTag",
              "name": "2.1"
            },
            "name": "latest"
          },
          {
            "annotations": {
              "description": "Build and run .NET Core 2.1 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore/tree/master/2.0/build/README.md.",
              "iconClass": "icon-dotnet",
              "openshift.io/display-name": ".NET Core 2.1",
              "sampleContextDir": "app",
              "sampleRef": "dotnetcore-2.1",
              "sampleRepo": "https://github.com/redhat-developer/s2i-dotnetcore-ex.git",
              "supports": "dotnet:2.1,dotnet",
              "tags": "builder,.net,dotnet,dotnetcore,rh-dotnet21",
              "version": "2.1"
            },
            "from": {
              "kind": "DockerImage",
              "name": "registry.centos.org/dotnet/dotnet-21-centos7:latest"
            },
            "name": "2.1"
          },
          {
            "annotations": {
              "description": "RETIRED: Build and run .NET Core 2.0 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore/tree/master/2.0/build/README.md.",
              "iconClass": "icon-dotnet",
              "openshift.io/display-name": ".NET Core 2.0",
              "sampleContextDir": "app",
              "sampleRef": "dotnetcore-2.0",
              "sampleRepo": "https://github.com/redhat-developer/s2i-dotnetcore-ex.git",
              "supports": "dotnet:2.0,dotnet",
              "tags": "hidden,builder,.net,dotnet,dotnetcore,rh-dotnet20",
              "version": "2.0"
            },
            "from": {
              "kind": "DockerImage",
              "name": "registry.centos.org/dotnet/dotnet-20-centos7:latest"
            },
            "name": "2.0"
          }
        ]
      }
    },
    {
      "apiVersion": "v1",
      "kind": "ImageStream",
      "metadata": {
        "annotations": {
          "openshift.io/display-name": "Apache HTTP Server (httpd)"
        },
        "name": "httpd"
      },
      "spec": {
        "tags": [
          {
            "annotations": {
              "description": "Build and serve static content via Apache HTTP Server (httpd) on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/httpd-container/blob/master/2.4/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Httpd available on OpenShift, including major versions updates.",
              "iconClass": "icon-apache",
              "openshift.io/display-name": "Apache HTTP Server (Latest)",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/httpd-ex.git",
              "supports": "httpd",
              "tags": "builder,httpd"
            },
            "from": {
              "kind": "ImageStreamTag",
              "name": "2.4"
            },
            "name": "latest",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and serve static content via Apache HTTP Server (httpd) 2.4 on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/httpd-container/blob/master/2.4/README.md.",
              "iconClass": "icon-apache",
              "openshift.io/display-name": "Apache HTTP Server 2.4",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/httpd-ex.git",
              "supports": "httpd",
              "tags": "builder,httpd",
              "version": "2.4"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/centos/httpd-24-centos7:latest"
            },
            "name": "2.4",
            "referencePolicy": {
              "type": "Local"
            }
          }
        ]
      }
    },
    {
      "apiVersion": "v1",
      "kind": "ImageStream",
      "metadata": {
        "annotations": {
          "openshift.io/display-name": "Jenkins"
        },
        "name": "jenkins"
      },
      "spec": {
        "tags": [
          {
            "annotations": {
              "description": "Provides a Jenkins server on CentOS 7. For more information about using this container image, including OpenShift considerations, see https://github.com/openshift/jenkins/blob/master/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Jenkins available on OpenShift, including major versions updates.",
              "iconClass": "icon-jenkins",
              "openshift.io/display-name": "Jenkins (Latest)",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "tags": "jenkins"
            },
            "from": {
              "kind": "ImageStreamTag",
              "name": "2"
            },
            "name": "latest",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Provides a Jenkins v2.x server on CentOS 7. For more information about using this container image, including OpenShift considerations, see https://github.com/openshift/jenkins/blob/master/README.md.",
              "iconClass": "icon-jenkins",
              "openshift.io/display-name": "Jenkins 2.X",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "tags": "jenkins",
              "version": "2.x"
            },
            "from": {
              "kind": "DockerImage",
              "name": "quay.io/openshift/origin-jenkins:v4.0"
            },
            "name": "2",
            "referencePolicy": {
              "type": "Local"
            }
          }
        ]
      }
    },
    {
      "apiVersion": "v1",
      "kind": "ImageStream",
      "metadata": {
        "annotations": {
          "openshift.io/display-name": "MariaDB"
        },
        "name": "mariadb"
      },
      "spec": {
        "tags": [
          {
            "annotations": {
              "description": "Provides a MariaDB database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/tree/master/10.2/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of MariaDB available on OpenShift, including major versions updates.",
              "iconClass": "icon-mariadb",
              "openshift.io/display-name": "MariaDB (Latest)",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "tags": "database,mariadb"
            },
            "from": {
              "kind": "ImageStreamTag",
              "name": "10.2"
            },
            "name": "latest",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Provides a MariaDB 10.1 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/tree/master/10.1/README.md.",
              "iconClass": "icon-mariadb",
              "openshift.io/display-name": "MariaDB 10.1",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "tags": "database,mariadb",
              "version": "10.1"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/centos/mariadb-101-centos7:latest"
            },
            "name": "10.1",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Provides a MariaDB 10.2 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/tree/master/10.2/README.md.",
              "iconClass": "icon-mariadb",
              "openshift.io/display-name": "MariaDB 10.2",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "tags": "database,mariadb",
              "version": "10.2"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/centos/mariadb-102-centos7:latest"
            },
            "name": "10.2",
            "referencePolicy": {
              "type": "Local"
            }
          }
        ]
      }
    },
    {
      "apiVersion": "v1",
      "kind": "ImageStream",
      "metadata": {
        "annotations": {
          "openshift.io/display-name": "MongoDB"
        },
        "name": "mongodb"
      },
      "spec": {
        "tags": [
          {
            "annotations": {
              "description": "Provides a MongoDB database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mongodb-container/tree/master/3.4/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of MongoDB available on OpenShift, including major versions updates.",
              "iconClass": "icon-mongodb",
              "openshift.io/display-name": "MongoDB (Latest)",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "tags": "database,mongodb"
            },
            "from": {
              "kind": "ImageStreamTag",
              "name": "3.6"
            },
            "name": "latest",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Provides a MongoDB 2.4 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mongodb-container/tree/master/2.4/README.md.",
              "iconClass": "icon-mongodb",
              "openshift.io/display-name": "MongoDB 2.4",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "tags": "hidden,mongodb",
              "version": "2.4"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/openshift/mongodb-24-centos7:latest"
            },
            "name": "2.4",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Provides a MongoDB 2.6 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mongodb-container/tree/master/2.6/README.md.",
              "iconClass": "icon-mongodb",
              "openshift.io/display-name": "MongoDB 2.6",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "tags": "hidden,database,mongodb",
              "version": "2.6"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/centos/mongodb-26-centos7:latest"
            },
            "name": "2.6",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Provides a MongoDB 3.2 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mongodb-container/tree/master/3.2/README.md.",
              "iconClass": "icon-mongodb",
              "openshift.io/display-name": "MongoDB 3.2",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "tags": "database,mongodb",
              "version": "3.2"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/centos/mongodb-32-centos7:latest"
            },
            "name": "3.2",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Provides a MongoDB 3.4 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mongodb-container/tree/master/3.4/README.md.",
              "iconClass": "icon-mongodb",
              "openshift.io/display-name": "MongoDB 3.4",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "tags": "database,mongodb",
              "version": "3.4"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/centos/mongodb-34-centos7:latest"
            },
            "name": "3.4",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Provides a MongoDB 3.6 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mongodb-container/tree/master/3.6/README.md.",
              "iconClass": "icon-mongodb",
              "openshift.io/display-name": "MongoDB 3.6",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "tags": "database,mongodb",
              "version": "3.6"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/centos/mongodb-36-centos7:latest"
            },
            "name": "3.6",
            "referencePolicy": {
              "type": "Local"
            }
          }
        ]
      }
    },
    {
      "apiVersion": "v1",
      "kind": "ImageStream",
      "metadata": {
        "annotations": {
          "openshift.io/display-name": "MySQL"
        },
        "name": "mysql"
      },
      "spec": {
        "tags": [
          {
            "annotations": {
              "description": "Provides a MySQL database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of MySQL available on OpenShift, including major versions updates.",
              "iconClass": "icon-mysql-database",
              "openshift.io/display-name": "MySQL (Latest)",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "tags": "mysql"
            },
            "from": {
              "kind": "ImageStreamTag",
              "name": "5.7"
            },
            "name": "latest",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Provides a MySQL 5.5 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/README.md.",
              "iconClass": "icon-mysql-database",
              "openshift.io/display-name": "MySQL 5.5",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "tags": "hidden,mysql",
              "version": "5.5"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/openshift/mysql-55-centos7:latest"
            },
            "name": "5.5",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Provides a MySQL 5.6 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/README.md.",
              "iconClass": "icon-mysql-database",
              "openshift.io/display-name": "MySQL 5.6",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "tags": "hidden,mysql",
              "version": "5.6"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/centos/mysql-56-centos7:latest"
            },
            "name": "5.6",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Provides a MySQL 5.7 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/README.md.",
              "iconClass": "icon-mysql-database",
              "openshift.io/display-name": "MySQL 5.7",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "tags": "mysql",
              "version": "5.7"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/centos/mysql-57-centos7:latest"
            },
            "name": "5.7",
            "referencePolicy": {
              "type": "Local"
            }
          }
        ]
      }
    },
    {
      "apiVersion": "v1",
      "kind": "ImageStream",
      "metadata": {
        "annotations": {
          "openshift.io/display-name": "Nginx HTTP server and a reverse proxy (nginx)"
        },
        "name": "nginx"
      },
      "spec": {
        "tags": [
          {
            "annotations": {
              "description": "Build and serve static content via Nginx HTTP Server and a reverse proxy (nginx) on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/nginx-container/blob/master/1.8/README.md.",
              "iconClass": "icon-nginx",
              "openshift.io/display-name": "Nginx HTTP server and a reverse proxy 1.8",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/nginx-ex.git",
              "supports": "nginx",
              "tags": "builder,nginx",
              "version": "1.8"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/centos/nginx-18-centos7:latest"
            },
            "name": "1.8",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and serve static content via Nginx HTTP Server and a reverse proxy (nginx) on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/nginx-container/blob/master/1.10/README.md.",
              "iconClass": "icon-nginx",
              "openshift.io/display-name": "Nginx HTTP server and a reverse proxy 1.10",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/nginx-ex.git",
              "supports": "nginx",
              "tags": "builder,nginx",
              "version": "1.10"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/centos/nginx-110-centos7:latest"
            },
            "name": "1.10",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and serve static content via Nginx HTTP Server and a reverse proxy (nginx) on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/nginx-container/blob/master/1.12/README.md.",
              "iconClass": "icon-nginx",
              "openshift.io/display-name": "Nginx HTTP server and a reverse proxy 1.12",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/nginx-ex.git",
              "supports": "nginx",
              "tags": "builder,nginx",
              "version": "1.12"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/centos/nginx-112-centos7:latest"
            },
            "name": "1.12",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and serve static content via Nginx HTTP Server and a reverse proxy (nginx) on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/nginx-container/blob/master/1.12/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Nginx available on OpenShift, including major versions updates.",
              "iconClass": "icon-nginx",
              "openshift.io/display-name": "Nginx HTTP server and a reverse proxy (Latest)",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/nginx-ex.git",
              "supports": "nginx",
              "tags": "builder,nginx"
            },
            "from": {
              "kind": "ImageStreamTag",
              "name": "1.12"
            },
            "name": "latest",
            "referencePolicy": {
              "type": "Local"
            }
          }
        ]
      }
    },
    {
      "apiVersion": "v1",
      "kind": "ImageStream",
      "metadata": {
        "annotations": {
          "openshift.io/display-name": "Node.js"
        },
        "name": "nodejs"
      },
      "spec": {
        "tags": [
          {
            "annotations": {
              "description": "Build and run Node.js applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/nodeshift/centos7-s2i-nodejs.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Node.js available on OpenShift, including major versions updates.",
              "iconClass": "icon-nodejs",
              "openshift.io/display-name": "Node.js (Latest)",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/nodejs-ex.git",
              "supports": "nodejs",
              "tags": "builder,nodejs"
            },
            "from": {
              "kind": "ImageStreamTag",
              "name": "11"
            },
            "name": "latest",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "DEPRECATED: Build and run Node.js 0.10 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-nodejs-container/blob/master/0.10/README.md.",
              "iconClass": "icon-nodejs",
              "openshift.io/display-name": "Node.js 0.10",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/nodejs-ex.git",
              "supports": "nodejs:0.10,nodejs:0.1,nodejs",
              "tags": "hidden,nodejs",
              "version": "0.10"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/openshift/nodejs-010-centos7:latest"
            },
            "name": "0.10",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run Node.js 4 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-nodejs-container/blob/master/4/README.md.",
              "iconClass": "icon-nodejs",
              "openshift.io/display-name": "Node.js 4",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/nodejs-ex.git",
              "supports": "nodejs:4,nodejs",
              "tags": "hidden,builder,nodejs",
              "version": "4"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/centos/nodejs-4-centos7:latest"
            },
            "name": "4",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run Node.js 6 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-nodejs-container/blob/master/6/README.md.",
              "iconClass": "icon-nodejs",
              "openshift.io/display-name": "Node.js 6",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/nodejs-ex.git",
              "supports": "nodejs:6,nodejs",
              "tags": "builder,nodejs",
              "version": "6"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/centos/nodejs-6-centos7:latest"
            },
            "name": "6",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run Node.js 8 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-nodejs-container/blob/master/8/README.md.",
              "iconClass": "icon-nodejs",
              "openshift.io/display-name": "Node.js 8",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/nodejs-ex.git",
              "tags": "builder,nodejs",
              "version": "8"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/centos/nodejs-8-centos7:latest"
            },
            "name": "8",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run Node.js 8 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/nodeshift/centos7-s2i-nodejs.",
              "iconClass": "icon-nodejs",
              "openshift.io/display-name": "Node.js 8 (RHOAR)",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/nodejs-ex.git",
              "tags": "builder,nodejs",
              "version": "8"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/nodeshift/centos7-s2i-nodejs:8.x"
            },
            "name": "8-RHOAR",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run Node.js 10 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/nodeshift/centos7-s2i-nodejs.",
              "iconClass": "icon-nodejs",
              "openshift.io/display-name": "Node.js 10",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/nodejs-ex.git",
              "tags": "builder,nodejs",
              "version": "10"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/nodeshift/centos7-s2i-nodejs:10.x"
            },
            "name": "10",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run Node.js 11 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/nodeshift/centos7-s2i-nodejs.",
              "iconClass": "icon-nodejs",
              "openshift.io/display-name": "Node.js 11",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/nodejs-ex.git",
              "tags": "builder,nodejs",
              "version": "11"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/nodeshift/centos7-s2i-nodejs:11.x"
            },
            "name": "11",
            "referencePolicy": {
              "type": "Local"
            }
          }
        ]
      }
    },
    {
      "apiVersion": "v1",
      "kind": "ImageStream",
      "metadata": {
        "annotations": {
          "openshift.io/display-name": "Perl"
        },
        "name": "perl"
      },
      "spec": {
        "tags": [
          {
            "annotations": {
              "description": "Build and run Perl applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-perl-container/blob/master/5.20/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Perl available on OpenShift, including major versions updates.",
              "iconClass": "icon-perl",
              "openshift.io/display-name": "Perl (Latest)",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/dancer-ex.git",
              "supports": "perl",
              "tags": "builder,perl"
            },
            "from": {
              "kind": "ImageStreamTag",
              "name": "5.26"
            },
            "name": "latest",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run Perl 5.16 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-perl-container/blob/master/5.16/README.md.",
              "iconClass": "icon-perl",
              "openshift.io/display-name": "Perl 5.16",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/dancer-ex.git",
              "supports": "perl:5.16,perl",
              "tags": "hidden,builder,perl",
              "version": "5.16"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/openshift/perl-516-centos7:latest"
            },
            "name": "5.16",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run Perl 5.20 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-perl-container/blob/master/5.20/README.md.",
              "iconClass": "icon-perl",
              "openshift.io/display-name": "Perl 5.20",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/dancer-ex.git",
              "supports": "perl:5.20,perl",
              "tags": "hidden,builder,perl",
              "version": "5.20"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/centos/perl-520-centos7:latest"
            },
            "name": "5.20",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run Perl 5.24 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-perl-container/blob/master/5.24/README.md.",
              "iconClass": "icon-perl",
              "openshift.io/display-name": "Perl 5.24",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/dancer-ex.git",
              "supports": "perl:5.24,perl",
              "tags": "builder,perl",
              "version": "5.24"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/centos/perl-524-centos7:latest"
            },
            "name": "5.24",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run Perl 5.26 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-perl-container/blob/master/5.26/README.md.",
              "iconClass": "icon-perl",
              "openshift.io/display-name": "Perl 5.26",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/dancer-ex.git",
              "supports": "perl:5.26,perl",
              "tags": "builder,perl",
              "version": "5.26"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/centos/perl-526-centos7:latest"
            },
            "name": "5.26",
            "referencePolicy": {
              "type": "Local"
            }
          }
        ]
      }
    },
    {
      "apiVersion": "v1",
      "kind": "ImageStream",
      "metadata": {
        "annotations": {
          "openshift.io/display-name": "PHP"
        },
        "name": "php"
      },
      "spec": {
        "tags": [
          {
            "annotations": {
              "description": "Build and run PHP applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-php-container/blob/master/7.1/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of PHP available on OpenShift, including major versions updates.",
              "iconClass": "icon-php",
              "openshift.io/display-name": "PHP (Latest)",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/cakephp-ex.git",
              "supports": "php",
              "tags": "builder,php"
            },
            "from": {
              "kind": "ImageStreamTag",
              "name": "7.1"
            },
            "name": "latest",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run PHP 5.5 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-php-container/blob/master/5.5/README.md.",
              "iconClass": "icon-php",
              "openshift.io/display-name": "PHP 5.5",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/cakephp-ex.git",
              "supports": "php:5.5,php",
              "tags": "hidden,builder,php",
              "version": "5.5"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/openshift/php-55-centos7:latest"
            },
            "name": "5.5",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run PHP 5.6 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-php-container/blob/master/5.6/README.md.",
              "iconClass": "icon-php",
              "openshift.io/display-name": "PHP 5.6",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/cakephp-ex.git",
              "supports": "php:5.6,php",
              "tags": "hidden,builder,php",
              "version": "5.6"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/centos/php-56-centos7:latest"
            },
            "name": "5.6",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run PHP 7.0 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-php-container/blob/master/7.0/README.md.",
              "iconClass": "icon-php",
              "openshift.io/display-name": "PHP 7.0",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/cakephp-ex.git",
              "supports": "php:7.0,php",
              "tags": "builder,php",
              "version": "7.0"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/centos/php-70-centos7:latest"
            },
            "name": "7.0",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run PHP 7.1 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-php-container/blob/master/7.1/README.md.",
              "iconClass": "icon-php",
              "openshift.io/display-name": "PHP 7.1",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/cakephp-ex.git",
              "supports": "php:7.1,php",
              "tags": "builder,php",
              "version": "7.1"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/centos/php-71-centos7:latest"
            },
            "name": "7.1",
            "referencePolicy": {
              "type": "Local"
            }
          }
        ]
      }
    },
    {
      "apiVersion": "v1",
      "kind": "ImageStream",
      "metadata": {
        "annotations": {
          "openshift.io/display-name": "PostgreSQL"
        },
        "name": "postgresql"
      },
      "spec": {
        "tags": [
          {
            "annotations": {
              "description": "Provides a PostgreSQL database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of PostgreSQL available on OpenShift, including major versions updates.",
              "iconClass": "icon-postgresql",
              "openshift.io/display-name": "PostgreSQL (Latest)",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "tags": "database,postgresql"
            },
            "from": {
              "kind": "ImageStreamTag",
              "name": "10"
            },
            "name": "latest",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Provides a PostgreSQL 9.2 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.",
              "iconClass": "icon-postgresql",
              "openshift.io/display-name": "PostgreSQL 9.2",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "tags": "hidden,postgresql",
              "version": "9.2"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/openshift/postgresql-92-centos7:latest"
            },
            "name": "9.2",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Provides a PostgreSQL 9.4 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.",
              "iconClass": "icon-postgresql",
              "openshift.io/display-name": "PostgreSQL 9.4",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "tags": "hidden,database,postgresql",
              "version": "9.4"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/centos/postgresql-94-centos7:latest"
            },
            "name": "9.4",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Provides a PostgreSQL 9.5 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.",
              "iconClass": "icon-postgresql",
              "openshift.io/display-name": "PostgreSQL 9.5",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "tags": "database,postgresql",
              "version": "9.5"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/centos/postgresql-95-centos7:latest"
            },
            "name": "9.5",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Provides a PostgreSQL 9.6 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.",
              "iconClass": "icon-postgresql",
              "openshift.io/display-name": "PostgreSQL 9.6",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "tags": "database,postgresql",
              "version": "9.6"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/centos/postgresql-96-centos7:latest"
            },
            "name": "9.6",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Provides a PostgreSQL 10 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.",
              "iconClass": "icon-postgresql",
              "openshift.io/display-name": "PostgreSQL 10",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "tags": "database,postgresql",
              "version": "10"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/centos/postgresql-10-centos7:latest"
            },
            "name": "10",
            "referencePolicy": {
              "type": "Local"
            }
          }
        ]
      }
    },
    {
      "apiVersion": "v1",
      "kind": "ImageStream",
      "metadata": {
        "annotations": {
          "openshift.io/display-name": "Python"
        },
        "name": "python"
      },
      "spec": {
        "tags": [
          {
            "annotations": {
              "description": "Build and run Python applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-python-container/blob/master/3.6/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Python available on OpenShift, including major versions updates.",
              "iconClass": "icon-python",
              "openshift.io/display-name": "Python (Latest)",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/django-ex.git",
              "supports": "python",
              "tags": "builder,python"
            },
            "from": {
              "kind": "ImageStreamTag",
              "name": "3.6"
            },
            "name": "latest",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run Python 3.3 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-python-container/blob/master/3.3/README.md.",
              "iconClass": "icon-python",
              "openshift.io/display-name": "Python 3.3",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/django-ex.git",
              "supports": "python:3.3,python",
              "tags": "hidden,builder,python",
              "version": "3.3"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/openshift/python-33-centos7:latest"
            },
            "name": "3.3",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run Python 2.7 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-python-container/blob/master/2.7/README.md.",
              "iconClass": "icon-python",
              "openshift.io/display-name": "Python 2.7",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/django-ex.git",
              "supports": "python:2.7,python",
              "tags": "builder,python",
              "version": "2.7"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/centos/python-27-centos7:latest"
            },
            "name": "2.7",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run Python 3.4 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-python-container/blob/master/3.4/README.md.",
              "iconClass": "icon-python",
              "openshift.io/display-name": "Python 3.4",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/django-ex.git",
              "supports": "python:3.4,python",
              "tags": "hidden,builder,python",
              "version": "3.4"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/centos/python-34-centos7:latest"
            },
            "name": "3.4",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run Python 3.5 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-python-container/blob/master/3.5/README.md.",
              "iconClass": "icon-python",
              "openshift.io/display-name": "Python 3.5",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/django-ex.git",
              "supports": "python:3.5,python",
              "tags": "builder,python",
              "version": "3.5"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/centos/python-35-centos7:latest"
            },
            "name": "3.5",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run Python 3.6 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-python-container/blob/master/3.6/README.md.",
              "iconClass": "icon-python",
              "openshift.io/display-name": "Python 3.6",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/django-ex.git",
              "supports": "python:3.6,python",
              "tags": "builder,python",
              "version": "3.6"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/centos/python-36-centos7:latest"
            },
            "name": "3.6",
            "referencePolicy": {
              "type": "Local"
            }
          }
        ]
      }
    },
    {
      "apiVersion": "v1",
      "kind": "ImageStream",
      "metadata": {
        "annotations": {
          "openshift.io/display-name": "Redis"
        },
        "name": "redis"
      },
      "spec": {
        "tags": [
          {
            "annotations": {
              "description": "Provides a Redis database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/redis-container/tree/master/3.2/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Redis available on OpenShift, including major versions updates.",
              "iconClass": "icon-redis",
              "openshift.io/display-name": "Redis (Latest)",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "tags": "redis"
            },
            "from": {
              "kind": "ImageStreamTag",
              "name": "3.2"
            },
            "name": "latest",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Provides a Redis 3.2 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/redis-container/tree/master/3.2/README.md.",
              "iconClass": "icon-redis",
              "openshift.io/display-name": "Redis 3.2",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "tags": "redis",
              "version": "3.2"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/centos/redis-32-centos7:latest"
            },
            "name": "3.2",
            "referencePolicy": {
              "type": "Local"
            }
          }
        ]
      }
    },
    {
      "apiVersion": "v1",
      "kind": "ImageStream",
      "metadata": {
        "annotations": {
          "openshift.io/display-name": "Ruby"
        },
        "name": "ruby"
      },
      "spec": {
        "tags": [
          {
            "annotations": {
              "description": "Build and run Ruby applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-ruby-container/tree/master/2.3/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Ruby available on OpenShift, including major versions updates.",
              "iconClass": "icon-ruby",
              "openshift.io/display-name": "Ruby (Latest)",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/ruby-ex.git",
              "supports": "ruby",
              "tags": "builder,ruby"
            },
            "from": {
              "kind": "ImageStreamTag",
              "name": "2.5"
            },
            "name": "latest",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run Ruby 2.5 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-ruby-container/blob/master/2.5/README.md.",
              "iconClass": "icon-ruby",
              "openshift.io/display-name": "Ruby 2.5",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/ruby-ex.git",
              "supports": "ruby:2.5,ruby",
              "tags": "builder,ruby",
              "version": "2.5"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/centos/ruby-25-centos7:latest"
            },
            "name": "2.5",
            "referencePolicy": {
              "type": "Local"
            }
          }
        ]
      }
    },
    {
      "apiVersion": "v1",
      "kind": "ImageStream",
      "metadata": {
        "annotations": {
          "openshift.io/display-name": "WildFly"
        },
        "name": "wildfly"
      },
      "spec": {
        "tags": [
          {
            "annotations": {
              "description": "Build and run WildFly applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/openshift-s2i/s2i-wildfly/blob/master/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of WildFly available on OpenShift, including major versions updates.",
              "iconClass": "icon-wildfly",
              "openshift.io/display-name": "WildFly (Latest)",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git",
              "supports": "jee,java",
              "tags": "builder,wildfly,java"
            },
            "from": {
              "kind": "ImageStreamTag",
              "name": "15.0"
            },
            "name": "latest",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run WildFly 8.1 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/openshift-s2i/s2i-wildfly/blob/master/README.md.",
              "iconClass": "icon-wildfly",
              "openshift.io/display-name": "WildFly 8.1",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git",
              "supports": "wildfly:8.1,jee,java",
              "tags": "builder,wildfly,java",
              "version": "8.1"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/openshift/wildfly-81-centos7:latest"
            },
            "name": "8.1",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run WildFly 9.0 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/openshift-s2i/s2i-wildfly/blob/master/README.md.",
              "iconClass": "icon-wildfly",
              "openshift.io/display-name": "WildFly 9.0",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git",
              "supports": "wildfly:9.0,jee,java",
              "tags": "builder,wildfly,java",
              "version": "9.0"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/openshift/wildfly-90-centos7:latest"
            },
            "name": "9.0",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run WildFly 10.0 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/openshift-s2i/s2i-wildfly/blob/master/README.md.",
              "iconClass": "icon-wildfly",
              "openshift.io/display-name": "WildFly 10.0",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git",
              "supports": "wildfly:10.0,jee,java",
              "tags": "builder,wildfly,java",
              "version": "10.0"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/openshift/wildfly-100-centos7:latest"
            },
            "name": "10.0",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run WildFly 10.1 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/openshift-s2i/s2i-wildfly/blob/master/README.md.",
              "iconClass": "icon-wildfly",
              "openshift.io/display-name": "WildFly 10.1",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git",
              "supports": "wildfly:10.1,jee,java",
              "tags": "builder,wildfly,java",
              "version": "10.1"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/openshift/wildfly-101-centos7:latest"
            },
            "name": "10.1",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run WildFly 11 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/openshift-s2i/s2i-wildfly/blob/master/README.md.",
              "iconClass": "icon-wildfly",
              "openshift.io/display-name": "WildFly 11",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git",
              "supports": "wildfly:11,jee,java",
              "tags": "builder,wildfly,java",
              "version": "11.0"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/openshift/wildfly-110-centos7:latest"
            },
            "name": "11.0",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run WildFly 12 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/openshift-s2i/s2i-wildfly/blob/master/README.md.",
              "iconClass": "icon-wildfly",
              "openshift.io/display-name": "WildFly 12",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git",
              "supports": "wildfly:12,jee,java",
              "tags": "builder,wildfly,java",
              "version": "12.0"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/openshift/wildfly-120-centos7:latest"
            },
            "name": "12.0",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run WildFly 13 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/openshift-s2i/s2i-wildfly/blob/master/README.md.",
              "iconClass": "icon-wildfly",
              "openshift.io/display-name": "WildFly 13",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git",
              "supports": "wildfly:13,jee,java",
              "tags": "builder,wildfly,java",
              "version": "13.0"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/openshift/wildfly-130-centos7:latest"
            },
            "name": "13.0",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run WildFly 14 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/openshift-s2i/s2i-wildfly/blob/master/README.md.",
              "iconClass": "icon-wildfly",
              "openshift.io/display-name": "WildFly 14",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git",
              "supports": "wildfly:14,jee,java",
              "tags": "builder,wildfly,java",
              "version": "14.0"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/openshift/wildfly-140-centos7:latest"
            },
            "name": "14.0",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run WildFly 15 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/openshift-s2i/s2i-wildfly/blob/master/README.md.",
              "iconClass": "icon-wildfly",
              "openshift.io/display-name": "WildFly 15",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git",
              "supports": "wildfly:15,jee,java",
              "tags": "builder,wildfly,java",
              "version": "15.0"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/openshift/wildfly-150-centos7:latest"
            },
            "name": "15.0",
            "referencePolicy": {
              "type": "Local"
            }
          }
        ]
      }
    }
  ]
}
`)

func examplesImageStreamsImageStreamsCentos7JsonBytes() ([]byte, error) {
	return _examplesImageStreamsImageStreamsCentos7Json, nil
}

func examplesImageStreamsImageStreamsCentos7Json() (*asset, error) {
	bytes, err := examplesImageStreamsImageStreamsCentos7JsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "examples/image-streams/image-streams-centos7.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _examplesImageStreamsImageStreamsRhel7Json = []byte(`{
  "kind": "ImageStreamList",
  "apiVersion": "v1",
  "items": [
    {
      "apiVersion": "v1",
      "kind": "ImageStream",
      "metadata": {
        "annotations": {
          "openshift.io/display-name": ".NET Core"
        },
        "name": "dotnet"
      },
      "spec": {
        "tags": [
          {
            "annotations": {
              "description": "Build and run .NET Core applications on RHEL 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore/tree/master/2.2/build/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of .NET Core available on OpenShift, including major versions updates.",
              "iconClass": "icon-dotnet",
              "openshift.io/display-name": ".NET Core (Latest)",
              "sampleContextDir": "app",
              "sampleRef": "dotnetcore-2.2",
              "sampleRepo": "https://github.com/redhat-developer/s2i-dotnetcore-ex.git",
              "supports": "dotnet",
              "tags": "builder,.net,dotnet,dotnetcore"
            },
            "from": {
              "kind": "ImageStreamTag",
              "name": "2.2"
            },
            "name": "latest",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run .NET Core 2.2 applications on RHEL 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore/tree/master/2.2/build/README.md.",
              "iconClass": "icon-dotnet",
              "openshift.io/display-name": ".NET Core 2.2",
              "sampleContextDir": "app",
              "sampleRef": "dotnetcore-2.2",
              "sampleRepo": "https://github.com/redhat-developer/s2i-dotnetcore-ex.git",
              "supports": "dotnet:2.2,dotnet",
              "tags": "builder,.net,dotnet,dotnetcore,rh-dotnet22",
              "version": "2.2"
            },
            "from": {
              "kind": "DockerImage",
              "name": "registry.redhat.io/dotnet/dotnet-22-rhel7:2.2"
            },
            "name": "2.2",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run .NET Core 2.1 applications on RHEL 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore/tree/master/2.1/build/README.md.",
              "iconClass": "icon-dotnet",
              "openshift.io/display-name": ".NET Core 2.1",
              "sampleContextDir": "app",
              "sampleRef": "dotnetcore-2.1",
              "sampleRepo": "https://github.com/redhat-developer/s2i-dotnetcore-ex.git",
              "supports": "dotnet:2.1,dotnet",
              "tags": "builder,.net,dotnet,dotnetcore,rh-dotnet21",
              "version": "2.1"
            },
            "from": {
              "kind": "DockerImage",
              "name": "registry.redhat.io/dotnet/dotnet-21-rhel7:2.1"
            },
            "name": "2.1",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "RETIRED: Build and run .NET Core 2.0 applications on RHEL 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore/tree/master/2.0/build/README.md.",
              "iconClass": "icon-dotnet",
              "openshift.io/display-name": ".NET Core 2.0",
              "sampleContextDir": "app",
              "sampleRef": "dotnetcore-2.0",
              "sampleRepo": "https://github.com/redhat-developer/s2i-dotnetcore-ex.git",
              "supports": "dotnet:2.0,dotnet",
              "tags": "hidden,builder,.net,dotnet,dotnetcore,rh-dotnet20",
              "version": "2.0"
            },
            "from": {
              "kind": "DockerImage",
              "name": "registry.redhat.io/dotnet/dotnet-20-rhel7:2.0"
            },
            "name": "2.0",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run .NET Core 1.1 applications on RHEL 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore/tree/master/1.1/README.md.",
              "iconClass": "icon-dotnet",
              "openshift.io/display-name": ".NET Core 1.1",
              "sampleContextDir": "app",
              "sampleRef": "dotnetcore-1.1",
              "sampleRepo": "https://github.com/redhat-developer/s2i-dotnetcore-ex.git",
              "supports": "dotnet:1.1,dotnet",
              "tags": "builder,.net,dotnet,dotnetcore,rh-dotnetcore11",
              "version": "1.1"
            },
            "from": {
              "kind": "DockerImage",
              "name": "registry.redhat.io/dotnet/dotnetcore-11-rhel7:1.1"
            },
            "name": "1.1",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run .NET Core 1.0 applications on RHEL 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore/tree/master/1.0/README.md.",
              "iconClass": "icon-dotnet",
              "openshift.io/display-name": ".NET Core 1.0",
              "sampleContextDir": "app",
              "sampleRef": "dotnetcore-1.0",
              "sampleRepo": "https://github.com/redhat-developer/s2i-dotnetcore-ex.git",
              "supports": "dotnet:1.0,dotnet",
              "tags": "builder,.net,dotnet,dotnetcore,rh-dotnetcore10",
              "version": "1.0"
            },
            "from": {
              "kind": "DockerImage",
              "name": "registry.redhat.io/dotnet/dotnetcore-10-rhel7:1.0"
            },
            "name": "1.0",
            "referencePolicy": {
              "type": "Local"
            }
          }
        ]
      }
    },
    {
      "apiVersion": "v1",
      "kind": "ImageStream",
      "metadata": {
        "annotations": {
          "openshift.io/display-name": "Apache HTTP Server (httpd)"
        },
        "name": "httpd"
      },
      "spec": {
        "tags": [
          {
            "annotations": {
              "description": "Build and serve static content via Apache HTTP Server (httpd) on RHEL 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/httpd-container/blob/master/2.4/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Httpd available on OpenShift, including major versions updates.",
              "iconClass": "icon-apache",
              "openshift.io/display-name": "Apache HTTP Server (Latest)",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/httpd-ex.git",
              "supports": "httpd",
              "tags": "builder,httpd"
            },
            "from": {
              "kind": "ImageStreamTag",
              "name": "2.4"
            },
            "name": "latest",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and serve static content via Apache HTTP Server (httpd) 2.4 on RHEL 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/httpd-container/blob/master/2.4/README.md.",
              "iconClass": "icon-apache",
              "openshift.io/display-name": "Apache HTTP Server 2.4",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/httpd-ex.git",
              "supports": "httpd",
              "tags": "builder,httpd",
              "version": "2.4"
            },
            "from": {
              "kind": "DockerImage",
              "name": "registry.redhat.io/rhscl/httpd-24-rhel7"
            },
            "name": "2.4",
            "referencePolicy": {
              "type": "Local"
            }
          }
        ]
      }
    },
    {
      "apiVersion": "v1",
      "kind": "ImageStream",
      "metadata": {
        "annotations": {
          "openshift.io/display-name": "Jenkins"
        },
        "name": "jenkins"
      },
      "spec": {
        "tags": [
          {
            "annotations": {
              "description": "Provides a Jenkins server on RHEL 7. For more information about using this container image, including OpenShift considerations, see https://github.com/openshift/jenkins/blob/master/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Jenkins available on OpenShift, including major versions updates.",
              "iconClass": "icon-jenkins",
              "openshift.io/display-name": "Jenkins (Latest)",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "tags": "jenkins"
            },
            "from": {
              "kind": "ImageStreamTag",
              "name": "2"
            },
            "name": "latest",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Provides a Jenkins 2.X server on RHEL 7. For more information about using this container image, including OpenShift considerations, see https://github.com/openshift/jenkins/blob/master/README.md.",
              "iconClass": "icon-jenkins",
              "openshift.io/display-name": "Jenkins 2.X",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "tags": "jenkins",
              "version": "2.x"
            },
            "from": {
              "kind": "DockerImage",
              "name": "registry.redhat.io/openshift/jenkins-2-rhel7:v4.0"
            },
            "name": "2",
            "referencePolicy": {
              "type": "Local"
            }
          }
        ]
      }
    },
    {
      "apiVersion": "v1",
      "kind": "ImageStream",
      "metadata": {
        "annotations": {
          "openshift.io/display-name": "MariaDB"
        },
        "name": "mariadb"
      },
      "spec": {
        "tags": [
          {
            "annotations": {
              "description": "Provides a MariaDB database on RHEL 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/tree/master/10.2/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of MariaDB available on OpenShift, including major versions updates.",
              "iconClass": "icon-mariadb",
              "openshift.io/display-name": "MariaDB (Latest)",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "tags": "database,mariadb"
            },
            "from": {
              "kind": "ImageStreamTag",
              "name": "10.2"
            },
            "name": "latest",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Provides a MariaDB 10.1 database on RHEL 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/tree/master/10.1/README.md.",
              "iconClass": "icon-mariadb",
              "openshift.io/display-name": "MariaDB 10.1",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "tags": "database,mariadb",
              "version": "10.1"
            },
            "from": {
              "kind": "DockerImage",
              "name": "registry.redhat.io/rhscl/mariadb-101-rhel7:latest"
            },
            "name": "10.1",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Provides a MariaDB 10.2 database on RHEL 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/tree/master/10.2/README.md.",
              "iconClass": "icon-mariadb",
              "openshift.io/display-name": "MariaDB 10.2",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "tags": "database,mariadb",
              "version": "10.2"
            },
            "from": {
              "kind": "DockerImage",
              "name": "registry.redhat.io/rhscl/mariadb-102-rhel7:latest"
            },
            "name": "10.2",
            "referencePolicy": {
              "type": "Local"
            }
          }
        ]
      }
    },
    {
      "apiVersion": "v1",
      "kind": "ImageStream",
      "metadata": {
        "annotations": {
          "openshift.io/display-name": "MongoDB"
        },
        "name": "mongodb"
      },
      "spec": {
        "tags": [
          {
            "annotations": {
              "description": "Provides a MongoDB database on RHEL 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mongodb-container/tree/master/3.4/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of MongoDB available on OpenShift, including major versions updates.",
              "iconClass": "icon-mongodb",
              "openshift.io/display-name": "MongoDB (Latest)",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "tags": "mongodb"
            },
            "from": {
              "kind": "ImageStreamTag",
              "name": "3.6"
            },
            "name": "latest",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Provides a MongoDB 2.4 database on RHEL 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mongodb-container/tree/master/2.4/README.md.",
              "iconClass": "icon-mongodb",
              "openshift.io/display-name": "MongoDB 2.4",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "tags": "hidden,mongodb",
              "version": "2.4"
            },
            "from": {
              "kind": "DockerImage",
              "name": "registry.redhat.io/openshift3/mongodb-24-rhel7:latest"
            },
            "name": "2.4",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Provides a MongoDB 2.6 database on RHEL 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mongodb-container/tree/master/2.6/README.md.",
              "iconClass": "icon-mongodb",
              "openshift.io/display-name": "MongoDB 2.6",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "tags": "hidden,database,mongodb",
              "version": "2.6"
            },
            "from": {
              "kind": "DockerImage",
              "name": "registry.redhat.io/rhscl/mongodb-26-rhel7:latest"
            },
            "name": "2.6",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Provides a MongoDB 3.2 database on RHEL 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mongodb-container/tree/master/3.2/README.md.",
              "iconClass": "icon-mongodb",
              "openshift.io/display-name": "MongoDB 3.2",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "tags": "database,mongodb",
              "version": "3.2"
            },
            "from": {
              "kind": "DockerImage",
              "name": "registry.redhat.io/rhscl/mongodb-32-rhel7:latest"
            },
            "name": "3.2",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Provides a MongoDB 3.4 database on RHEL 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mongodb-container/tree/master/3.4/README.md.",
              "iconClass": "icon-mongodb",
              "openshift.io/display-name": "MongoDB 3.4",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "tags": "database,mongodb",
              "version": "3.4"
            },
            "from": {
              "kind": "DockerImage",
              "name": "registry.redhat.io/rhscl/mongodb-34-rhel7:latest"
            },
            "name": "3.4",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Provides a MongoDB 3.6 database on RHEL 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mongodb-container/tree/master/3.6/README.md.",
              "iconClass": "icon-mongodb",
              "openshift.io/display-name": "MongoDB 3.6",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "tags": "database,mongodb",
              "version": "3.6"
            },
            "from": {
              "kind": "DockerImage",
              "name": "registry.redhat.io/rhscl/mongodb-36-rhel7:latest"
            },
            "name": "3.6",
            "referencePolicy": {
              "type": "Local"
            }
          }
        ]
      }
    },
    {
      "apiVersion": "v1",
      "kind": "ImageStream",
      "metadata": {
        "annotations": {
          "openshift.io/display-name": "MySQL"
        },
        "name": "mysql"
      },
      "spec": {
        "tags": [
          {
            "annotations": {
              "description": "Provides a MySQL database on RHEL 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of MySQL available on OpenShift, including major versions updates.",
              "iconClass": "icon-mysql-database",
              "openshift.io/display-name": "MySQL (Latest)",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "tags": "mysql"
            },
            "from": {
              "kind": "ImageStreamTag",
              "name": "5.7"
            },
            "name": "latest",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Provides a MySQL 5.5 database on RHEL 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/README.md.",
              "iconClass": "icon-mysql-database",
              "openshift.io/display-name": "MySQL 5.5",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "tags": "hidden,mysql",
              "version": "5.5"
            },
            "from": {
              "kind": "DockerImage",
              "name": "registry.redhat.io/openshift3/mysql-55-rhel7:latest"
            },
            "name": "5.5",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Provides a MySQL 5.6 database on RHEL 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/README.md.",
              "iconClass": "icon-mysql-database",
              "openshift.io/display-name": "MySQL 5.6",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "tags": "hidden,mysql",
              "version": "5.6"
            },
            "from": {
              "kind": "DockerImage",
              "name": "registry.redhat.io/rhscl/mysql-56-rhel7:latest"
            },
            "name": "5.6",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Provides a MySQL 5.7 database on RHEL 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/README.md.",
              "iconClass": "icon-mysql-database",
              "openshift.io/display-name": "MySQL 5.7",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "tags": "mysql",
              "version": "5.7"
            },
            "from": {
              "kind": "DockerImage",
              "name": "registry.redhat.io/rhscl/mysql-57-rhel7:latest"
            },
            "name": "5.7",
            "referencePolicy": {
              "type": "Local"
            }
          }
        ]
      }
    },
    {
      "apiVersion": "v1",
      "kind": "ImageStream",
      "metadata": {
        "annotations": {
          "openshift.io/display-name": "Nginx HTTP server and a reverse proxy (nginx)"
        },
        "name": "nginx"
      },
      "spec": {
        "tags": [
          {
            "annotations": {
              "description": "Build and serve static content via Nginx HTTP server and a reverse proxy (nginx) on RHEL 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/nginx-container/blob/master/1.8/README.md.",
              "iconClass": "icon-nginx",
              "openshift.io/display-name": "Nginx HTTP server and a reverse proxy 1.8",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/nginx-ex.git",
              "supports": "nginx",
              "tags": "builder,nginx",
              "version": "1.8"
            },
            "from": {
              "kind": "DockerImage",
              "name": "registry.redhat.io/rhscl/nginx-18-rhel7:latest"
            },
            "name": "1.8",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and serve static content via Nginx HTTP server and a reverse proxy (nginx) on RHEL 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/nginx-container/blob/master/1.10/README.md.",
              "iconClass": "icon-nginx",
              "openshift.io/display-name": "Nginx HTTP server and a reverse proxy 1.10",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/nginx-ex.git",
              "supports": "nginx",
              "tags": "builder,nginx",
              "version": "1.10"
            },
            "from": {
              "kind": "DockerImage",
              "name": "registry.redhat.io/rhscl/nginx-110-rhel7:latest"
            },
            "name": "1.10",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and serve static content via Nginx HTTP server and a reverse proxy (nginx) on RHEL 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/nginx-container/blob/master/1.12/README.md.",
              "iconClass": "icon-nginx",
              "openshift.io/display-name": "Nginx HTTP server and a reverse proxy 1.12",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/nginx-ex.git",
              "supports": "nginx",
              "tags": "builder,nginx",
              "version": "1.12"
            },
            "from": {
              "kind": "DockerImage",
              "name": "registry.redhat.io/rhscl/nginx-112-rhel7:latest"
            },
            "name": "1.12",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and serve static content via Nginx HTTP server and a reverse proxy (nginx) on RHEL 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/nginx-container/blob/master/1.12/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Nginx available on OpenShift, including major versions updates.",
              "iconClass": "icon-nginx",
              "openshift.io/display-name": "Nginx HTTP server and a reverse proxy (Latest)",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/nginx-ex.git",
              "supports": "nginx",
              "tags": "builder,nginx"
            },
            "from": {
              "kind": "ImageStreamTag",
              "name": "1.12"
            },
            "name": "latest",
            "referencePolicy": {
              "type": "Local"
            }
          }
        ]
      }
    },
    {
      "apiVersion": "v1",
      "kind": "ImageStream",
      "metadata": {
        "annotations": {
          "openshift.io/display-name": "Node.js"
        },
        "name": "nodejs"
      },
      "spec": {
        "tags": [
          {
            "annotations": {
              "description": "Build and run Node.js 10 applications on RHEL 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/nodeshift/centos7-s2i-nodejs.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Node.js available on OpenShift, including major versions updates.",
              "iconClass": "icon-nodejs",
              "openshift.io/display-name": "Node.js (Latest)",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/nodejs-ex.git",
              "supports": "nodejs",
              "tags": "builder,nodejs"
            },
            "from": {
              "kind": "ImageStreamTag",
              "name": "10"
            },
            "name": "latest",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "DEPRECATED: Build and run Node.js 0.10 applications on RHEL 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-nodejs-container/blob/master/0.10/README.md.",
              "iconClass": "icon-nodejs",
              "openshift.io/display-name": "Node.js 0.10",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/nodejs-ex.git",
              "supports": "nodejs:0.10,nodejs:0.1,nodejs",
              "tags": "hidden,nodejs",
              "version": "0.10"
            },
            "from": {
              "kind": "DockerImage",
              "name": "registry.redhat.io/openshift3/nodejs-010-rhel7:latest"
            },
            "name": "0.10",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run Node.js 4 applications on RHEL 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-nodejs-container/blob/master/4/README.md.",
              "iconClass": "icon-nodejs",
              "openshift.io/display-name": "Node.js 4",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/nodejs-ex.git",
              "supports": "nodejs:4,nodejs",
              "tags": "hidden,builder,nodejs",
              "version": "4"
            },
            "from": {
              "kind": "DockerImage",
              "name": "registry.redhat.io/rhscl/nodejs-4-rhel7:latest"
            },
            "name": "4",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run Node.js 6 applications on RHEL 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-nodejs-container.",
              "iconClass": "icon-nodejs",
              "openshift.io/display-name": "Node.js 6",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/nodejs-ex.git",
              "supports": "nodejs:6,nodejs",
              "tags": "builder,nodejs",
              "version": "6"
            },
            "from": {
              "kind": "DockerImage",
              "name": "registry.redhat.io/rhscl/nodejs-6-rhel7:latest"
            },
            "name": "6",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run Node.js 8 applications on RHEL 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-nodejs-container.",
              "iconClass": "icon-nodejs",
              "openshift.io/display-name": "Node.js 8",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/nodejs-ex.git",
              "tags": "builder,nodejs",
              "version": "8"
            },
            "from": {
              "kind": "DockerImage",
              "name": "registry.redhat.io/rhscl/nodejs-8-rhel7:latest"
            },
            "name": "8",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run Node.js 8 applications on RHEL 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/nodeshift/centos7-s2i-nodejs.",
              "iconClass": "icon-nodejs",
              "openshift.io/display-name": "OpenShift Application Runtimes Node.js 8",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/nodejs-ex.git",
              "tags": "builder,nodejs",
              "version": "8"
            },
            "from": {
              "kind": "DockerImage",
              "name": "registry.redhat.io/rhoar-nodejs/nodejs-8"
            },
            "name": "8-RHOAR",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run Node.js 10 applications on RHEL 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/nodeshift/centos7-s2i-nodejs.",
              "iconClass": "icon-nodejs",
              "openshift.io/display-name": "OpenShift Application Runtimes Node.js 10",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/nodejs-ex.git",
              "tags": "builder,nodejs",
              "version": "10"
            },
            "from": {
              "kind": "DockerImage",
              "name": "registry.redhat.io/rhoar-nodejs/nodejs-10"
            },
            "name": "10",
            "referencePolicy": {
              "type": "Local"
            }
          }
        ]
      }
    },
    {
      "apiVersion": "v1",
      "kind": "ImageStream",
      "metadata": {
        "annotations": {
          "openshift.io/display-name": "Perl"
        },
        "name": "perl"
      },
      "spec": {
        "tags": [
          {
            "annotations": {
              "description": "Build and run Perl applications on RHEL 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-perl-container/blob/master/5.20/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Perl available on OpenShift, including major versions updates.",
              "iconClass": "icon-perl",
              "openshift.io/display-name": "Perl (Latest)",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/dancer-ex.git",
              "supports": "perl",
              "tags": "builder,perl"
            },
            "from": {
              "kind": "ImageStreamTag",
              "name": "5.26"
            },
            "name": "latest",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run Perl 5.16 applications on RHEL 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-perl-container/blob/master/5.16/README.md.",
              "iconClass": "icon-perl",
              "openshift.io/display-name": "Perl 5.16",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/dancer-ex.git",
              "supports": "perl:5.16,perl",
              "tags": "hidden,builder,perl",
              "version": "5.16"
            },
            "from": {
              "kind": "DockerImage",
              "name": "registry.redhat.io/openshift3/perl-516-rhel7:latest"
            },
            "name": "5.16",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run Perl 5.20 applications on RHEL 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-perl-container/blob/master/5.20/README.md.",
              "iconClass": "icon-perl",
              "openshift.io/display-name": "Perl 5.20",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/dancer-ex.git",
              "supports": "perl:5.20,perl",
              "tags": "hidden,builder,perl",
              "version": "5.20"
            },
            "from": {
              "kind": "DockerImage",
              "name": "registry.redhat.io/rhscl/perl-520-rhel7:latest"
            },
            "name": "5.20",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run Perl 5.24 applications on RHEL 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-perl-container/blob/master/5.24/README.md.",
              "iconClass": "icon-perl",
              "openshift.io/display-name": "Perl 5.24",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/dancer-ex.git",
              "supports": "perl:5.24,perl",
              "tags": "builder,perl",
              "version": "5.24"
            },
            "from": {
              "kind": "DockerImage",
              "name": "registry.redhat.io/rhscl/perl-524-rhel7:latest"
            },
            "name": "5.24",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run Perl 5.26 applications on RHEL 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-perl-container/blob/master/5.26/README.md.",
              "iconClass": "icon-perl",
              "openshift.io/display-name": "Perl 5.26",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/dancer-ex.git",
              "supports": "perl:5.26,perl",
              "tags": "builder,perl",
              "version": "5.26"
            },
            "from": {
              "kind": "DockerImage",
              "name": "registry.redhat.io/rhscl/perl-526-rhel7:latest"
            },
            "name": "5.26",
            "referencePolicy": {
              "type": "Local"
            }
          }
        ]
      }
    },
    {
      "apiVersion": "v1",
      "kind": "ImageStream",
      "metadata": {
        "annotations": {
          "openshift.io/display-name": "PHP"
        },
        "name": "php"
      },
      "spec": {
        "tags": [
          {
            "annotations": {
              "description": "Build and run PHP applications on RHEL 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-php-container/blob/master/7.1/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of PHP available on OpenShift, including major versions updates.",
              "iconClass": "icon-php",
              "openshift.io/display-name": "PHP (Latest)",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/cakephp-ex.git",
              "supports": "php",
              "tags": "builder,php"
            },
            "from": {
              "kind": "ImageStreamTag",
              "name": "7.1"
            },
            "name": "latest",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run PHP 5.5 applications on RHEL 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-php-container/blob/master/5.5/README.md.",
              "iconClass": "icon-php",
              "openshift.io/display-name": "PHP 5.5",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/cakephp-ex.git",
              "supports": "php:5.5,php",
              "tags": "hidden,builder,php",
              "version": "5.5"
            },
            "from": {
              "kind": "DockerImage",
              "name": "registry.redhat.io/openshift3/php-55-rhel7:latest"
            },
            "name": "5.5",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run PHP 5.6 applications on RHEL 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-php-container/blob/master/5.6/README.md.",
              "iconClass": "icon-php",
              "openshift.io/display-name": "PHP 5.6",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/cakephp-ex.git",
              "supports": "php:5.6,php",
              "tags": "hidden,builder,php",
              "version": "5.6"
            },
            "from": {
              "kind": "DockerImage",
              "name": "registry.redhat.io/rhscl/php-56-rhel7:latest"
            },
            "name": "5.6",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run PHP 7.0 applications on RHEL 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-php-container/blob/master/7.0/README.md.",
              "iconClass": "icon-php",
              "openshift.io/display-name": "PHP 7.0",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/cakephp-ex.git",
              "supports": "php:7.0,php",
              "tags": "builder,php",
              "version": "7.0"
            },
            "from": {
              "kind": "DockerImage",
              "name": "registry.redhat.io/rhscl/php-70-rhel7:latest"
            },
            "name": "7.0",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run PHP 7.1 applications on RHEL 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-php-container/blob/master/7.1/README.md.",
              "iconClass": "icon-php",
              "openshift.io/display-name": "PHP 7.1",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/cakephp-ex.git",
              "supports": "php:7.1,php",
              "tags": "builder,php",
              "version": "7.1"
            },
            "from": {
              "kind": "DockerImage",
              "name": "registry.redhat.io/rhscl/php-71-rhel7:latest"
            },
            "name": "7.1",
            "referencePolicy": {
              "type": "Local"
            }
          }
        ]
      }
    },
    {
      "apiVersion": "v1",
      "kind": "ImageStream",
      "metadata": {
        "annotations": {
          "openshift.io/display-name": "PostgreSQL"
        },
        "name": "postgresql"
      },
      "spec": {
        "tags": [
          {
            "annotations": {
              "description": "Provides a PostgreSQL database on RHEL 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of PostgreSQL available on OpenShift, including major versions updates.",
              "iconClass": "icon-postgresql",
              "openshift.io/display-name": "PostgreSQL (Latest)",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "tags": "database,postgresql"
            },
            "from": {
              "kind": "ImageStreamTag",
              "name": "10"
            },
            "name": "latest",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Provides a PostgreSQL 9.2 database on RHEL 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.",
              "iconClass": "icon-postgresql",
              "openshift.io/display-name": "PostgreSQL 9.2",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "tags": "hidden,postgresql",
              "version": "9.2"
            },
            "from": {
              "kind": "DockerImage",
              "name": "registry.redhat.io/openshift3/postgresql-92-rhel7:latest"
            },
            "name": "9.2",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Provides a PostgreSQL 9.4 database on RHEL 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.",
              "iconClass": "icon-postgresql",
              "openshift.io/display-name": "PostgreSQL 9.4",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "tags": "hidden,database,postgresql",
              "version": "9.4"
            },
            "from": {
              "kind": "DockerImage",
              "name": "registry.redhat.io/rhscl/postgresql-94-rhel7:latest"
            },
            "name": "9.4",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Provides a PostgreSQL 9.5 database on RHEL 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.",
              "iconClass": "icon-postgresql",
              "openshift.io/display-name": "PostgreSQL 9.5",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "tags": "database,postgresql",
              "version": "9.5"
            },
            "from": {
              "kind": "DockerImage",
              "name": "registry.redhat.io/rhscl/postgresql-95-rhel7:latest"
            },
            "name": "9.5",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Provides a PostgreSQL 9.6 database on RHEL 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.",
              "iconClass": "icon-postgresql",
              "openshift.io/display-name": "PostgreSQL (Ephemeral) 9.6",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "tags": "database,postgresql",
              "version": "9.6"
            },
            "from": {
              "kind": "DockerImage",
              "name": "registry.redhat.io/rhscl/postgresql-96-rhel7:latest"
            },
            "name": "9.6",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Provides a PostgreSQL 10 database on RHEL 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.",
              "iconClass": "icon-postgresql",
              "openshift.io/display-name": "PostgreSQL (Ephemeral) 10",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "tags": "database,postgresql",
              "version": "10"
            },
            "from": {
              "kind": "DockerImage",
              "name": "registry.redhat.io/rhscl/postgresql-10-rhel7:latest"
            },
            "name": "10",
            "referencePolicy": {
              "type": "Local"
            }
          }
        ]
      }
    },
    {
      "apiVersion": "v1",
      "kind": "ImageStream",
      "metadata": {
        "annotations": {
          "openshift.io/display-name": "Python"
        },
        "name": "python"
      },
      "spec": {
        "tags": [
          {
            "annotations": {
              "description": "Build and run Python applications on RHEL 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-python-container/blob/master/3.6/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Python available on OpenShift, including major versions updates.",
              "iconClass": "icon-python",
              "openshift.io/display-name": "Python (Latest)",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/django-ex.git",
              "supports": "python",
              "tags": "builder,python"
            },
            "from": {
              "kind": "ImageStreamTag",
              "name": "3.6"
            },
            "name": "latest",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run Python 3.3 applications on RHEL 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-python-container/blob/master/3.3/README.md.",
              "iconClass": "icon-python",
              "openshift.io/display-name": "Python 3.3",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/django-ex.git",
              "supports": "python:3.3,python",
              "tags": "hidden,builder,python",
              "version": "3.3"
            },
            "from": {
              "kind": "DockerImage",
              "name": "registry.redhat.io/openshift3/python-33-rhel7:latest"
            },
            "name": "3.3",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run Python 2.7 applications on RHEL 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-python-container/blob/master/2.7/README.md.",
              "iconClass": "icon-python",
              "openshift.io/display-name": "Python 2.7",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/django-ex.git",
              "supports": "python:2.7,python",
              "tags": "builder,python",
              "version": "2.7"
            },
            "from": {
              "kind": "DockerImage",
              "name": "registry.redhat.io/rhscl/python-27-rhel7:latest"
            },
            "name": "2.7",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run Python 3.4 applications on RHEL 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-python-container/blob/master/3.4/README.md.",
              "iconClass": "icon-python",
              "openshift.io/display-name": "Python 3.4",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/django-ex.git",
              "supports": "python:3.4,python",
              "tags": "hidden,builder,python",
              "version": "3.4"
            },
            "from": {
              "kind": "DockerImage",
              "name": "registry.redhat.io/rhscl/python-34-rhel7:latest"
            },
            "name": "3.4",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run Python 3.5 applications on RHEL 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-python-container/blob/master/3.5/README.md.",
              "iconClass": "icon-python",
              "openshift.io/display-name": "Python 3.5",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/django-ex.git",
              "supports": "python:3.5,python",
              "tags": "builder,python",
              "version": "3.5"
            },
            "from": {
              "kind": "DockerImage",
              "name": "registry.redhat.io/rhscl/python-35-rhel7:latest"
            },
            "name": "3.5",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run Python 3.6 applications on RHEL 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-python-container/blob/master/3.6/README.md.",
              "iconClass": "icon-python",
              "openshift.io/display-name": "Python 3.6",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/django-ex.git",
              "supports": "python:3.6,python",
              "tags": "builder,python",
              "version": "3.6"
            },
            "from": {
              "kind": "DockerImage",
              "name": "registry.redhat.io/rhscl/python-36-rhel7:latest"
            },
            "name": "3.6",
            "referencePolicy": {
              "type": "Local"
            }
          }
        ]
      }
    },
    {
      "apiVersion": "v1",
      "kind": "ImageStream",
      "metadata": {
        "annotations": {
          "openshift.io/display-name": "Redis"
        },
        "name": "redis"
      },
      "spec": {
        "tags": [
          {
            "annotations": {
              "description": "Provides a Redis database on RHEL 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/redis-container/tree/master/3.2/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Redis available on OpenShift, including major versions updates.",
              "iconClass": "icon-redis",
              "openshift.io/display-name": "Redis (Latest)",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "tags": "redis"
            },
            "from": {
              "kind": "ImageStreamTag",
              "name": "3.2"
            },
            "name": "latest",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Provides a Redis 3.2 database on RHEL 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/redis-container/tree/master/3.2/README.md.",
              "iconClass": "icon-redis",
              "openshift.io/display-name": "Redis 3.2",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "tags": "redis",
              "version": "3.2"
            },
            "from": {
              "kind": "DockerImage",
              "name": "registry.redhat.io/rhscl/redis-32-rhel7:latest"
            },
            "name": "3.2",
            "referencePolicy": {
              "type": "Local"
            }
          }
        ]
      }
    },
    {
      "apiVersion": "v1",
      "kind": "ImageStream",
      "metadata": {
        "annotations": {
          "openshift.io/display-name": "Ruby"
        },
        "name": "ruby"
      },
      "spec": {
        "tags": [
          {
            "annotations": {
              "description": "Build and run Ruby applications on RHEL 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-ruby-container/tree/master/2.3/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Ruby available on OpenShift, including major versions updates.",
              "iconClass": "icon-ruby",
              "openshift.io/display-name": "Ruby (Latest)",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/ruby-ex.git",
              "supports": "ruby",
              "tags": "builder,ruby"
            },
            "from": {
              "kind": "ImageStreamTag",
              "name": "2.5"
            },
            "name": "latest",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run Ruby 2.0 applications on RHEL 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-ruby-container/tree/master/2.0/README.md.",
              "iconClass": "icon-ruby",
              "openshift.io/display-name": "Ruby 2.0",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/ruby-ex.git",
              "supports": "ruby:2.0,ruby",
              "tags": "hidden,builder,ruby",
              "version": "2.0"
            },
            "from": {
              "kind": "DockerImage",
              "name": "registry.redhat.io/openshift3/ruby-20-rhel7:latest"
            },
            "name": "2.0",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run Ruby 2.2 applications on RHEL 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-ruby-container/tree/master/2.2/README.md.",
              "iconClass": "icon-ruby",
              "openshift.io/display-name": "Ruby 2.2",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/ruby-ex.git",
              "supports": "ruby:2.2,ruby",
              "tags": "hidden,builder,ruby",
              "version": "2.2"
            },
            "from": {
              "kind": "DockerImage",
              "name": "registry.redhat.io/rhscl/ruby-22-rhel7:latest"
            },
            "name": "2.2",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run Ruby 2.3 applications on RHEL 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-ruby-container/blob/master/2.3/README.md.",
              "iconClass": "icon-ruby",
              "openshift.io/display-name": "Ruby 2.3",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/ruby-ex.git",
              "supports": "ruby:2.3,ruby",
              "tags": "builder,ruby",
              "version": "2.3"
            },
            "from": {
              "kind": "DockerImage",
              "name": "registry.redhat.io/rhscl/ruby-23-rhel7:latest"
            },
            "name": "2.3",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run Ruby 2.4 applications on RHEL 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-ruby-container/blob/master/2.4/README.md.",
              "iconClass": "icon-ruby",
              "openshift.io/display-name": "Ruby 2.4",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/ruby-ex.git",
              "supports": "ruby:2.4,ruby",
              "tags": "builder,ruby",
              "version": "2.4"
            },
            "from": {
              "kind": "DockerImage",
              "name": "registry.redhat.io/rhscl/ruby-24-rhel7:latest"
            },
            "name": "2.4",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run Ruby 2.5 applications on RHEL 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-ruby-container/blob/master/2.5/README.md.",
              "iconClass": "icon-ruby",
              "openshift.io/display-name": "Ruby 2.5",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/ruby-ex.git",
              "supports": "ruby:2.5,ruby",
              "tags": "builder,ruby",
              "version": "2.5"
            },
            "from": {
              "kind": "DockerImage",
              "name": "registry.redhat.io/rhscl/ruby-25-rhel7:latest"
            },
            "name": "2.5",
            "referencePolicy": {
              "type": "Local"
            }
          }
        ]
      }
    }
  ]
}
`)

func examplesImageStreamsImageStreamsRhel7JsonBytes() ([]byte, error) {
	return _examplesImageStreamsImageStreamsRhel7Json, nil
}

func examplesImageStreamsImageStreamsRhel7Json() (*asset, error) {
	bytes, err := examplesImageStreamsImageStreamsRhel7JsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "examples/image-streams/image-streams-rhel7.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _examplesSampleAppApplicationTemplateDockerbuildJson = []byte(`{
  "kind": "Template",
  "apiVersion": "v1",
  "metadata": {
    "name": "ruby-helloworld-sample",
    "annotations": {
      "description": "This example shows how to create a simple ruby application in openshift origin v3",
      "iconClass": "icon-ruby",
      "tags": "instant-app,ruby,mysql"
    }
  },
  "objects": [
    {
      "kind": "Secret",
      "apiVersion": "v1",
      "metadata": {
        "name": "dbsecret"
      },
      "stringData" : {
        "mysql-user" : "${MYSQL_USER}",
        "mysql-password" : "${MYSQL_PASSWORD}"
      }
    },
    {
      "kind": "Service",
      "apiVersion": "v1",
      "metadata": {
        "name": "frontend"
      },
      "spec": {
        "ports": [
          {
            "name": "web",
            "protocol": "TCP",
            "port": 5432,
            "targetPort": 8080,
            "nodePort": 0
          }
        ],
        "selector": {
          "name": "frontend"
        },
        "type": "ClusterIP",
        "sessionAffinity": "None"
      },
      "status": {
        "loadBalancer": {}
      }
    },
    {
      "kind": "Route",
      "apiVersion": "v1",
      "metadata": {
        "name": "route-edge",
        "annotations": {
          "template.openshift.io/expose-uri": "http://{.spec.host}{.spec.path}"
        }
      },
      "spec": {
        "host": "www.example.com",
        "to": {
          "kind": "Service",
          "name": "frontend"
        },
        "tls": {
          "termination": "edge"
        }
      },
      "status": {}
    },
    {
      "kind": "ImageStream",
      "apiVersion": "v1",
      "metadata": {
        "name": "origin-ruby-sample"
      },
      "spec": {},
      "status": {
        "dockerImageRepository": ""
      }
    },
    {
      "kind": "ImageStream",
      "apiVersion": "v1",
      "metadata": {
        "name": "ruby-25-centos7"
      },
      "spec": {
        "tags": [
          {
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/centos/ruby-25-centos7:latest"
            },
            "name": "latest"
          }
        ]
      }
    },
    {
      "kind": "BuildConfig",
      "apiVersion": "v1",
      "metadata": {
        "name": "ruby-sample-build",
        "labels": {
          "name": "ruby-sample-build"
        },
        "annotations": {
          "template.alpha.openshift.io/wait-for-ready": "true"
        }
      },
      "spec": {
        "triggers": [
          {
            "type": "GitHub",
            "github": {
              "secret": "secret101"
            }
          },
          {
            "type": "Generic",
            "generic": {
              "secret": "secret101",
              "allowEnv": true
            }
          },
          {
            "type": "ImageChange",
            "imageChange": {}
          },
          {
            "type": "ConfigChange"
          }
        ],
        "source": {
          "type": "Git",
          "git": {
            "uri": "https://github.com/openshift/ruby-hello-world.git"
          }
        },
        "strategy": {
          "type": "Docker",
          "dockerStrategy": {
            "from": {
              "kind": "ImageStreamTag",
              "name": "ruby-25-centos7:latest"
            },
            "env": [
              {
                "name": "EXAMPLE",
                "value": "sample-app"
              }
            ]
          }
        },
        "output": {
          "to": {
            "kind": "ImageStreamTag",
            "name": "origin-ruby-sample:latest"
          }
        },
        "postCommit": {
          "script": "bundle exec rake test"
        },
        "resources": {}
      },
      "status": {
        "lastVersion": 0
      }
    },
    {
      "kind": "DeploymentConfig",
      "apiVersion": "v1",
      "metadata": {
        "name": "frontend",
        "annotations": {
          "template.alpha.openshift.io/wait-for-ready": "true"
        }
      },
      "spec": {
        "strategy": {
          "type": "Rolling",
          "rollingParams": {
            "updatePeriodSeconds": 1,
            "intervalSeconds": 1,
            "timeoutSeconds": 120,
            "pre": {
              "failurePolicy": "Abort",
              "execNewPod": {
                "command": [
                  "/bin/true"
                ],
                "env": [
                  {
                    "name": "CUSTOM_VAR1",
                    "value": "custom_value1"
                  }
                ],
                "containerName": "ruby-helloworld"
              }
            },
            "post": {
              "failurePolicy": "Ignore",
              "execNewPod": {
                "command": [
                  "/bin/true"
                ],
                "env": [
                  {
                    "name": "CUSTOM_VAR2",
                    "value": "custom_value2"
                  }
                ],
                "containerName": "ruby-helloworld"
              }
            }
          },
          "resources": {}
        },
        "triggers": [
          {
            "type": "ImageChange",
            "imageChangeParams": {
              "automatic": true,
              "containerNames": [
                "ruby-helloworld"
              ],
              "from": {
                "kind": "ImageStreamTag",
                "name": "origin-ruby-sample:latest"
              }
            }
          },
          {
            "type": "ConfigChange"
          }
        ],
        "replicas": 2,
        "selector": {
          "name": "frontend"
        },
        "template": {
          "metadata": {
            "labels": {
              "name": "frontend"
            }
          },
          "spec": {
            "containers": [
              {
                "name": "ruby-helloworld",
                "image": "origin-ruby-sample",
                "ports": [
                  {
                    "containerPort": 8080,
                    "protocol": "TCP"
                  }
                ],
                "env": [
                  {
                    "name": "MYSQL_USER",
                    "valueFrom": {
                      "secretKeyRef" : {
                        "name" : "dbsecret",
                        "key" : "mysql-user"
                      }
                    }
                  },
                  {
                    "name": "MYSQL_PASSWORD",
                    "valueFrom": {
                      "secretKeyRef" : {
                        "name" : "dbsecret",
                        "key" : "mysql-password"
                      }
                    }
                  },
                  {
                    "name": "MYSQL_DATABASE",
                    "value": "${MYSQL_DATABASE}"
                  }
                ],
                "resources": {},
                "terminationMessagePath": "/dev/termination-log",
                "imagePullPolicy": "IfNotPresent",
                "securityContext": {
                  "capabilities": {},
                  "privileged": false
                }
              }
            ],
            "restartPolicy": "Always",
            "dnsPolicy": "ClusterFirst"
          }
        }
      },
      "status": {}
    },
    {
      "kind": "Service",
      "apiVersion": "v1",
      "metadata": {
        "name": "database"
      },
      "spec": {
        "ports": [
          {
            "name": "db",
            "protocol": "TCP",
            "port": 5434,
            "targetPort": 3306,
            "nodePort": 0
          }
        ],
        "selector": {
          "name": "database"
        },
        "type": "ClusterIP",
        "sessionAffinity": "None"
      },
      "status": {
        "loadBalancer": {}
      }
    },
    {
      "kind": "DeploymentConfig",
      "apiVersion": "v1",
      "metadata": {
        "name": "database",
        "annotations": {
          "template.alpha.openshift.io/wait-for-ready": "true"
        }
      },
      "spec": {
        "strategy": {
          "type": "Recreate",
          "resources": {}
        },
        "triggers": [
          {
            "type": "ConfigChange"
          }
        ],
        "replicas": 1,
        "selector": {
          "name": "database"
        },
        "template": {
          "metadata": {
            "labels": {
              "name": "database"
            }
          },
          "spec": {
            "containers": [
              {
                "name": "ruby-helloworld-database",
                "image": "centos/mysql-57-centos7:latest",
                "ports": [
                  {
                    "containerPort": 3306,
                    "protocol": "TCP"
                  }
                ],
                "env": [
                  {
                    "name": "MYSQL_USER",
                    "valueFrom": {
                      "secretKeyRef" : {
                        "name" : "dbsecret",
                        "key" : "mysql-user"
                      }
                    }
                  },
                  {
                    "name": "MYSQL_PASSWORD",
                    "valueFrom": {
                      "secretKeyRef" : {
                        "name" : "dbsecret",
                        "key" : "mysql-password"
                      }
                    }
                  },
                  {
                    "name": "MYSQL_DATABASE",
                    "value": "${MYSQL_DATABASE}"
                  }
                ],
                "resources": {},
                "volumeMounts": [
                  {
                    "name": "ruby-helloworld-data",
                    "mountPath": "/var/lib/mysql/data"
                  }
                ],
                "terminationMessagePath": "/dev/termination-log",
                "imagePullPolicy": "Always",
                "securityContext": {
                  "capabilities": {},
                  "privileged": false
                }
              }
            ],
            "volumes": [
              {
                "name": "ruby-helloworld-data",
                "emptyDir": {
                  "medium": ""
                }
              }
            ],
            "restartPolicy": "Always",
            "dnsPolicy": "ClusterFirst"
          }
        }
      },
      "status": {}
    }
  ],
  "parameters": [
    {
      "name": "MYSQL_USER",
      "description": "database username",
      "generate": "expression",
      "from": "user[A-Z0-9]{3}",
      "required": true
    },
    {
      "name": "MYSQL_PASSWORD",
      "description": "database password",
      "generate": "expression",
      "from": "[a-zA-Z0-9]{8}",
      "required": true
    },
    {
      "name": "MYSQL_DATABASE",
      "description": "database name",
      "value": "root",
      "required": true
    }
  ],
  "labels": {
    "template": "application-template-dockerbuild"
  }
}
`)

func examplesSampleAppApplicationTemplateDockerbuildJsonBytes() ([]byte, error) {
	return _examplesSampleAppApplicationTemplateDockerbuildJson, nil
}

func examplesSampleAppApplicationTemplateDockerbuildJson() (*asset, error) {
	bytes, err := examplesSampleAppApplicationTemplateDockerbuildJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "examples/sample-app/application-template-dockerbuild.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _examplesSampleAppApplicationTemplatePullspecbuildJson = []byte(`{
  "kind": "Template",
  "apiVersion": "v1",
  "metadata": {
    "name": "ruby-helloworld-sample",
    "annotations": {
      "description": "This example shows how to create a simple ruby application in openshift origin v3",
      "iconClass": "icon-ruby",
      "tags": "instant-app,ruby,mysql"
    }
  },
  "objects": [
    {
      "kind": "Secret",
      "apiVersion": "v1",
      "metadata": {
        "name": "dbsecret"
      },
      "stringData" : {
        "mysql-user" : "${MYSQL_USER}",
        "mysql-password" : "${MYSQL_PASSWORD}"
      }
    },
    {
      "kind": "Service",
      "apiVersion": "v1",
      "metadata": {
        "name": "frontend"
      },
      "spec": {
        "ports": [
          {
            "name": "web",
            "protocol": "TCP",
            "port": 5432,
            "targetPort": 8080,
            "nodePort": 0
          }
        ],
        "selector": {
          "name": "frontend"
        },
        "type": "ClusterIP",
        "sessionAffinity": "None"
      },
      "status": {
        "loadBalancer": {}
      }
    },
    {
      "kind": "Route",
      "apiVersion": "v1",
      "metadata": {
        "name": "route-edge",
        "annotations": {
          "template.openshift.io/expose-uri": "http://{.spec.host}{.spec.path}"
        }
      },
      "spec": {
        "host": "www.example.com",
        "to": {
          "kind": "Service",
          "name": "frontend"
        },
        "tls": {
          "termination": "edge"
        }
      },
      "status": {}
    },
    {
      "kind": "ImageStream",
      "apiVersion": "v1",
      "metadata": {
        "name": "origin-ruby-sample"
      },
      "spec": {},
      "status": {
        "dockerImageRepository": ""
      }
    },
    {
      "kind": "ImageStream",
      "apiVersion": "v1",
      "metadata": {
        "name": "ruby-25-centos7"
      },
      "spec": {
        "dockerImageRepository": "centos/ruby-25-centos7"
      },
      "status": {
        "dockerImageRepository": ""
      }
    },
    {
      "kind": "BuildConfig",
      "apiVersion": "v1",
      "metadata": {
        "name": "ruby-sample-build",
        "labels": {
          "name": "ruby-sample-build"
        },
        "annotations": {
          "template.alpha.openshift.io/wait-for-ready": "true"
        }
      },
      "spec": {
        "triggers": [
          {
            "type": "GitHub",
            "github": {
              "secret": "secret101"
            }
          },
          {
            "type": "Generic",
            "generic": {
              "secret": "secret101",
              "allowEnv": true
            }
          },
          {
            "type": "ConfigChange"
          }
        ],
        "source": {
          "type": "Git",
          "git": {
            "uri": "https://github.com/openshift/ruby-hello-world.git"
          }
        },
        "strategy": {
          "type": "Source",
          "sourceStrategy": {
            "from": {
              "kind": "DockerImage",
              "name": "centos/ruby-25-centos7:latest"
            }
          }
        },
        "output": {
          "to": {
            "kind": "ImageStreamTag",
            "name": "origin-ruby-sample:latest"
          }
        },
        "postCommit": {
          "script": "bundle exec rake test"
        },
        "resources": {}
      },
      "status": {
        "lastVersion": 0
      }
    },
    {
      "kind": "DeploymentConfig",
      "apiVersion": "v1",
      "metadata": {
        "name": "frontend",
        "annotations": {
          "template.alpha.openshift.io/wait-for-ready": "true"
        }
      },
      "spec": {
        "strategy": {
          "type": "Rolling",
          "rollingParams": {
            "updatePeriodSeconds": 1,
            "intervalSeconds": 1,
            "timeoutSeconds": 120,
            "pre": {
              "failurePolicy": "Abort",
              "execNewPod": {
                "command": [
                  "/bin/true"
                ],
                "env": [
                  {
                    "name": "CUSTOM_VAR1",
                    "value": "custom_value1"
                  }
                ],
                "containerName": "ruby-helloworld"
              }
            },
            "post": {
              "failurePolicy": "Ignore",
              "execNewPod": {
                "command": [
                  "/bin/true"
                ],
                "env": [
                  {
                    "name": "CUSTOM_VAR2",
                    "value": "custom_value2"
                  }
                ],
                "containerName": "ruby-helloworld"
              }
            }
          },
          "resources": {}
        },
        "triggers": [
          {
            "type": "ImageChange",
            "imageChangeParams": {
              "automatic": true,
              "containerNames": [
                "ruby-helloworld"
              ],
              "from": {
                "kind": "ImageStreamTag",
                "name": "origin-ruby-sample:latest"
              }
            }
          },
          {
            "type": "ConfigChange"
          }
        ],
        "replicas": 2,
        "selector": {
          "name": "frontend"
        },
        "template": {
          "metadata": {
            "labels": {
              "name": "frontend"
            }
          },
          "spec": {
            "containers": [
              {
                "name": "ruby-helloworld",
                "image": "origin-ruby-sample",
                "ports": [
                  {
                    "containerPort": 8080,
                    "protocol": "TCP"
                  }
                ],
                "env": [
                  {
                    "name": "MYSQL_USER",
                    "valueFrom": {
                      "secretKeyRef" : {
                        "name" : "dbsecret",
                        "key" : "mysql-user"
                      }
                    }
                  },
                  {
                    "name": "MYSQL_PASSWORD",
                    "valueFrom": {
                      "secretKeyRef" : {
                        "name" : "dbsecret",
                        "key" : "mysql-password"
                      }
                    }
                  },
                  {
                    "name": "MYSQL_DATABASE",
                    "value": "${MYSQL_DATABASE}"
                  }
                ],
                "resources": {},
                "terminationMessagePath": "/dev/termination-log",
                "imagePullPolicy": "IfNotPresent",
                "securityContext": {
                  "capabilities": {},
                  "privileged": false
                }
              }
            ],
            "restartPolicy": "Always",
            "dnsPolicy": "ClusterFirst"
          }
        }
      },
      "status": {}
    },
    {
      "kind": "Service",
      "apiVersion": "v1",
      "metadata": {
        "name": "database"
      },
      "spec": {
        "ports": [
          {
            "name": "db",
            "protocol": "TCP",
            "port": 5434,
            "targetPort": 3306,
            "nodePort": 0
          }
        ],
        "selector": {
          "name": "database"
        },
        "type": "ClusterIP",
        "sessionAffinity": "None"
      },
      "status": {
        "loadBalancer": {}
      }
    },
    {
      "kind": "DeploymentConfig",
      "apiVersion": "v1",
      "metadata": {
        "name": "database",
        "annotations": {
          "template.alpha.openshift.io/wait-for-ready": "true"
        }
      },
      "spec": {
        "strategy": {
          "type": "Recreate",
          "recreateParams": {
            "pre": {
              "failurePolicy": "Abort",
              "execNewPod": {
                "command": [
                  "/bin/true"
                ],
                "env": [
                  {
                    "name": "CUSTOM_VAR1",
                    "value": "custom_value1"
                  }
                ],
                "containerName": "ruby-helloworld-database",
                "volumes": ["ruby-helloworld-data"]
              }
            },
            "mid": {
              "failurePolicy": "Abort",
              "execNewPod": {
                "command": [
                  "/bin/true"
                ],
                "env": [
                  {
                    "name": "CUSTOM_VAR2",
                    "value": "custom_value2"
                  }
                ],
                "containerName": "ruby-helloworld-database",
                "volumes": ["ruby-helloworld-data"]
              }
            },
            "post": {
              "failurePolicy": "Ignore",
              "execNewPod": {
                "command": [
                  "/bin/true"
                ],
                "env": [
                  {
                    "name": "CUSTOM_VAR2",
                    "value": "custom_value2"
                  }
                ],
                "containerName": "ruby-helloworld-database",
                "volumes": ["ruby-helloworld-data"]
              }
            }
          },
          "resources": {}
        },
        "triggers": [
          {
            "type": "ConfigChange"
          }
        ],
        "replicas": 1,
        "selector": {
          "name": "database"
        },
        "template": {
          "metadata": {
            "labels": {
              "name": "database"
            }
          },
          "spec": {
            "containers": [
              {
                "name": "ruby-helloworld-database",
                "image": "centos/mysql-57-centos7:latest",
                "ports": [
                  {
                    "containerPort": 3306,
                    "protocol": "TCP"
                  }
                ],
                "env": [
                  {
                    "name": "MYSQL_USER",
                    "valueFrom": {
                      "secretKeyRef" : {
                        "name" : "dbsecret",
                        "key" : "mysql-user"
                      }
                    }
                  },
                  {
                    "name": "MYSQL_PASSWORD",
                    "valueFrom": {
                      "secretKeyRef" : {
                        "name" : "dbsecret",
                        "key" : "mysql-password"
                      }
                    }
                  },
                  {
                    "name": "MYSQL_DATABASE",
                    "value": "${MYSQL_DATABASE}"
                  }
                ],
                "resources": {},
                "volumeMounts": [
                  {
                    "name": "ruby-helloworld-data",
                    "mountPath": "/var/lib/mysql/data"
                  }
                ],
                "terminationMessagePath": "/dev/termination-log",
                "imagePullPolicy": "Always",
                "securityContext": {
                  "capabilities": {},
                  "privileged": false
                }
              }
            ],
            "volumes": [
              {
                "name": "ruby-helloworld-data",
                "emptyDir": {
                  "medium": ""
                }
              }
            ],
            "restartPolicy": "Always",
            "dnsPolicy": "ClusterFirst"
          }
        }
      },
      "status": {}
    }
  ],
  "parameters": [
    {
      "name": "MYSQL_USER",
      "description": "database username",
      "generate": "expression",
      "from": "user[A-Z0-9]{3}",
      "required": true
    },
    {
      "name": "MYSQL_PASSWORD",
      "description": "database password",
      "generate": "expression",
      "from": "[a-zA-Z0-9]{8}",
      "required": true
    },
    {
      "name": "MYSQL_DATABASE",
      "description": "database name",
      "value": "root",
      "required": true
    }
  ],
  "labels": {
    "template": "application-template-stibuild"
  }
}
`)

func examplesSampleAppApplicationTemplatePullspecbuildJsonBytes() ([]byte, error) {
	return _examplesSampleAppApplicationTemplatePullspecbuildJson, nil
}

func examplesSampleAppApplicationTemplatePullspecbuildJson() (*asset, error) {
	bytes, err := examplesSampleAppApplicationTemplatePullspecbuildJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "examples/sample-app/application-template-pullspecbuild.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _examplesSampleAppApplicationTemplateStibuildJson = []byte(`{
  "kind": "Template",
  "apiVersion": "v1",
  "metadata": {
    "name": "ruby-helloworld-sample",
    "annotations": {
      "description": "This example shows how to create a simple ruby application in openshift origin v3",
      "iconClass": "icon-ruby",
      "tags": "instant-app,ruby,mysql"
    }
  },
  "objects": [
    {
      "kind": "Secret",
      "apiVersion": "v1",
      "metadata": {
        "name": "dbsecret"
      },
      "stringData" : {
        "mysql-user" : "${MYSQL_USER}",
        "mysql-password" : "${MYSQL_PASSWORD}"
      }
    },
    {
      "kind": "Service",
      "apiVersion": "v1",
      "metadata": {
        "name": "frontend"
      },
      "spec": {
        "ports": [
          {
            "name": "web",
            "protocol": "TCP",
            "port": 5432,
            "targetPort": 8080,
            "nodePort": 0
          }
        ],
        "selector": {
          "name": "frontend"
        },
        "type": "ClusterIP",
        "sessionAffinity": "None"
      },
      "status": {
        "loadBalancer": {}
      }
    },
    {
      "kind": "Route",
      "apiVersion": "v1",
      "metadata": {
        "name": "route-edge",
        "annotations": {
          "template.openshift.io/expose-uri": "http://{.spec.host}{.spec.path}"
        }
     },
      "spec": {
        "host": "www.example.com",
        "to": {
          "kind": "Service",
          "name": "frontend"
        },
        "tls": {
          "termination": "edge"
        }
      },
      "status": {}
    },
    {
      "kind": "ImageStream",
      "apiVersion": "v1",
      "metadata": {
        "name": "origin-ruby-sample"
      },
      "spec": {},
      "status": {
        "dockerImageRepository": ""
      }
    },
    {
      "kind": "ImageStream",
      "apiVersion": "v1",
      "metadata": {
        "name": "ruby-25-centos7"
      },
      "spec": {
        "dockerImageRepository": "centos/ruby-25-centos7"
      },
      "status": {
        "dockerImageRepository": ""
      }
    },
    {
      "kind": "BuildConfig",
      "apiVersion": "v1",
      "metadata": {
        "name": "ruby-sample-build",
        "labels": {
          "name": "ruby-sample-build"
        },
        "annotations": {
          "template.alpha.openshift.io/wait-for-ready": "true"
        }
      },
      "spec": {
        "triggers": [
          {
            "type": "GitHub",
            "github": {
              "secret": "secret101"
            }
          },
          {
            "type": "Generic",
            "generic": {
              "secret": "secret101",
              "allowEnv": true
            }
          },
          {
            "type": "ImageChange",
            "imageChange": {}
          },
          {
            "type": "ConfigChange"
          }
        ],
        "source": {
          "type": "Git",
          "git": {
            "uri": "https://github.com/openshift/ruby-hello-world.git"
          }
        },
        "strategy": {
          "type": "Source",
          "sourceStrategy": {
            "from": {
              "kind": "ImageStreamTag",
              "name": "ruby-25-centos7:latest"
            },
            "env": [
              {
                "name": "EXAMPLE",
                "value": "sample-app"
              }
            ]
          }
        },
        "output": {
          "to": {
            "kind": "ImageStreamTag",
            "name": "origin-ruby-sample:latest"
          }
        },
        "postCommit": {
          "script": "bundle exec rake test"
        },
        "resources": {}
      },
      "status": {
        "lastVersion": 0
      }
    },
    {
      "kind": "DeploymentConfig",
      "apiVersion": "v1",
      "metadata": {
        "name": "frontend",
        "annotations": {
          "template.alpha.openshift.io/wait-for-ready": "true"
        }
      },
      "spec": {
        "strategy": {
          "type": "Rolling",
          "rollingParams": {
            "updatePeriodSeconds": 1,
            "intervalSeconds": 1,
            "timeoutSeconds": 120,
            "pre": {
              "failurePolicy": "Abort",
              "execNewPod": {
                "command": [
                  "/bin/true"
                ],
                "env": [
                  {
                    "name": "CUSTOM_VAR1",
                    "value": "custom_value1"
                  }
                ],
                "containerName": "ruby-helloworld"
              }
            },
            "post": {
              "failurePolicy": "Ignore",
              "execNewPod": {
                "command": [
                  "/bin/true"
                ],
                "env": [
                  {
                    "name": "CUSTOM_VAR2",
                    "value": "custom_value2"
                  }
                ],
                "containerName": "ruby-helloworld"
              }
            }
          },
          "resources": {}
        },
        "triggers": [
          {
            "type": "ImageChange",
            "imageChangeParams": {
              "automatic": true,
              "containerNames": [
                "ruby-helloworld"
              ],
              "from": {
                "kind": "ImageStreamTag",
                "name": "origin-ruby-sample:latest"
              }
            }
          },
          {
            "type": "ConfigChange"
          }
        ],
        "replicas": 2,
        "selector": {
          "name": "frontend"
        },
        "template": {
          "metadata": {
            "labels": {
              "name": "frontend"
            }
          },
          "spec": {
            "containers": [
              {
                "name": "ruby-helloworld",
                "image": "origin-ruby-sample",
                "ports": [
                  {
                    "containerPort": 8080,
                    "protocol": "TCP"
                  }
                ],
                "env": [
                  {
                    "name": "MYSQL_USER",
                    "valueFrom": {
                      "secretKeyRef" : {
                        "name" : "dbsecret",
                        "key" : "mysql-user"
                      }
                    }
                  },
                  {
                    "name": "MYSQL_PASSWORD",
                    "valueFrom": {
                      "secretKeyRef" : {
                        "name" : "dbsecret",
                        "key" : "mysql-password"
                      }
                    }
                  },
                  {
                    "name": "MYSQL_DATABASE",
                    "value": "${MYSQL_DATABASE}"
                  }
                ],
                "resources": {},
                "terminationMessagePath": "/dev/termination-log",
                "imagePullPolicy": "IfNotPresent",
                "securityContext": {
                  "capabilities": {},
                  "privileged": false
                }
              }
            ],
            "restartPolicy": "Always",
            "dnsPolicy": "ClusterFirst"
          }
        }
      },
      "status": {}
    },
    {
      "kind": "Service",
      "apiVersion": "v1",
      "metadata": {
        "name": "database"
      },
      "spec": {
        "ports": [
          {
            "name": "db",
            "protocol": "TCP",
            "port": 5434,
            "targetPort": 3306,
            "nodePort": 0
          }
        ],
        "selector": {
          "name": "database"
        },
        "type": "ClusterIP",
        "sessionAffinity": "None"
      },
      "status": {
        "loadBalancer": {}
      }
    },
    {
      "kind": "DeploymentConfig",
      "apiVersion": "v1",
      "metadata": {
        "name": "database",
        "annotations": {
          "template.alpha.openshift.io/wait-for-ready": "true"
        }
      },
      "spec": {
        "strategy": {
          "type": "Recreate",
          "recreateParams": {
            "pre": {
              "failurePolicy": "Abort",
              "execNewPod": {
                "command": [
                  "/bin/true"
                ],
                "env": [
                  {
                    "name": "CUSTOM_VAR1",
                    "value": "custom_value1"
                  }
                ],
                "containerName": "ruby-helloworld-database",
                "volumes": ["ruby-helloworld-data"]
              }
            },
            "mid": {
              "failurePolicy": "Abort",
              "execNewPod": {
                "command": [
                  "/bin/true"
                ],
                "env": [
                  {
                    "name": "CUSTOM_VAR2",
                    "value": "custom_value2"
                  }
                ],
                "containerName": "ruby-helloworld-database",
                "volumes": ["ruby-helloworld-data"]
              }
            },
            "post": {
              "failurePolicy": "Ignore",
              "execNewPod": {
                "command": [
                  "/bin/true"
                ],
                "env": [
                  {
                    "name": "CUSTOM_VAR2",
                    "value": "custom_value2"
                  }
                ],
                "containerName": "ruby-helloworld-database",
                "volumes": ["ruby-helloworld-data"]
              }
            }
          },
          "resources": {}
        },
        "triggers": [
          {
            "type": "ConfigChange"
          }
        ],
        "replicas": 1,
        "selector": {
          "name": "database"
        },
        "template": {
          "metadata": {
            "labels": {
              "name": "database"
            }
          },
          "spec": {
            "containers": [
              {
                "name": "ruby-helloworld-database",
                "image": "centos/mysql-57-centos7:latest",
                "ports": [
                  {
                    "containerPort": 3306,
                    "protocol": "TCP"
                  }
                ],
                "env": [
                  {
                    "name": "MYSQL_USER",
                    "valueFrom": {
                      "secretKeyRef" : {
                        "name" : "dbsecret",
                        "key" : "mysql-user"
                      }
                    }
                  },
                  {
                    "name": "MYSQL_PASSWORD",
                    "valueFrom": {
                      "secretKeyRef" : {
                        "name" : "dbsecret",
                        "key" : "mysql-password"
                      }
                    }
                  },
                  {
                    "name": "MYSQL_DATABASE",
                    "value": "${MYSQL_DATABASE}"
                  }
                ],
                "resources": {},
                "volumeMounts": [
                  {
                    "name": "ruby-helloworld-data",
                    "mountPath": "/var/lib/mysql/data"
                  }
                ],
                "terminationMessagePath": "/dev/termination-log",
                "imagePullPolicy": "Always",
                "securityContext": {
                  "capabilities": {},
                  "privileged": false
                }
              }
            ],
            "volumes": [
              {
                "name": "ruby-helloworld-data",
                "emptyDir": {
                  "medium": ""
                }
              }
            ],
            "restartPolicy": "Always",
            "dnsPolicy": "ClusterFirst"
          }
        }
      },
      "status": {}
    }
  ],
  "parameters": [
    {
      "name": "MYSQL_USER",
      "description": "database username",
      "generate": "expression",
      "from": "user[A-Z0-9]{3}",
      "required": true
    },
    {
      "name": "MYSQL_PASSWORD",
      "description": "database password",
      "generate": "expression",
      "from": "[a-zA-Z0-9]{8}",
      "required": true
    },
    {
      "name": "MYSQL_DATABASE",
      "description": "database name",
      "value": "root",
      "required": true
    }
  ],
  "labels": {
    "template": "application-template-stibuild"
  }
}
`)

func examplesSampleAppApplicationTemplateStibuildJsonBytes() ([]byte, error) {
	return _examplesSampleAppApplicationTemplateStibuildJson, nil
}

func examplesSampleAppApplicationTemplateStibuildJson() (*asset, error) {
	bytes, err := examplesSampleAppApplicationTemplateStibuildJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "examples/sample-app/application-template-stibuild.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _examplesSampleAppCleanupSh = []byte(`#!/bin/sh

echo "Killing openshift all-in-one server ..."
sudo pkill -x openshift

echo "Stopping all k8s containers on host ..."
sudo docker ps --format='{{.Names}}' | grep -E '^k8s_' | xargs -l -r sudo docker stop

echo "Unmounting openshift local volumes ..."
mount | grep "openshift.local.volumes" | awk '{ print $3}' | xargs -l -r sudo umount

echo "Cleaning up openshift runtime files ..."
sudo rm -rf openshift.local.*


`)

func examplesSampleAppCleanupShBytes() ([]byte, error) {
	return _examplesSampleAppCleanupSh, nil
}

func examplesSampleAppCleanupSh() (*asset, error) {
	bytes, err := examplesSampleAppCleanupShBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "examples/sample-app/cleanup.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _examplesSampleAppGithubWebhookExampleJson = []byte(`{
  "after": "9bdc3a26ff933b32f3e558636b58aea86a69f051",
  "before": "0000000000000000000000000000000000000000",
  "commits": [
    {
      "added": [
        "LICENSE"
      ],
      "author": {
        "email": "anonUser@example.com",
        "name": "Anonymous User"
      },
      "committer": {
        "email": "anonUser@example.com",
        "name": "Anonymous User"
      },
      "distinct": true,
      "id": "9bdc3a26ff933b32f3e558636b58aea86a69f051",
      "message": "Added license",
      "modified": [],
      "removed": [],
      "timestamp": "2014-08-28T16:55:36+02:00",
      "url": "https://github.com/anonUser/anonRepo/commit/9bdc3a26ff933b32f3e558636b58aea86a69f051"
    }
  ],
  "compare": "https://github.com/anonUser/anonRepo/commit/9bdc3a26ff93",
  "created": true,
  "deleted": false,
  "forced": true,
  "head_commit": {
    "added": [
      "LICENSE"
    ],
    "author": {
      "email": "anonUser@example.com",
      "name": "Anonymous User"
    },
    "committer": {
      "email": "anonUser@example.com",
      "name": "Anonymous User"
    },
    "distinct": true,
    "id": "",
    "message": "Added license",
    "modified": [],
    "removed": [],
    "timestamp": "2014-08-28T16:55:36+02:00",
    "url": "https://github.com/anonUser/anonRepo/commit/9bdc3a26ff933b32f3e558636b58aea86a69f051"
  },
  "pusher": {
    "email": "anonUser@example.com",
    "name": "anonUser"
  },
  "ref": "refs/heads/master",
  "repository": {
    "archive_url": "https://api.github.com/repos/anonUser/anonRepo/{archive_format}{/ref}",
    "assignees_url": "https://api.github.com/repos/anonUser/anonRepo/assignees{/user}",
    "blobs_url": "https://api.github.com/repos/anonUser/anonRepo/git/blobs{/sha}",
    "branches_url": "https://api.github.com/repos/anonUser/anonRepo/branches{/branch}",
    "clone_url": "https://github.com/anonUser/anonRepo.git",
    "collaborators_url": "https://api.github.com/repos/anonUser/anonRepo/collaborators{/collaborator}",
    "comments_url": "https://api.github.com/repos/anonUser/anonRepo/comments{/number}",
    "commits_url": "https://api.github.com/repos/anonUser/anonRepo/commits{/sha}",
    "compare_url": "https://api.github.com/repos/anonUser/anonRepo/compare/{base}...{head}",
    "contents_url": "https://api.github.com/repos/anonUser/anonRepo/contents/{+path}",
    "contributors_url": "https://api.github.com/repos/anonUser/anonRepo/contributors",
    "created_at": 1.409063699e+09,
    "default_branch": "master",
    "description": "Git webhook implementation in Go.",
    "downloads_url": "https://api.github.com/repos/anonUser/anonRepo/downloads",
    "events_url": "https://api.github.com/repos/anonUser/anonRepo/events",
    "fork": false,
    "forks": 0,
    "forks_count": 0,
    "forks_url": "https://api.github.com/repos/anonUser/anonRepo/forks",
    "full_name": "anonUser/anonRepo",
    "git_commits_url": "https://api.github.com/repos/anonUser/anonRepo/git/commits{/sha}",
    "git_refs_url": "https://api.github.com/repos/anonUser/anonRepo/git/refs{/sha}",
    "git_tags_url": "https://api.github.com/repos/anonUser/anonRepo/git/tags{/sha}",
    "git_url": "git://github.com/anonUser/anonRepo.git",
    "has_downloads": true,
    "has_issues": true,
    "has_wiki": true,
    "homepage": null,
    "hooks_url": "https://api.github.com/repos/anonUser/anonRepo/hooks",
    "html_url": "https://github.com/anonUser/anonRepo",
    "id": 2.3354788e+07,
    "issue_comment_url": "https://api.github.com/repos/anonUser/anonRepo/issues/comments/{number}",
    "issue_events_url": "https://api.github.com/repos/anonUser/anonRepo/issues/events{/number}",
    "issues_url": "https://api.github.com/repos/anonUser/anonRepo/issues{/number}",
    "keys_url": "https://api.github.com/repos/anonUser/anonRepo/keys{/key_id}",
    "labels_url": "https://api.github.com/repos/anonUser/anonRepo/labels{/name}",
    "language": null,
    "languages_url": "https://api.github.com/repos/anonUser/anonRepo/languages",
    "master_branch": "master",
    "merges_url": "https://api.github.com/repos/anonUser/anonRepo/merges",
    "milestones_url": "https://api.github.com/repos/anonUser/anonRepo/milestones{/number}",
    "mirror_url": null,
    "name": "anonRepo",
    "notifications_url": "https://api.github.com/repos/anonUser/anonRepo/notifications{?since,all,participating}",
    "open_issues": 0,
    "open_issues_count": 0,
    "owner": {
      "email": "anonUser@example.com",
      "name": "anonUser"
    },
    "private": false,
    "pulls_url": "https://api.github.com/repos/anonUser/anonRepo/pulls{/number}",
    "pushed_at": 1.409238007e+09,
    "releases_url": "https://api.github.com/repos/anonUser/anonRepo/releases{/id}",
    "size": 0,
    "ssh_url": "git@github.com:anonUser/anonRepo.git",
    "stargazers": 0,
    "stargazers_count": 0,
    "stargazers_url": "https://api.github.com/repos/anonUser/anonRepo/stargazers",
    "statuses_url": "https://api.github.com/repos/anonUser/anonRepo/statuses/{sha}",
    "subscribers_url": "https://api.github.com/repos/anonUser/anonRepo/subscribers",
    "subscription_url": "https://api.github.com/repos/anonUser/anonRepo/subscription",
    "svn_url": "https://github.com/anonUser/anonRepo",
    "tags_url": "https://api.github.com/repos/anonUser/anonRepo/tags",
    "teams_url": "https://api.github.com/repos/anonUser/anonRepo/teams",
    "trees_url": "https://api.github.com/repos/anonUser/anonRepo/git/trees{/sha}",
    "updated_at": "2014-08-26T14:34:59Z",
    "url": "https://github.com/anonUser/anonRepo",
    "watchers": 0,
    "watchers_count": 0
  }
}
`)

func examplesSampleAppGithubWebhookExampleJsonBytes() ([]byte, error) {
	return _examplesSampleAppGithubWebhookExampleJson, nil
}

func examplesSampleAppGithubWebhookExampleJson() (*asset, error) {
	bytes, err := examplesSampleAppGithubWebhookExampleJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "examples/sample-app/github-webhook-example.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _examplesQuickstartsCakephpMysqlPersistentJson = []byte(`{
    "apiVersion": "v1",
    "kind": "Template",
    "labels": {
        "app": "cakephp-mysql-persistent",
        "template": "cakephp-mysql-persistent"
    },
    "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/cakephp-ex/blob/master/README.md.",
    "metadata": {
        "annotations": {
            "description": "An example CakePHP application with a MySQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/cakephp-ex/blob/master/README.md.",
            "iconClass": "icon-php",
            "openshift.io/display-name": "CakePHP + MySQL",
            "openshift.io/documentation-url": "https://github.com/sclorg/cakephp-ex",
            "openshift.io/long-description": "This template defines resources needed to develop a CakePHP application, including a build configuration, application deployment configuration, and database deployment configuration.",
            "openshift.io/provider-display-name": "Red Hat, Inc.",
            "openshift.io/support-url": "https://access.redhat.com",
            "tags": "quickstart,php,cakephp",
            "template.openshift.io/bindable": "false"
        },
        "name": "cakephp-mysql-persistent"
    },
    "objects": [
        {
            "apiVersion": "v1",
            "kind": "Secret",
            "metadata": {
                "name": "${NAME}"
            },
            "stringData": {
                "cakephp-secret-token": "${CAKEPHP_SECRET_TOKEN}",
                "cakephp-security-salt": "${CAKEPHP_SECURITY_SALT}",
                "database-password": "${DATABASE_PASSWORD}",
                "database-user": "${DATABASE_USER}"
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Service",
            "metadata": {
                "annotations": {
                    "description": "Exposes and load balances the application pods",
                    "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]"
                },
                "name": "${NAME}"
            },
            "spec": {
                "ports": [
                    {
                        "name": "web",
                        "port": 8080,
                        "targetPort": 8080
                    }
                ],
                "selector": {
                    "name": "${NAME}"
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Route",
            "metadata": {
                "name": "${NAME}"
            },
            "spec": {
                "host": "${APPLICATION_DOMAIN}",
                "to": {
                    "kind": "Service",
                    "name": "${NAME}"
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "ImageStream",
            "metadata": {
                "annotations": {
                    "description": "Keeps track of changes in the application image"
                },
                "name": "${NAME}"
            }
        },
        {
            "apiVersion": "v1",
            "kind": "BuildConfig",
            "metadata": {
                "annotations": {
                    "description": "Defines how to build the application",
                    "template.alpha.openshift.io/wait-for-ready": "true"
                },
                "name": "${NAME}"
            },
            "spec": {
                "output": {
                    "to": {
                        "kind": "ImageStreamTag",
                        "name": "${NAME}:latest"
                    }
                },
                "postCommit": {
                    "script": "./vendor/bin/phpunit"
                },
                "source": {
                    "contextDir": "${CONTEXT_DIR}",
                    "git": {
                        "ref": "${SOURCE_REPOSITORY_REF}",
                        "uri": "${SOURCE_REPOSITORY_URL}"
                    },
                    "type": "Git"
                },
                "strategy": {
                    "sourceStrategy": {
                        "env": [
                            {
                                "name": "COMPOSER_MIRROR",
                                "value": "${COMPOSER_MIRROR}"
                            }
                        ],
                        "from": {
                            "kind": "ImageStreamTag",
                            "name": "php:${PHP_VERSION}",
                            "namespace": "${NAMESPACE}"
                        }
                    },
                    "type": "Source"
                },
                "triggers": [
                    {
                        "type": "ImageChange"
                    },
                    {
                        "type": "ConfigChange"
                    },
                    {
                        "github": {
                            "secret": "${GITHUB_WEBHOOK_SECRET}"
                        },
                        "type": "GitHub"
                    }
                ]
            }
        },
        {
            "apiVersion": "v1",
            "kind": "DeploymentConfig",
            "metadata": {
                "annotations": {
                    "description": "Defines how to deploy the application server",
                    "template.alpha.openshift.io/wait-for-ready": "true"
                },
                "name": "${NAME}"
            },
            "spec": {
                "replicas": 1,
                "selector": {
                    "name": "${NAME}"
                },
                "strategy": {
                    "recreateParams": {
                        "pre": {
                            "execNewPod": {
                                "command": [
                                    "./migrate-database.sh"
                                ],
                                "containerName": "cakephp-mysql-persistent"
                            },
                            "failurePolicy": "Retry"
                        }
                    },
                    "type": "Recreate"
                },
                "template": {
                    "metadata": {
                        "labels": {
                            "name": "${NAME}"
                        },
                        "name": "${NAME}"
                    },
                    "spec": {
                        "containers": [
                            {
                                "env": [
                                    {
                                        "name": "DATABASE_SERVICE_NAME",
                                        "value": "${DATABASE_SERVICE_NAME}"
                                    },
                                    {
                                        "name": "DATABASE_ENGINE",
                                        "value": "${DATABASE_ENGINE}"
                                    },
                                    {
                                        "name": "DATABASE_NAME",
                                        "value": "${DATABASE_NAME}"
                                    },
                                    {
                                        "name": "DATABASE_USER",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-user",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "DATABASE_PASSWORD",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-password",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "CAKEPHP_SECRET_TOKEN",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "cakephp-secret-token",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "CAKEPHP_SECURITY_SALT",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "cakephp-security-salt",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "OPCACHE_REVALIDATE_FREQ",
                                        "value": "${OPCACHE_REVALIDATE_FREQ}"
                                    }
                                ],
                                "image": " ",
                                "livenessProbe": {
                                    "httpGet": {
                                        "path": "/health.php",
                                        "port": 8080
                                    },
                                    "initialDelaySeconds": 30,
                                    "periodSeconds": 60,
                                    "timeoutSeconds": 3
                                },
                                "name": "cakephp-mysql-persistent",
                                "ports": [
                                    {
                                        "containerPort": 8080
                                    }
                                ],
                                "readinessProbe": {
                                    "httpGet": {
                                        "path": "/health.php",
                                        "port": 8080
                                    },
                                    "initialDelaySeconds": 3,
                                    "periodSeconds": 60,
                                    "timeoutSeconds": 3
                                },
                                "resources": {
                                    "limits": {
                                        "memory": "${MEMORY_LIMIT}"
                                    }
                                }
                            }
                        ]
                    }
                },
                "triggers": [
                    {
                        "imageChangeParams": {
                            "automatic": true,
                            "containerNames": [
                                "cakephp-mysql-persistent"
                            ],
                            "from": {
                                "kind": "ImageStreamTag",
                                "name": "${NAME}:latest"
                            }
                        },
                        "type": "ImageChange"
                    },
                    {
                        "type": "ConfigChange"
                    }
                ]
            }
        },
        {
            "apiVersion": "v1",
            "kind": "PersistentVolumeClaim",
            "metadata": {
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "spec": {
                "accessModes": [
                    "ReadWriteOnce"
                ],
                "resources": {
                    "requests": {
                        "storage": "${VOLUME_CAPACITY}"
                    }
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Service",
            "metadata": {
                "annotations": {
                    "description": "Exposes the database server"
                },
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "spec": {
                "ports": [
                    {
                        "name": "mysql",
                        "port": 3306,
                        "targetPort": 3306
                    }
                ],
                "selector": {
                    "name": "${DATABASE_SERVICE_NAME}"
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "DeploymentConfig",
            "metadata": {
                "annotations": {
                    "description": "Defines how to deploy the database",
                    "template.alpha.openshift.io/wait-for-ready": "true"
                },
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "spec": {
                "replicas": 1,
                "selector": {
                    "name": "${DATABASE_SERVICE_NAME}"
                },
                "strategy": {
                    "type": "Recreate"
                },
                "template": {
                    "metadata": {
                        "labels": {
                            "name": "${DATABASE_SERVICE_NAME}"
                        },
                        "name": "${DATABASE_SERVICE_NAME}"
                    },
                    "spec": {
                        "containers": [
                            {
                                "env": [
                                    {
                                        "name": "MYSQL_USER",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-user",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "MYSQL_PASSWORD",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-password",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "MYSQL_DATABASE",
                                        "value": "${DATABASE_NAME}"
                                    }
                                ],
                                "image": " ",
                                "livenessProbe": {
                                    "initialDelaySeconds": 30,
                                    "tcpSocket": {
                                        "port": 3306
                                    },
                                    "timeoutSeconds": 1
                                },
                                "name": "mysql",
                                "ports": [
                                    {
                                        "containerPort": 3306
                                    }
                                ],
                                "readinessProbe": {
                                    "exec": {
                                        "command": [
                                            "/bin/sh",
                                            "-i",
                                            "-c",
                                            "MYSQL_PWD='${DATABASE_PASSWORD}' mysql -h 127.0.0.1 -u ${DATABASE_USER} -D ${DATABASE_NAME} -e 'SELECT 1'"
                                        ]
                                    },
                                    "initialDelaySeconds": 5,
                                    "timeoutSeconds": 1
                                },
                                "resources": {
                                    "limits": {
                                        "memory": "${MEMORY_MYSQL_LIMIT}"
                                    }
                                },
                                "volumeMounts": [
                                    {
                                        "mountPath": "/var/lib/mysql/data",
                                        "name": "${DATABASE_SERVICE_NAME}-data"
                                    }
                                ]
                            }
                        ],
                        "volumes": [
                            {
                                "name": "${DATABASE_SERVICE_NAME}-data",
                                "persistentVolumeClaim": {
                                    "claimName": "${DATABASE_SERVICE_NAME}"
                                }
                            }
                        ]
                    }
                },
                "triggers": [
                    {
                        "imageChangeParams": {
                            "automatic": true,
                            "containerNames": [
                                "mysql"
                            ],
                            "from": {
                                "kind": "ImageStreamTag",
                                "name": "mysql:5.7",
                                "namespace": "${NAMESPACE}"
                            }
                        },
                        "type": "ImageChange"
                    },
                    {
                        "type": "ConfigChange"
                    }
                ]
            }
        }
    ],
    "parameters": [
        {
            "description": "The name assigned to all of the frontend objects defined in this template.",
            "displayName": "Name",
            "name": "NAME",
            "required": true,
            "value": "cakephp-mysql-persistent"
        },
        {
            "description": "The OpenShift Namespace where the ImageStream resides.",
            "displayName": "Namespace",
            "name": "NAMESPACE",
            "required": true,
            "value": "openshift"
        },
        {
            "description": "Version of PHP image to be used (7.1 or latest).",
            "displayName": "PHP Version",
            "name": "PHP_VERSION",
            "required": true,
            "value": "7.1"
        },
        {
            "description": "Maximum amount of memory the CakePHP container can use.",
            "displayName": "Memory Limit",
            "name": "MEMORY_LIMIT",
            "required": true,
            "value": "512Mi"
        },
        {
            "description": "Maximum amount of memory the MySQL container can use.",
            "displayName": "Memory Limit (MySQL)",
            "name": "MEMORY_MYSQL_LIMIT",
            "required": true,
            "value": "512Mi"
        },
        {
            "description": "Volume space available for data, e.g. 512Mi, 2Gi",
            "displayName": "Volume Capacity",
            "name": "VOLUME_CAPACITY",
            "required": true,
            "value": "1Gi"
        },
        {
            "description": "The URL of the repository with your application source code.",
            "displayName": "Git Repository URL",
            "name": "SOURCE_REPOSITORY_URL",
            "required": true,
            "value": "https://github.com/sclorg/cakephp-ex.git"
        },
        {
            "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.",
            "displayName": "Git Reference",
            "name": "SOURCE_REPOSITORY_REF"
        },
        {
            "description": "Set this to the relative path to your project if it is not in the root of your repository.",
            "displayName": "Context Directory",
            "name": "CONTEXT_DIR"
        },
        {
            "description": "The exposed hostname that will route to the CakePHP service, if left blank a value will be defaulted.",
            "displayName": "Application Hostname",
            "name": "APPLICATION_DOMAIN",
            "value": ""
        },
        {
            "description": "Github trigger secret.  A difficult to guess string encoded as part of the webhook URL.  Not encrypted.",
            "displayName": "GitHub Webhook Secret",
            "from": "[a-zA-Z0-9]{40}",
            "generate": "expression",
            "name": "GITHUB_WEBHOOK_SECRET"
        },
        {
            "displayName": "Database Service Name",
            "name": "DATABASE_SERVICE_NAME",
            "required": true,
            "value": "mysql"
        },
        {
            "description": "Database engine: postgresql, mysql or sqlite (default).",
            "displayName": "Database Engine",
            "name": "DATABASE_ENGINE",
            "required": true,
            "value": "mysql"
        },
        {
            "displayName": "Database Name",
            "name": "DATABASE_NAME",
            "required": true,
            "value": "default"
        },
        {
            "displayName": "Database User",
            "name": "DATABASE_USER",
            "required": true,
            "value": "cakephp"
        },
        {
            "displayName": "Database Password",
            "from": "[a-zA-Z0-9]{16}",
            "generate": "expression",
            "name": "DATABASE_PASSWORD"
        },
        {
            "description": "Set this to a long random string.",
            "displayName": "CakePHP secret token",
            "from": "[\\w]{50}",
            "generate": "expression",
            "name": "CAKEPHP_SECRET_TOKEN"
        },
        {
            "description": "Security salt for session hash.",
            "displayName": "CakePHP Security Salt",
            "from": "[a-zA-Z0-9]{40}",
            "generate": "expression",
            "name": "CAKEPHP_SECURITY_SALT"
        },
        {
            "description": "How often to check script timestamps for updates, in seconds. 0 will result in OPcache checking for updates on every request.",
            "displayName": "OPcache Revalidation Frequency",
            "name": "OPCACHE_REVALIDATE_FREQ",
            "value": "2"
        },
        {
            "description": "The custom Composer mirror URL",
            "displayName": "Custom Composer Mirror URL",
            "name": "COMPOSER_MIRROR",
            "value": ""
        }
    ]
}`)

func examplesQuickstartsCakephpMysqlPersistentJsonBytes() ([]byte, error) {
	return _examplesQuickstartsCakephpMysqlPersistentJson, nil
}

func examplesQuickstartsCakephpMysqlPersistentJson() (*asset, error) {
	bytes, err := examplesQuickstartsCakephpMysqlPersistentJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "examples/quickstarts/cakephp-mysql-persistent.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _examplesQuickstartsCakephpMysqlJson = []byte(`{
    "apiVersion": "v1",
    "kind": "Template",
    "labels": {
        "app": "cakephp-mysql-example",
        "template": "cakephp-mysql-example"
    },
    "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/cakephp-ex/blob/master/README.md.",
    "metadata": {
        "annotations": {
            "description": "An example CakePHP application with a MySQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/cakephp-ex/blob/master/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.",
            "iconClass": "icon-php",
            "openshift.io/display-name": "CakePHP + MySQL (Ephemeral)",
            "openshift.io/documentation-url": "https://github.com/sclorg/cakephp-ex",
            "openshift.io/long-description": "This template defines resources needed to develop a CakePHP application, including a build configuration, application deployment configuration, and database deployment configuration.  The database is stored in non-persistent storage, so this configuration should be used for experimental purposes only.",
            "openshift.io/provider-display-name": "Red Hat, Inc.",
            "openshift.io/support-url": "https://access.redhat.com",
            "tags": "quickstart,php,cakephp",
            "template.openshift.io/bindable": "false"
        },
        "name": "cakephp-mysql-example"
    },
    "objects": [
        {
            "apiVersion": "v1",
            "kind": "Secret",
            "metadata": {
                "name": "${NAME}"
            },
            "stringData": {
                "cakephp-secret-token": "${CAKEPHP_SECRET_TOKEN}",
                "cakephp-security-salt": "${CAKEPHP_SECURITY_SALT}",
                "database-password": "${DATABASE_PASSWORD}",
                "database-user": "${DATABASE_USER}"
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Service",
            "metadata": {
                "annotations": {
                    "description": "Exposes and load balances the application pods",
                    "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]"
                },
                "name": "${NAME}"
            },
            "spec": {
                "ports": [
                    {
                        "name": "web",
                        "port": 8080,
                        "targetPort": 8080
                    }
                ],
                "selector": {
                    "name": "${NAME}"
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Route",
            "metadata": {
                "name": "${NAME}"
            },
            "spec": {
                "host": "${APPLICATION_DOMAIN}",
                "to": {
                    "kind": "Service",
                    "name": "${NAME}"
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "ImageStream",
            "metadata": {
                "annotations": {
                    "description": "Keeps track of changes in the application image"
                },
                "name": "${NAME}"
            }
        },
        {
            "apiVersion": "v1",
            "kind": "BuildConfig",
            "metadata": {
                "annotations": {
                    "description": "Defines how to build the application",
                    "template.alpha.openshift.io/wait-for-ready": "true"
                },
                "name": "${NAME}"
            },
            "spec": {
                "output": {
                    "to": {
                        "kind": "ImageStreamTag",
                        "name": "${NAME}:latest"
                    }
                },
                "postCommit": {
                    "script": "./vendor/bin/phpunit"
                },
                "source": {
                    "contextDir": "${CONTEXT_DIR}",
                    "git": {
                        "ref": "${SOURCE_REPOSITORY_REF}",
                        "uri": "${SOURCE_REPOSITORY_URL}"
                    },
                    "type": "Git"
                },
                "strategy": {
                    "sourceStrategy": {
                        "env": [
                            {
                                "name": "COMPOSER_MIRROR",
                                "value": "${COMPOSER_MIRROR}"
                            }
                        ],
                        "from": {
                            "kind": "ImageStreamTag",
                            "name": "php:${PHP_VERSION}",
                            "namespace": "${NAMESPACE}"
                        }
                    },
                    "type": "Source"
                },
                "triggers": [
                    {
                        "type": "ImageChange"
                    },
                    {
                        "type": "ConfigChange"
                    },
                    {
                        "github": {
                            "secret": "${GITHUB_WEBHOOK_SECRET}"
                        },
                        "type": "GitHub"
                    }
                ]
            }
        },
        {
            "apiVersion": "v1",
            "kind": "DeploymentConfig",
            "metadata": {
                "annotations": {
                    "description": "Defines how to deploy the application server",
                    "template.alpha.openshift.io/wait-for-ready": "true"
                },
                "name": "${NAME}"
            },
            "spec": {
                "replicas": 1,
                "selector": {
                    "name": "${NAME}"
                },
                "strategy": {
                    "recreateParams": {
                        "pre": {
                            "execNewPod": {
                                "command": [
                                    "./migrate-database.sh"
                                ],
                                "containerName": "cakephp-mysql-example"
                            },
                            "failurePolicy": "Retry"
                        }
                    },
                    "type": "Recreate"
                },
                "template": {
                    "metadata": {
                        "labels": {
                            "name": "${NAME}"
                        },
                        "name": "${NAME}"
                    },
                    "spec": {
                        "containers": [
                            {
                                "env": [
                                    {
                                        "name": "DATABASE_SERVICE_NAME",
                                        "value": "${DATABASE_SERVICE_NAME}"
                                    },
                                    {
                                        "name": "DATABASE_ENGINE",
                                        "value": "${DATABASE_ENGINE}"
                                    },
                                    {
                                        "name": "DATABASE_NAME",
                                        "value": "${DATABASE_NAME}"
                                    },
                                    {
                                        "name": "DATABASE_USER",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-user",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "DATABASE_PASSWORD",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-password",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "CAKEPHP_SECRET_TOKEN",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "cakephp-secret-token",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "CAKEPHP_SECURITY_SALT",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "cakephp-security-salt",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "OPCACHE_REVALIDATE_FREQ",
                                        "value": "${OPCACHE_REVALIDATE_FREQ}"
                                    }
                                ],
                                "image": " ",
                                "livenessProbe": {
                                    "httpGet": {
                                        "path": "/health.php",
                                        "port": 8080
                                    },
                                    "initialDelaySeconds": 30,
                                    "periodSeconds": 60,
                                    "timeoutSeconds": 3
                                },
                                "name": "cakephp-mysql-example",
                                "ports": [
                                    {
                                        "containerPort": 8080
                                    }
                                ],
                                "readinessProbe": {
                                    "httpGet": {
                                        "path": "/health.php",
                                        "port": 8080
                                    },
                                    "initialDelaySeconds": 3,
                                    "periodSeconds": 60,
                                    "timeoutSeconds": 3
                                },
                                "resources": {
                                    "limits": {
                                        "memory": "${MEMORY_LIMIT}"
                                    }
                                }
                            }
                        ]
                    }
                },
                "triggers": [
                    {
                        "imageChangeParams": {
                            "automatic": true,
                            "containerNames": [
                                "cakephp-mysql-example"
                            ],
                            "from": {
                                "kind": "ImageStreamTag",
                                "name": "${NAME}:latest"
                            }
                        },
                        "type": "ImageChange"
                    },
                    {
                        "type": "ConfigChange"
                    }
                ]
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Service",
            "metadata": {
                "annotations": {
                    "description": "Exposes the database server"
                },
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "spec": {
                "ports": [
                    {
                        "name": "mysql",
                        "port": 3306,
                        "targetPort": 3306
                    }
                ],
                "selector": {
                    "name": "${DATABASE_SERVICE_NAME}"
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "DeploymentConfig",
            "metadata": {
                "annotations": {
                    "description": "Defines how to deploy the database",
                    "template.alpha.openshift.io/wait-for-ready": "true"
                },
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "spec": {
                "replicas": 1,
                "selector": {
                    "name": "${DATABASE_SERVICE_NAME}"
                },
                "strategy": {
                    "type": "Recreate"
                },
                "template": {
                    "metadata": {
                        "labels": {
                            "name": "${DATABASE_SERVICE_NAME}"
                        },
                        "name": "${DATABASE_SERVICE_NAME}"
                    },
                    "spec": {
                        "containers": [
                            {
                                "env": [
                                    {
                                        "name": "MYSQL_USER",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-user",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "MYSQL_PASSWORD",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-password",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "MYSQL_DATABASE",
                                        "value": "${DATABASE_NAME}"
                                    }
                                ],
                                "image": " ",
                                "livenessProbe": {
                                    "initialDelaySeconds": 30,
                                    "tcpSocket": {
                                        "port": 3306
                                    },
                                    "timeoutSeconds": 1
                                },
                                "name": "mysql",
                                "ports": [
                                    {
                                        "containerPort": 3306
                                    }
                                ],
                                "readinessProbe": {
                                    "exec": {
                                        "command": [
                                            "/bin/sh",
                                            "-i",
                                            "-c",
                                            "MYSQL_PWD='${DATABASE_PASSWORD}' mysql -h 127.0.0.1 -u ${DATABASE_USER} -D ${DATABASE_NAME} -e 'SELECT 1'"
                                        ]
                                    },
                                    "initialDelaySeconds": 5,
                                    "timeoutSeconds": 1
                                },
                                "resources": {
                                    "limits": {
                                        "memory": "${MEMORY_MYSQL_LIMIT}"
                                    }
                                },
                                "volumeMounts": [
                                    {
                                        "mountPath": "/var/lib/mysql/data",
                                        "name": "data"
                                    }
                                ]
                            }
                        ],
                        "volumes": [
                            {
                                "emptyDir": {},
                                "name": "data"
                            }
                        ]
                    }
                },
                "triggers": [
                    {
                        "imageChangeParams": {
                            "automatic": true,
                            "containerNames": [
                                "mysql"
                            ],
                            "from": {
                                "kind": "ImageStreamTag",
                                "name": "mysql:5.7",
                                "namespace": "${NAMESPACE}"
                            }
                        },
                        "type": "ImageChange"
                    },
                    {
                        "type": "ConfigChange"
                    }
                ]
            }
        }
    ],
    "parameters": [
        {
            "description": "The name assigned to all of the frontend objects defined in this template.",
            "displayName": "Name",
            "name": "NAME",
            "required": true,
            "value": "cakephp-mysql-example"
        },
        {
            "description": "The OpenShift Namespace where the ImageStream resides.",
            "displayName": "Namespace",
            "name": "NAMESPACE",
            "required": true,
            "value": "openshift"
        },
        {
            "description": "Version of PHP image to be used (7.1 or latest).",
            "displayName": "PHP Version",
            "name": "PHP_VERSION",
            "required": true,
            "value": "7.1"
        },
        {
            "description": "Maximum amount of memory the CakePHP container can use.",
            "displayName": "Memory Limit",
            "name": "MEMORY_LIMIT",
            "required": true,
            "value": "512Mi"
        },
        {
            "description": "Maximum amount of memory the MySQL container can use.",
            "displayName": "Memory Limit (MySQL)",
            "name": "MEMORY_MYSQL_LIMIT",
            "required": true,
            "value": "512Mi"
        },
        {
            "description": "The URL of the repository with your application source code.",
            "displayName": "Git Repository URL",
            "name": "SOURCE_REPOSITORY_URL",
            "required": true,
            "value": "https://github.com/sclorg/cakephp-ex.git"
        },
        {
            "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.",
            "displayName": "Git Reference",
            "name": "SOURCE_REPOSITORY_REF"
        },
        {
            "description": "Set this to the relative path to your project if it is not in the root of your repository.",
            "displayName": "Context Directory",
            "name": "CONTEXT_DIR"
        },
        {
            "description": "The exposed hostname that will route to the CakePHP service, if left blank a value will be defaulted.",
            "displayName": "Application Hostname",
            "name": "APPLICATION_DOMAIN",
            "value": ""
        },
        {
            "description": "Github trigger secret.  A difficult to guess string encoded as part of the webhook URL.  Not encrypted.",
            "displayName": "GitHub Webhook Secret",
            "from": "[a-zA-Z0-9]{40}",
            "generate": "expression",
            "name": "GITHUB_WEBHOOK_SECRET"
        },
        {
            "displayName": "Database Service Name",
            "name": "DATABASE_SERVICE_NAME",
            "required": true,
            "value": "mysql"
        },
        {
            "description": "Database engine: postgresql, mysql or sqlite (default).",
            "displayName": "Database Engine",
            "name": "DATABASE_ENGINE",
            "required": true,
            "value": "mysql"
        },
        {
            "displayName": "Database Name",
            "name": "DATABASE_NAME",
            "required": true,
            "value": "default"
        },
        {
            "displayName": "Database User",
            "name": "DATABASE_USER",
            "required": true,
            "value": "cakephp"
        },
        {
            "displayName": "Database Password",
            "from": "[a-zA-Z0-9]{16}",
            "generate": "expression",
            "name": "DATABASE_PASSWORD"
        },
        {
            "description": "Set this to a long random string.",
            "displayName": "CakePHP secret token",
            "from": "[\\w]{50}",
            "generate": "expression",
            "name": "CAKEPHP_SECRET_TOKEN"
        },
        {
            "description": "Security salt for session hash.",
            "displayName": "CakePHP Security Salt",
            "from": "[a-zA-Z0-9]{40}",
            "generate": "expression",
            "name": "CAKEPHP_SECURITY_SALT"
        },
        {
            "description": "How often to check script timestamps for updates, in seconds. 0 will result in OPcache checking for updates on every request.",
            "displayName": "OPcache Revalidation Frequency",
            "name": "OPCACHE_REVALIDATE_FREQ",
            "value": "2"
        },
        {
            "description": "The custom Composer mirror URL",
            "displayName": "Custom Composer Mirror URL",
            "name": "COMPOSER_MIRROR",
            "value": ""
        }
    ]
}`)

func examplesQuickstartsCakephpMysqlJsonBytes() ([]byte, error) {
	return _examplesQuickstartsCakephpMysqlJson, nil
}

func examplesQuickstartsCakephpMysqlJson() (*asset, error) {
	bytes, err := examplesQuickstartsCakephpMysqlJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "examples/quickstarts/cakephp-mysql.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _examplesQuickstartsDancerMysqlPersistentJson = []byte(`{
    "apiVersion": "v1",
    "kind": "Template",
    "labels": {
        "app": "dancer-mysql-persistent",
        "template": "dancer-mysql-persistent"
    },
    "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/dancer-ex/blob/master/README.md.",
    "metadata": {
        "annotations": {
            "description": "An example Dancer application with a MySQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/dancer-ex/blob/master/README.md.",
            "iconClass": "icon-perl",
            "openshift.io/display-name": "Dancer + MySQL",
            "openshift.io/documentation-url": "https://github.com/sclorg/dancer-ex",
            "openshift.io/long-description": "This template defines resources needed to develop a Dancer based application, including a build configuration, application deployment configuration, and database deployment configuration.",
            "openshift.io/provider-display-name": "Red Hat, Inc.",
            "openshift.io/support-url": "https://access.redhat.com",
            "tags": "quickstart,perl,dancer",
            "template.openshift.io/bindable": "false"
        },
        "name": "dancer-mysql-persistent"
    },
    "objects": [
        {
            "apiVersion": "v1",
            "kind": "Secret",
            "metadata": {
                "name": "${NAME}"
            },
            "stringData": {
                "database-password": "${DATABASE_PASSWORD}",
                "database-user": "${DATABASE_USER}",
                "keybase": "${SECRET_KEY_BASE}"
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Service",
            "metadata": {
                "annotations": {
                    "description": "Exposes and load balances the application pods",
                    "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]"
                },
                "name": "${NAME}"
            },
            "spec": {
                "ports": [
                    {
                        "name": "web",
                        "port": 8080,
                        "targetPort": 8080
                    }
                ],
                "selector": {
                    "name": "${NAME}"
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Route",
            "metadata": {
                "name": "${NAME}"
            },
            "spec": {
                "host": "${APPLICATION_DOMAIN}",
                "to": {
                    "kind": "Service",
                    "name": "${NAME}"
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "ImageStream",
            "metadata": {
                "annotations": {
                    "description": "Keeps track of changes in the application image"
                },
                "name": "${NAME}"
            }
        },
        {
            "apiVersion": "v1",
            "kind": "BuildConfig",
            "metadata": {
                "annotations": {
                    "description": "Defines how to build the application",
                    "template.alpha.openshift.io/wait-for-ready": "true"
                },
                "name": "${NAME}"
            },
            "spec": {
                "output": {
                    "to": {
                        "kind": "ImageStreamTag",
                        "name": "${NAME}:latest"
                    }
                },
                "postCommit": {
                    "script": "perl -I extlib/lib/perl5 -I lib t/*"
                },
                "source": {
                    "contextDir": "${CONTEXT_DIR}",
                    "git": {
                        "ref": "${SOURCE_REPOSITORY_REF}",
                        "uri": "${SOURCE_REPOSITORY_URL}"
                    },
                    "type": "Git"
                },
                "strategy": {
                    "sourceStrategy": {
                        "env": [
                            {
                                "name": "CPAN_MIRROR",
                                "value": "${CPAN_MIRROR}"
                            }
                        ],
                        "from": {
                            "kind": "ImageStreamTag",
                            "name": "perl:5.26",
                            "namespace": "${NAMESPACE}"
                        }
                    },
                    "type": "Source"
                },
                "triggers": [
                    {
                        "type": "ImageChange"
                    },
                    {
                        "type": "ConfigChange"
                    },
                    {
                        "github": {
                            "secret": "${GITHUB_WEBHOOK_SECRET}"
                        },
                        "type": "GitHub"
                    }
                ]
            }
        },
        {
            "apiVersion": "v1",
            "kind": "DeploymentConfig",
            "metadata": {
                "annotations": {
                    "description": "Defines how to deploy the application server",
                    "template.alpha.openshift.io/wait-for-ready": "true"
                },
                "name": "${NAME}"
            },
            "spec": {
                "replicas": 1,
                "selector": {
                    "name": "${NAME}"
                },
                "strategy": {
                    "type": "Recreate"
                },
                "template": {
                    "metadata": {
                        "labels": {
                            "name": "${NAME}"
                        },
                        "name": "${NAME}"
                    },
                    "spec": {
                        "containers": [
                            {
                                "env": [
                                    {
                                        "name": "DATABASE_SERVICE_NAME",
                                        "value": "${DATABASE_SERVICE_NAME}"
                                    },
                                    {
                                        "name": "MYSQL_USER",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-user",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "MYSQL_PASSWORD",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-password",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "MYSQL_DATABASE",
                                        "value": "${DATABASE_NAME}"
                                    },
                                    {
                                        "name": "SECRET_KEY_BASE",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "keybase",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "PERL_APACHE2_RELOAD",
                                        "value": "${PERL_APACHE2_RELOAD}"
                                    }
                                ],
                                "image": " ",
                                "livenessProbe": {
                                    "httpGet": {
                                        "path": "/health",
                                        "port": 8080
                                    },
                                    "initialDelaySeconds": 30,
                                    "timeoutSeconds": 3
                                },
                                "name": "dancer-mysql-persistent",
                                "ports": [
                                    {
                                        "containerPort": 8080
                                    }
                                ],
                                "readinessProbe": {
                                    "httpGet": {
                                        "path": "/health",
                                        "port": 8080
                                    },
                                    "initialDelaySeconds": 3,
                                    "timeoutSeconds": 3
                                },
                                "resources": {
                                    "limits": {
                                        "memory": "${MEMORY_LIMIT}"
                                    }
                                }
                            }
                        ]
                    }
                },
                "triggers": [
                    {
                        "imageChangeParams": {
                            "automatic": true,
                            "containerNames": [
                                "dancer-mysql-persistent"
                            ],
                            "from": {
                                "kind": "ImageStreamTag",
                                "name": "${NAME}:latest"
                            }
                        },
                        "type": "ImageChange"
                    },
                    {
                        "type": "ConfigChange"
                    }
                ]
            }
        },
        {
            "apiVersion": "v1",
            "kind": "PersistentVolumeClaim",
            "metadata": {
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "spec": {
                "accessModes": [
                    "ReadWriteOnce"
                ],
                "resources": {
                    "requests": {
                        "storage": "${VOLUME_CAPACITY}"
                    }
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Service",
            "metadata": {
                "annotations": {
                    "description": "Exposes the database server"
                },
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "spec": {
                "ports": [
                    {
                        "name": "mysql",
                        "port": 3306,
                        "targetPort": 3306
                    }
                ],
                "selector": {
                    "name": "${DATABASE_SERVICE_NAME}"
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "DeploymentConfig",
            "metadata": {
                "annotations": {
                    "description": "Defines how to deploy the database",
                    "template.alpha.openshift.io/wait-for-ready": "true"
                },
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "spec": {
                "replicas": 1,
                "selector": {
                    "name": "${DATABASE_SERVICE_NAME}"
                },
                "strategy": {
                    "type": "Recreate"
                },
                "template": {
                    "metadata": {
                        "labels": {
                            "name": "${DATABASE_SERVICE_NAME}"
                        },
                        "name": "${DATABASE_SERVICE_NAME}"
                    },
                    "spec": {
                        "containers": [
                            {
                                "env": [
                                    {
                                        "name": "MYSQL_USER",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-user",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "MYSQL_PASSWORD",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-password",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "MYSQL_DATABASE",
                                        "value": "${DATABASE_NAME}"
                                    }
                                ],
                                "image": " ",
                                "livenessProbe": {
                                    "initialDelaySeconds": 30,
                                    "tcpSocket": {
                                        "port": 3306
                                    },
                                    "timeoutSeconds": 1
                                },
                                "name": "mysql",
                                "ports": [
                                    {
                                        "containerPort": 3306
                                    }
                                ],
                                "readinessProbe": {
                                    "exec": {
                                        "command": [
                                            "/bin/sh",
                                            "-i",
                                            "-c",
                                            "MYSQL_PWD='${DATABASE_PASSWORD}' mysql -h 127.0.0.1 -u ${DATABASE_USER} -D ${DATABASE_NAME} -e 'SELECT 1'"
                                        ]
                                    },
                                    "initialDelaySeconds": 5,
                                    "timeoutSeconds": 1
                                },
                                "resources": {
                                    "limits": {
                                        "memory": "${MEMORY_MYSQL_LIMIT}"
                                    }
                                },
                                "volumeMounts": [
                                    {
                                        "mountPath": "/var/lib/mysql/data",
                                        "name": "${DATABASE_SERVICE_NAME}-data"
                                    }
                                ]
                            }
                        ],
                        "volumes": [
                            {
                                "name": "${DATABASE_SERVICE_NAME}-data",
                                "persistentVolumeClaim": {
                                    "claimName": "${DATABASE_SERVICE_NAME}"
                                }
                            }
                        ]
                    }
                },
                "triggers": [
                    {
                        "imageChangeParams": {
                            "automatic": true,
                            "containerNames": [
                                "mysql"
                            ],
                            "from": {
                                "kind": "ImageStreamTag",
                                "name": "mysql:5.7",
                                "namespace": "${NAMESPACE}"
                            }
                        },
                        "type": "ImageChange"
                    },
                    {
                        "type": "ConfigChange"
                    }
                ]
            }
        }
    ],
    "parameters": [
        {
            "description": "The name assigned to all of the frontend objects defined in this template.",
            "displayName": "Name",
            "name": "NAME",
            "required": true,
            "value": "dancer-mysql-persistent"
        },
        {
            "description": "The OpenShift Namespace where the ImageStream resides.",
            "displayName": "Namespace",
            "name": "NAMESPACE",
            "required": true,
            "value": "openshift"
        },
        {
            "description": "Maximum amount of memory the Perl Dancer container can use.",
            "displayName": "Memory Limit",
            "name": "MEMORY_LIMIT",
            "required": true,
            "value": "512Mi"
        },
        {
            "description": "Maximum amount of memory the MySQL container can use.",
            "displayName": "Memory Limit (MySQL)",
            "name": "MEMORY_MYSQL_LIMIT",
            "required": true,
            "value": "512Mi"
        },
        {
            "description": "Volume space available for data, e.g. 512Mi, 2Gi",
            "displayName": "Volume Capacity",
            "name": "VOLUME_CAPACITY",
            "required": true,
            "value": "1Gi"
        },
        {
            "description": "The URL of the repository with your application source code.",
            "displayName": "Git Repository URL",
            "name": "SOURCE_REPOSITORY_URL",
            "required": true,
            "value": "https://github.com/sclorg/dancer-ex.git"
        },
        {
            "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.",
            "displayName": "Git Reference",
            "name": "SOURCE_REPOSITORY_REF"
        },
        {
            "description": "Set this to the relative path to your project if it is not in the root of your repository.",
            "displayName": "Context Directory",
            "name": "CONTEXT_DIR"
        },
        {
            "description": "The exposed hostname that will route to the Dancer service, if left blank a value will be defaulted.",
            "displayName": "Application Hostname",
            "name": "APPLICATION_DOMAIN",
            "value": ""
        },
        {
            "description": "Github trigger secret.  A difficult to guess string encoded as part of the webhook URL.  Not encrypted.",
            "displayName": "GitHub Webhook Secret",
            "from": "[a-zA-Z0-9]{40}",
            "generate": "expression",
            "name": "GITHUB_WEBHOOK_SECRET"
        },
        {
            "displayName": "Database Service Name",
            "name": "DATABASE_SERVICE_NAME",
            "required": true,
            "value": "database"
        },
        {
            "displayName": "Database Username",
            "from": "user[A-Z0-9]{3}",
            "generate": "expression",
            "name": "DATABASE_USER"
        },
        {
            "displayName": "Database Password",
            "from": "[a-zA-Z0-9]{8}",
            "generate": "expression",
            "name": "DATABASE_PASSWORD"
        },
        {
            "displayName": "Database Name",
            "name": "DATABASE_NAME",
            "required": true,
            "value": "sampledb"
        },
        {
            "description": "Set this to \"true\" to enable automatic reloading of modified Perl modules.",
            "displayName": "Perl Module Reload",
            "name": "PERL_APACHE2_RELOAD",
            "value": ""
        },
        {
            "description": "Your secret key for verifying the integrity of signed cookies.",
            "displayName": "Secret Key",
            "from": "[a-z0-9]{127}",
            "generate": "expression",
            "name": "SECRET_KEY_BASE"
        },
        {
            "description": "The custom CPAN mirror URL",
            "displayName": "Custom CPAN Mirror URL",
            "name": "CPAN_MIRROR",
            "value": ""
        }
    ]
}`)

func examplesQuickstartsDancerMysqlPersistentJsonBytes() ([]byte, error) {
	return _examplesQuickstartsDancerMysqlPersistentJson, nil
}

func examplesQuickstartsDancerMysqlPersistentJson() (*asset, error) {
	bytes, err := examplesQuickstartsDancerMysqlPersistentJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "examples/quickstarts/dancer-mysql-persistent.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _examplesQuickstartsDancerMysqlJson = []byte(`{
    "apiVersion": "v1",
    "kind": "Template",
    "labels": {
        "app": "dancer-mysql-example",
        "template": "dancer-mysql-example"
    },
    "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/dancer-ex/blob/master/README.md.",
    "metadata": {
        "annotations": {
            "description": "An example Dancer application with a MySQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/dancer-ex/blob/master/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.",
            "iconClass": "icon-perl",
            "openshift.io/display-name": "Dancer + MySQL (Ephemeral)",
            "openshift.io/documentation-url": "https://github.com/sclorg/dancer-ex",
            "openshift.io/long-description": "This template defines resources needed to develop a Dancer based application, including a build configuration, application deployment configuration, and database deployment configuration.  The database is stored in non-persistent storage, so this configuration should be used for experimental purposes only.",
            "openshift.io/provider-display-name": "Red Hat, Inc.",
            "openshift.io/support-url": "https://access.redhat.com",
            "tags": "quickstart,perl,dancer",
            "template.openshift.io/bindable": "false"
        },
        "name": "dancer-mysql-example"
    },
    "objects": [
        {
            "apiVersion": "v1",
            "kind": "Secret",
            "metadata": {
                "name": "${NAME}"
            },
            "stringData": {
                "database-password": "${DATABASE_PASSWORD}",
                "database-user": "${DATABASE_USER}",
                "keybase": "${SECRET_KEY_BASE}"
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Service",
            "metadata": {
                "annotations": {
                    "description": "Exposes and load balances the application pods",
                    "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]"
                },
                "name": "${NAME}"
            },
            "spec": {
                "ports": [
                    {
                        "name": "web",
                        "port": 8080,
                        "targetPort": 8080
                    }
                ],
                "selector": {
                    "name": "${NAME}"
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Route",
            "metadata": {
                "name": "${NAME}"
            },
            "spec": {
                "host": "${APPLICATION_DOMAIN}",
                "to": {
                    "kind": "Service",
                    "name": "${NAME}"
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "ImageStream",
            "metadata": {
                "annotations": {
                    "description": "Keeps track of changes in the application image"
                },
                "name": "${NAME}"
            }
        },
        {
            "apiVersion": "v1",
            "kind": "BuildConfig",
            "metadata": {
                "annotations": {
                    "description": "Defines how to build the application",
                    "template.alpha.openshift.io/wait-for-ready": "true"
                },
                "name": "${NAME}"
            },
            "spec": {
                "output": {
                    "to": {
                        "kind": "ImageStreamTag",
                        "name": "${NAME}:latest"
                    }
                },
                "postCommit": {
                    "script": "perl -I extlib/lib/perl5 -I lib t/*"
                },
                "source": {
                    "contextDir": "${CONTEXT_DIR}",
                    "git": {
                        "ref": "${SOURCE_REPOSITORY_REF}",
                        "uri": "${SOURCE_REPOSITORY_URL}"
                    },
                    "type": "Git"
                },
                "strategy": {
                    "sourceStrategy": {
                        "env": [
                            {
                                "name": "CPAN_MIRROR",
                                "value": "${CPAN_MIRROR}"
                            }
                        ],
                        "from": {
                            "kind": "ImageStreamTag",
                            "name": "perl:5.26",
                            "namespace": "${NAMESPACE}"
                        }
                    },
                    "type": "Source"
                },
                "triggers": [
                    {
                        "type": "ImageChange"
                    },
                    {
                        "type": "ConfigChange"
                    },
                    {
                        "github": {
                            "secret": "${GITHUB_WEBHOOK_SECRET}"
                        },
                        "type": "GitHub"
                    }
                ]
            }
        },
        {
            "apiVersion": "v1",
            "kind": "DeploymentConfig",
            "metadata": {
                "annotations": {
                    "description": "Defines how to deploy the application server",
                    "template.alpha.openshift.io/wait-for-ready": "true"
                },
                "name": "${NAME}"
            },
            "spec": {
                "replicas": 1,
                "selector": {
                    "name": "${NAME}"
                },
                "strategy": {
                    "type": "Recreate"
                },
                "template": {
                    "metadata": {
                        "labels": {
                            "name": "${NAME}"
                        },
                        "name": "${NAME}"
                    },
                    "spec": {
                        "containers": [
                            {
                                "env": [
                                    {
                                        "name": "DATABASE_SERVICE_NAME",
                                        "value": "${DATABASE_SERVICE_NAME}"
                                    },
                                    {
                                        "name": "MYSQL_USER",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-user",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "MYSQL_PASSWORD",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-password",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "MYSQL_DATABASE",
                                        "value": "${DATABASE_NAME}"
                                    },
                                    {
                                        "name": "SECRET_KEY_BASE",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "keybase",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "PERL_APACHE2_RELOAD",
                                        "value": "${PERL_APACHE2_RELOAD}"
                                    }
                                ],
                                "image": " ",
                                "livenessProbe": {
                                    "httpGet": {
                                        "path": "/health",
                                        "port": 8080
                                    },
                                    "initialDelaySeconds": 30,
                                    "timeoutSeconds": 3
                                },
                                "name": "dancer-mysql-example",
                                "ports": [
                                    {
                                        "containerPort": 8080
                                    }
                                ],
                                "readinessProbe": {
                                    "httpGet": {
                                        "path": "/health",
                                        "port": 8080
                                    },
                                    "initialDelaySeconds": 3,
                                    "timeoutSeconds": 3
                                },
                                "resources": {
                                    "limits": {
                                        "memory": "${MEMORY_LIMIT}"
                                    }
                                }
                            }
                        ]
                    }
                },
                "triggers": [
                    {
                        "imageChangeParams": {
                            "automatic": true,
                            "containerNames": [
                                "dancer-mysql-example"
                            ],
                            "from": {
                                "kind": "ImageStreamTag",
                                "name": "${NAME}:latest"
                            }
                        },
                        "type": "ImageChange"
                    },
                    {
                        "type": "ConfigChange"
                    }
                ]
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Service",
            "metadata": {
                "annotations": {
                    "description": "Exposes the database server"
                },
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "spec": {
                "ports": [
                    {
                        "name": "mysql",
                        "port": 3306,
                        "targetPort": 3306
                    }
                ],
                "selector": {
                    "name": "${DATABASE_SERVICE_NAME}"
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "DeploymentConfig",
            "metadata": {
                "annotations": {
                    "description": "Defines how to deploy the database",
                    "template.alpha.openshift.io/wait-for-ready": "true"
                },
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "spec": {
                "replicas": 1,
                "selector": {
                    "name": "${DATABASE_SERVICE_NAME}"
                },
                "strategy": {
                    "type": "Recreate"
                },
                "template": {
                    "metadata": {
                        "labels": {
                            "name": "${DATABASE_SERVICE_NAME}"
                        },
                        "name": "${DATABASE_SERVICE_NAME}"
                    },
                    "spec": {
                        "containers": [
                            {
                                "env": [
                                    {
                                        "name": "MYSQL_USER",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-user",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "MYSQL_PASSWORD",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-password",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "MYSQL_DATABASE",
                                        "value": "${DATABASE_NAME}"
                                    }
                                ],
                                "image": " ",
                                "livenessProbe": {
                                    "initialDelaySeconds": 30,
                                    "tcpSocket": {
                                        "port": 3306
                                    },
                                    "timeoutSeconds": 1
                                },
                                "name": "mysql",
                                "ports": [
                                    {
                                        "containerPort": 3306
                                    }
                                ],
                                "readinessProbe": {
                                    "exec": {
                                        "command": [
                                            "/bin/sh",
                                            "-i",
                                            "-c",
                                            "MYSQL_PWD='${DATABASE_PASSWORD}' mysql -h 127.0.0.1 -u ${DATABASE_USER} -D ${DATABASE_NAME} -e 'SELECT 1'"
                                        ]
                                    },
                                    "initialDelaySeconds": 5,
                                    "timeoutSeconds": 1
                                },
                                "resources": {
                                    "limits": {
                                        "memory": "${MEMORY_MYSQL_LIMIT}"
                                    }
                                },
                                "volumeMounts": [
                                    {
                                        "mountPath": "/var/lib/mysql/data",
                                        "name": "data"
                                    }
                                ]
                            }
                        ],
                        "volumes": [
                            {
                                "emptyDir": {},
                                "name": "data"
                            }
                        ]
                    }
                },
                "triggers": [
                    {
                        "imageChangeParams": {
                            "automatic": true,
                            "containerNames": [
                                "mysql"
                            ],
                            "from": {
                                "kind": "ImageStreamTag",
                                "name": "mysql:5.7",
                                "namespace": "${NAMESPACE}"
                            }
                        },
                        "type": "ImageChange"
                    },
                    {
                        "type": "ConfigChange"
                    }
                ]
            }
        }
    ],
    "parameters": [
        {
            "description": "The name assigned to all of the frontend objects defined in this template.",
            "displayName": "Name",
            "name": "NAME",
            "required": true,
            "value": "dancer-mysql-example"
        },
        {
            "description": "The OpenShift Namespace where the ImageStream resides.",
            "displayName": "Namespace",
            "name": "NAMESPACE",
            "required": true,
            "value": "openshift"
        },
        {
            "description": "Maximum amount of memory the Perl Dancer container can use.",
            "displayName": "Memory Limit",
            "name": "MEMORY_LIMIT",
            "required": true,
            "value": "512Mi"
        },
        {
            "description": "Maximum amount of memory the MySQL container can use.",
            "displayName": "Memory Limit (MySQL)",
            "name": "MEMORY_MYSQL_LIMIT",
            "required": true,
            "value": "512Mi"
        },
        {
            "description": "The URL of the repository with your application source code.",
            "displayName": "Git Repository URL",
            "name": "SOURCE_REPOSITORY_URL",
            "required": true,
            "value": "https://github.com/sclorg/dancer-ex.git"
        },
        {
            "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.",
            "displayName": "Git Reference",
            "name": "SOURCE_REPOSITORY_REF"
        },
        {
            "description": "Set this to the relative path to your project if it is not in the root of your repository.",
            "displayName": "Context Directory",
            "name": "CONTEXT_DIR"
        },
        {
            "description": "The exposed hostname that will route to the Dancer service, if left blank a value will be defaulted.",
            "displayName": "Application Hostname",
            "name": "APPLICATION_DOMAIN",
            "value": ""
        },
        {
            "description": "Github trigger secret.  A difficult to guess string encoded as part of the webhook URL.  Not encrypted.",
            "displayName": "GitHub Webhook Secret",
            "from": "[a-zA-Z0-9]{40}",
            "generate": "expression",
            "name": "GITHUB_WEBHOOK_SECRET"
        },
        {
            "displayName": "Database Service Name",
            "name": "DATABASE_SERVICE_NAME",
            "required": true,
            "value": "database"
        },
        {
            "displayName": "Database Username",
            "from": "user[A-Z0-9]{3}",
            "generate": "expression",
            "name": "DATABASE_USER"
        },
        {
            "displayName": "Database Password",
            "from": "[a-zA-Z0-9]{8}",
            "generate": "expression",
            "name": "DATABASE_PASSWORD"
        },
        {
            "displayName": "Database Name",
            "name": "DATABASE_NAME",
            "required": true,
            "value": "sampledb"
        },
        {
            "description": "Set this to \"true\" to enable automatic reloading of modified Perl modules.",
            "displayName": "Perl Module Reload",
            "name": "PERL_APACHE2_RELOAD",
            "value": ""
        },
        {
            "description": "Your secret key for verifying the integrity of signed cookies.",
            "displayName": "Secret Key",
            "from": "[a-z0-9]{127}",
            "generate": "expression",
            "name": "SECRET_KEY_BASE"
        },
        {
            "description": "The custom CPAN mirror URL",
            "displayName": "Custom CPAN Mirror URL",
            "name": "CPAN_MIRROR",
            "value": ""
        }
    ]
}`)

func examplesQuickstartsDancerMysqlJsonBytes() ([]byte, error) {
	return _examplesQuickstartsDancerMysqlJson, nil
}

func examplesQuickstartsDancerMysqlJson() (*asset, error) {
	bytes, err := examplesQuickstartsDancerMysqlJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "examples/quickstarts/dancer-mysql.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _examplesQuickstartsDjangoPostgresqlPersistentJson = []byte(`{
    "apiVersion": "v1",
    "kind": "Template",
    "labels": {
        "app": "django-psql-persistent",
        "template": "django-psql-persistent"
    },
    "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/django-ex/blob/master/README.md.",
    "metadata": {
        "annotations": {
            "description": "An example Django application with a PostgreSQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/django-ex/blob/master/README.md.",
            "iconClass": "icon-python",
            "openshift.io/display-name": "Django + PostgreSQL",
            "openshift.io/documentation-url": "https://github.com/sclorg/django-ex",
            "openshift.io/long-description": "This template defines resources needed to develop a Django based application, including a build configuration, application deployment configuration, and database deployment configuration.",
            "openshift.io/provider-display-name": "Red Hat, Inc.",
            "openshift.io/support-url": "https://access.redhat.com",
            "tags": "quickstart,python,django",
            "template.openshift.io/bindable": "false"
        },
        "name": "django-psql-persistent"
    },
    "objects": [
        {
            "apiVersion": "v1",
            "kind": "Secret",
            "metadata": {
                "name": "${NAME}"
            },
            "stringData": {
                "database-password": "${DATABASE_PASSWORD}",
                "database-user": "${DATABASE_USER}",
                "django-secret-key": "${DJANGO_SECRET_KEY}"
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Service",
            "metadata": {
                "annotations": {
                    "description": "Exposes and load balances the application pods",
                    "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]"
                },
                "name": "${NAME}"
            },
            "spec": {
                "ports": [
                    {
                        "name": "web",
                        "port": 8080,
                        "targetPort": 8080
                    }
                ],
                "selector": {
                    "name": "${NAME}"
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Route",
            "metadata": {
                "name": "${NAME}"
            },
            "spec": {
                "host": "${APPLICATION_DOMAIN}",
                "to": {
                    "kind": "Service",
                    "name": "${NAME}"
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "ImageStream",
            "metadata": {
                "annotations": {
                    "description": "Keeps track of changes in the application image"
                },
                "name": "${NAME}"
            }
        },
        {
            "apiVersion": "v1",
            "kind": "BuildConfig",
            "metadata": {
                "annotations": {
                    "description": "Defines how to build the application",
                    "template.alpha.openshift.io/wait-for-ready": "true"
                },
                "name": "${NAME}"
            },
            "spec": {
                "output": {
                    "to": {
                        "kind": "ImageStreamTag",
                        "name": "${NAME}:latest"
                    }
                },
                "postCommit": {
                    "script": "./manage.py test"
                },
                "source": {
                    "contextDir": "${CONTEXT_DIR}",
                    "git": {
                        "ref": "${SOURCE_REPOSITORY_REF}",
                        "uri": "${SOURCE_REPOSITORY_URL}"
                    },
                    "type": "Git"
                },
                "strategy": {
                    "sourceStrategy": {
                        "env": [
                            {
                                "name": "PIP_INDEX_URL",
                                "value": "${PIP_INDEX_URL}"
                            }
                        ],
                        "from": {
                            "kind": "ImageStreamTag",
                            "name": "python:${PYTHON_VERSION}",
                            "namespace": "${NAMESPACE}"
                        }
                    },
                    "type": "Source"
                },
                "triggers": [
                    {
                        "type": "ImageChange"
                    },
                    {
                        "type": "ConfigChange"
                    },
                    {
                        "github": {
                            "secret": "${GITHUB_WEBHOOK_SECRET}"
                        },
                        "type": "GitHub"
                    }
                ]
            }
        },
        {
            "apiVersion": "v1",
            "kind": "DeploymentConfig",
            "metadata": {
                "annotations": {
                    "description": "Defines how to deploy the application server",
                    "template.alpha.openshift.io/wait-for-ready": "true"
                },
                "name": "${NAME}"
            },
            "spec": {
                "replicas": 1,
                "selector": {
                    "name": "${NAME}"
                },
                "strategy": {
                    "type": "Recreate"
                },
                "template": {
                    "metadata": {
                        "labels": {
                            "name": "${NAME}"
                        },
                        "name": "${NAME}"
                    },
                    "spec": {
                        "containers": [
                            {
                                "env": [
                                    {
                                        "name": "DATABASE_SERVICE_NAME",
                                        "value": "${DATABASE_SERVICE_NAME}"
                                    },
                                    {
                                        "name": "DATABASE_ENGINE",
                                        "value": "${DATABASE_ENGINE}"
                                    },
                                    {
                                        "name": "DATABASE_NAME",
                                        "value": "${DATABASE_NAME}"
                                    },
                                    {
                                        "name": "DATABASE_USER",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-user",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "DATABASE_PASSWORD",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-password",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "APP_CONFIG",
                                        "value": "${APP_CONFIG}"
                                    },
                                    {
                                        "name": "DJANGO_SECRET_KEY",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "django-secret-key",
                                                "name": "${NAME}"
                                            }
                                        }
                                    }
                                ],
                                "image": " ",
                                "livenessProbe": {
                                    "httpGet": {
                                        "path": "/health",
                                        "port": 8080
                                    },
                                    "initialDelaySeconds": 30,
                                    "timeoutSeconds": 3
                                },
                                "name": "django-psql-persistent",
                                "ports": [
                                    {
                                        "containerPort": 8080
                                    }
                                ],
                                "readinessProbe": {
                                    "httpGet": {
                                        "path": "/health",
                                        "port": 8080
                                    },
                                    "initialDelaySeconds": 3,
                                    "timeoutSeconds": 3
                                },
                                "resources": {
                                    "limits": {
                                        "memory": "${MEMORY_LIMIT}"
                                    }
                                }
                            }
                        ]
                    }
                },
                "triggers": [
                    {
                        "imageChangeParams": {
                            "automatic": true,
                            "containerNames": [
                                "django-psql-persistent"
                            ],
                            "from": {
                                "kind": "ImageStreamTag",
                                "name": "${NAME}:latest"
                            }
                        },
                        "type": "ImageChange"
                    },
                    {
                        "type": "ConfigChange"
                    }
                ]
            }
        },
        {
            "apiVersion": "v1",
            "kind": "PersistentVolumeClaim",
            "metadata": {
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "spec": {
                "accessModes": [
                    "ReadWriteOnce"
                ],
                "resources": {
                    "requests": {
                        "storage": "${VOLUME_CAPACITY}"
                    }
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Service",
            "metadata": {
                "annotations": {
                    "description": "Exposes the database server"
                },
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "spec": {
                "ports": [
                    {
                        "name": "postgresql",
                        "port": 5432,
                        "targetPort": 5432
                    }
                ],
                "selector": {
                    "name": "${DATABASE_SERVICE_NAME}"
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "DeploymentConfig",
            "metadata": {
                "annotations": {
                    "description": "Defines how to deploy the database",
                    "template.alpha.openshift.io/wait-for-ready": "true"
                },
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "spec": {
                "replicas": 1,
                "selector": {
                    "name": "${DATABASE_SERVICE_NAME}"
                },
                "strategy": {
                    "type": "Recreate"
                },
                "template": {
                    "metadata": {
                        "labels": {
                            "name": "${DATABASE_SERVICE_NAME}"
                        },
                        "name": "${DATABASE_SERVICE_NAME}"
                    },
                    "spec": {
                        "containers": [
                            {
                                "env": [
                                    {
                                        "name": "POSTGRESQL_USER",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-user",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "POSTGRESQL_PASSWORD",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-password",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "POSTGRESQL_DATABASE",
                                        "value": "${DATABASE_NAME}"
                                    }
                                ],
                                "image": " ",
                                "livenessProbe": {
                                    "exec": {
                                        "command": [
                                            "/usr/libexec/check-container",
                                            "--live"
                                        ]
                                    },
                                    "initialDelaySeconds": 120,
                                    "timeoutSeconds": 10
                                },
                                "name": "postgresql",
                                "ports": [
                                    {
                                        "containerPort": 5432
                                    }
                                ],
                                "readinessProbe": {
                                    "exec": {
                                        "command": [
                                            "/usr/libexec/check-container"
                                        ]
                                    },
                                    "initialDelaySeconds": 5,
                                    "timeoutSeconds": 1
                                },
                                "resources": {
                                    "limits": {
                                        "memory": "${MEMORY_POSTGRESQL_LIMIT}"
                                    }
                                },
                                "volumeMounts": [
                                    {
                                        "mountPath": "/var/lib/pgsql/data",
                                        "name": "${DATABASE_SERVICE_NAME}-data"
                                    }
                                ]
                            }
                        ],
                        "volumes": [
                            {
                                "name": "${DATABASE_SERVICE_NAME}-data",
                                "persistentVolumeClaim": {
                                    "claimName": "${DATABASE_SERVICE_NAME}"
                                }
                            }
                        ]
                    }
                },
                "triggers": [
                    {
                        "imageChangeParams": {
                            "automatic": true,
                            "containerNames": [
                                "postgresql"
                            ],
                            "from": {
                                "kind": "ImageStreamTag",
                                "name": "postgresql:${POSTGRESQL_VERSION}",
                                "namespace": "${NAMESPACE}"
                            }
                        },
                        "type": "ImageChange"
                    },
                    {
                        "type": "ConfigChange"
                    }
                ]
            }
        }
    ],
    "parameters": [
        {
            "description": "The name assigned to all of the frontend objects defined in this template.",
            "displayName": "Name",
            "name": "NAME",
            "required": true,
            "value": "django-psql-persistent"
        },
        {
            "description": "The OpenShift Namespace where the ImageStream resides.",
            "displayName": "Namespace",
            "name": "NAMESPACE",
            "required": true,
            "value": "openshift"
        },
        {
            "description": "Version of Python image to be used (3.6 or latest).",
            "displayName": "Version of Python Image",
            "name": "PYTHON_VERSION",
            "required": true,
            "value": "3.6"
        },
        {
            "description": "Version of PostgreSQL image to be used (10 or latest).",
            "displayName": "Version of PostgreSQL Image",
            "name": "POSTGRESQL_VERSION",
            "required": true,
            "value": "10"
        },
        {
            "description": "Maximum amount of memory the Django container can use.",
            "displayName": "Memory Limit",
            "name": "MEMORY_LIMIT",
            "required": true,
            "value": "512Mi"
        },
        {
            "description": "Maximum amount of memory the PostgreSQL container can use.",
            "displayName": "Memory Limit (PostgreSQL)",
            "name": "MEMORY_POSTGRESQL_LIMIT",
            "required": true,
            "value": "512Mi"
        },
        {
            "description": "Volume space available for data, e.g. 512Mi, 2Gi",
            "displayName": "Volume Capacity",
            "name": "VOLUME_CAPACITY",
            "required": true,
            "value": "1Gi"
        },
        {
            "description": "The URL of the repository with your application source code.",
            "displayName": "Git Repository URL",
            "name": "SOURCE_REPOSITORY_URL",
            "required": true,
            "value": "https://github.com/sclorg/django-ex.git"
        },
        {
            "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.",
            "displayName": "Git Reference",
            "name": "SOURCE_REPOSITORY_REF"
        },
        {
            "description": "Set this to the relative path to your project if it is not in the root of your repository.",
            "displayName": "Context Directory",
            "name": "CONTEXT_DIR"
        },
        {
            "description": "The exposed hostname that will route to the Django service, if left blank a value will be defaulted.",
            "displayName": "Application Hostname",
            "name": "APPLICATION_DOMAIN",
            "value": ""
        },
        {
            "description": "Github trigger secret.  A difficult to guess string encoded as part of the webhook URL.  Not encrypted.",
            "displayName": "GitHub Webhook Secret",
            "from": "[a-zA-Z0-9]{40}",
            "generate": "expression",
            "name": "GITHUB_WEBHOOK_SECRET"
        },
        {
            "displayName": "Database Service Name",
            "name": "DATABASE_SERVICE_NAME",
            "required": true,
            "value": "postgresql"
        },
        {
            "description": "Database engine: postgresql, mysql or sqlite (default).",
            "displayName": "Database Engine",
            "name": "DATABASE_ENGINE",
            "required": true,
            "value": "postgresql"
        },
        {
            "displayName": "Database Name",
            "name": "DATABASE_NAME",
            "required": true,
            "value": "default"
        },
        {
            "displayName": "Database Username",
            "name": "DATABASE_USER",
            "required": true,
            "value": "django"
        },
        {
            "displayName": "Database User Password",
            "from": "[a-zA-Z0-9]{16}",
            "generate": "expression",
            "name": "DATABASE_PASSWORD"
        },
        {
            "description": "Relative path to Gunicorn configuration file (optional).",
            "displayName": "Application Configuration File Path",
            "name": "APP_CONFIG"
        },
        {
            "description": "Set this to a long random string.",
            "displayName": "Django Secret Key",
            "from": "[\\w]{50}",
            "generate": "expression",
            "name": "DJANGO_SECRET_KEY"
        },
        {
            "description": "The custom PyPi index URL",
            "displayName": "Custom PyPi Index URL",
            "name": "PIP_INDEX_URL",
            "value": ""
        }
    ]
}`)

func examplesQuickstartsDjangoPostgresqlPersistentJsonBytes() ([]byte, error) {
	return _examplesQuickstartsDjangoPostgresqlPersistentJson, nil
}

func examplesQuickstartsDjangoPostgresqlPersistentJson() (*asset, error) {
	bytes, err := examplesQuickstartsDjangoPostgresqlPersistentJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "examples/quickstarts/django-postgresql-persistent.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _examplesQuickstartsDjangoPostgresqlJson = []byte(`{
    "apiVersion": "v1",
    "kind": "Template",
    "labels": {
        "app": "django-psql-example",
        "template": "django-psql-example"
    },
    "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/django-ex/blob/master/README.md.",
    "metadata": {
        "annotations": {
            "description": "An example Django application with a PostgreSQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/django-ex/blob/master/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.",
            "iconClass": "icon-python",
            "openshift.io/display-name": "Django + PostgreSQL (Ephemeral)",
            "openshift.io/documentation-url": "https://github.com/sclorg/django-ex",
            "openshift.io/long-description": "This template defines resources needed to develop a Django based application, including a build configuration, application deployment configuration, and database deployment configuration.  The database is stored in non-persistent storage, so this configuration should be used for experimental purposes only.",
            "openshift.io/provider-display-name": "Red Hat, Inc.",
            "openshift.io/support-url": "https://access.redhat.com",
            "tags": "quickstart,python,django",
            "template.openshift.io/bindable": "false"
        },
        "name": "django-psql-example"
    },
    "objects": [
        {
            "apiVersion": "v1",
            "kind": "Secret",
            "metadata": {
                "name": "${NAME}"
            },
            "stringData": {
                "database-password": "${DATABASE_PASSWORD}",
                "database-user": "${DATABASE_USER}",
                "django-secret-key": "${DJANGO_SECRET_KEY}"
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Service",
            "metadata": {
                "annotations": {
                    "description": "Exposes and load balances the application pods",
                    "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]"
                },
                "name": "${NAME}"
            },
            "spec": {
                "ports": [
                    {
                        "name": "web",
                        "port": 8080,
                        "targetPort": 8080
                    }
                ],
                "selector": {
                    "name": "${NAME}"
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Route",
            "metadata": {
                "name": "${NAME}"
            },
            "spec": {
                "host": "${APPLICATION_DOMAIN}",
                "to": {
                    "kind": "Service",
                    "name": "${NAME}"
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "ImageStream",
            "metadata": {
                "annotations": {
                    "description": "Keeps track of changes in the application image"
                },
                "name": "${NAME}"
            }
        },
        {
            "apiVersion": "v1",
            "kind": "BuildConfig",
            "metadata": {
                "annotations": {
                    "description": "Defines how to build the application",
                    "template.alpha.openshift.io/wait-for-ready": "true"
                },
                "name": "${NAME}"
            },
            "spec": {
                "output": {
                    "to": {
                        "kind": "ImageStreamTag",
                        "name": "${NAME}:latest"
                    }
                },
                "postCommit": {
                    "script": "./manage.py test"
                },
                "source": {
                    "contextDir": "${CONTEXT_DIR}",
                    "git": {
                        "ref": "${SOURCE_REPOSITORY_REF}",
                        "uri": "${SOURCE_REPOSITORY_URL}"
                    },
                    "type": "Git"
                },
                "strategy": {
                    "sourceStrategy": {
                        "env": [
                            {
                                "name": "PIP_INDEX_URL",
                                "value": "${PIP_INDEX_URL}"
                            }
                        ],
                        "from": {
                            "kind": "ImageStreamTag",
                            "name": "python:${PYTHON_VERSION}",
                            "namespace": "${NAMESPACE}"
                        }
                    },
                    "type": "Source"
                },
                "triggers": [
                    {
                        "type": "ImageChange"
                    },
                    {
                        "type": "ConfigChange"
                    },
                    {
                        "github": {
                            "secret": "${GITHUB_WEBHOOK_SECRET}"
                        },
                        "type": "GitHub"
                    }
                ]
            }
        },
        {
            "apiVersion": "v1",
            "kind": "DeploymentConfig",
            "metadata": {
                "annotations": {
                    "description": "Defines how to deploy the application server",
                    "template.alpha.openshift.io/wait-for-ready": "true"
                },
                "name": "${NAME}"
            },
            "spec": {
                "replicas": 1,
                "selector": {
                    "name": "${NAME}"
                },
                "strategy": {
                    "type": "Recreate"
                },
                "template": {
                    "metadata": {
                        "labels": {
                            "name": "${NAME}"
                        },
                        "name": "${NAME}"
                    },
                    "spec": {
                        "containers": [
                            {
                                "env": [
                                    {
                                        "name": "DATABASE_SERVICE_NAME",
                                        "value": "${DATABASE_SERVICE_NAME}"
                                    },
                                    {
                                        "name": "DATABASE_ENGINE",
                                        "value": "${DATABASE_ENGINE}"
                                    },
                                    {
                                        "name": "DATABASE_NAME",
                                        "value": "${DATABASE_NAME}"
                                    },
                                    {
                                        "name": "DATABASE_USER",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-user",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "DATABASE_PASSWORD",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-password",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "APP_CONFIG",
                                        "value": "${APP_CONFIG}"
                                    },
                                    {
                                        "name": "DJANGO_SECRET_KEY",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "django-secret-key",
                                                "name": "${NAME}"
                                            }
                                        }
                                    }
                                ],
                                "image": " ",
                                "livenessProbe": {
                                    "httpGet": {
                                        "path": "/health",
                                        "port": 8080
                                    },
                                    "initialDelaySeconds": 30,
                                    "timeoutSeconds": 3
                                },
                                "name": "django-psql-example",
                                "ports": [
                                    {
                                        "containerPort": 8080
                                    }
                                ],
                                "readinessProbe": {
                                    "httpGet": {
                                        "path": "/health",
                                        "port": 8080
                                    },
                                    "initialDelaySeconds": 3,
                                    "timeoutSeconds": 3
                                },
                                "resources": {
                                    "limits": {
                                        "memory": "${MEMORY_LIMIT}"
                                    }
                                }
                            }
                        ]
                    }
                },
                "triggers": [
                    {
                        "imageChangeParams": {
                            "automatic": true,
                            "containerNames": [
                                "django-psql-example"
                            ],
                            "from": {
                                "kind": "ImageStreamTag",
                                "name": "${NAME}:latest"
                            }
                        },
                        "type": "ImageChange"
                    },
                    {
                        "type": "ConfigChange"
                    }
                ]
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Service",
            "metadata": {
                "annotations": {
                    "description": "Exposes the database server"
                },
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "spec": {
                "ports": [
                    {
                        "name": "postgresql",
                        "port": 5432,
                        "targetPort": 5432
                    }
                ],
                "selector": {
                    "name": "${DATABASE_SERVICE_NAME}"
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "DeploymentConfig",
            "metadata": {
                "annotations": {
                    "description": "Defines how to deploy the database",
                    "template.alpha.openshift.io/wait-for-ready": "true"
                },
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "spec": {
                "replicas": 1,
                "selector": {
                    "name": "${DATABASE_SERVICE_NAME}"
                },
                "strategy": {
                    "type": "Recreate"
                },
                "template": {
                    "metadata": {
                        "labels": {
                            "name": "${DATABASE_SERVICE_NAME}"
                        },
                        "name": "${DATABASE_SERVICE_NAME}"
                    },
                    "spec": {
                        "containers": [
                            {
                                "env": [
                                    {
                                        "name": "POSTGRESQL_USER",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-user",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "POSTGRESQL_PASSWORD",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-password",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "POSTGRESQL_DATABASE",
                                        "value": "${DATABASE_NAME}"
                                    }
                                ],
                                "image": " ",
                                "livenessProbe": {
                                    "exec": {
                                        "command": [
                                            "/usr/libexec/check-container",
                                            "--live"
                                        ]
                                    },
                                    "initialDelaySeconds": 120,
                                    "timeoutSeconds": 10
                                },
                                "name": "postgresql",
                                "ports": [
                                    {
                                        "containerPort": 5432
                                    }
                                ],
                                "readinessProbe": {
                                    "exec": {
                                        "command": [
                                            "/usr/libexec/check-container"
                                        ]
                                    },
                                    "initialDelaySeconds": 5,
                                    "timeoutSeconds": 1
                                },
                                "resources": {
                                    "limits": {
                                        "memory": "${MEMORY_POSTGRESQL_LIMIT}"
                                    }
                                },
                                "volumeMounts": [
                                    {
                                        "mountPath": "/var/lib/pgsql/data",
                                        "name": "data"
                                    }
                                ]
                            }
                        ],
                        "volumes": [
                            {
                                "emptyDir": {},
                                "name": "data"
                            }
                        ]
                    }
                },
                "triggers": [
                    {
                        "imageChangeParams": {
                            "automatic": true,
                            "containerNames": [
                                "postgresql"
                            ],
                            "from": {
                                "kind": "ImageStreamTag",
                                "name": "postgresql:${POSTGRESQL_VERSION}",
                                "namespace": "${NAMESPACE}"
                            }
                        },
                        "type": "ImageChange"
                    },
                    {
                        "type": "ConfigChange"
                    }
                ]
            }
        }
    ],
    "parameters": [
        {
            "description": "The name assigned to all of the frontend objects defined in this template.",
            "displayName": "Name",
            "name": "NAME",
            "required": true,
            "value": "django-psql-example"
        },
        {
            "description": "The OpenShift Namespace where the ImageStream resides.",
            "displayName": "Namespace",
            "name": "NAMESPACE",
            "required": true,
            "value": "openshift"
        },
        {
            "description": "Version of Python image to be used (3.6 or latest).",
            "displayName": "Version of Python Image",
            "name": "PYTHON_VERSION",
            "required": true,
            "value": "3.6"
        },
        {
            "description": "Version of PostgreSQL image to be used (10 or latest).",
            "displayName": "Version of PostgreSQL Image",
            "name": "POSTGRESQL_VERSION",
            "required": true,
            "value": "10"
        },
        {
            "description": "Maximum amount of memory the Django container can use.",
            "displayName": "Memory Limit",
            "name": "MEMORY_LIMIT",
            "required": true,
            "value": "512Mi"
        },
        {
            "description": "Maximum amount of memory the PostgreSQL container can use.",
            "displayName": "Memory Limit (PostgreSQL)",
            "name": "MEMORY_POSTGRESQL_LIMIT",
            "required": true,
            "value": "512Mi"
        },
        {
            "description": "The URL of the repository with your application source code.",
            "displayName": "Git Repository URL",
            "name": "SOURCE_REPOSITORY_URL",
            "required": true,
            "value": "https://github.com/sclorg/django-ex.git"
        },
        {
            "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.",
            "displayName": "Git Reference",
            "name": "SOURCE_REPOSITORY_REF"
        },
        {
            "description": "Set this to the relative path to your project if it is not in the root of your repository.",
            "displayName": "Context Directory",
            "name": "CONTEXT_DIR"
        },
        {
            "description": "The exposed hostname that will route to the Django service, if left blank a value will be defaulted.",
            "displayName": "Application Hostname",
            "name": "APPLICATION_DOMAIN",
            "value": ""
        },
        {
            "description": "Github trigger secret.  A difficult to guess string encoded as part of the webhook URL.  Not encrypted.",
            "displayName": "GitHub Webhook Secret",
            "from": "[a-zA-Z0-9]{40}",
            "generate": "expression",
            "name": "GITHUB_WEBHOOK_SECRET"
        },
        {
            "displayName": "Database Service Name",
            "name": "DATABASE_SERVICE_NAME",
            "required": true,
            "value": "postgresql"
        },
        {
            "description": "Database engine: postgresql, mysql or sqlite (default).",
            "displayName": "Database Engine",
            "name": "DATABASE_ENGINE",
            "required": true,
            "value": "postgresql"
        },
        {
            "displayName": "Database Name",
            "name": "DATABASE_NAME",
            "required": true,
            "value": "default"
        },
        {
            "displayName": "Database Username",
            "name": "DATABASE_USER",
            "required": true,
            "value": "django"
        },
        {
            "displayName": "Database User Password",
            "from": "[a-zA-Z0-9]{16}",
            "generate": "expression",
            "name": "DATABASE_PASSWORD"
        },
        {
            "description": "Relative path to Gunicorn configuration file (optional).",
            "displayName": "Application Configuration File Path",
            "name": "APP_CONFIG"
        },
        {
            "description": "Set this to a long random string.",
            "displayName": "Django Secret Key",
            "from": "[\\w]{50}",
            "generate": "expression",
            "name": "DJANGO_SECRET_KEY"
        },
        {
            "description": "The custom PyPi index URL",
            "displayName": "Custom PyPi Index URL",
            "name": "PIP_INDEX_URL",
            "value": ""
        }
    ]
}`)

func examplesQuickstartsDjangoPostgresqlJsonBytes() ([]byte, error) {
	return _examplesQuickstartsDjangoPostgresqlJson, nil
}

func examplesQuickstartsDjangoPostgresqlJson() (*asset, error) {
	bytes, err := examplesQuickstartsDjangoPostgresqlJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "examples/quickstarts/django-postgresql.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _examplesQuickstartsDotnetPgsqlPersistentJson = []byte(`{
    "apiVersion": "v1",
    "kind": "Template",
    "labels": {
        "template": "dotnet-pgsql-persistent"
    },
    "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore.",
    "metadata": {
        "annotations": {
            "description": "An example .NET Core application with a PostgreSQL database. For more information about using this template, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore.",
            "iconClass": "icon-dotnet",
            "openshift.io/display-name": ".NET Core + PostgreSQL (Persistent)",
            "tags": "quickstart,dotnet",
            "template.openshift.io/documentation-url": "https://github.com/redhat-developer/s2i-dotnetcore",
            "template.openshift.io/provider-display-name": "Red Hat, Inc.",
            "template.openshift.io/support-url": "https://access.redhat.com"
        },
        "name": "dotnet-pgsql-persistent"
    },
    "objects": [
        {
            "apiVersion": "v1",
            "kind": "Secret",
            "metadata": {
                "name": "${NAME}"
            },
            "stringData": {
                "connect-string": "Host=${DATABASE_SERVICE_NAME};Database=${DATABASE_NAME};Username=${DATABASE_USER};Password=${DATABASE_PASSWORD}",
                "database-password": "${DATABASE_PASSWORD}"
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Service",
            "metadata": {
                "annotations": {
                    "description": "Exposes and load balances the application pods",
                    "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]"
                },
                "name": "${NAME}"
            },
            "spec": {
                "ports": [
                    {
                        "name": "web",
                        "port": 8080,
                        "targetPort": 8080
                    }
                ],
                "selector": {
                    "name": "${NAME}"
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Route",
            "metadata": {
                "name": "${NAME}"
            },
            "spec": {
                "host": "${APPLICATION_DOMAIN}",
                "to": {
                    "kind": "Service",
                    "name": "${NAME}"
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "ImageStream",
            "metadata": {
                "annotations": {
                    "description": "Keeps track of changes in the application image"
                },
                "name": "${NAME}"
            }
        },
        {
            "apiVersion": "v1",
            "kind": "BuildConfig",
            "metadata": {
                "annotations": {
                    "description": "Defines how to build the application"
                },
                "name": "${NAME}"
            },
            "spec": {
                "output": {
                    "to": {
                        "kind": "ImageStreamTag",
                        "name": "${NAME}:latest"
                    }
                },
                "postCommit": {},
                "source": {
                    "contextDir": "${CONTEXT_DIR}",
                    "git": {
                        "ref": "${SOURCE_REPOSITORY_REF}",
                        "uri": "${SOURCE_REPOSITORY_URL}"
                    },
                    "type": "Git"
                },
                "strategy": {
                    "sourceStrategy": {
                        "env": [
                            {
                                "name": "DOTNET_STARTUP_PROJECT",
                                "value": "${DOTNET_STARTUP_PROJECT}"
                            },
                            {
                                "name": "DOTNET_SDK_VERSION",
                                "value": "${DOTNET_SDK_VERSION}"
                            },
                            {
                                "name": "DOTNET_ASSEMBLY_NAME",
                                "value": "${DOTNET_ASSEMBLY_NAME}"
                            },
                            {
                                "name": "DOTNET_NPM_TOOLS",
                                "value": "${DOTNET_NPM_TOOLS}"
                            },
                            {
                                "name": "DOTNET_TEST_PROJECTS",
                                "value": "${DOTNET_TEST_PROJECTS}"
                            },
                            {
                                "name": "DOTNET_CONFIGURATION",
                                "value": "${DOTNET_CONFIGURATION}"
                            },
                            {
                                "name": "DOTNET_RESTORE_SOURCES",
                                "value": "${DOTNET_RESTORE_SOURCES}"
                            },
                            {
                                "name": "DOTNET_TOOLS",
                                "value": "${DOTNET_TOOLS}"
                            }
                        ],
                        "from": {
                            "kind": "ImageStreamTag",
                            "name": "${DOTNET_IMAGE_STREAM_TAG}",
                            "namespace": "${NAMESPACE}"
                        }
                    },
                    "type": "Source"
                },
                "triggers": [
                    {
                        "type": "ImageChange"
                    },
                    {
                        "type": "ConfigChange"
                    },
                    {
                        "github": {
                            "secret": "${GITHUB_WEBHOOK_SECRET}"
                        },
                        "type": "GitHub"
                    }
                ]
            }
        },
        {
            "apiVersion": "v1",
            "kind": "DeploymentConfig",
            "metadata": {
                "annotations": {
                    "description": "Defines how to deploy the application server"
                },
                "name": "${NAME}"
            },
            "spec": {
                "replicas": 1,
                "selector": {
                    "name": "${NAME}"
                },
                "strategy": {
                    "resources": {},
                    "rollingParams": {
                        "intervalSeconds": 1,
                        "maxSurge": "25%",
                        "maxUnavailable": "25%",
                        "timeoutSeconds": 600,
                        "updatePeriodSeconds": 1
                    },
                    "type": "Rolling"
                },
                "template": {
                    "metadata": {
                        "labels": {
                            "name": "${NAME}"
                        },
                        "name": "${NAME}"
                    },
                    "spec": {
                        "containers": [
                            {
                                "env": [
                                    {
                                        "name": "ConnectionString",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "connect-string",
                                                "name": "${NAME}"
                                            }
                                        }
                                    }
                                ],
                                "image": " ",
                                "livenessProbe": {
                                    "httpGet": {
                                        "path": "/",
                                        "port": 8080,
                                        "scheme": "HTTP"
                                    },
                                    "initialDelaySeconds": 40,
                                    "timeoutSeconds": 10
                                },
                                "name": "dotnet-pgsql-persistent",
                                "ports": [
                                    {
                                        "containerPort": 8080
                                    }
                                ],
                                "readinessProbe": {
                                    "httpGet": {
                                        "path": "/",
                                        "port": 8080,
                                        "scheme": "HTTP"
                                    },
                                    "initialDelaySeconds": 10,
                                    "timeoutSeconds": 30
                                },
                                "resources": {
                                    "limits": {
                                        "memory": "${MEMORY_LIMIT}"
                                    }
                                }
                            }
                        ]
                    }
                },
                "triggers": [
                    {
                        "imageChangeParams": {
                            "automatic": true,
                            "containerNames": [
                                "dotnet-pgsql-persistent"
                            ],
                            "from": {
                                "kind": "ImageStreamTag",
                                "name": "${NAME}:latest"
                            }
                        },
                        "type": "ImageChange"
                    },
                    {
                        "type": "ConfigChange"
                    }
                ]
            }
        },
        {
            "apiVersion": "v1",
            "kind": "PersistentVolumeClaim",
            "metadata": {
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "spec": {
                "accessModes": [
                    "ReadWriteOnce"
                ],
                "resources": {
                    "requests": {
                        "storage": "${VOLUME_CAPACITY}"
                    }
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Service",
            "metadata": {
                "annotations": {
                    "description": "Exposes the database server"
                },
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "spec": {
                "ports": [
                    {
                        "name": "postgresql",
                        "port": 5432,
                        "targetPort": 5432
                    }
                ],
                "selector": {
                    "name": "${DATABASE_SERVICE_NAME}"
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "DeploymentConfig",
            "metadata": {
                "annotations": {
                    "description": "Defines how to deploy the database"
                },
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "spec": {
                "replicas": 1,
                "selector": {
                    "name": "${DATABASE_SERVICE_NAME}"
                },
                "strategy": {
                    "type": "Recreate"
                },
                "template": {
                    "metadata": {
                        "labels": {
                            "name": "${DATABASE_SERVICE_NAME}"
                        },
                        "name": "${DATABASE_SERVICE_NAME}"
                    },
                    "spec": {
                        "containers": [
                            {
                                "env": [
                                    {
                                        "name": "POSTGRESQL_USER",
                                        "value": "${DATABASE_USER}"
                                    },
                                    {
                                        "name": "POSTGRESQL_PASSWORD",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-password",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "POSTGRESQL_DATABASE",
                                        "value": "${DATABASE_NAME}"
                                    },
                                    {
                                        "name": "POSTGRESQL_MAX_CONNECTIONS",
                                        "value": "${POSTGRESQL_MAX_CONNECTIONS}"
                                    },
                                    {
                                        "name": "POSTGRESQL_SHARED_BUFFERS",
                                        "value": "${POSTGRESQL_SHARED_BUFFERS}"
                                    }
                                ],
                                "image": " ",
                                "livenessProbe": {
                                    "initialDelaySeconds": 30,
                                    "tcpSocket": {
                                        "port": 5432
                                    },
                                    "timeoutSeconds": 1
                                },
                                "name": "postgresql",
                                "ports": [
                                    {
                                        "containerPort": 5432
                                    }
                                ],
                                "resources": {
                                    "limits": {
                                        "memory": "${MEMORY_POSTGRESQL_LIMIT}"
                                    }
                                },
                                "volumeMounts": [
                                    {
                                        "mountPath": "/var/lib/pgsql/data",
                                        "name": "${DATABASE_SERVICE_NAME}-data"
                                    }
                                ]
                            }
                        ],
                        "volumes": [
                            {
                                "name": "${DATABASE_SERVICE_NAME}-data",
                                "persistentVolumeClaim": {
                                    "claimName": "${DATABASE_SERVICE_NAME}"
                                }
                            }
                        ]
                    }
                },
                "triggers": [
                    {
                        "imageChangeParams": {
                            "automatic": true,
                            "containerNames": [
                                "postgresql"
                            ],
                            "from": {
                                "kind": "ImageStreamTag",
                                "name": "postgresql:9.5",
                                "namespace": "openshift"
                            }
                        },
                        "type": "ImageChange"
                    },
                    {
                        "type": "ConfigChange"
                    }
                ]
            }
        }
    ],
    "parameters": [
        {
            "description": "The name assigned to all of the frontend objects defined in this template.",
            "displayName": "Name",
            "name": "NAME",
            "required": true,
            "value": "musicstore"
        },
        {
            "description": "Maximum amount of memory the .NET Core container can use.",
            "displayName": "Memory Limit",
            "name": "MEMORY_LIMIT",
            "required": true,
            "value": "128Mi"
        },
        {
            "description": "Maximum amount of memory the PostgreSQL container can use.",
            "displayName": "Memory Limit (PostgreSQL)",
            "name": "MEMORY_POSTGRESQL_LIMIT",
            "required": true,
            "value": "128Mi"
        },
        {
            "description": "Volume space available for data, e.g. 512Mi, 2Gi",
            "displayName": "Volume Capacity",
            "name": "VOLUME_CAPACITY",
            "required": true,
            "value": "256Mi"
        },
        {
            "description": "The image stream tag which is used to build the code.",
            "displayName": ".NET builder",
            "name": "DOTNET_IMAGE_STREAM_TAG",
            "required": true,
            "value": "dotnet:2.1"
        },
        {
            "description": "The OpenShift Namespace where the .NET builder ImageStream resides.",
            "displayName": "Namespace",
            "name": "NAMESPACE",
            "required": true,
            "value": "openshift"
        },
        {
            "description": "The URL of the repository with your application source code.",
            "displayName": "Git Repository URL",
            "name": "SOURCE_REPOSITORY_URL",
            "required": true,
            "value": "https://github.com/redhat-developer/s2i-aspnet-musicstore-ex.git"
        },
        {
            "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.",
            "displayName": "Git Reference",
            "name": "SOURCE_REPOSITORY_REF",
            "value": "rel/2.1-example"
        },
        {
            "description": "Set this to the relative path to your project if it is not in the root of your repository.",
            "displayName": "Context Directory",
            "name": "CONTEXT_DIR"
        },
        {
            "description": "Set this to a project file (e.g. csproj) or a folder containing a single project file.",
            "displayName": "Startup Project",
            "name": "DOTNET_STARTUP_PROJECT",
            "value": "samples/MusicStore"
        },
        {
            "description": "Set this to configure the default SDK version. This can be set to a specific version, '' (lowest version) or 'latest' (highest version).",
            "displayName": "SDK Version",
            "name": "DOTNET_SDK_VERSION",
            "value": ""
        },
        {
            "description": "Set this when the assembly name is overridden in the project file.",
            "displayName": "Startup Assembly",
            "name": "DOTNET_ASSEMBLY_NAME"
        },
        {
            "description": "Set this to a space separated list of .NET tools needed to publish.",
            "displayName": ".NET Tools",
            "name": "DOTNET_TOOLS"
        },
        {
            "description": "Set this to a space separated list of npm tools needed to publish.",
            "displayName": "Npm Tools",
            "name": "DOTNET_NPM_TOOLS"
        },
        {
            "description": "Set this to a space separated list of test projects to run before publishing.",
            "displayName": "Test projects",
            "name": "DOTNET_TEST_PROJECTS"
        },
        {
            "description": "Set this to configuration (Release/Debug).",
            "displayName": "Configuration",
            "name": "DOTNET_CONFIGURATION",
            "value": "Release"
        },
        {
            "description": "Set this to override the NuGet.config sources.",
            "displayName": "NuGet package sources",
            "name": "DOTNET_RESTORE_SOURCES"
        },
        {
            "description": "The exposed hostname that will route to the .NET Core service, if left blank a value will be defaulted.",
            "displayName": "Application Hostname",
            "name": "APPLICATION_DOMAIN",
            "value": ""
        },
        {
            "description": "A secret string used to configure the GitHub webhook.",
            "displayName": "GitHub Webhook Secret",
            "from": "[a-zA-Z0-9]{40}",
            "generate": "expression",
            "name": "GITHUB_WEBHOOK_SECRET"
        },
        {
            "displayName": "Database Service Name",
            "name": "DATABASE_SERVICE_NAME",
            "required": true,
            "value": "postgresql"
        },
        {
            "displayName": "Database Username",
            "from": "user[A-Z0-9]{3}",
            "generate": "expression",
            "name": "DATABASE_USER"
        },
        {
            "displayName": "Database Password",
            "from": "[a-zA-Z0-9]{8}",
            "generate": "expression",
            "name": "DATABASE_PASSWORD"
        },
        {
            "displayName": "Database Name",
            "name": "DATABASE_NAME",
            "required": true,
            "value": "musicstore"
        },
        {
            "displayName": "Maximum Database Connections",
            "name": "POSTGRESQL_MAX_CONNECTIONS",
            "value": "100"
        },
        {
            "displayName": "Shared Buffer Amount",
            "name": "POSTGRESQL_SHARED_BUFFERS",
            "value": "12MB"
        }
    ]
}`)

func examplesQuickstartsDotnetPgsqlPersistentJsonBytes() ([]byte, error) {
	return _examplesQuickstartsDotnetPgsqlPersistentJson, nil
}

func examplesQuickstartsDotnetPgsqlPersistentJson() (*asset, error) {
	bytes, err := examplesQuickstartsDotnetPgsqlPersistentJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "examples/quickstarts/dotnet-pgsql-persistent.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _examplesQuickstartsDotnetJson = []byte(`{
    "apiVersion": "v1",
    "kind": "Template",
    "metadata": {
        "annotations": {
            "description": "An example .NET Core application.",
            "iconClass": "icon-dotnet",
            "openshift.io/display-name": ".NET Core Example",
            "tags": "quickstart,dotnet,.net",
            "template.openshift.io/documentation-url": "https://github.com/redhat-developer/s2i-dotnetcore",
            "template.openshift.io/provider-display-name": "Red Hat, Inc.",
            "template.openshift.io/support-url": "https://access.redhat.com"
        },
        "name": "dotnet-example"
    },
    "objects": [
        {
            "apiVersion": "v1",
            "kind": "Route",
            "metadata": {
                "name": "${NAME}"
            },
            "spec": {
                "host": "${APPLICATION_DOMAIN}",
                "to": {
                    "kind": "Service",
                    "name": "${NAME}"
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Service",
            "metadata": {
                "annotations": {
                    "description": "Exposes and load balances the application pods"
                },
                "name": "${NAME}"
            },
            "spec": {
                "ports": [
                    {
                        "name": "web",
                        "port": 8080,
                        "targetPort": 8080
                    }
                ],
                "selector": {
                    "name": "${NAME}"
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "ImageStream",
            "metadata": {
                "annotations": {
                    "description": "Keeps track of changes in the application image"
                },
                "name": "${NAME}"
            }
        },
        {
            "apiVersion": "v1",
            "kind": "BuildConfig",
            "metadata": {
                "annotations": {
                    "description": "Defines how to build the application"
                },
                "name": "${NAME}"
            },
            "spec": {
                "output": {
                    "to": {
                        "kind": "ImageStreamTag",
                        "name": "${NAME}:latest"
                    }
                },
                "source": {
                    "contextDir": "${CONTEXT_DIR}",
                    "git": {
                        "ref": "${SOURCE_REPOSITORY_REF}",
                        "uri": "${SOURCE_REPOSITORY_URL}"
                    },
                    "type": "Git"
                },
                "strategy": {
                    "sourceStrategy": {
                        "env": [
                            {
                                "name": "DOTNET_STARTUP_PROJECT",
                                "value": "${DOTNET_STARTUP_PROJECT}"
                            },
                            {
                                "name": "DOTNET_SDK_VERSION",
                                "value": "${DOTNET_SDK_VERSION}"
                            },
                            {
                                "name": "DOTNET_ASSEMBLY_NAME",
                                "value": "${DOTNET_ASSEMBLY_NAME}"
                            },
                            {
                                "name": "DOTNET_NPM_TOOLS",
                                "value": "${DOTNET_NPM_TOOLS}"
                            },
                            {
                                "name": "DOTNET_TEST_PROJECTS",
                                "value": "${DOTNET_TEST_PROJECTS}"
                            },
                            {
                                "name": "DOTNET_CONFIGURATION",
                                "value": "${DOTNET_CONFIGURATION}"
                            },
                            {
                                "name": "DOTNET_RESTORE_SOURCES",
                                "value": "${DOTNET_RESTORE_SOURCES}"
                            },
                            {
                                "name": "DOTNET_TOOLS",
                                "value": "${DOTNET_TOOLS}"
                            }
                        ],
                        "from": {
                            "kind": "ImageStreamTag",
                            "name": "${DOTNET_IMAGE_STREAM_TAG}",
                            "namespace": "${NAMESPACE}"
                        }
                    },
                    "type": "Source"
                },
                "triggers": [
                    {
                        "type": "ImageChange"
                    },
                    {
                        "type": "ConfigChange"
                    },
                    {
                        "github": {
                            "secret": "${GITHUB_WEBHOOK_SECRET}"
                        },
                        "type": "GitHub"
                    },
                    {
                        "generic": {
                            "secret": "${GENERIC_WEBHOOK_SECRET}"
                        },
                        "type": "Generic"
                    }
                ]
            }
        },
        {
            "apiVersion": "v1",
            "kind": "DeploymentConfig",
            "metadata": {
                "annotations": {
                    "description": "Defines how to deploy the application server"
                },
                "name": "${NAME}"
            },
            "spec": {
                "replicas": 1,
                "selector": {
                    "name": "${NAME}"
                },
                "strategy": {
                    "type": "Rolling"
                },
                "template": {
                    "metadata": {
                        "labels": {
                            "name": "${NAME}"
                        },
                        "name": "${NAME}"
                    },
                    "spec": {
                        "containers": [
                            {
                                "env": [],
                                "image": " ",
                                "livenessProbe": {
                                    "httpGet": {
                                        "path": "/",
                                        "port": 8080,
                                        "scheme": "HTTP"
                                    },
                                    "initialDelaySeconds": 40,
                                    "timeoutSeconds": 15
                                },
                                "name": "dotnet-app",
                                "ports": [
                                    {
                                        "containerPort": 8080
                                    }
                                ],
                                "readinessProbe": {
                                    "httpGet": {
                                        "path": "/",
                                        "port": 8080,
                                        "scheme": "HTTP"
                                    },
                                    "initialDelaySeconds": 10,
                                    "timeoutSeconds": 30
                                },
                                "resources": {
                                    "limits": {
                                        "memory": "${MEMORY_LIMIT}"
                                    }
                                }
                            }
                        ]
                    }
                },
                "triggers": [
                    {
                        "imageChangeParams": {
                            "automatic": true,
                            "containerNames": [
                                "dotnet-app"
                            ],
                            "from": {
                                "kind": "ImageStreamTag",
                                "name": "${NAME}:latest"
                            }
                        },
                        "type": "ImageChange"
                    },
                    {
                        "type": "ConfigChange"
                    }
                ]
            }
        }
    ],
    "parameters": [
        {
            "description": "The name assigned to all of the frontend objects defined in this template.",
            "displayName": "Name",
            "name": "NAME",
            "required": true,
            "value": "dotnet-example"
        },
        {
            "description": "Maximum amount of memory the container can use.",
            "displayName": "Memory Limit",
            "name": "MEMORY_LIMIT",
            "required": true,
            "value": "128Mi"
        },
        {
            "description": "The image stream tag which is used to build the code.",
            "displayName": ".NET builder",
            "name": "DOTNET_IMAGE_STREAM_TAG",
            "required": true,
            "value": "dotnet:2.2"
        },
        {
            "description": "The OpenShift Namespace where the ImageStream resides.",
            "displayName": "Namespace",
            "name": "NAMESPACE",
            "required": true,
            "value": "openshift"
        },
        {
            "description": "The URL of the repository with your application source code.",
            "displayName": "Git Repository URL",
            "name": "SOURCE_REPOSITORY_URL",
            "required": true,
            "value": "https://github.com/redhat-developer/s2i-dotnetcore-ex.git"
        },
        {
            "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.",
            "displayName": "Git Reference",
            "name": "SOURCE_REPOSITORY_REF",
            "value": "dotnetcore-2.2"
        },
        {
            "description": "Set this to use a subdirectory of the source code repository",
            "displayName": "Context Directory",
            "name": "CONTEXT_DIR"
        },
        {
            "description": "The exposed hostname that will route to the .NET Core service, if left blank a value will be defaulted.",
            "displayName": "Application Hostname",
            "name": "APPLICATION_DOMAIN",
            "value": ""
        },
        {
            "description": "A secret string used to configure the GitHub webhook.",
            "displayName": "GitHub Webhook Secret",
            "from": "[a-zA-Z0-9]{40}",
            "generate": "expression",
            "name": "GITHUB_WEBHOOK_SECRET"
        },
        {
            "description": "A secret string used to configure the Generic webhook.",
            "displayName": "Generic Webhook Secret",
            "from": "[a-zA-Z0-9]{40}",
            "generate": "expression",
            "name": "GENERIC_WEBHOOK_SECRET"
        },
        {
            "description": "Set this to configure the default SDK version. This can be set to a specific version, '' (lowest version) or 'latest' (highest version).",
            "displayName": "SDK Version",
            "name": "DOTNET_SDK_VERSION",
            "value": ""
        },
        {
            "description": "Set this to a project file (e.g. csproj) or a folder containing a single project file.",
            "displayName": "Startup Project",
            "name": "DOTNET_STARTUP_PROJECT",
            "value": "app"
        },
        {
            "description": "Set this when the assembly name is overridden in the project file.",
            "displayName": "Startup Assembly",
            "name": "DOTNET_ASSEMBLY_NAME"
        },
        {
            "description": "Set this to a space separated list of .NET tools needed to publish.",
            "displayName": ".NET Tools",
            "name": "DOTNET_TOOLS"
        },
        {
            "description": "Set this to a space separated list of npm tools needed to publish.",
            "displayName": "Npm Tools",
            "name": "DOTNET_NPM_TOOLS"
        },
        {
            "description": "Set this to a space separated list of test projects to run before publishing.",
            "displayName": "Test projects",
            "name": "DOTNET_TEST_PROJECTS"
        },
        {
            "description": "Set this to configuration (Release/Debug).",
            "displayName": "Configuration",
            "name": "DOTNET_CONFIGURATION",
            "value": "Release"
        },
        {
            "description": "Set this to override the NuGet.config sources.",
            "displayName": "NuGet package sources",
            "name": "DOTNET_RESTORE_SOURCES"
        }
    ]
}`)

func examplesQuickstartsDotnetJsonBytes() ([]byte, error) {
	return _examplesQuickstartsDotnetJson, nil
}

func examplesQuickstartsDotnetJson() (*asset, error) {
	bytes, err := examplesQuickstartsDotnetJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "examples/quickstarts/dotnet.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _examplesQuickstartsHttpdJson = []byte(`{
    "apiVersion": "v1",
    "kind": "Template",
    "labels": {
        "app": "httpd-example",
        "template": "httpd-example"
    },
    "message": "The following service(s) have been created in your project: ${NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/httpd-ex/blob/master/README.md.",
    "metadata": {
        "annotations": {
            "description": "An example Apache HTTP Server (httpd) application that serves static content. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/httpd-ex/blob/master/README.md.",
            "iconClass": "icon-apache",
            "openshift.io/display-name": "Apache HTTP Server",
            "openshift.io/documentation-url": "https://github.com/sclorg/httpd-ex",
            "openshift.io/long-description": "This template defines resources needed to develop a static application served by Apache HTTP Server (httpd), including a build configuration and application deployment configuration.",
            "openshift.io/provider-display-name": "Red Hat, Inc.",
            "openshift.io/support-url": "https://access.redhat.com",
            "tags": "quickstart,httpd",
            "template.openshift.io/bindable": "false"
        },
        "name": "httpd-example"
    },
    "objects": [
        {
            "apiVersion": "v1",
            "kind": "Service",
            "metadata": {
                "annotations": {
                    "description": "Exposes and load balances the application pods"
                },
                "name": "${NAME}"
            },
            "spec": {
                "ports": [
                    {
                        "name": "web",
                        "port": 8080,
                        "targetPort": 8080
                    }
                ],
                "selector": {
                    "name": "${NAME}"
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Route",
            "metadata": {
                "name": "${NAME}"
            },
            "spec": {
                "host": "${APPLICATION_DOMAIN}",
                "to": {
                    "kind": "Service",
                    "name": "${NAME}"
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "ImageStream",
            "metadata": {
                "annotations": {
                    "description": "Keeps track of changes in the application image"
                },
                "name": "${NAME}"
            }
        },
        {
            "apiVersion": "v1",
            "kind": "BuildConfig",
            "metadata": {
                "annotations": {
                    "description": "Defines how to build the application",
                    "template.alpha.openshift.io/wait-for-ready": "true"
                },
                "name": "${NAME}"
            },
            "spec": {
                "output": {
                    "to": {
                        "kind": "ImageStreamTag",
                        "name": "${NAME}:latest"
                    }
                },
                "source": {
                    "contextDir": "${CONTEXT_DIR}",
                    "git": {
                        "ref": "${SOURCE_REPOSITORY_REF}",
                        "uri": "${SOURCE_REPOSITORY_URL}"
                    },
                    "type": "Git"
                },
                "strategy": {
                    "sourceStrategy": {
                        "from": {
                            "kind": "ImageStreamTag",
                            "name": "httpd:2.4",
                            "namespace": "${NAMESPACE}"
                        }
                    },
                    "type": "Source"
                },
                "triggers": [
                    {
                        "type": "ImageChange"
                    },
                    {
                        "type": "ConfigChange"
                    },
                    {
                        "github": {
                            "secret": "${GITHUB_WEBHOOK_SECRET}"
                        },
                        "type": "GitHub"
                    },
                    {
                        "generic": {
                            "secret": "${GENERIC_WEBHOOK_SECRET}"
                        },
                        "type": "Generic"
                    }
                ]
            }
        },
        {
            "apiVersion": "v1",
            "kind": "DeploymentConfig",
            "metadata": {
                "annotations": {
                    "description": "Defines how to deploy the application server",
                    "template.alpha.openshift.io/wait-for-ready": "true"
                },
                "name": "${NAME}"
            },
            "spec": {
                "replicas": 1,
                "selector": {
                    "name": "${NAME}"
                },
                "strategy": {
                    "type": "Rolling"
                },
                "template": {
                    "metadata": {
                        "labels": {
                            "name": "${NAME}"
                        },
                        "name": "${NAME}"
                    },
                    "spec": {
                        "containers": [
                            {
                                "env": [],
                                "image": " ",
                                "livenessProbe": {
                                    "httpGet": {
                                        "path": "/",
                                        "port": 8080
                                    },
                                    "initialDelaySeconds": 30,
                                    "timeoutSeconds": 3
                                },
                                "name": "httpd-example",
                                "ports": [
                                    {
                                        "containerPort": 8080
                                    }
                                ],
                                "readinessProbe": {
                                    "httpGet": {
                                        "path": "/",
                                        "port": 8080
                                    },
                                    "initialDelaySeconds": 3,
                                    "timeoutSeconds": 3
                                },
                                "resources": {
                                    "limits": {
                                        "memory": "${MEMORY_LIMIT}"
                                    }
                                }
                            }
                        ]
                    }
                },
                "triggers": [
                    {
                        "imageChangeParams": {
                            "automatic": true,
                            "containerNames": [
                                "httpd-example"
                            ],
                            "from": {
                                "kind": "ImageStreamTag",
                                "name": "${NAME}:latest"
                            }
                        },
                        "type": "ImageChange"
                    },
                    {
                        "type": "ConfigChange"
                    }
                ]
            }
        }
    ],
    "parameters": [
        {
            "description": "The name assigned to all of the frontend objects defined in this template.",
            "displayName": "Name",
            "name": "NAME",
            "required": true,
            "value": "httpd-example"
        },
        {
            "description": "The OpenShift Namespace where the ImageStream resides.",
            "displayName": "Namespace",
            "name": "NAMESPACE",
            "required": true,
            "value": "openshift"
        },
        {
            "description": "Maximum amount of memory the container can use.",
            "displayName": "Memory Limit",
            "name": "MEMORY_LIMIT",
            "required": true,
            "value": "512Mi"
        },
        {
            "description": "The URL of the repository with your application source code.",
            "displayName": "Git Repository URL",
            "name": "SOURCE_REPOSITORY_URL",
            "required": true,
            "value": "https://github.com/sclorg/httpd-ex.git"
        },
        {
            "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.",
            "displayName": "Git Reference",
            "name": "SOURCE_REPOSITORY_REF"
        },
        {
            "description": "Set this to the relative path to your project if it is not in the root of your repository.",
            "displayName": "Context Directory",
            "name": "CONTEXT_DIR"
        },
        {
            "description": "The exposed hostname that will route to the httpd service, if left blank a value will be defaulted.",
            "displayName": "Application Hostname",
            "name": "APPLICATION_DOMAIN",
            "value": ""
        },
        {
            "description": "Github trigger secret.  A difficult to guess string encoded as part of the webhook URL.  Not encrypted.",
            "displayName": "GitHub Webhook Secret",
            "from": "[a-zA-Z0-9]{40}",
            "generate": "expression",
            "name": "GITHUB_WEBHOOK_SECRET"
        },
        {
            "description": "A secret string used to configure the Generic webhook.",
            "displayName": "Generic Webhook Secret",
            "from": "[a-zA-Z0-9]{40}",
            "generate": "expression",
            "name": "GENERIC_WEBHOOK_SECRET"
        }
    ]
}`)

func examplesQuickstartsHttpdJsonBytes() ([]byte, error) {
	return _examplesQuickstartsHttpdJson, nil
}

func examplesQuickstartsHttpdJson() (*asset, error) {
	bytes, err := examplesQuickstartsHttpdJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "examples/quickstarts/httpd.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _examplesQuickstartsNginxJson = []byte(`{
    "apiVersion": "v1",
    "kind": "Template",
    "labels": {
        "template": "nginx-example"
    },
    "message": "The following service(s) have been created in your project: ${NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/nginx-ex/blob/master/README.md.",
    "metadata": {
        "annotations": {
            "description": "An example Nginx HTTP server and a reverse proxy (nginx) application that serves static content. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/nginx-ex/blob/master/README.md.",
            "iconClass": "icon-nginx",
            "openshift.io/display-name": "Nginx HTTP server and a reverse proxy",
            "openshift.io/documentation-url": "https://github.com/sclorg/nginx-ex",
            "openshift.io/long-description": "This template defines resources needed to develop a static application served by Nginx HTTP server and a reverse proxy (nginx), including a build configuration and application deployment configuration.",
            "openshift.io/provider-display-name": "Red Hat, Inc.",
            "openshift.io/support-url": "https://access.redhat.com",
            "tags": "quickstart,nginx"
        },
        "name": "nginx-example"
    },
    "objects": [
        {
            "apiVersion": "v1",
            "kind": "Service",
            "metadata": {
                "annotations": {
                    "description": "Exposes and load balances the application pods"
                },
                "name": "${NAME}"
            },
            "spec": {
                "ports": [
                    {
                        "name": "web",
                        "port": 8080,
                        "targetPort": 8080
                    }
                ],
                "selector": {
                    "name": "${NAME}"
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Route",
            "metadata": {
                "annotations": {
                    "template.openshift.io/expose-uri": "http://{.spec.host}{.spec.path}"
                },
                "name": "${NAME}"
            },
            "spec": {
                "host": "${APPLICATION_DOMAIN}",
                "to": {
                    "kind": "Service",
                    "name": "${NAME}"
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "ImageStream",
            "metadata": {
                "annotations": {
                    "description": "Keeps track of changes in the application image"
                },
                "name": "${NAME}"
            }
        },
        {
            "apiVersion": "v1",
            "kind": "BuildConfig",
            "metadata": {
                "annotations": {
                    "description": "Defines how to build the application",
                    "template.alpha.openshift.io/wait-for-ready": "true"
                },
                "name": "${NAME}"
            },
            "spec": {
                "output": {
                    "to": {
                        "kind": "ImageStreamTag",
                        "name": "${NAME}:latest"
                    }
                },
                "source": {
                    "contextDir": "${CONTEXT_DIR}",
                    "git": {
                        "ref": "${SOURCE_REPOSITORY_REF}",
                        "uri": "${SOURCE_REPOSITORY_URL}"
                    },
                    "type": "Git"
                },
                "strategy": {
                    "sourceStrategy": {
                        "from": {
                            "kind": "ImageStreamTag",
                            "name": "nginx:${NGINX_VERSION}",
                            "namespace": "${NAMESPACE}"
                        }
                    },
                    "type": "Source"
                },
                "triggers": [
                    {
                        "type": "ImageChange"
                    },
                    {
                        "type": "ConfigChange"
                    },
                    {
                        "github": {
                            "secret": "${GITHUB_WEBHOOK_SECRET}"
                        },
                        "type": "GitHub"
                    },
                    {
                        "generic": {
                            "secret": "${GENERIC_WEBHOOK_SECRET}"
                        },
                        "type": "Generic"
                    }
                ]
            }
        },
        {
            "apiVersion": "v1",
            "kind": "DeploymentConfig",
            "metadata": {
                "annotations": {
                    "description": "Defines how to deploy the application server",
                    "template.alpha.openshift.io/wait-for-ready": "true"
                },
                "name": "${NAME}"
            },
            "spec": {
                "replicas": 1,
                "selector": {
                    "name": "${NAME}"
                },
                "strategy": {
                    "type": "Rolling"
                },
                "template": {
                    "metadata": {
                        "labels": {
                            "name": "${NAME}"
                        },
                        "name": "${NAME}"
                    },
                    "spec": {
                        "containers": [
                            {
                                "env": [],
                                "image": " ",
                                "livenessProbe": {
                                    "httpGet": {
                                        "path": "/",
                                        "port": 8080
                                    },
                                    "initialDelaySeconds": 30,
                                    "timeoutSeconds": 3
                                },
                                "name": "nginx-example",
                                "ports": [
                                    {
                                        "containerPort": 8080
                                    }
                                ],
                                "readinessProbe": {
                                    "httpGet": {
                                        "path": "/",
                                        "port": 8080
                                    },
                                    "initialDelaySeconds": 3,
                                    "timeoutSeconds": 3
                                },
                                "resources": {
                                    "limits": {
                                        "memory": "${MEMORY_LIMIT}"
                                    }
                                }
                            }
                        ]
                    }
                },
                "triggers": [
                    {
                        "imageChangeParams": {
                            "automatic": true,
                            "containerNames": [
                                "nginx-example"
                            ],
                            "from": {
                                "kind": "ImageStreamTag",
                                "name": "${NAME}:latest"
                            }
                        },
                        "type": "ImageChange"
                    },
                    {
                        "type": "ConfigChange"
                    }
                ]
            }
        }
    ],
    "parameters": [
        {
            "description": "The name assigned to all of the frontend objects defined in this template.",
            "displayName": "Name",
            "name": "NAME",
            "required": true,
            "value": "nginx-example"
        },
        {
            "description": "The OpenShift Namespace where the ImageStream resides.",
            "displayName": "Namespace",
            "name": "NAMESPACE",
            "required": true,
            "value": "openshift"
        },
        {
            "description": "Version of NGINX image to be used (1.12 by default).",
            "displayName": "NGINX Version",
            "name": "NGINX_VERSION",
            "required": true,
            "value": "1.12"
        },
        {
            "description": "Maximum amount of memory the container can use.",
            "displayName": "Memory Limit",
            "name": "MEMORY_LIMIT",
            "required": true,
            "value": "512Mi"
        },
        {
            "description": "The URL of the repository with your application source code.",
            "displayName": "Git Repository URL",
            "name": "SOURCE_REPOSITORY_URL",
            "required": true,
            "value": "https://github.com/sclorg/nginx-ex.git"
        },
        {
            "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.",
            "displayName": "Git Reference",
            "name": "SOURCE_REPOSITORY_REF"
        },
        {
            "description": "Set this to the relative path to your project if it is not in the root of your repository.",
            "displayName": "Context Directory",
            "name": "CONTEXT_DIR"
        },
        {
            "description": "The exposed hostname that will route to the nginx service, if left blank a value will be defaulted.",
            "displayName": "Application Hostname",
            "name": "APPLICATION_DOMAIN",
            "value": ""
        },
        {
            "description": "Github trigger secret.  A difficult to guess string encoded as part of the webhook URL.  Not encrypted.",
            "displayName": "GitHub Webhook Secret",
            "from": "[a-zA-Z0-9]{40}",
            "generate": "expression",
            "name": "GITHUB_WEBHOOK_SECRET"
        },
        {
            "description": "A secret string used to configure the Generic webhook.",
            "displayName": "Generic Webhook Secret",
            "from": "[a-zA-Z0-9]{40}",
            "generate": "expression",
            "name": "GENERIC_WEBHOOK_SECRET"
        }
    ]
}`)

func examplesQuickstartsNginxJsonBytes() ([]byte, error) {
	return _examplesQuickstartsNginxJson, nil
}

func examplesQuickstartsNginxJson() (*asset, error) {
	bytes, err := examplesQuickstartsNginxJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "examples/quickstarts/nginx.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _examplesQuickstartsNodejsMongodbPersistentJson = []byte(`{
    "apiVersion": "v1",
    "kind": "Template",
    "labels": {
        "template": "nodejs-mongo-persistent"
    },
    "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/nodejs-ex/blob/master/README.md.",
    "metadata": {
        "annotations": {
            "description": "An example Node.js application with a MongoDB database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/nodejs-ex/blob/master/README.md.",
            "iconClass": "icon-nodejs",
            "openshift.io/display-name": "Node.js + MongoDB",
            "openshift.io/documentation-url": "https://github.com/sclorg/nodejs-ex",
            "openshift.io/long-description": "This template defines resources needed to develop a NodeJS application, including a build configuration, application deployment configuration, and database deployment configuration.",
            "openshift.io/provider-display-name": "Red Hat, Inc.",
            "openshift.io/support-url": "https://access.redhat.com",
            "tags": "quickstart,nodejs",
            "template.openshift.io/bindable": "false"
        },
        "name": "nodejs-mongo-persistent"
    },
    "objects": [
        {
            "apiVersion": "v1",
            "kind": "Secret",
            "metadata": {
                "name": "${NAME}"
            },
            "stringData": {
                "database-admin-password": "${DATABASE_ADMIN_PASSWORD}",
                "database-password": "${DATABASE_PASSWORD}",
                "database-user": "${DATABASE_USER}"
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Service",
            "metadata": {
                "annotations": {
                    "description": "Exposes and load balances the application pods",
                    "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]"
                },
                "name": "${NAME}"
            },
            "spec": {
                "ports": [
                    {
                        "name": "web",
                        "port": 8080,
                        "targetPort": 8080
                    }
                ],
                "selector": {
                    "name": "${NAME}"
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Route",
            "metadata": {
                "name": "${NAME}"
            },
            "spec": {
                "host": "${APPLICATION_DOMAIN}",
                "to": {
                    "kind": "Service",
                    "name": "${NAME}"
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "ImageStream",
            "metadata": {
                "annotations": {
                    "description": "Keeps track of changes in the application image"
                },
                "name": "${NAME}"
            }
        },
        {
            "apiVersion": "v1",
            "kind": "BuildConfig",
            "metadata": {
                "annotations": {
                    "description": "Defines how to build the application",
                    "template.alpha.openshift.io/wait-for-ready": "true"
                },
                "name": "${NAME}"
            },
            "spec": {
                "output": {
                    "to": {
                        "kind": "ImageStreamTag",
                        "name": "${NAME}:latest"
                    }
                },
                "postCommit": {
                    "script": "npm test"
                },
                "source": {
                    "contextDir": "${CONTEXT_DIR}",
                    "git": {
                        "ref": "${SOURCE_REPOSITORY_REF}",
                        "uri": "${SOURCE_REPOSITORY_URL}"
                    },
                    "type": "Git"
                },
                "strategy": {
                    "sourceStrategy": {
                        "env": [
                            {
                                "name": "NPM_MIRROR",
                                "value": "${NPM_MIRROR}"
                            }
                        ],
                        "from": {
                            "kind": "ImageStreamTag",
                            "name": "nodejs:${NODEJS_VERSION}",
                            "namespace": "${NAMESPACE}"
                        }
                    },
                    "type": "Source"
                },
                "triggers": [
                    {
                        "type": "ImageChange"
                    },
                    {
                        "type": "ConfigChange"
                    },
                    {
                        "github": {
                            "secret": "${GITHUB_WEBHOOK_SECRET}"
                        },
                        "type": "GitHub"
                    },
                    {
                        "generic": {
                            "secret": "${GENERIC_WEBHOOK_SECRET}"
                        },
                        "type": "Generic"
                    }
                ]
            }
        },
        {
            "apiVersion": "v1",
            "kind": "DeploymentConfig",
            "metadata": {
                "annotations": {
                    "description": "Defines how to deploy the application server",
                    "template.alpha.openshift.io/wait-for-ready": "true"
                },
                "name": "${NAME}"
            },
            "spec": {
                "replicas": 1,
                "selector": {
                    "name": "${NAME}"
                },
                "strategy": {
                    "type": "Recreate"
                },
                "template": {
                    "metadata": {
                        "labels": {
                            "name": "${NAME}"
                        },
                        "name": "${NAME}"
                    },
                    "spec": {
                        "containers": [
                            {
                                "env": [
                                    {
                                        "name": "DATABASE_SERVICE_NAME",
                                        "value": "${DATABASE_SERVICE_NAME}"
                                    },
                                    {
                                        "name": "MONGODB_USER",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-user",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "MONGODB_PASSWORD",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-password",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "MONGODB_DATABASE",
                                        "value": "${DATABASE_NAME}"
                                    },
                                    {
                                        "name": "MONGODB_ADMIN_PASSWORD",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-admin-password",
                                                "name": "${NAME}"
                                            }
                                        }
                                    }
                                ],
                                "image": " ",
                                "livenessProbe": {
                                    "httpGet": {
                                        "path": "/",
                                        "port": 8080
                                    },
                                    "initialDelaySeconds": 30,
                                    "timeoutSeconds": 3
                                },
                                "name": "nodejs-mongo-persistent",
                                "ports": [
                                    {
                                        "containerPort": 8080
                                    }
                                ],
                                "readinessProbe": {
                                    "httpGet": {
                                        "path": "/",
                                        "port": 8080
                                    },
                                    "initialDelaySeconds": 3,
                                    "timeoutSeconds": 3
                                },
                                "resources": {
                                    "limits": {
                                        "memory": "${MEMORY_LIMIT}"
                                    }
                                }
                            }
                        ]
                    }
                },
                "triggers": [
                    {
                        "imageChangeParams": {
                            "automatic": true,
                            "containerNames": [
                                "nodejs-mongo-persistent"
                            ],
                            "from": {
                                "kind": "ImageStreamTag",
                                "name": "${NAME}:latest"
                            }
                        },
                        "type": "ImageChange"
                    },
                    {
                        "type": "ConfigChange"
                    }
                ]
            }
        },
        {
            "apiVersion": "v1",
            "kind": "PersistentVolumeClaim",
            "metadata": {
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "spec": {
                "accessModes": [
                    "ReadWriteOnce"
                ],
                "resources": {
                    "requests": {
                        "storage": "${VOLUME_CAPACITY}"
                    }
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Service",
            "metadata": {
                "annotations": {
                    "description": "Exposes the database server"
                },
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "spec": {
                "ports": [
                    {
                        "name": "mongodb",
                        "port": 27017,
                        "targetPort": 27017
                    }
                ],
                "selector": {
                    "name": "${DATABASE_SERVICE_NAME}"
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "DeploymentConfig",
            "metadata": {
                "annotations": {
                    "description": "Defines how to deploy the database",
                    "template.alpha.openshift.io/wait-for-ready": "true"
                },
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "spec": {
                "replicas": 1,
                "selector": {
                    "name": "${DATABASE_SERVICE_NAME}"
                },
                "strategy": {
                    "type": "Recreate"
                },
                "template": {
                    "metadata": {
                        "labels": {
                            "name": "${DATABASE_SERVICE_NAME}"
                        },
                        "name": "${DATABASE_SERVICE_NAME}"
                    },
                    "spec": {
                        "containers": [
                            {
                                "env": [
                                    {
                                        "name": "MONGODB_USER",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-user",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "MONGODB_PASSWORD",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-password",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "MONGODB_DATABASE",
                                        "value": "${DATABASE_NAME}"
                                    },
                                    {
                                        "name": "MONGODB_ADMIN_PASSWORD",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-admin-password",
                                                "name": "${NAME}"
                                            }
                                        }
                                    }
                                ],
                                "image": " ",
                                "livenessProbe": {
                                    "initialDelaySeconds": 30,
                                    "tcpSocket": {
                                        "port": 27017
                                    },
                                    "timeoutSeconds": 1
                                },
                                "name": "mongodb",
                                "ports": [
                                    {
                                        "containerPort": 27017
                                    }
                                ],
                                "readinessProbe": {
                                    "exec": {
                                        "command": [
                                            "/bin/sh",
                                            "-i",
                                            "-c",
                                            "mongo 127.0.0.1:27017/$MONGODB_DATABASE -u $MONGODB_USER -p $MONGODB_PASSWORD --eval=\"quit()\""
                                        ]
                                    },
                                    "initialDelaySeconds": 3,
                                    "timeoutSeconds": 1
                                },
                                "resources": {
                                    "limits": {
                                        "memory": "${MEMORY_MONGODB_LIMIT}"
                                    }
                                },
                                "volumeMounts": [
                                    {
                                        "mountPath": "/var/lib/mongodb/data",
                                        "name": "${DATABASE_SERVICE_NAME}-data"
                                    }
                                ]
                            }
                        ],
                        "volumes": [
                            {
                                "name": "${DATABASE_SERVICE_NAME}-data",
                                "persistentVolumeClaim": {
                                    "claimName": "${DATABASE_SERVICE_NAME}"
                                }
                            }
                        ]
                    }
                },
                "triggers": [
                    {
                        "imageChangeParams": {
                            "automatic": true,
                            "containerNames": [
                                "mongodb"
                            ],
                            "from": {
                                "kind": "ImageStreamTag",
                                "name": "mongodb:${MONGODB_VERSION}",
                                "namespace": "${NAMESPACE}"
                            }
                        },
                        "type": "ImageChange"
                    },
                    {
                        "type": "ConfigChange"
                    }
                ]
            }
        }
    ],
    "parameters": [
        {
            "description": "The name assigned to all of the frontend objects defined in this template.",
            "displayName": "Name",
            "name": "NAME",
            "required": true,
            "value": "nodejs-mongo-persistent"
        },
        {
            "description": "The OpenShift Namespace where the ImageStream resides.",
            "displayName": "Namespace",
            "name": "NAMESPACE",
            "required": true,
            "value": "openshift"
        },
        {
            "description": "Version of NodeJS image to be used (6, 8, or latest).",
            "displayName": "Version of NodeJS Image",
            "name": "NODEJS_VERSION",
            "required": true,
            "value": "8"
        },
        {
            "description": "Version of MongoDB image to be used (3.6 or latest).",
            "displayName": "Version of MongoDB Image",
            "name": "MONGODB_VERSION",
            "required": true,
            "value": "3.6"
        },
        {
            "description": "Maximum amount of memory the Node.js container can use.",
            "displayName": "Memory Limit",
            "name": "MEMORY_LIMIT",
            "required": true,
            "value": "512Mi"
        },
        {
            "description": "Maximum amount of memory the MongoDB container can use.",
            "displayName": "Memory Limit (MongoDB)",
            "name": "MEMORY_MONGODB_LIMIT",
            "required": true,
            "value": "512Mi"
        },
        {
            "description": "Volume space available for data, e.g. 512Mi, 2Gi",
            "displayName": "Volume Capacity",
            "name": "VOLUME_CAPACITY",
            "required": true,
            "value": "1Gi"
        },
        {
            "description": "The URL of the repository with your application source code.",
            "displayName": "Git Repository URL",
            "name": "SOURCE_REPOSITORY_URL",
            "required": true,
            "value": "https://github.com/sclorg/nodejs-ex.git"
        },
        {
            "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.",
            "displayName": "Git Reference",
            "name": "SOURCE_REPOSITORY_REF"
        },
        {
            "description": "Set this to the relative path to your project if it is not in the root of your repository.",
            "displayName": "Context Directory",
            "name": "CONTEXT_DIR"
        },
        {
            "description": "The exposed hostname that will route to the Node.js service, if left blank a value will be defaulted.",
            "displayName": "Application Hostname",
            "name": "APPLICATION_DOMAIN",
            "value": ""
        },
        {
            "description": "Github trigger secret.  A difficult to guess string encoded as part of the webhook URL.  Not encrypted.",
            "displayName": "GitHub Webhook Secret",
            "from": "[a-zA-Z0-9]{40}",
            "generate": "expression",
            "name": "GITHUB_WEBHOOK_SECRET"
        },
        {
            "description": "A secret string used to configure the Generic webhook.",
            "displayName": "Generic Webhook Secret",
            "from": "[a-zA-Z0-9]{40}",
            "generate": "expression",
            "name": "GENERIC_WEBHOOK_SECRET"
        },
        {
            "displayName": "Database Service Name",
            "name": "DATABASE_SERVICE_NAME",
            "required": true,
            "value": "mongodb"
        },
        {
            "description": "Username for MongoDB user that will be used for accessing the database.",
            "displayName": "MongoDB Username",
            "from": "user[A-Z0-9]{3}",
            "generate": "expression",
            "name": "DATABASE_USER"
        },
        {
            "description": "Password for the MongoDB user.",
            "displayName": "MongoDB Password",
            "from": "[a-zA-Z0-9]{16}",
            "generate": "expression",
            "name": "DATABASE_PASSWORD"
        },
        {
            "displayName": "Database Name",
            "name": "DATABASE_NAME",
            "required": true,
            "value": "sampledb"
        },
        {
            "description": "Password for the database admin user.",
            "displayName": "Database Administrator Password",
            "from": "[a-zA-Z0-9]{16}",
            "generate": "expression",
            "name": "DATABASE_ADMIN_PASSWORD"
        },
        {
            "description": "The custom NPM mirror URL",
            "displayName": "Custom NPM Mirror URL",
            "name": "NPM_MIRROR",
            "value": ""
        }
    ]
}`)

func examplesQuickstartsNodejsMongodbPersistentJsonBytes() ([]byte, error) {
	return _examplesQuickstartsNodejsMongodbPersistentJson, nil
}

func examplesQuickstartsNodejsMongodbPersistentJson() (*asset, error) {
	bytes, err := examplesQuickstartsNodejsMongodbPersistentJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "examples/quickstarts/nodejs-mongodb-persistent.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _examplesQuickstartsNodejsMongodbJson = []byte(`{
    "apiVersion": "v1",
    "kind": "Template",
    "labels": {
        "app": "nodejs-mongodb-example",
        "template": "nodejs-mongodb-example"
    },
    "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/nodejs-ex/blob/master/README.md.",
    "metadata": {
        "annotations": {
            "description": "An example Node.js application with a MongoDB database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/nodejs-ex/blob/master/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.",
            "iconClass": "icon-nodejs",
            "openshift.io/display-name": "Node.js + MongoDB (Ephemeral)",
            "openshift.io/documentation-url": "https://github.com/sclorg/nodejs-ex",
            "openshift.io/long-description": "This template defines resources needed to develop a NodeJS application, including a build configuration, application deployment configuration, and database deployment configuration.  The database is stored in non-persistent storage, so this configuration should be used for experimental purposes only.",
            "openshift.io/provider-display-name": "Red Hat, Inc.",
            "openshift.io/support-url": "https://access.redhat.com",
            "tags": "quickstart,nodejs",
            "template.openshift.io/bindable": "false"
        },
        "name": "nodejs-mongodb-example"
    },
    "objects": [
        {
            "apiVersion": "v1",
            "kind": "Secret",
            "metadata": {
                "name": "${NAME}"
            },
            "stringData": {
                "database-admin-password": "${DATABASE_ADMIN_PASSWORD}",
                "database-password": "${DATABASE_PASSWORD}",
                "database-user": "${DATABASE_USER}"
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Service",
            "metadata": {
                "annotations": {
                    "description": "Exposes and load balances the application pods",
                    "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]"
                },
                "name": "${NAME}"
            },
            "spec": {
                "ports": [
                    {
                        "name": "web",
                        "port": 8080,
                        "targetPort": 8080
                    }
                ],
                "selector": {
                    "name": "${NAME}"
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Route",
            "metadata": {
                "name": "${NAME}"
            },
            "spec": {
                "host": "${APPLICATION_DOMAIN}",
                "to": {
                    "kind": "Service",
                    "name": "${NAME}"
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "ImageStream",
            "metadata": {
                "annotations": {
                    "description": "Keeps track of changes in the application image"
                },
                "name": "${NAME}"
            }
        },
        {
            "apiVersion": "v1",
            "kind": "BuildConfig",
            "metadata": {
                "annotations": {
                    "description": "Defines how to build the application",
                    "template.alpha.openshift.io/wait-for-ready": "true"
                },
                "name": "${NAME}"
            },
            "spec": {
                "output": {
                    "to": {
                        "kind": "ImageStreamTag",
                        "name": "${NAME}:latest"
                    }
                },
                "postCommit": {
                    "script": "npm test"
                },
                "source": {
                    "contextDir": "${CONTEXT_DIR}",
                    "git": {
                        "ref": "${SOURCE_REPOSITORY_REF}",
                        "uri": "${SOURCE_REPOSITORY_URL}"
                    },
                    "type": "Git"
                },
                "strategy": {
                    "sourceStrategy": {
                        "env": [
                            {
                                "name": "NPM_MIRROR",
                                "value": "${NPM_MIRROR}"
                            }
                        ],
                        "from": {
                            "kind": "ImageStreamTag",
                            "name": "nodejs:${NODEJS_VERSION}",
                            "namespace": "${NAMESPACE}"
                        }
                    },
                    "type": "Source"
                },
                "triggers": [
                    {
                        "type": "ImageChange"
                    },
                    {
                        "type": "ConfigChange"
                    },
                    {
                        "github": {
                            "secret": "${GITHUB_WEBHOOK_SECRET}"
                        },
                        "type": "GitHub"
                    },
                    {
                        "generic": {
                            "secret": "${GENERIC_WEBHOOK_SECRET}"
                        },
                        "type": "Generic"
                    }
                ]
            }
        },
        {
            "apiVersion": "v1",
            "kind": "DeploymentConfig",
            "metadata": {
                "annotations": {
                    "description": "Defines how to deploy the application server",
                    "template.alpha.openshift.io/wait-for-ready": "true"
                },
                "name": "${NAME}"
            },
            "spec": {
                "replicas": 1,
                "selector": {
                    "name": "${NAME}"
                },
                "strategy": {
                    "type": "Recreate"
                },
                "template": {
                    "metadata": {
                        "labels": {
                            "name": "${NAME}"
                        },
                        "name": "${NAME}"
                    },
                    "spec": {
                        "containers": [
                            {
                                "env": [
                                    {
                                        "name": "DATABASE_SERVICE_NAME",
                                        "value": "${DATABASE_SERVICE_NAME}"
                                    },
                                    {
                                        "name": "MONGODB_USER",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-user",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "MONGODB_PASSWORD",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-password",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "MONGODB_DATABASE",
                                        "value": "${DATABASE_NAME}"
                                    },
                                    {
                                        "name": "MONGODB_ADMIN_PASSWORD",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-admin-password",
                                                "name": "${NAME}"
                                            }
                                        }
                                    }
                                ],
                                "image": " ",
                                "livenessProbe": {
                                    "httpGet": {
                                        "path": "/",
                                        "port": 8080
                                    },
                                    "initialDelaySeconds": 30,
                                    "timeoutSeconds": 3
                                },
                                "name": "nodejs-mongodb-example",
                                "ports": [
                                    {
                                        "containerPort": 8080
                                    }
                                ],
                                "readinessProbe": {
                                    "httpGet": {
                                        "path": "/",
                                        "port": 8080
                                    },
                                    "initialDelaySeconds": 3,
                                    "timeoutSeconds": 3
                                },
                                "resources": {
                                    "limits": {
                                        "memory": "${MEMORY_LIMIT}"
                                    }
                                }
                            }
                        ]
                    }
                },
                "triggers": [
                    {
                        "imageChangeParams": {
                            "automatic": true,
                            "containerNames": [
                                "nodejs-mongodb-example"
                            ],
                            "from": {
                                "kind": "ImageStreamTag",
                                "name": "${NAME}:latest"
                            }
                        },
                        "type": "ImageChange"
                    },
                    {
                        "type": "ConfigChange"
                    }
                ]
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Service",
            "metadata": {
                "annotations": {
                    "description": "Exposes the database server"
                },
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "spec": {
                "ports": [
                    {
                        "name": "mongodb",
                        "port": 27017,
                        "targetPort": 27017
                    }
                ],
                "selector": {
                    "name": "${DATABASE_SERVICE_NAME}"
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "DeploymentConfig",
            "metadata": {
                "annotations": {
                    "description": "Defines how to deploy the database",
                    "template.alpha.openshift.io/wait-for-ready": "true"
                },
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "spec": {
                "replicas": 1,
                "selector": {
                    "name": "${DATABASE_SERVICE_NAME}"
                },
                "strategy": {
                    "type": "Recreate"
                },
                "template": {
                    "metadata": {
                        "labels": {
                            "name": "${DATABASE_SERVICE_NAME}"
                        },
                        "name": "${DATABASE_SERVICE_NAME}"
                    },
                    "spec": {
                        "containers": [
                            {
                                "env": [
                                    {
                                        "name": "MONGODB_USER",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-user",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "MONGODB_PASSWORD",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-password",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "MONGODB_DATABASE",
                                        "value": "${DATABASE_NAME}"
                                    },
                                    {
                                        "name": "MONGODB_ADMIN_PASSWORD",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-admin-password",
                                                "name": "${NAME}"
                                            }
                                        }
                                    }
                                ],
                                "image": " ",
                                "livenessProbe": {
                                    "initialDelaySeconds": 30,
                                    "tcpSocket": {
                                        "port": 27017
                                    },
                                    "timeoutSeconds": 1
                                },
                                "name": "mongodb",
                                "ports": [
                                    {
                                        "containerPort": 27017
                                    }
                                ],
                                "readinessProbe": {
                                    "exec": {
                                        "command": [
                                            "/bin/sh",
                                            "-i",
                                            "-c",
                                            "mongo 127.0.0.1:27017/$MONGODB_DATABASE -u $MONGODB_USER -p $MONGODB_PASSWORD --eval=\"quit()\""
                                        ]
                                    },
                                    "initialDelaySeconds": 3,
                                    "timeoutSeconds": 1
                                },
                                "resources": {
                                    "limits": {
                                        "memory": "${MEMORY_MONGODB_LIMIT}"
                                    }
                                },
                                "volumeMounts": [
                                    {
                                        "mountPath": "/var/lib/mongodb/data",
                                        "name": "${DATABASE_SERVICE_NAME}-data"
                                    }
                                ]
                            }
                        ],
                        "volumes": [
                            {
                                "emptyDir": {
                                    "medium": ""
                                },
                                "name": "${DATABASE_SERVICE_NAME}-data"
                            }
                        ]
                    }
                },
                "triggers": [
                    {
                        "imageChangeParams": {
                            "automatic": true,
                            "containerNames": [
                                "mongodb"
                            ],
                            "from": {
                                "kind": "ImageStreamTag",
                                "name": "mongodb:${MONGODB_VERSION}",
                                "namespace": "${NAMESPACE}"
                            }
                        },
                        "type": "ImageChange"
                    },
                    {
                        "type": "ConfigChange"
                    }
                ]
            }
        }
    ],
    "parameters": [
        {
            "description": "The name assigned to all of the frontend objects defined in this template.",
            "displayName": "Name",
            "name": "NAME",
            "required": true,
            "value": "nodejs-mongodb-example"
        },
        {
            "description": "The OpenShift Namespace where the ImageStream resides.",
            "displayName": "Namespace",
            "name": "NAMESPACE",
            "required": true,
            "value": "openshift"
        },
        {
            "description": "Version of NodeJS image to be used (6, 8, or latest).",
            "displayName": "Version of NodeJS Image",
            "name": "NODEJS_VERSION",
            "required": true,
            "value": "8"
        },
        {
            "description": "Version of MongoDB image to be used (3.6 or latest).",
            "displayName": "Version of MongoDB Image",
            "name": "MONGODB_VERSION",
            "required": true,
            "value": "3.6"
        },
        {
            "description": "Maximum amount of memory the Node.js container can use.",
            "displayName": "Memory Limit",
            "name": "MEMORY_LIMIT",
            "required": true,
            "value": "512Mi"
        },
        {
            "description": "Maximum amount of memory the MongoDB container can use.",
            "displayName": "Memory Limit (MongoDB)",
            "name": "MEMORY_MONGODB_LIMIT",
            "required": true,
            "value": "512Mi"
        },
        {
            "description": "The URL of the repository with your application source code.",
            "displayName": "Git Repository URL",
            "name": "SOURCE_REPOSITORY_URL",
            "required": true,
            "value": "https://github.com/sclorg/nodejs-ex.git"
        },
        {
            "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.",
            "displayName": "Git Reference",
            "name": "SOURCE_REPOSITORY_REF"
        },
        {
            "description": "Set this to the relative path to your project if it is not in the root of your repository.",
            "displayName": "Context Directory",
            "name": "CONTEXT_DIR"
        },
        {
            "description": "The exposed hostname that will route to the Node.js service, if left blank a value will be defaulted.",
            "displayName": "Application Hostname",
            "name": "APPLICATION_DOMAIN",
            "value": ""
        },
        {
            "description": "Github trigger secret.  A difficult to guess string encoded as part of the webhook URL.  Not encrypted.",
            "displayName": "GitHub Webhook Secret",
            "from": "[a-zA-Z0-9]{40}",
            "generate": "expression",
            "name": "GITHUB_WEBHOOK_SECRET"
        },
        {
            "description": "A secret string used to configure the Generic webhook.",
            "displayName": "Generic Webhook Secret",
            "from": "[a-zA-Z0-9]{40}",
            "generate": "expression",
            "name": "GENERIC_WEBHOOK_SECRET"
        },
        {
            "displayName": "Database Service Name",
            "name": "DATABASE_SERVICE_NAME",
            "required": true,
            "value": "mongodb"
        },
        {
            "description": "Username for MongoDB user that will be used for accessing the database.",
            "displayName": "MongoDB Username",
            "from": "user[A-Z0-9]{3}",
            "generate": "expression",
            "name": "DATABASE_USER"
        },
        {
            "description": "Password for the MongoDB user.",
            "displayName": "MongoDB Password",
            "from": "[a-zA-Z0-9]{16}",
            "generate": "expression",
            "name": "DATABASE_PASSWORD"
        },
        {
            "displayName": "Database Name",
            "name": "DATABASE_NAME",
            "required": true,
            "value": "sampledb"
        },
        {
            "description": "Password for the database admin user.",
            "displayName": "Database Administrator Password",
            "from": "[a-zA-Z0-9]{16}",
            "generate": "expression",
            "name": "DATABASE_ADMIN_PASSWORD"
        },
        {
            "description": "The custom NPM mirror URL",
            "displayName": "Custom NPM Mirror URL",
            "name": "NPM_MIRROR",
            "value": ""
        }
    ]
}`)

func examplesQuickstartsNodejsMongodbJsonBytes() ([]byte, error) {
	return _examplesQuickstartsNodejsMongodbJson, nil
}

func examplesQuickstartsNodejsMongodbJson() (*asset, error) {
	bytes, err := examplesQuickstartsNodejsMongodbJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "examples/quickstarts/nodejs-mongodb.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _examplesQuickstartsRailsPostgresqlPersistentJson = []byte(`{
    "apiVersion": "v1",
    "kind": "Template",
    "labels": {
        "app": "rails-pgsql-persistent",
        "template": "rails-pgsql-persistent"
    },
    "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/rails-ex/blob/master/README.md.",
    "metadata": {
        "annotations": {
            "description": "An example Rails application with a PostgreSQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/rails-ex/blob/master/README.md.",
            "iconClass": "icon-ruby",
            "openshift.io/display-name": "Rails + PostgreSQL",
            "openshift.io/documentation-url": "https://github.com/sclorg/rails-ex",
            "openshift.io/long-description": "This template defines resources needed to develop a Rails application, including a build configuration, application deployment configuration, and database deployment configuration.",
            "openshift.io/provider-display-name": "Red Hat, Inc.",
            "openshift.io/support-url": "https://access.redhat.com",
            "tags": "quickstart,ruby,rails",
            "template.openshift.io/bindable": "false"
        },
        "name": "rails-pgsql-persistent"
    },
    "objects": [
        {
            "apiVersion": "v1",
            "kind": "Secret",
            "metadata": {
                "name": "${NAME}"
            },
            "stringData": {
                "application-password": "${APPLICATION_PASSWORD}",
                "application-user": "${APPLICATION_USER}",
                "database-password": "${DATABASE_PASSWORD}",
                "database-user": "${DATABASE_USER}",
                "keybase": "${SECRET_KEY_BASE}"
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Service",
            "metadata": {
                "annotations": {
                    "description": "Exposes and load balances the application pods",
                    "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]"
                },
                "name": "${NAME}"
            },
            "spec": {
                "ports": [
                    {
                        "name": "web",
                        "port": 8080,
                        "targetPort": 8080
                    }
                ],
                "selector": {
                    "name": "${NAME}"
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Route",
            "metadata": {
                "name": "${NAME}"
            },
            "spec": {
                "host": "${APPLICATION_DOMAIN}",
                "to": {
                    "kind": "Service",
                    "name": "${NAME}"
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "ImageStream",
            "metadata": {
                "annotations": {
                    "description": "Keeps track of changes in the application image"
                },
                "name": "${NAME}"
            }
        },
        {
            "apiVersion": "v1",
            "kind": "BuildConfig",
            "metadata": {
                "annotations": {
                    "description": "Defines how to build the application",
                    "template.alpha.openshift.io/wait-for-ready": "true"
                },
                "name": "${NAME}"
            },
            "spec": {
                "output": {
                    "to": {
                        "kind": "ImageStreamTag",
                        "name": "${NAME}:latest"
                    }
                },
                "postCommit": {
                    "script": "bundle exec rake test"
                },
                "source": {
                    "contextDir": "${CONTEXT_DIR}",
                    "git": {
                        "ref": "${SOURCE_REPOSITORY_REF}",
                        "uri": "${SOURCE_REPOSITORY_URL}"
                    },
                    "type": "Git"
                },
                "strategy": {
                    "sourceStrategy": {
                        "env": [
                            {
                                "name": "RUBYGEM_MIRROR",
                                "value": "${RUBYGEM_MIRROR}"
                            }
                        ],
                        "from": {
                            "kind": "ImageStreamTag",
                            "name": "ruby:2.5",
                            "namespace": "${NAMESPACE}"
                        }
                    },
                    "type": "Source"
                },
                "triggers": [
                    {
                        "type": "ImageChange"
                    },
                    {
                        "type": "ConfigChange"
                    },
                    {
                        "github": {
                            "secret": "${GITHUB_WEBHOOK_SECRET}"
                        },
                        "type": "GitHub"
                    }
                ]
            }
        },
        {
            "apiVersion": "v1",
            "kind": "DeploymentConfig",
            "metadata": {
                "annotations": {
                    "description": "Defines how to deploy the application server",
                    "template.alpha.openshift.io/wait-for-ready": "true"
                },
                "name": "${NAME}"
            },
            "spec": {
                "replicas": 1,
                "selector": {
                    "name": "${NAME}"
                },
                "strategy": {
                    "recreateParams": {
                        "pre": {
                            "execNewPod": {
                                "command": [
                                    "./migrate-database.sh"
                                ],
                                "containerName": "${NAME}"
                            },
                            "failurePolicy": "Abort"
                        }
                    },
                    "type": "Recreate"
                },
                "template": {
                    "metadata": {
                        "labels": {
                            "name": "${NAME}"
                        },
                        "name": "${NAME}"
                    },
                    "spec": {
                        "containers": [
                            {
                                "env": [
                                    {
                                        "name": "DATABASE_SERVICE_NAME",
                                        "value": "${DATABASE_SERVICE_NAME}"
                                    },
                                    {
                                        "name": "POSTGRESQL_USER",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-user",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "POSTGRESQL_PASSWORD",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-password",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "SECRET_KEY_BASE",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "keybase",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "POSTGRESQL_DATABASE",
                                        "value": "${DATABASE_NAME}"
                                    },
                                    {
                                        "name": "POSTGRESQL_MAX_CONNECTIONS",
                                        "value": "${POSTGRESQL_MAX_CONNECTIONS}"
                                    },
                                    {
                                        "name": "POSTGRESQL_SHARED_BUFFERS",
                                        "value": "${POSTGRESQL_SHARED_BUFFERS}"
                                    },
                                    {
                                        "name": "APPLICATION_DOMAIN",
                                        "value": "${APPLICATION_DOMAIN}"
                                    },
                                    {
                                        "name": "APPLICATION_USER",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "application-user",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "APPLICATION_PASSWORD",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "application-password",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "RAILS_ENV",
                                        "value": "${RAILS_ENV}"
                                    }
                                ],
                                "image": " ",
                                "livenessProbe": {
                                    "httpGet": {
                                        "path": "/articles",
                                        "port": 8080
                                    },
                                    "initialDelaySeconds": 10,
                                    "timeoutSeconds": 3
                                },
                                "name": "${NAME}",
                                "ports": [
                                    {
                                        "containerPort": 8080
                                    }
                                ],
                                "readinessProbe": {
                                    "httpGet": {
                                        "path": "/articles",
                                        "port": 8080
                                    },
                                    "initialDelaySeconds": 5,
                                    "timeoutSeconds": 3
                                },
                                "resources": {
                                    "limits": {
                                        "memory": "${MEMORY_LIMIT}"
                                    }
                                }
                            }
                        ]
                    }
                },
                "triggers": [
                    {
                        "imageChangeParams": {
                            "automatic": true,
                            "containerNames": [
                                "${NAME}"
                            ],
                            "from": {
                                "kind": "ImageStreamTag",
                                "name": "${NAME}:latest"
                            }
                        },
                        "type": "ImageChange"
                    },
                    {
                        "type": "ConfigChange"
                    }
                ]
            }
        },
        {
            "apiVersion": "v1",
            "kind": "PersistentVolumeClaim",
            "metadata": {
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "spec": {
                "accessModes": [
                    "ReadWriteOnce"
                ],
                "resources": {
                    "requests": {
                        "storage": "${VOLUME_CAPACITY}"
                    }
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Service",
            "metadata": {
                "annotations": {
                    "description": "Exposes the database server"
                },
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "spec": {
                "ports": [
                    {
                        "name": "postgresql",
                        "port": 5432,
                        "targetPort": 5432
                    }
                ],
                "selector": {
                    "name": "${DATABASE_SERVICE_NAME}"
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "DeploymentConfig",
            "metadata": {
                "annotations": {
                    "description": "Defines how to deploy the database",
                    "template.alpha.openshift.io/wait-for-ready": "true"
                },
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "spec": {
                "replicas": 1,
                "selector": {
                    "name": "${DATABASE_SERVICE_NAME}"
                },
                "strategy": {
                    "type": "Recreate"
                },
                "template": {
                    "metadata": {
                        "labels": {
                            "name": "${DATABASE_SERVICE_NAME}"
                        },
                        "name": "${DATABASE_SERVICE_NAME}"
                    },
                    "spec": {
                        "containers": [
                            {
                                "env": [
                                    {
                                        "name": "POSTGRESQL_USER",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-user",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "POSTGRESQL_PASSWORD",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-password",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "POSTGRESQL_DATABASE",
                                        "value": "${DATABASE_NAME}"
                                    },
                                    {
                                        "name": "POSTGRESQL_MAX_CONNECTIONS",
                                        "value": "${POSTGRESQL_MAX_CONNECTIONS}"
                                    },
                                    {
                                        "name": "POSTGRESQL_SHARED_BUFFERS",
                                        "value": "${POSTGRESQL_SHARED_BUFFERS}"
                                    }
                                ],
                                "image": " ",
                                "livenessProbe": {
                                    "exec": {
                                        "command": [
                                            "/usr/libexec/check-container",
                                            "--live"
                                        ]
                                    },
                                    "initialDelaySeconds": 120,
                                    "timeoutSeconds": 10
                                },
                                "name": "postgresql",
                                "ports": [
                                    {
                                        "containerPort": 5432
                                    }
                                ],
                                "readinessProbe": {
                                    "exec": {
                                        "command": [
                                            "/usr/libexec/check-container"
                                        ]
                                    },
                                    "initialDelaySeconds": 5,
                                    "timeoutSeconds": 1
                                },
                                "resources": {
                                    "limits": {
                                        "memory": "${MEMORY_POSTGRESQL_LIMIT}"
                                    }
                                },
                                "volumeMounts": [
                                    {
                                        "mountPath": "/var/lib/pgsql/data",
                                        "name": "${DATABASE_SERVICE_NAME}-data"
                                    }
                                ]
                            }
                        ],
                        "volumes": [
                            {
                                "name": "${DATABASE_SERVICE_NAME}-data",
                                "persistentVolumeClaim": {
                                    "claimName": "${DATABASE_SERVICE_NAME}"
                                }
                            }
                        ]
                    }
                },
                "triggers": [
                    {
                        "imageChangeParams": {
                            "automatic": true,
                            "containerNames": [
                                "postgresql"
                            ],
                            "from": {
                                "kind": "ImageStreamTag",
                                "name": "postgresql:10",
                                "namespace": "${NAMESPACE}"
                            }
                        },
                        "type": "ImageChange"
                    },
                    {
                        "type": "ConfigChange"
                    }
                ]
            }
        }
    ],
    "parameters": [
        {
            "description": "The name assigned to all of the frontend objects defined in this template.",
            "displayName": "Name",
            "name": "NAME",
            "required": true,
            "value": "rails-pgsql-persistent"
        },
        {
            "description": "The OpenShift Namespace where the ImageStream resides.",
            "displayName": "Namespace",
            "name": "NAMESPACE",
            "required": true,
            "value": "openshift"
        },
        {
            "description": "Maximum amount of memory the Rails container can use.",
            "displayName": "Memory Limit",
            "name": "MEMORY_LIMIT",
            "required": true,
            "value": "512Mi"
        },
        {
            "description": "Maximum amount of memory the PostgreSQL container can use.",
            "displayName": "Memory Limit (PostgreSQL)",
            "name": "MEMORY_POSTGRESQL_LIMIT",
            "required": true,
            "value": "512Mi"
        },
        {
            "description": "Volume space available for data, e.g. 512Mi, 2Gi",
            "displayName": "Volume Capacity",
            "name": "VOLUME_CAPACITY",
            "required": true,
            "value": "1Gi"
        },
        {
            "description": "The URL of the repository with your application source code.",
            "displayName": "Git Repository URL",
            "name": "SOURCE_REPOSITORY_URL",
            "required": true,
            "value": "https://github.com/sclorg/rails-ex.git"
        },
        {
            "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.",
            "displayName": "Git Reference",
            "name": "SOURCE_REPOSITORY_REF"
        },
        {
            "description": "Set this to the relative path to your project if it is not in the root of your repository.",
            "displayName": "Context Directory",
            "name": "CONTEXT_DIR"
        },
        {
            "description": "The exposed hostname that will route to the Rails service, if left blank a value will be defaulted.",
            "displayName": "Application Hostname",
            "name": "APPLICATION_DOMAIN",
            "value": ""
        },
        {
            "description": "Github trigger secret.  A difficult to guess string encoded as part of the webhook URL.  Not encrypted.",
            "displayName": "GitHub Webhook Secret",
            "from": "[a-zA-Z0-9]{40}",
            "generate": "expression",
            "name": "GITHUB_WEBHOOK_SECRET"
        },
        {
            "description": "Your secret key for verifying the integrity of signed cookies.",
            "displayName": "Secret Key",
            "from": "[a-z0-9]{127}",
            "generate": "expression",
            "name": "SECRET_KEY_BASE"
        },
        {
            "description": "The application user that is used within the sample application to authorize access on pages.",
            "displayName": "Application Username",
            "name": "APPLICATION_USER",
            "required": true,
            "value": "openshift"
        },
        {
            "description": "The application password that is used within the sample application to authorize access on pages.",
            "displayName": "Application Password",
            "name": "APPLICATION_PASSWORD",
            "required": true,
            "value": "secret"
        },
        {
            "description": "Environment under which the sample application will run. Could be set to production, development or test.",
            "displayName": "Rails Environment",
            "name": "RAILS_ENV",
            "required": true,
            "value": "production"
        },
        {
            "displayName": "Database Service Name",
            "name": "DATABASE_SERVICE_NAME",
            "required": true,
            "value": "postgresql"
        },
        {
            "displayName": "Database Username",
            "from": "user[A-Z0-9]{3}",
            "generate": "expression",
            "name": "DATABASE_USER"
        },
        {
            "displayName": "Database Password",
            "from": "[a-zA-Z0-9]{8}",
            "generate": "expression",
            "name": "DATABASE_PASSWORD"
        },
        {
            "displayName": "Database Name",
            "name": "DATABASE_NAME",
            "required": true,
            "value": "root"
        },
        {
            "displayName": "Maximum Database Connections",
            "name": "POSTGRESQL_MAX_CONNECTIONS",
            "value": "100"
        },
        {
            "displayName": "Shared Buffer Amount",
            "name": "POSTGRESQL_SHARED_BUFFERS",
            "value": "12MB"
        },
        {
            "description": "The custom RubyGems mirror URL",
            "displayName": "Custom RubyGems Mirror URL",
            "name": "RUBYGEM_MIRROR",
            "value": ""
        }
    ]
}`)

func examplesQuickstartsRailsPostgresqlPersistentJsonBytes() ([]byte, error) {
	return _examplesQuickstartsRailsPostgresqlPersistentJson, nil
}

func examplesQuickstartsRailsPostgresqlPersistentJson() (*asset, error) {
	bytes, err := examplesQuickstartsRailsPostgresqlPersistentJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "examples/quickstarts/rails-postgresql-persistent.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _examplesQuickstartsRailsPostgresqlJson = []byte(`{
    "apiVersion": "v1",
    "kind": "Template",
    "labels": {
        "app": "rails-postgresql-example",
        "template": "rails-postgresql-example"
    },
    "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/rails-ex/blob/master/README.md.",
    "metadata": {
        "annotations": {
            "description": "An example Rails application with a PostgreSQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/rails-ex/blob/master/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.",
            "iconClass": "icon-ruby",
            "openshift.io/display-name": "Rails + PostgreSQL (Ephemeral)",
            "openshift.io/documentation-url": "https://github.com/sclorg/rails-ex",
            "openshift.io/long-description": "This template defines resources needed to develop a Rails application, including a build configuration, application deployment configuration, and database deployment configuration.  The database is stored in non-persistent storage, so this configuration should be used for experimental purposes only.",
            "openshift.io/provider-display-name": "Red Hat, Inc.",
            "openshift.io/support-url": "https://access.redhat.com",
            "tags": "quickstart,ruby,rails",
            "template.openshift.io/bindable": "false"
        },
        "name": "rails-postgresql-example"
    },
    "objects": [
        {
            "apiVersion": "v1",
            "kind": "Secret",
            "metadata": {
                "name": "${NAME}"
            },
            "stringData": {
                "application-password": "${APPLICATION_PASSWORD}",
                "application-user": "${APPLICATION_USER}",
                "database-password": "${DATABASE_PASSWORD}",
                "database-user": "${DATABASE_USER}",
                "keybase": "${SECRET_KEY_BASE}"
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Service",
            "metadata": {
                "annotations": {
                    "description": "Exposes and load balances the application pods",
                    "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]"
                },
                "name": "${NAME}"
            },
            "spec": {
                "ports": [
                    {
                        "name": "web",
                        "port": 8080,
                        "targetPort": 8080
                    }
                ],
                "selector": {
                    "name": "${NAME}"
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Route",
            "metadata": {
                "name": "${NAME}"
            },
            "spec": {
                "host": "${APPLICATION_DOMAIN}",
                "to": {
                    "kind": "Service",
                    "name": "${NAME}"
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "ImageStream",
            "metadata": {
                "annotations": {
                    "description": "Keeps track of changes in the application image"
                },
                "name": "${NAME}"
            }
        },
        {
            "apiVersion": "v1",
            "kind": "BuildConfig",
            "metadata": {
                "annotations": {
                    "description": "Defines how to build the application",
                    "template.alpha.openshift.io/wait-for-ready": "true"
                },
                "name": "${NAME}"
            },
            "spec": {
                "output": {
                    "to": {
                        "kind": "ImageStreamTag",
                        "name": "${NAME}:latest"
                    }
                },
                "postCommit": {
                    "script": "bundle exec rake test"
                },
                "source": {
                    "contextDir": "${CONTEXT_DIR}",
                    "git": {
                        "ref": "${SOURCE_REPOSITORY_REF}",
                        "uri": "${SOURCE_REPOSITORY_URL}"
                    },
                    "type": "Git"
                },
                "strategy": {
                    "sourceStrategy": {
                        "env": [
                            {
                                "name": "RUBYGEM_MIRROR",
                                "value": "${RUBYGEM_MIRROR}"
                            }
                        ],
                        "from": {
                            "kind": "ImageStreamTag",
                            "name": "ruby:2.5",
                            "namespace": "${NAMESPACE}"
                        }
                    },
                    "type": "Source"
                },
                "triggers": [
                    {
                        "type": "ImageChange"
                    },
                    {
                        "type": "ConfigChange"
                    },
                    {
                        "github": {
                            "secret": "${GITHUB_WEBHOOK_SECRET}"
                        },
                        "type": "GitHub"
                    }
                ]
            }
        },
        {
            "apiVersion": "v1",
            "kind": "DeploymentConfig",
            "metadata": {
                "annotations": {
                    "description": "Defines how to deploy the application server",
                    "template.alpha.openshift.io/wait-for-ready": "true"
                },
                "name": "${NAME}"
            },
            "spec": {
                "replicas": 1,
                "selector": {
                    "name": "${NAME}"
                },
                "strategy": {
                    "recreateParams": {
                        "pre": {
                            "execNewPod": {
                                "command": [
                                    "./migrate-database.sh"
                                ],
                                "containerName": "${NAME}"
                            },
                            "failurePolicy": "Abort"
                        }
                    },
                    "type": "Recreate"
                },
                "template": {
                    "metadata": {
                        "labels": {
                            "name": "${NAME}"
                        },
                        "name": "${NAME}"
                    },
                    "spec": {
                        "containers": [
                            {
                                "env": [
                                    {
                                        "name": "DATABASE_SERVICE_NAME",
                                        "value": "${DATABASE_SERVICE_NAME}"
                                    },
                                    {
                                        "name": "POSTGRESQL_USER",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-user",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "POSTGRESQL_PASSWORD",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-password",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "POSTGRESQL_DATABASE",
                                        "value": "${DATABASE_NAME}"
                                    },
                                    {
                                        "name": "SECRET_KEY_BASE",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "keybase",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "POSTGRESQL_MAX_CONNECTIONS",
                                        "value": "${POSTGRESQL_MAX_CONNECTIONS}"
                                    },
                                    {
                                        "name": "POSTGRESQL_SHARED_BUFFERS",
                                        "value": "${POSTGRESQL_SHARED_BUFFERS}"
                                    },
                                    {
                                        "name": "APPLICATION_DOMAIN",
                                        "value": "${APPLICATION_DOMAIN}"
                                    },
                                    {
                                        "name": "APPLICATION_USER",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "application-user",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "APPLICATION_PASSWORD",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "application-password",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "RAILS_ENV",
                                        "value": "${RAILS_ENV}"
                                    }
                                ],
                                "image": " ",
                                "livenessProbe": {
                                    "httpGet": {
                                        "path": "/articles",
                                        "port": 8080
                                    },
                                    "initialDelaySeconds": 10,
                                    "timeoutSeconds": 3
                                },
                                "name": "${NAME}",
                                "ports": [
                                    {
                                        "containerPort": 8080
                                    }
                                ],
                                "readinessProbe": {
                                    "httpGet": {
                                        "path": "/articles",
                                        "port": 8080
                                    },
                                    "initialDelaySeconds": 5,
                                    "timeoutSeconds": 3
                                },
                                "resources": {
                                    "limits": {
                                        "memory": "${MEMORY_LIMIT}"
                                    }
                                }
                            }
                        ]
                    }
                },
                "triggers": [
                    {
                        "imageChangeParams": {
                            "automatic": true,
                            "containerNames": [
                                "${NAME}"
                            ],
                            "from": {
                                "kind": "ImageStreamTag",
                                "name": "${NAME}:latest"
                            }
                        },
                        "type": "ImageChange"
                    },
                    {
                        "type": "ConfigChange"
                    }
                ]
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Service",
            "metadata": {
                "annotations": {
                    "description": "Exposes the database server"
                },
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "spec": {
                "ports": [
                    {
                        "name": "postgresql",
                        "port": 5432,
                        "targetPort": 5432
                    }
                ],
                "selector": {
                    "name": "${DATABASE_SERVICE_NAME}"
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "DeploymentConfig",
            "metadata": {
                "annotations": {
                    "description": "Defines how to deploy the database",
                    "template.alpha.openshift.io/wait-for-ready": "true"
                },
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "spec": {
                "replicas": 1,
                "selector": {
                    "name": "${DATABASE_SERVICE_NAME}"
                },
                "strategy": {
                    "type": "Recreate"
                },
                "template": {
                    "metadata": {
                        "labels": {
                            "name": "${DATABASE_SERVICE_NAME}"
                        },
                        "name": "${DATABASE_SERVICE_NAME}"
                    },
                    "spec": {
                        "containers": [
                            {
                                "env": [
                                    {
                                        "name": "POSTGRESQL_USER",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-user",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "POSTGRESQL_PASSWORD",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-password",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "POSTGRESQL_DATABASE",
                                        "value": "${DATABASE_NAME}"
                                    },
                                    {
                                        "name": "POSTGRESQL_MAX_CONNECTIONS",
                                        "value": "${POSTGRESQL_MAX_CONNECTIONS}"
                                    },
                                    {
                                        "name": "POSTGRESQL_SHARED_BUFFERS",
                                        "value": "${POSTGRESQL_SHARED_BUFFERS}"
                                    }
                                ],
                                "image": " ",
                                "livenessProbe": {
                                    "exec": {
                                        "command": [
                                            "/usr/libexec/check-container",
                                            "--live"
                                        ]
                                    },
                                    "initialDelaySeconds": 120,
                                    "timeoutSeconds": 10
                                },
                                "name": "postgresql",
                                "ports": [
                                    {
                                        "containerPort": 5432
                                    }
                                ],
                                "readinessProbe": {
                                    "exec": {
                                        "command": [
                                            "/usr/libexec/check-container"
                                        ]
                                    },
                                    "initialDelaySeconds": 5,
                                    "timeoutSeconds": 1
                                },
                                "resources": {
                                    "limits": {
                                        "memory": "${MEMORY_POSTGRESQL_LIMIT}"
                                    }
                                },
                                "volumeMounts": [
                                    {
                                        "mountPath": "/var/lib/pgsql/data",
                                        "name": "data"
                                    }
                                ]
                            }
                        ],
                        "volumes": [
                            {
                                "emptyDir": {},
                                "name": "data"
                            }
                        ]
                    }
                },
                "triggers": [
                    {
                        "imageChangeParams": {
                            "automatic": true,
                            "containerNames": [
                                "postgresql"
                            ],
                            "from": {
                                "kind": "ImageStreamTag",
                                "name": "postgresql:10",
                                "namespace": "${NAMESPACE}"
                            }
                        },
                        "type": "ImageChange"
                    },
                    {
                        "type": "ConfigChange"
                    }
                ]
            }
        }
    ],
    "parameters": [
        {
            "description": "The name assigned to all of the frontend objects defined in this template.",
            "displayName": "Name",
            "name": "NAME",
            "required": true,
            "value": "rails-postgresql-example"
        },
        {
            "description": "The OpenShift Namespace where the ImageStream resides.",
            "displayName": "Namespace",
            "name": "NAMESPACE",
            "required": true,
            "value": "openshift"
        },
        {
            "description": "Maximum amount of memory the Rails container can use.",
            "displayName": "Memory Limit",
            "name": "MEMORY_LIMIT",
            "required": true,
            "value": "512Mi"
        },
        {
            "description": "Maximum amount of memory the PostgreSQL container can use.",
            "displayName": "Memory Limit (PostgreSQL)",
            "name": "MEMORY_POSTGRESQL_LIMIT",
            "required": true,
            "value": "512Mi"
        },
        {
            "description": "The URL of the repository with your application source code.",
            "displayName": "Git Repository URL",
            "name": "SOURCE_REPOSITORY_URL",
            "required": true,
            "value": "https://github.com/sclorg/rails-ex.git"
        },
        {
            "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.",
            "displayName": "Git Reference",
            "name": "SOURCE_REPOSITORY_REF"
        },
        {
            "description": "Set this to the relative path to your project if it is not in the root of your repository.",
            "displayName": "Context Directory",
            "name": "CONTEXT_DIR"
        },
        {
            "description": "The exposed hostname that will route to the Rails service, if left blank a value will be defaulted.",
            "displayName": "Application Hostname",
            "name": "APPLICATION_DOMAIN",
            "value": ""
        },
        {
            "description": "Github trigger secret.  A difficult to guess string encoded as part of the webhook URL.  Not encrypted.",
            "displayName": "GitHub Webhook Secret",
            "from": "[a-zA-Z0-9]{40}",
            "generate": "expression",
            "name": "GITHUB_WEBHOOK_SECRET"
        },
        {
            "description": "Your secret key for verifying the integrity of signed cookies.",
            "displayName": "Secret Key",
            "from": "[a-z0-9]{127}",
            "generate": "expression",
            "name": "SECRET_KEY_BASE"
        },
        {
            "description": "The application user that is used within the sample application to authorize access on pages.",
            "displayName": "Application Username",
            "name": "APPLICATION_USER",
            "required": true,
            "value": "openshift"
        },
        {
            "description": "The application password that is used within the sample application to authorize access on pages.",
            "displayName": "Application Password",
            "name": "APPLICATION_PASSWORD",
            "required": true,
            "value": "secret"
        },
        {
            "description": "Environment under which the sample application will run. Could be set to production, development or test.",
            "displayName": "Rails Environment",
            "name": "RAILS_ENV",
            "required": true,
            "value": "production"
        },
        {
            "displayName": "Database Service Name",
            "name": "DATABASE_SERVICE_NAME",
            "required": true,
            "value": "postgresql"
        },
        {
            "displayName": "Database Username",
            "from": "user[A-Z0-9]{3}",
            "generate": "expression",
            "name": "DATABASE_USER"
        },
        {
            "displayName": "Database Password",
            "from": "[a-zA-Z0-9]{8}",
            "generate": "expression",
            "name": "DATABASE_PASSWORD"
        },
        {
            "displayName": "Database Name",
            "name": "DATABASE_NAME",
            "required": true,
            "value": "root"
        },
        {
            "displayName": "Maximum Database Connections",
            "name": "POSTGRESQL_MAX_CONNECTIONS",
            "value": "100"
        },
        {
            "displayName": "Shared Buffer Amount",
            "name": "POSTGRESQL_SHARED_BUFFERS",
            "value": "12MB"
        },
        {
            "description": "The custom RubyGems mirror URL",
            "displayName": "Custom RubyGems Mirror URL",
            "name": "RUBYGEM_MIRROR",
            "value": ""
        }
    ]
}`)

func examplesQuickstartsRailsPostgresqlJsonBytes() ([]byte, error) {
	return _examplesQuickstartsRailsPostgresqlJson, nil
}

func examplesQuickstartsRailsPostgresqlJson() (*asset, error) {
	bytes, err := examplesQuickstartsRailsPostgresqlJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "examples/quickstarts/rails-postgresql.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _examplesHelloOpenshiftDockerfile = []byte(`FROM scratch
MAINTAINER Jessica Forrester <jforrest@redhat.com>
COPY bin/hello-openshift /hello-openshift
EXPOSE 8080 8888
USER 1001
ENTRYPOINT ["/hello-openshift"]
`)

func examplesHelloOpenshiftDockerfileBytes() ([]byte, error) {
	return _examplesHelloOpenshiftDockerfile, nil
}

func examplesHelloOpenshiftDockerfile() (*asset, error) {
	bytes, err := examplesHelloOpenshiftDockerfileBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "examples/hello-openshift/Dockerfile", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _examplesHelloOpenshiftHelloPodJson = []byte(`{
  "kind": "Pod",
  "apiVersion": "v1",
  "metadata": {
    "name": "hello-openshift",
    "creationTimestamp": null,
    "labels": {
      "name": "hello-openshift"
    }
  },
  "spec": {
    "containers": [
      {
        "name": "hello-openshift",
        "image": "openshift/hello-openshift",
        "ports": [
          {
            "containerPort": 8080,
            "protocol": "TCP"
          }
        ],
        "resources": {},
        "volumeMounts": [
          {
            "name":"tmp",
            "mountPath":"/tmp"
          }
        ],
        "terminationMessagePath": "/dev/termination-log",
        "imagePullPolicy": "IfNotPresent",
        "securityContext": {
          "capabilities": {},
          "privileged": false
        }
      }
    ],
    "volumes": [
      {
        "name":"tmp",
        "emptyDir": {}
      }
    ],
    "restartPolicy": "Always",
    "dnsPolicy": "ClusterFirst",
    "serviceAccount": ""
  },
  "status": {}
}
`)

func examplesHelloOpenshiftHelloPodJsonBytes() ([]byte, error) {
	return _examplesHelloOpenshiftHelloPodJson, nil
}

func examplesHelloOpenshiftHelloPodJson() (*asset, error) {
	bytes, err := examplesHelloOpenshiftHelloPodJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "examples/hello-openshift/hello-pod.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _examplesHelloOpenshiftHelloProjectJson = []byte(`{
  "kind": "Project",
  "apiVersion": "v1",
  "metadata": {
    "name": "hello-openshift-project",
    "creationTimestamp": null,
    "labels": {
      "name": "hello-openshift-project"
    },
    "annotations": {
      "openshift.io/description": "This is an example project to demonstrate OpenShift v3",
      "openshift.io/display-name": "Hello OpenShift"
    }
  },
  "spec": {},
  "status": {}
}
`)

func examplesHelloOpenshiftHelloProjectJsonBytes() ([]byte, error) {
	return _examplesHelloOpenshiftHelloProjectJson, nil
}

func examplesHelloOpenshiftHelloProjectJson() (*asset, error) {
	bytes, err := examplesHelloOpenshiftHelloProjectJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "examples/hello-openshift/hello-project.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _examplesJenkinsApplicationTemplateJson = []byte(`{
  "kind": "Template",
  "apiVersion": "v1",
  "metadata": {
    "name": "nodejs-helloworld-sample",
    "annotations": {
      "description": "This example shows how to create a simple nodejs application in openshift origin v3",
      "iconClass": "icon-nodejs",
      "tags": "instant-app,nodejs"
    }
  },
  "objects": [
    {
      "kind": "Service",
      "apiVersion": "v1",
      "metadata": {
        "name": "frontend-prod"
      },
      "spec": {
        "ports": [
          {
            "name": "web",
            "protocol": "TCP",
            "port": 8080,
            "targetPort": 8080,
            "nodePort": 0
          }
        ],
        "selector": {
          "name": "frontend-prod"
        },
        "type": "ClusterIP",
        "sessionAffinity": "None"
      },
      "status": {
        "loadBalancer": {}
      }
    },
    {
      "kind": "Route",
      "apiVersion": "v1",
      "metadata": {
        "name": "frontend"
      },
      "spec": {
        "to": {
          "kind": "Service",
          "name": "frontend"
        },
        "tls": {
          "termination": "edge"
        }
      }
    },
    {
      "kind": "DeploymentConfig",
      "apiVersion": "v1",
      "metadata": {
        "name": "frontend-prod"
      },
      "spec": {
        "strategy": {
          "type": "Rolling",
          "rollingParams": {
            "updatePeriodSeconds": 1,
            "intervalSeconds": 1,
            "timeoutSeconds": 120
          }
        },
        "triggers": [
          {
            "type": "ImageChange",
            "imageChangeParams": {
              "automatic": true,
              "containerNames": [
                "nodejs-helloworld"
              ],
              "from": {
                "kind": "ImageStreamTag",
                "name": "origin-nodejs-sample:prod"
              }
            }
          },
          {
            "type": "ConfigChange"
          }
        ],
        "replicas": 1,
        "selector": {
          "name":"frontend-prod"
        },
        "template": {
          "metadata": {
            "labels": {
              "name": "frontend-prod"
            }
          },
          "spec": {
            "containers": [
              {
                "name": "nodejs-helloworld",
                "image": " ",
                "ports": [
                  {
                    "containerPort": 8080,
                    "protocol": "TCP"
                  }
                ],
                "resources": {
                  "limits": {
                    "memory": "${MEMORY_LIMIT}"
                  }
                },
                "terminationMessagePath": "/dev/termination-log",
                "imagePullPolicy": "IfNotPresent",
                "securityContext": {
                  "capabilities": {},
                  "privileged": false
                }
              }
            ],
            "restartPolicy": "Always",
            "dnsPolicy": "ClusterFirst"
          }
        }
      }
    },
    {
      "kind": "Service",
      "apiVersion": "v1",
      "metadata": {
        "name": "frontend"
      },
      "spec": {
        "ports": [
          {
            "name": "web",
            "protocol": "TCP",
            "port": 8080,
            "targetPort": 8080,
            "nodePort": 0
          }
        ],
        "selector": {
          "name": "frontend"
        },
        "type": "ClusterIP",
        "sessionAffinity": "None"
      }
    },
    {
      "kind": "ImageStream",
      "apiVersion": "v1",
      "metadata": {
        "name": "origin-nodejs-sample"
      }
    },
    {
      "kind": "ImageStream",
      "apiVersion": "v1",
      "metadata": {
        "name": "origin-nodejs-sample2"
      }
    },
    {
      "kind": "ImageStream",
      "apiVersion": "v1",
      "metadata": {
        "name": "origin-nodejs-sample3"
      }
    },
    {
      "kind": "ImageStream",
      "apiVersion": "v1",
      "metadata": {
        "name": "nodejs-010-centos7"
      },
      "spec": {
        "dockerImageRepository": "${NAMESPACE}/nodejs-010-centos7"
      }
    },
    {
      "kind": "BuildConfig",
      "apiVersion": "v1",
      "metadata": {
        "name": "frontend",
        "labels": {
          "name": "nodejs-sample-build"
        }
      },
      "spec": {
        "triggers": [
          {
            "type": "GitHub",
            "github": {
              "secret": "secret101"
            }
          },
          {
            "type": "Generic",
            "generic": {
              "secret": "secret101"
            }
          }
        ],
        "source": {
          "type": "Git",
          "git": {
            "uri": "https://github.com/openshift/nodejs-ex.git"
          }
        },
        "strategy": {
          "type": "Source",
          "sourceStrategy": {
            "from": {
              "kind": "ImageStreamTag",
              "name": "nodejs-010-centos7:latest"
            }
          }
        },
        "output": {
          "to": {
            "kind": "ImageStreamTag",
            "name": "origin-nodejs-sample:latest"
          }
        },
        "resources": {}
      }
    },
    {
      "kind": "DeploymentConfig",
      "apiVersion": "v1",
      "metadata": {
        "name": "frontend"
      },
      "spec": {
        "strategy": {
          "type": "Rolling",
          "rollingParams": {
            "updatePeriodSeconds": 1,
            "intervalSeconds": 1,
            "timeoutSeconds": 120
          }
        },
        "triggers": [
          {
            "type": "ImageChange",
            "imageChangeParams": {
              "automatic": false,
              "containerNames": [
                "nodejs-helloworld"
              ],
              "from": {
                "kind": "ImageStreamTag",
                "name": "origin-nodejs-sample:latest"
              }
            }
          },
          {
            "type": "ConfigChange"
          }
        ],
        "replicas": 1,
        "selector": {
          "name":"frontend"
          },
        "template": {
          "metadata": {
            "labels": {
              "name": "frontend"
            }
          },
          "spec": {
            "containers": [
              {
                "name": "nodejs-helloworld",
                "image": " ",
                "ports": [
                  {
                    "containerPort": 8080,
                    "protocol": "TCP"
                  }
                ],
                "resources": {
                  "limits": {
                    "memory": "${MEMORY_LIMIT}"
                  }
                },
                "terminationMessagePath": "/dev/termination-log",
                "imagePullPolicy": "IfNotPresent",
                "securityContext": {
                  "capabilities": {},
                  "privileged": false
                }
              }
            ],
            "restartPolicy": "Always",
            "dnsPolicy": "ClusterFirst"
          }
        }
      }
    }
  ],
  "parameters": [
    {
      "name": "MEMORY_LIMIT",
      "displayName": "Memory Limit",
      "description": "Maximum amount of memory the container can use.",
      "value": "512Mi"
    },
    {
      "name": "NAMESPACE",
      "displayName": "Namespace",
      "description": "The OpenShift Namespace where the ImageStream resides.",
      "value": "openshift"
    },
   {
      "name": "ADMIN_USERNAME",
      "displayName": "Administrator Username",
      "description": "Username for the administrator of this application.",
      "generate": "expression",
      "from": "admin[A-Z0-9]{3}"
    },
    {
      "name": "ADMIN_PASSWORD",
      "displayName": "Administrator Password",
      "description": "Password for the administrator of this application.",
      "generate": "expression",
      "from": "[a-zA-Z0-9]{8}"
    }
  ],
  "labels": {
    "template": "application-template-stibuild"
  }
}
`)

func examplesJenkinsApplicationTemplateJsonBytes() ([]byte, error) {
	return _examplesJenkinsApplicationTemplateJson, nil
}

func examplesJenkinsApplicationTemplateJson() (*asset, error) {
	bytes, err := examplesJenkinsApplicationTemplateJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "examples/jenkins/application-template.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _examplesJenkinsJenkinsEphemeralTemplateJson = []byte(`{
    "apiVersion": "v1",
    "kind": "Template",
    "labels": {
        "app": "jenkins-ephemeral",
        "template": "jenkins-ephemeral-template"
    },
    "message": "A Jenkins service has been created in your project.  Log into Jenkins with your OpenShift account.  The tutorial at https://github.com/openshift/origin/blob/master/examples/jenkins/README.md contains more information about using this template.",
    "metadata": {
        "annotations": {
            "description": "Jenkins service, without persistent storage.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.",
            "iconClass": "icon-jenkins",
            "openshift.io/display-name": "Jenkins (Ephemeral)",
            "openshift.io/documentation-url": "https://docs.okd.io/latest/using_images/other_images/jenkins.html",
            "openshift.io/long-description": "This template deploys a Jenkins server capable of managing OpenShift Pipeline builds and supporting OpenShift-based oauth login.  The Jenkins configuration is stored in non-persistent storage, so this configuration should be used for experimental purposes only.",
            "openshift.io/provider-display-name": "Red Hat, Inc.",
            "openshift.io/support-url": "https://access.redhat.com",
            "tags": "instant-app,jenkins"
        },
        "name": "jenkins-ephemeral"
    },
    "objects": [
        {
            "apiVersion": "v1",
            "kind": "Route",
            "metadata": {
                "annotations": {
                    "haproxy.router.openshift.io/timeout": "4m",
                    "template.openshift.io/expose-uri": "http://{.spec.host}{.spec.path}"
                },
                "name": "${JENKINS_SERVICE_NAME}"
            },
            "spec": {
                "tls": {
                    "insecureEdgeTerminationPolicy": "Redirect",
                    "termination": "edge"
                },
                "to": {
                    "kind": "Service",
                    "name": "${JENKINS_SERVICE_NAME}"
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "DeploymentConfig",
            "metadata": {
                "annotations": {
                    "template.alpha.openshift.io/wait-for-ready": "true"
                },
                "name": "${JENKINS_SERVICE_NAME}"
            },
            "spec": {
                "replicas": 1,
                "selector": {
                    "name": "${JENKINS_SERVICE_NAME}"
                },
                "strategy": {
                    "type": "Recreate"
                },
                "template": {
                    "metadata": {
                        "labels": {
                            "name": "${JENKINS_SERVICE_NAME}"
                        }
                    },
                    "spec": {
                        "containers": [
                            {
                                "env": [
                                    {
                                        "name": "OPENSHIFT_ENABLE_OAUTH",
                                        "value": "${ENABLE_OAUTH}"
                                    },
                                    {
                                        "name": "OPENSHIFT_ENABLE_REDIRECT_PROMPT",
                                        "value": "true"
                                    },
                                    {
                                        "name": "DISABLE_ADMINISTRATIVE_MONITORS",
                                        "value": "${DISABLE_ADMINISTRATIVE_MONITORS}"
                                    },
                                    {
                                        "name": "KUBERNETES_MASTER",
                                        "value": "https://kubernetes.default:443"
                                    },
                                    {
                                        "name": "KUBERNETES_TRUST_CERTIFICATES",
                                        "value": "true"
                                    },
                                    {
                                        "name": "JENKINS_SERVICE_NAME",
                                        "value": "${JENKINS_SERVICE_NAME}"
                                    },
                                    {
                                        "name": "JNLP_SERVICE_NAME",
                                        "value": "${JNLP_SERVICE_NAME}"
                                    }
                                ],
                                "image": " ",
                                "imagePullPolicy": "IfNotPresent",
                                "livenessProbe": {
                                    "failureThreshold": 2,
                                    "httpGet": {
                                        "path": "/login",
                                        "port": 8080
                                    },
                                    "initialDelaySeconds": 420,
                                    "periodSeconds": 360,
                                    "timeoutSeconds": 240
                                },
                                "name": "jenkins",
                                "readinessProbe": {
                                    "httpGet": {
                                        "path": "/login",
                                        "port": 8080
                                    },
                                    "initialDelaySeconds": 3,
                                    "timeoutSeconds": 240
                                },
                                "resources": {
                                    "limits": {
                                        "memory": "${MEMORY_LIMIT}"
                                    }
                                },
                                "securityContext": {
                                    "capabilities": {},
                                    "privileged": false
                                },
                                "terminationMessagePath": "/dev/termination-log",
                                "volumeMounts": [
                                    {
                                        "mountPath": "/var/lib/jenkins",
                                        "name": "${JENKINS_SERVICE_NAME}-data"
                                    }
                                ]
                            }
                        ],
                        "dnsPolicy": "ClusterFirst",
                        "restartPolicy": "Always",
                        "serviceAccountName": "${JENKINS_SERVICE_NAME}",
                        "volumes": [
                            {
                                "emptyDir": {
                                    "medium": ""
                                },
                                "name": "${JENKINS_SERVICE_NAME}-data"
                            }
                        ]
                    }
                },
                "triggers": [
                    {
                        "imageChangeParams": {
                            "automatic": true,
                            "containerNames": [
                                "jenkins"
                            ],
                            "from": {
                                "kind": "ImageStreamTag",
                                "name": "${JENKINS_IMAGE_STREAM_TAG}",
                                "namespace": "${NAMESPACE}"
                            },
                            "lastTriggeredImage": ""
                        },
                        "type": "ImageChange"
                    },
                    {
                        "type": "ConfigChange"
                    }
                ]
            }
        },
        {
            "apiVersion": "v1",
            "kind": "ServiceAccount",
            "metadata": {
                "annotations": {
                    "serviceaccounts.openshift.io/oauth-redirectreference.jenkins": "{\"kind\":\"OAuthRedirectReference\",\"apiVersion\":\"v1\",\"reference\":{\"kind\":\"Route\",\"name\":\"${JENKINS_SERVICE_NAME}\"}}"
                },
                "name": "${JENKINS_SERVICE_NAME}"
            }
        },
        {
            "apiVersion": "v1",
            "groupNames": null,
            "kind": "RoleBinding",
            "metadata": {
                "name": "${JENKINS_SERVICE_NAME}_edit"
            },
            "roleRef": {
                "name": "edit"
            },
            "subjects": [
                {
                    "kind": "ServiceAccount",
                    "name": "${JENKINS_SERVICE_NAME}"
                }
            ]
        },
        {
            "apiVersion": "v1",
            "kind": "Service",
            "metadata": {
                "name": "${JNLP_SERVICE_NAME}"
            },
            "spec": {
                "ports": [
                    {
                        "name": "agent",
                        "nodePort": 0,
                        "port": 50000,
                        "protocol": "TCP",
                        "targetPort": 50000
                    }
                ],
                "selector": {
                    "name": "${JENKINS_SERVICE_NAME}"
                },
                "sessionAffinity": "None",
                "type": "ClusterIP"
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Service",
            "metadata": {
                "annotations": {
                    "service.alpha.openshift.io/dependencies": "[{\"name\": \"${JNLP_SERVICE_NAME}\", \"namespace\": \"\", \"kind\": \"Service\"}]",
                    "service.openshift.io/infrastructure": "true"
                },
                "name": "${JENKINS_SERVICE_NAME}"
            },
            "spec": {
                "ports": [
                    {
                        "name": "web",
                        "nodePort": 0,
                        "port": 80,
                        "protocol": "TCP",
                        "targetPort": 8080
                    }
                ],
                "selector": {
                    "name": "${JENKINS_SERVICE_NAME}"
                },
                "sessionAffinity": "None",
                "type": "ClusterIP"
            }
        }
    ],
    "parameters": [
        {
            "description": "The name of the OpenShift Service exposed for the Jenkins container.",
            "displayName": "Jenkins Service Name",
            "name": "JENKINS_SERVICE_NAME",
            "value": "jenkins"
        },
        {
            "description": "The name of the service used for master/slave communication.",
            "displayName": "Jenkins JNLP Service Name",
            "name": "JNLP_SERVICE_NAME",
            "value": "jenkins-jnlp"
        },
        {
            "description": "Whether to enable OAuth OpenShift integration. If false, the static account 'admin' will be initialized with the password 'password'.",
            "displayName": "Enable OAuth in Jenkins",
            "name": "ENABLE_OAUTH",
            "value": "true"
        },
        {
            "description": "Maximum amount of memory the container can use.",
            "displayName": "Memory Limit",
            "name": "MEMORY_LIMIT",
            "value": "512Mi"
        },
        {
            "description": "The OpenShift Namespace where the Jenkins ImageStream resides.",
            "displayName": "Jenkins ImageStream Namespace",
            "name": "NAMESPACE",
            "value": "openshift"
        },
        {
            "description": "Whether to perform memory intensive, possibly slow, synchronization with the Jenkins Update Center on start.  If true, the Jenkins core update monitor and site warnings monitor are disabled.",
            "displayName": "Disable memory intensive administrative monitors",
            "name": "DISABLE_ADMINISTRATIVE_MONITORS",
            "value": "false"
        },
        {
            "description": "Name of the ImageStreamTag to be used for the Jenkins image.",
            "displayName": "Jenkins ImageStreamTag",
            "name": "JENKINS_IMAGE_STREAM_TAG",
            "value": "jenkins:2"
        }
    ]
}
`)

func examplesJenkinsJenkinsEphemeralTemplateJsonBytes() ([]byte, error) {
	return _examplesJenkinsJenkinsEphemeralTemplateJson, nil
}

func examplesJenkinsJenkinsEphemeralTemplateJson() (*asset, error) {
	bytes, err := examplesJenkinsJenkinsEphemeralTemplateJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "examples/jenkins/jenkins-ephemeral-template.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _examplesJenkinsJenkinsPersistentTemplateJson = []byte(`{
    "apiVersion": "v1",
    "kind": "Template",
    "labels": {
        "app": "jenkins-persistent",
        "template": "jenkins-persistent-template"
    },
    "message": "A Jenkins service has been created in your project.  Log into Jenkins with your OpenShift account.  The tutorial at https://github.com/openshift/origin/blob/master/examples/jenkins/README.md contains more information about using this template.",
    "metadata": {
        "annotations": {
            "description": "Jenkins service, with persistent storage.\n\nNOTE: You must have persistent volumes available in your cluster to use this template.",
            "iconClass": "icon-jenkins",
            "openshift.io/display-name": "Jenkins",
            "openshift.io/documentation-url": "https://docs.okd.io/latest/using_images/other_images/jenkins.html",
            "openshift.io/long-description": "This template deploys a Jenkins server capable of managing OpenShift Pipeline builds and supporting OpenShift-based oauth login.",
            "openshift.io/provider-display-name": "Red Hat, Inc.",
            "openshift.io/support-url": "https://access.redhat.com",
            "tags": "instant-app,jenkins"
        },
        "name": "jenkins-persistent"
    },
    "objects": [
        {
            "apiVersion": "v1",
            "kind": "Route",
            "metadata": {
                "annotations": {
                    "haproxy.router.openshift.io/timeout": "4m",
                    "template.openshift.io/expose-uri": "http://{.spec.host}{.spec.path}"
                },
                "name": "${JENKINS_SERVICE_NAME}"
            },
            "spec": {
                "tls": {
                    "insecureEdgeTerminationPolicy": "Redirect",
                    "termination": "edge"
                },
                "to": {
                    "kind": "Service",
                    "name": "${JENKINS_SERVICE_NAME}"
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "PersistentVolumeClaim",
            "metadata": {
                "name": "${JENKINS_SERVICE_NAME}"
            },
            "spec": {
                "accessModes": [
                    "ReadWriteOnce"
                ],
                "resources": {
                    "requests": {
                        "storage": "${VOLUME_CAPACITY}"
                    }
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "DeploymentConfig",
            "metadata": {
                "annotations": {
                    "template.alpha.openshift.io/wait-for-ready": "true"
                },
                "name": "${JENKINS_SERVICE_NAME}"
            },
            "spec": {
                "replicas": 1,
                "selector": {
                    "name": "${JENKINS_SERVICE_NAME}"
                },
                "strategy": {
                    "type": "Recreate"
                },
                "template": {
                    "metadata": {
                        "labels": {
                            "name": "${JENKINS_SERVICE_NAME}"
                        }
                    },
                    "spec": {
                        "containers": [
                            {
                                "capabilities": {},
                                "env": [
                                    {
                                        "name": "OPENSHIFT_ENABLE_OAUTH",
                                        "value": "${ENABLE_OAUTH}"
                                    },
                                    {
                                        "name": "OPENSHIFT_ENABLE_REDIRECT_PROMPT",
                                        "value": "true"
                                    },
                                    {
                                        "name": "DISABLE_ADMINISTRATIVE_MONITORS",
                                        "value": "${DISABLE_ADMINISTRATIVE_MONITORS}"
                                    },
                                    {
                                        "name": "KUBERNETES_MASTER",
                                        "value": "https://kubernetes.default:443"
                                    },
                                    {
                                        "name": "KUBERNETES_TRUST_CERTIFICATES",
                                        "value": "true"
                                    },
                                    {
                                        "name": "JENKINS_SERVICE_NAME",
                                        "value": "${JENKINS_SERVICE_NAME}"
                                    },
                                    {
                                        "name": "JNLP_SERVICE_NAME",
                                        "value": "${JNLP_SERVICE_NAME}"
                                    },
                                    {
                                        "name": "ENABLE_FATAL_ERROR_LOG_FILE",
                                        "value": "${ENABLE_FATAL_ERROR_LOG_FILE}"
                                    }
                                ],
                                "image": " ",
                                "imagePullPolicy": "IfNotPresent",
                                "livenessProbe": {
                                    "failureThreshold": 2,
                                    "httpGet": {
                                        "path": "/login",
                                        "port": 8080
                                    },
                                    "initialDelaySeconds": 420,
                                    "periodSeconds": 360,
                                    "timeoutSeconds": 240
                                },
                                "name": "jenkins",
                                "readinessProbe": {
                                    "httpGet": {
                                        "path": "/login",
                                        "port": 8080
                                    },
                                    "initialDelaySeconds": 3,
                                    "timeoutSeconds": 240
                                },
                                "resources": {
                                    "limits": {
                                        "memory": "${MEMORY_LIMIT}"
                                    }
                                },
                                "securityContext": {
                                    "capabilities": {},
                                    "privileged": false
                                },
                                "terminationMessagePath": "/dev/termination-log",
                                "volumeMounts": [
                                    {
                                        "mountPath": "/var/lib/jenkins",
                                        "name": "${JENKINS_SERVICE_NAME}-data"
                                    }
                                ]
                            }
                        ],
                        "dnsPolicy": "ClusterFirst",
                        "restartPolicy": "Always",
                        "serviceAccountName": "${JENKINS_SERVICE_NAME}",
                        "volumes": [
                            {
                                "name": "${JENKINS_SERVICE_NAME}-data",
                                "persistentVolumeClaim": {
                                    "claimName": "${JENKINS_SERVICE_NAME}"
                                }
                            }
                        ]
                    }
                },
                "triggers": [
                    {
                        "imageChangeParams": {
                            "automatic": true,
                            "containerNames": [
                                "jenkins"
                            ],
                            "from": {
                                "kind": "ImageStreamTag",
                                "name": "${JENKINS_IMAGE_STREAM_TAG}",
                                "namespace": "${NAMESPACE}"
                            },
                            "lastTriggeredImage": ""
                        },
                        "type": "ImageChange"
                    },
                    {
                        "type": "ConfigChange"
                    }
                ]
            }
        },
        {
            "apiVersion": "v1",
            "kind": "ServiceAccount",
            "metadata": {
                "annotations": {
                    "serviceaccounts.openshift.io/oauth-redirectreference.jenkins": "{\"kind\":\"OAuthRedirectReference\",\"apiVersion\":\"v1\",\"reference\":{\"kind\":\"Route\",\"name\":\"${JENKINS_SERVICE_NAME}\"}}"
                },
                "name": "${JENKINS_SERVICE_NAME}"
            }
        },
        {
            "apiVersion": "v1",
            "groupNames": null,
            "kind": "RoleBinding",
            "metadata": {
                "name": "${JENKINS_SERVICE_NAME}_edit"
            },
            "roleRef": {
                "name": "edit"
            },
            "subjects": [
                {
                    "kind": "ServiceAccount",
                    "name": "${JENKINS_SERVICE_NAME}"
                }
            ]
        },
        {
            "apiVersion": "v1",
            "kind": "Service",
            "metadata": {
                "name": "${JNLP_SERVICE_NAME}"
            },
            "spec": {
                "ports": [
                    {
                        "name": "agent",
                        "nodePort": 0,
                        "port": 50000,
                        "protocol": "TCP",
                        "targetPort": 50000
                    }
                ],
                "selector": {
                    "name": "${JENKINS_SERVICE_NAME}"
                },
                "sessionAffinity": "None",
                "type": "ClusterIP"
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Service",
            "metadata": {
                "annotations": {
                    "service.alpha.openshift.io/dependencies": "[{\"name\": \"${JNLP_SERVICE_NAME}\", \"namespace\": \"\", \"kind\": \"Service\"}]",
                    "service.openshift.io/infrastructure": "true"
                },
                "name": "${JENKINS_SERVICE_NAME}"
            },
            "spec": {
                "ports": [
                    {
                        "name": "web",
                        "nodePort": 0,
                        "port": 80,
                        "protocol": "TCP",
                        "targetPort": 8080
                    }
                ],
                "selector": {
                    "name": "${JENKINS_SERVICE_NAME}"
                },
                "sessionAffinity": "None",
                "type": "ClusterIP"
            }
        }
    ],
    "parameters": [
        {
            "description": "The name of the OpenShift Service exposed for the Jenkins container.",
            "displayName": "Jenkins Service Name",
            "name": "JENKINS_SERVICE_NAME",
            "value": "jenkins"
        },
        {
            "description": "The name of the service used for master/slave communication.",
            "displayName": "Jenkins JNLP Service Name",
            "name": "JNLP_SERVICE_NAME",
            "value": "jenkins-jnlp"
        },
        {
            "description": "Whether to enable OAuth OpenShift integration. If false, the static account 'admin' will be initialized with the password 'password'.",
            "displayName": "Enable OAuth in Jenkins",
            "name": "ENABLE_OAUTH",
            "value": "true"
        },
        {
            "description": "Maximum amount of memory the container can use.",
            "displayName": "Memory Limit",
            "name": "MEMORY_LIMIT",
            "value": "512Mi"
        },
        {
            "description": "Volume space available for data, e.g. 512Mi, 2Gi.",
            "displayName": "Volume Capacity",
            "name": "VOLUME_CAPACITY",
            "required": true,
            "value": "1Gi"
        },
        {
            "description": "The OpenShift Namespace where the Jenkins ImageStream resides.",
            "displayName": "Jenkins ImageStream Namespace",
            "name": "NAMESPACE",
            "value": "openshift"
        },
        {
            "description": "Whether to perform memory intensive, possibly slow, synchronization with the Jenkins Update Center on start.  If true, the Jenkins core update monitor and site warnings monitor are disabled.",
            "displayName": "Disable memory intensive administrative monitors",
            "name": "DISABLE_ADMINISTRATIVE_MONITORS",
            "value": "false"
        },
        {
            "description": "Name of the ImageStreamTag to be used for the Jenkins image.",
            "displayName": "Jenkins ImageStreamTag",
            "name": "JENKINS_IMAGE_STREAM_TAG",
            "value": "jenkins:2"
        },
        {
            "description": "When a fatal error occurs, an error log is created with information and the state obtained at the time of the fatal error.",
            "displayName": "Fatal Error Log File",
            "name": "ENABLE_FATAL_ERROR_LOG_FILE",
            "value": "false"
        }
    ]
}`)

func examplesJenkinsJenkinsPersistentTemplateJsonBytes() ([]byte, error) {
	return _examplesJenkinsJenkinsPersistentTemplateJson, nil
}

func examplesJenkinsJenkinsPersistentTemplateJson() (*asset, error) {
	bytes, err := examplesJenkinsJenkinsPersistentTemplateJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "examples/jenkins/jenkins-persistent-template.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _examplesJenkinsPipelineBluegreenPipelineYaml = []byte(`apiVersion: v1
kind: Template
labels:
  template: bluegreen-pipeline
message: A Jenkins server must be instantiated in this project to manage
  the Pipeline BuildConfig created by this template.  You will be able to log in to
  it using your OpenShift user credentials.
metadata:
  annotations:
    description: This example showcases a blue green deployment using a Jenkins
      pipeline that pauses for approval.
    iconClass: icon-jenkins
    tags: instant-app,jenkins
  name: bluegreen-pipeline
objects:
- apiVersion: v1
  kind: BuildConfig
  metadata:
    annotations:
      pipeline.alpha.openshift.io/uses: '[{"name": "${NAME}", "namespace": "", "kind": "DeploymentConfig"}]'
    creationTimestamp: null
    labels:
      name: bluegreen-pipeline
    name: bluegreen-pipeline
  spec:
    strategy:
      jenkinsPipelineStrategy:
        jenkinsfile: |-
          try {
             timeout(time: 20, unit: 'MINUTES') {
                def appName="${NAME}"
                def project=""
                def tag="blue"
                def altTag="green"
                def verbose="${VERBOSE}"
        
                node {
                  project = env.PROJECT_NAME
                  stage("Initialize") {
                    sh "oc get route ${appName} -n ${project} -o jsonpath='{ .spec.to.name }' --loglevel=4 > activeservice"
                    activeService = readFile('activeservice').trim()
                    if (activeService == "${appName}-blue") {
                      tag = "green"
                      altTag = "blue"
                    }
                    sh "oc get route ${tag}-${appName} -n ${project} -o jsonpath='{ .spec.host }' --loglevel=4 > routehost"
                    routeHost = readFile('routehost').trim()
                  }
        
                  openshift.withCluster() {
                    openshift.withProject() {
                      stage("Build") {
                        echo "building tag ${tag}"
                        def bld = openshift.startBuild("${appName}")
                        bld.untilEach {
                          return it.object().status.phase == "Running"
                        }
                        bld.logs('-f')                        
                      }
            
                      stage("Deploy Test") {
                        openshift.tag("${appName}:latest", "${appName}:${tag}")
                        def dc = openshift.selector('dc', "${appName}-${tag}")
                        dc.rollout().status()
                      }
            
                      stage("Test") {
                        input message: "Test deployment: http://${routeHost}. Approve?", id: "approval"
                      }
            
                      stage("Go Live") {
                        sh "oc set -n ${project} route-backends ${appName} ${appName}-${tag}=100 ${appName}-${altTag}=0 --loglevel=4"
                      }

                    }
                  }
                }
             }
          } catch (err) {
             echo "in catch block"
             echo "Caught: ${err}"
             currentBuild.result = 'FAILURE'
             throw err
          }          
      type: JenkinsPipeline
    triggers:
    - github:
        secret: "${GITHUB_WEBHOOK_SECRET}"
      type: GitHub
    - generic:
        secret: "${GENERIC_WEBHOOK_SECRET}"
      type: Generic
- apiVersion: v1
  kind: Route
  metadata:
    name: blue-${NAME}
  spec:
    to:
      kind: Service
      name: ${NAME}-blue
- apiVersion: v1
  kind: Route
  metadata:
    name: green-${NAME}
  spec:
    to:
      kind: Service
      name: ${NAME}-green
- apiVersion: v1
  kind: Route
  metadata:
    name: ${NAME}
  spec:
    alternateBackends:
    - name: ${NAME}-green
      weight: 0
    to:
      kind: Service
      name: ${NAME}-blue
      weight: 100
- apiVersion: v1
  kind: ImageStream
  metadata:
    annotations:
      description: Keeps track of changes in the application image
    name: ${NAME}
- apiVersion: v1
  kind: BuildConfig
  metadata:
    annotations:
      description: Defines how to build the application
    name: ${NAME}
  spec:
    output:
      to:
        kind: ImageStreamTag
        name: ${NAME}:latest
    postCommit:
      script: npm test
    source:
      contextDir: ${CONTEXT_DIR}
      git:
        ref: ${SOURCE_REPOSITORY_REF}
        uri: ${SOURCE_REPOSITORY_URL}
      type: Git
    strategy:
      sourceStrategy:
        env:
        - name: NPM_MIRROR
          value: ${NPM_MIRROR}
        from:
          kind: ImageStreamTag
          name: nodejs:12
          namespace: ${NAMESPACE}
      type: Source
    triggers:
    - github:
        secret: ${GITHUB_WEBHOOK_SECRET}
      type: GitHub
    - generic:
        secret: ${GENERIC_WEBHOOK_SECRET}
      type: Generic
- apiVersion: v1
  kind: Service
  metadata:
    annotations:
      service.alpha.openshift.io/dependencies: '[{"name": "${DATABASE_SERVICE_NAME}", "namespace": "", "kind": "Service"}]'
    name: ${NAME}-blue
  spec:
    ports:
    - name: web
      port: 8080
      targetPort: 8080
    selector:
      name: ${NAME}-blue
- apiVersion: v1
  kind: DeploymentConfig
  metadata:
    annotations:
      description: Defines how to deploy the application server
    name: ${NAME}-blue
  spec:
    replicas: 1
    selector:
      name: ${NAME}-blue
    strategy:
      type: Rolling
    template:
      metadata:
        labels:
          name: ${NAME}-blue
        name: ${NAME}-blue
      spec:
        containers:
        - env:
          - name: DATABASE_SERVICE_NAME
            value: ${DATABASE_SERVICE_NAME}
          - name: MONGODB_USER
            value: ${DATABASE_USER}
          - name: MONGODB_PASSWORD
            value: ${DATABASE_PASSWORD}
          - name: MONGODB_DATABASE
            value: ${DATABASE_NAME}
          - name: MONGODB_ADMIN_PASSWORD
            value: ${DATABASE_ADMIN_PASSWORD}
          image: ' '
          livenessProbe:
            httpGet:
              path: /pagecount
              port: 8080
            initialDelaySeconds: 30
            timeoutSeconds: 3
          name: nodejs-mongodb-example
          ports:
          - containerPort: 8080
          readinessProbe:
            httpGet:
              path: /pagecount
              port: 8080
            initialDelaySeconds: 3
            timeoutSeconds: 3
          resources:
            limits:
              memory: ${MEMORY_LIMIT}
    triggers:
    - imageChangeParams:
        automatic: true
        containerNames:
        - nodejs-mongodb-example
        from:
          kind: ImageStreamTag
          name: ${NAME}:blue
      type: ImageChange
    - type: ConfigChange
- apiVersion: v1
  kind: Service
  metadata:
    annotations:
      service.alpha.openshift.io/dependencies: '[{"name": "${DATABASE_SERVICE_NAME}", "namespace": "", "kind": "Service"}]'
    name: ${NAME}-green
  spec:
    ports:
    - name: web
      port: 8080
      targetPort: 8080
    selector:
      name: ${NAME}-green
- apiVersion: v1
  kind: DeploymentConfig
  metadata:
    annotations:
      description: Defines how to deploy the application server
    name: ${NAME}-green
  spec:
    replicas: 1
    selector:
      name: ${NAME}-green
    strategy:
      type: Rolling
    template:
      metadata:
        labels:
          name: ${NAME}-green
        name: ${NAME}-green
      spec:
        containers:
        - env:
          - name: DATABASE_SERVICE_NAME
            value: ${DATABASE_SERVICE_NAME}
          - name: MONGODB_USER
            value: ${DATABASE_USER}
          - name: MONGODB_PASSWORD
            value: ${DATABASE_PASSWORD}
          - name: MONGODB_DATABASE
            value: ${DATABASE_NAME}
          - name: MONGODB_ADMIN_PASSWORD
            value: ${DATABASE_ADMIN_PASSWORD}
          image: ' '
          livenessProbe:
            httpGet:
              path: /pagecount
              port: 8080
            initialDelaySeconds: 30
            timeoutSeconds: 3
          name: nodejs-mongodb-example
          ports:
          - containerPort: 8080
          readinessProbe:
            httpGet:
              path: /pagecount
              port: 8080
            initialDelaySeconds: 3
            timeoutSeconds: 3
          resources:
            limits:
              memory: ${MEMORY_LIMIT}
    triggers:
    - imageChangeParams:
        automatic: true
        containerNames:
        - nodejs-mongodb-example
        from:
          kind: ImageStreamTag
          name: ${NAME}:green
      type: ImageChange
    - type: ConfigChange
- apiVersion: v1
  kind: Service
  metadata:
    annotations:
      description: Exposes the database server
    name: ${DATABASE_SERVICE_NAME}
  spec:
    ports:
    - name: mongodb
      port: 27017
      targetPort: 27017
    selector:
      name: ${DATABASE_SERVICE_NAME}
- apiVersion: v1
  kind: DeploymentConfig
  metadata:
    annotations:
      description: Defines how to deploy the database
    name: ${DATABASE_SERVICE_NAME}
  spec:
    replicas: 1
    selector:
      name: ${DATABASE_SERVICE_NAME}
    strategy:
      type: Recreate
    template:
      metadata:
        labels:
          name: ${DATABASE_SERVICE_NAME}
        name: ${DATABASE_SERVICE_NAME}
      spec:
        containers:
        - env:
          - name: MONGODB_USER
            value: ${DATABASE_USER}
          - name: MONGODB_PASSWORD
            value: ${DATABASE_PASSWORD}
          - name: MONGODB_DATABASE
            value: ${DATABASE_NAME}
          - name: MONGODB_ADMIN_PASSWORD
            value: ${DATABASE_ADMIN_PASSWORD}
          image: ' '
          livenessProbe:
            initialDelaySeconds: 30
            tcpSocket:
              port: 27017
            timeoutSeconds: 1
          name: mongodb
          ports:
          - containerPort: 27017
          readinessProbe:
            exec:
              command:
              - /bin/sh
              - -i
              - -c
              - mongo 127.0.0.1:27017/$MONGODB_DATABASE -u $MONGODB_USER -p $MONGODB_PASSWORD
                --eval="quit()"
            initialDelaySeconds: 3
            timeoutSeconds: 1
          resources:
            limits:
              memory: ${MEMORY_MONGODB_LIMIT}
          volumeMounts:
          - mountPath: /var/lib/mongodb/data
            name: ${DATABASE_SERVICE_NAME}-data
        volumes:
        - emptyDir:
            medium: ""
          name: ${DATABASE_SERVICE_NAME}-data
    triggers:
    - imageChangeParams:
        automatic: true
        containerNames:
        - mongodb
        from:
          kind: ImageStreamTag
          name: mongodb:3.2
          namespace: ${NAMESPACE}
      type: ImageChange
    - type: ConfigChange
parameters:
- description: The name assigned to all of the frontend objects defined in this template.
  displayName: Name
  name: NAME
  required: true
  value: nodejs-mongodb-example
- description: The exposed hostname that will route to the Node.js service, if left
    blank a value will be defaulted.
  displayName: Application Hostname
  name: APPLICATION_DOMAIN
- description: The URL of the repository with your application source code.
  displayName: Git Repository URL
  name: SOURCE_REPOSITORY_URL
  required: true
  value: https://github.com/openshift/nodejs-ex.git
- description: The reference of the repository with your application source code.
  displayName: Git Repository Ref
  name: SOURCE_REPOSITORY_REF
  required: true
  value: master
- displayName: Database Name
  name: DATABASE_NAME
  required: true
  value: sampledb
- description: Username for MongoDB user that will be used for accessing the database.
  displayName: MongoDB Username
  from: user[A-Z0-9]{3}
  generate: expression
  name: DATABASE_USER
- description: Password for the MongoDB user.
  displayName: MongoDB Password
  from: '[a-zA-Z0-9]{16}'
  generate: expression
  name: DATABASE_PASSWORD
- description: Maximum amount of memory the Node.js container can use.
  displayName: Memory Limit
  name: MEMORY_LIMIT
  required: true
  value: 512Mi
- description: Maximum amount of memory the MongoDB container can use.
  displayName: Memory Limit (MongoDB)
  name: MEMORY_MONGODB_LIMIT
  required: true
  value: 512Mi
- displayName: Database Service Name
  name: DATABASE_SERVICE_NAME
  required: true
  value: mongodb
- description: Password for the database admin user.
  displayName: Database Administrator Password
  from: '[a-zA-Z0-9]{16}'
  generate: expression
  name: DATABASE_ADMIN_PASSWORD
- description: Set this to the relative path to your project if it is not in the root
    of your repository.
  displayName: Context Directory
  name: CONTEXT_DIR
- description: Github trigger secret.  A difficult to guess string encoded as part of the webhook URL.  Not encrypted.
  displayName: GitHub Webhook Secret
  from: '[a-zA-Z0-9]{40}'
  generate: expression
  name: GITHUB_WEBHOOK_SECRET
- description: A secret string used to configure the Generic webhook.
  displayName: Generic Webhook Secret
  from: '[a-zA-Z0-9]{40}'
  generate: expression
  name: GENERIC_WEBHOOK_SECRET
- description: The custom NPM mirror URL
  displayName: Custom NPM Mirror URL
  name: NPM_MIRROR
- description: The OpenShift Namespace where the NodeJS and MongoDB ImageStreams reside.
  displayName: Namespace
  name: NAMESPACE
  required: true
  value: openshift
- description: Whether to enable verbose logging of Jenkinsfile steps in pipeline
  displayName: Verbose
  name: VERBOSE
  required: true
  value: "false"
`)

func examplesJenkinsPipelineBluegreenPipelineYamlBytes() ([]byte, error) {
	return _examplesJenkinsPipelineBluegreenPipelineYaml, nil
}

func examplesJenkinsPipelineBluegreenPipelineYaml() (*asset, error) {
	bytes, err := examplesJenkinsPipelineBluegreenPipelineYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "examples/jenkins/pipeline/bluegreen-pipeline.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _examplesJenkinsPipelineMavenPipelineYaml = []byte(`apiVersion: v1
kind: Template
metadata:
  name: maven-pipeline
parameters:
- name: APP_NAME
  description: The name assigned to all of the application objects defined in this template.
  displayName: Application Name
  required: true
  value: openshift-jee-sample
- name: GIT_SOURCE_URL
  description: The source URL for the application
  displayName: Source URL
  required: true
  value: https://github.com/openshift/openshift-jee-sample.git
- name: GIT_SOURCE_REF
  description: The source Ref for the application
  displayName: Source Ref
  required: true
  value: master
- description: Github trigger secret.  A difficult to guess string encoded as part of the webhook URL.  Not encrypted.
  displayName: GitHub Webhook Secret
  from: '[a-zA-Z0-9]{40}'
  generate: expression
  name: GITHUB_WEBHOOK_SECRET
  required: true
- description: A secret string used to configure the Generic webhook.
  displayName: Generic Webhook Secret
  from: '[a-zA-Z0-9]{40}'
  generate: expression
  name: GENERIC_WEBHOOK_SECRET
  required: true
objects:
- apiVersion: v1
  kind: ImageStream
  metadata:
    labels:
      app: ${APP_NAME}
    name: ${APP_NAME}
  spec: {}
  status:
    dockerImageRepository: ""
- apiVersion: v1
  kind: ImageStream
  metadata:
    name: wildfly
  spec:
    tags:
    - annotations:
        supports: wildfly:10.1,jee,java
        tags: builder,wildfly,java
        version: "10.1"
      from:
        kind: DockerImage
        name: openshift/wildfly-101-centos7:latest
      name: "10.1"
    - annotations:
        supports: jee,java
        tags: builder,wildfly,java
      from:
        kind: ImageStreamTag
        name: "10.1"
      name: latest
- apiVersion: v1
  kind: BuildConfig
  metadata:
    annotations:
      pipeline.alpha.openshift.io/uses: '[{"name": "${NAME}", "namespace": "", "kind": "DeploymentConfig"}]'
    creationTimestamp: null
    labels:
      name: ${APP_NAME}
    name: ${APP_NAME}
  spec:
    strategy:
      jenkinsPipelineStrategy:
        jenkinsfile: |-
          try {
             timeout(time: 20, unit: 'MINUTES') {
                def appName="${APP_NAME}"
                def project=""

                node {
                  stage("Initialize") {
                    project = env.PROJECT_NAME
                  }
                }

                node("maven") {
                  stage("Checkout") {
                    git url: "${GIT_SOURCE_URL}", branch: "${GIT_SOURCE_REF}"
                  }
                  stage("Build WAR") {
                    sh "mvn clean package -Popenshift"
                    stash name:"war", includes:"target/ROOT.war"
                  }
                }

                node {
                  stage("Build Image") {
                    unstash name:"war"
                    def status = sh(returnStdout: true, script: "oc start-build ${appName}-docker --from-file=target/ROOT.war -n ${project}")

                    def result = status.split("\n").find{ it.matches("^build.*started") }
                    
                    if(!result) {
                      echo "ERROR: No started build found for ${appName}"
                      currentBuild.result = 'FAILURE'
                      return
                    }
                    
                    // result can be:
                    // - build "build-name" started
                    // - build build.build.openshift.io/build-name started
                    // - build "build.build.openshift.io/build-name" started
                    // Goal is to isolate "build-name"
                    def startedBuild = result.replaceAll("build [^0-9a-zA-Z]*", "").replaceAll("[^0-9a-zA-Z]* started", "").replaceFirst("^.*/", "")
                    echo "Build ${startedBuild} has started. Now watching it ..."
                    
                    timeout(time: 20, unit: 'MINUTES') {
                      openshift.withCluster() {
                        openshift.withProject() {
                          def build = openshift.selector('builds', "${startedBuild}")
                          build.untilEach {
                            def object = it.object()
                            if(object.status.phase == "Failed") {
                              error("Build ${startedBuild} failed")
                            }
                            return object.status.phase == "Complete"
                          }
                        }
                      }  
                    }
                  }
                  stage("Deploy") {
                    openshift.withCluster() {
                      openshift.withProject() {
                        def dc = openshift.selector('dc', "${appName}")
                        dc.rollout().status()
                      }
                    }
                  }
                }
             }
          } catch (err) {
             echo "in catch block"
             echo "Caught: ${err}"
             currentBuild.result = 'FAILURE'
             throw err
          }
      type: JenkinsPipeline
    triggers:
    - github:
        secret: "${GITHUB_WEBHOOK_SECRET}"
      type: GitHub
    - generic:
        secret: "${GENERIC_WEBHOOK_SECRET}"
      type: Generic
- apiVersion: v1
  kind: BuildConfig
  metadata:
    labels:
      app: ${APP_NAME}-docker
    name: ${APP_NAME}-docker
  spec:
    output:
      to:
        kind: ImageStreamTag
        name: ${APP_NAME}:latest
    postCommit: {}
    resources: {}
    runPolicy: Serial
    source:
      dockerfile: |-
        FROM wildfly
        COPY ROOT.war /wildfly/standalone/deployments/ROOT.war
        CMD $STI_SCRIPTS_PATH/run
      binary:
        asFile: ROOT.war
      type: Docker
    strategy:
      dockerStrategy:
        from:
          kind: ImageStreamTag
          name: wildfly:latest
      type: Docker
    triggers: []
- apiVersion: v1
  kind: DeploymentConfig
  metadata:
    labels:
      app: ${APP_NAME}
    name: ${APP_NAME}
  spec:
    replicas: 1
    selector:
      app: ${APP_NAME}
      deploymentconfig: ${APP_NAME}
    strategy:
      rollingParams:
        intervalSeconds: 1
        maxSurge: 25%
        maxUnavailable: 25%
        timeoutSeconds: 600
        updatePeriodSeconds: 1
      type: Rolling
    template:
      metadata:
        labels:
          app: ${APP_NAME}
          deploymentconfig: ${APP_NAME}
      spec:
        containers:
        - image: ${APP_NAME}:latest
          imagePullPolicy: Always
          name: ${APP_NAME}
          ports:
          - containerPort: 8080
            protocol: TCP
          resources: {}
          terminationMessagePath: /dev/termination-log
          livenessProbe:
            httpGet:
              path: /
              port: 8080
              scheme: HTTP
            initialDelaySeconds: 10
            timeoutSeconds: 2
            periodSeconds: 10
            successThreshold: 1
            failureThreshold: 3
          readinessProbe:
            httpGet:
              path: /
              port: 8080
              scheme: HTTP
            initialDelaySeconds: 30
            timeoutSeconds: 2
            periodSeconds: 10
            successThreshold: 1
            failureThreshold: 3
        dnsPolicy: ClusterFirst
        restartPolicy: Always
        securityContext: {}
        terminationGracePeriodSeconds: 30
    test: false
    triggers:
    - type: ConfigChange
    - imageChangeParams:
        automatic: true
        containerNames:
        - ${APP_NAME}
        from:
          kind: ImageStreamTag
          name: ${APP_NAME}:latest
      type: ImageChange
  status: {}
- apiVersion: v1
  kind: Service
  metadata:
    annotations:
      openshift.io/generated-by: OpenShiftNewApp
    labels:
      app: ${APP_NAME}
    name: ${APP_NAME}
  spec:
    ports:
    - name: 8080-tcp
      port: 8080
      protocol: TCP
      targetPort: 8080
    selector:
      app: ${APP_NAME}
      deploymentconfig: ${APP_NAME}
    sessionAffinity: None
    type: ClusterIP
  status:
    loadBalancer: {}
- apiVersion: v1
  kind: Route
  metadata:
    name: ${APP_NAME}
    labels:
      app: ${APP_NAME}
  spec:
    to:
      kind: Service
      name: ${APP_NAME}
      weight: 100
    port:
      targetPort: 8080-tcp
    wildcardPolicy: None
`)

func examplesJenkinsPipelineMavenPipelineYamlBytes() ([]byte, error) {
	return _examplesJenkinsPipelineMavenPipelineYaml, nil
}

func examplesJenkinsPipelineMavenPipelineYaml() (*asset, error) {
	bytes, err := examplesJenkinsPipelineMavenPipelineYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "examples/jenkins/pipeline/maven-pipeline.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _examplesJenkinsPipelineNodejsSamplePipelineYaml = []byte(`kind: "BuildConfig"
apiVersion: "v1"
metadata:
  name: "nodejs-sample-pipeline"
spec:
  strategy:
    jenkinsPipelineStrategy:
      jenkinsfile: |-
        // path of the template to use
        def templatePath = 'nodejs-mongodb-example'
        // name of the template that will be created
        def templateName = 'nodejs-mongodb-example'
        // NOTE, the "pipeline" directive/closure from the declarative pipeline syntax needs to include, or be nested outside,
        // and "openshift" directive/closure from the OpenShift Client Plugin for Jenkins.  Otherwise, the declarative pipeline engine
        // will not be fully engaged.
        pipeline {
            agent {
              node {
                // spin up a node.js slave pod to run this build on
                label 'nodejs'
              }
            }
            options {
                // set a timeout of 20 minutes for this pipeline
                timeout(time: 20, unit: 'MINUTES')
            }

            stages {
                stage('preamble') {
                    steps {
                        script {
                            openshift.withCluster() {
                                openshift.withProject() {
                                    echo "Using project: ${openshift.project()}"
                                }
                            }
                        }
                    }
                }
                stage('cleanup') {
                    steps {
                        script {
                            openshift.withCluster() {
                                openshift.withProject() {
                                    // delete everything with this template label
                                    openshift.selector("all", [ template : templateName ]).delete()
                                    // delete any secrets with this template label
                                    if (openshift.selector("secrets", templateName).exists()) {
                                        openshift.selector("secrets", templateName).delete()
                                    }
                                }
                            }
                        } // script
                    } // steps
                } // stage
                stage('create') {
                    steps {
                        script {
                            openshift.withCluster() {
                                openshift.withProject() {
                                    // create a new application from the templatePath
                                    openshift.newApp(templatePath)
                                }
                            }
                        } // script
                    } // steps
                } // stage
                stage('build') {
                    steps {
                        script {
                            openshift.withCluster() {
                                openshift.withProject() {
                                    def builds = openshift.selector("bc", templateName).related('builds')
                                    builds.untilEach(1) {
                                        return (it.object().status.phase == "Complete")
                                    }
                                }
                            }
                        } // script
                    } // steps
                } // stage
                stage('deploy') {
                    steps {
                        script {
                            openshift.withCluster() {
                                openshift.withProject() {
                                    def rm = openshift.selector("dc", templateName).rollout()
                                    openshift.selector("dc", templateName).related('pods').untilEach(1) {
                                        return (it.object().status.phase == "Running")
                                    }
                                }
                            }
                        } // script
                    } // steps
                } // stage
                stage('tag') {
                    steps {
                        script {
                            openshift.withCluster() {
                                openshift.withProject() {
                                    // if everything else succeeded, tag the ${templateName}:latest image as ${templateName}-staging:latest
                                    // a pipeline build config for the staging environment can watch for the ${templateName}-staging:latest
                                    // image to change and then deploy it to the staging environment
                                    openshift.tag("${templateName}:latest", "${templateName}-staging:latest")
                                }
                            }
                        } // script
                    } // steps
                } // stage
            } // stages
        } // pipeline
      type: JenkinsPipeline
`)

func examplesJenkinsPipelineNodejsSamplePipelineYamlBytes() ([]byte, error) {
	return _examplesJenkinsPipelineNodejsSamplePipelineYaml, nil
}

func examplesJenkinsPipelineNodejsSamplePipelineYaml() (*asset, error) {
	bytes, err := examplesJenkinsPipelineNodejsSamplePipelineYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "examples/jenkins/pipeline/nodejs-sample-pipeline.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _examplesJenkinsPipelineOpenshiftClientPluginPipelineYaml = []byte(`apiVersion: v1
kind: BuildConfig
metadata:
  labels:
    name: sample-pipeline-openshift-client-plugin
  name: sample-pipeline-openshift-client-plugin
spec:
  source:
    type: Git
    git:
      uri: https://github.com/openshift/jenkins-client-plugin.git
  strategy:
    type: JenkinsPipeline
    jenkinsPipelineStrategy:
      jenkinsfilePath: examples/jenkins-image-sample.groovy
`)

func examplesJenkinsPipelineOpenshiftClientPluginPipelineYamlBytes() ([]byte, error) {
	return _examplesJenkinsPipelineOpenshiftClientPluginPipelineYaml, nil
}

func examplesJenkinsPipelineOpenshiftClientPluginPipelineYaml() (*asset, error) {
	bytes, err := examplesJenkinsPipelineOpenshiftClientPluginPipelineYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "examples/jenkins/pipeline/openshift-client-plugin-pipeline.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _examplesJenkinsPipelineSamplepipelineYaml = []byte(`apiVersion: v1
kind: Template
labels:
  template: application-template-sample-pipeline
message: |-
  A Jenkins server must be instantiated in this project to manage
  the Pipeline BuildConfig created by this template.  You will be able to log in to
  it using your OpenShift user credentials.
metadata:
  annotations:
    openshift.io/display-name: Pipeline Build Example
    description: |-
      This example showcases the new Jenkins Pipeline integration in OpenShift,
      which performs continuous integration and deployment right on the platform.
      The template contains a Jenkinsfile - a definition of a multi-stage CI/CD process - that
      leverages the underlying OpenShift platform for dynamic and scalable
      builds. OpenShift integrates the status of your pipeline builds into the web
      console allowing you to see your entire application lifecycle in a single view.
    iconClass: icon-jenkins
    tags: instant-app,jenkins
  name: jenkins-pipeline-example
parameters:
- description: The name assigned to all of the frontend objects defined in this template.
  displayName: Name
  name: NAME
  required: true
  value: nodejs-mongodb-example
- description: The exposed hostname that will route to the Node.js service, if left
    blank a value will be defaulted.
  displayName: Application Hostname
  name: APPLICATION_DOMAIN
- description: The URL of the repository with your application source code.
  displayName: Git Repository URL
  name: SOURCE_REPOSITORY_URL
  required: true
  value: https://github.com/openshift/nodejs-ex.git
- displayName: Database Name
  name: DATABASE_NAME
  required: true
  value: sampledb
- description: Username for MongoDB user that will be used for accessing the database.
  displayName: MongoDB Username
  from: user[A-Z0-9]{3}
  generate: expression
  name: DATABASE_USER
- description: Password for the MongoDB user.
  displayName: MongoDB Password
  from: '[a-zA-Z0-9]{16}'
  generate: expression
  name: DATABASE_PASSWORD
- description: Maximum amount of memory the Node.js container can use.
  displayName: Memory Limit
  name: MEMORY_LIMIT
  required: true
  value: 512Mi
- description: Maximum amount of memory the MongoDB container can use.
  displayName: Memory Limit (MongoDB)
  name: MEMORY_MONGODB_LIMIT
  required: true
  value: 512Mi
- displayName: Database Service Name
  name: DATABASE_SERVICE_NAME
  required: true
  value: mongodb
- description: Password for the database admin user.
  displayName: Database Administrator Password
  from: '[a-zA-Z0-9]{16}'
  generate: expression
  name: DATABASE_ADMIN_PASSWORD
- description: Set this to a branch name, tag or other ref of your repository if you
    are not using the default branch.
  displayName: Git Reference
  name: SOURCE_REPOSITORY_REF
- description: Set this to the relative path to your project if it is not in the root
    of your repository.
  displayName: Context Directory
  name: CONTEXT_DIR
- description: Github trigger secret.  A difficult to guess string encoded as part of the webhook URL.  Not encrypted.
  displayName: GitHub Webhook Secret
  from: '[a-zA-Z0-9]{40}'
  generate: expression
  name: GITHUB_WEBHOOK_SECRET
- description: A secret string used to configure the Generic webhook.
  displayName: Generic Webhook Secret
  from: '[a-zA-Z0-9]{40}'
  generate: expression
  name: GENERIC_WEBHOOK_SECRET
- description: The custom NPM mirror URL
  displayName: Custom NPM Mirror URL
  name: NPM_MIRROR
- description: The OpenShift Namespace where the NodeJS and MongoDB ImageStreams reside.
  displayName: Namespace
  name: NAMESPACE
  required: true
  value: openshift
objects:
- apiVersion: v1
  kind: BuildConfig
  metadata:
    annotations:
      pipeline.alpha.openshift.io/uses: '[{"name": "${NAME}", "namespace": "", "kind": "DeploymentConfig"}]'
    labels:
      name: sample-pipeline
    name: sample-pipeline
  spec:
    strategy:
      jenkinsPipelineStrategy:
        jenkinsfile: |-
          try {
             timeout(time: 20, unit: 'MINUTES') {
                node('nodejs') {
                    stage('build') {
                      openshift.withCluster() {
                         openshift.withProject() {
                            def bld = openshift.startBuild('${NAME}')
                            bld.untilEach {
                              return it.object().status.phase == "Running"
                            }
                            bld.logs('-f')
                         }  
                      }
                    }
                    stage('deploy') {
                      openshift.withCluster() {
                        openshift.withProject() {
                          def dc = openshift.selector('dc', '${NAME}')
                          dc.rollout().latest()
                        }
                      }
                    }
                  }
             }
          } catch (err) {
             echo "in catch block"
             echo "Caught: ${err}"
             currentBuild.result = 'FAILURE'
             throw err
          }          
      type: JenkinsPipeline
    triggers:
    - github:
        secret: secret101
      type: GitHub
    - generic:
        secret: secret101
      type: Generic
- apiVersion: v1
  kind: Service
  metadata:
    annotations:
      service.alpha.openshift.io/dependencies: '[{"name": "${DATABASE_SERVICE_NAME}", "namespace": "", "kind": "Service"}]'
    name: ${NAME}
  spec:
    ports:
    - name: web
      port: 8080
      targetPort: 8080
    selector:
      name: ${NAME}
- apiVersion: v1
  kind: Route
  metadata:
    name: ${NAME}
  spec:
    host: ${APPLICATION_DOMAIN}
    to:
      kind: Service
      name: ${NAME}
- apiVersion: v1
  kind: ImageStream
  metadata:
    annotations:
      description: Keeps track of changes in the application image
    name: ${NAME}
- apiVersion: v1
  kind: BuildConfig
  metadata:
    annotations:
      description: Defines how to build the application
    name: ${NAME}
  spec:
    output:
      to:
        kind: ImageStreamTag
        name: ${NAME}:latest
    postCommit:
      script: npm test
    source:
      contextDir: ${CONTEXT_DIR}
      git:
        ref: ${SOURCE_REPOSITORY_REF}
        uri: ${SOURCE_REPOSITORY_URL}
      type: Git
    strategy:
      sourceStrategy:
        env:
        - name: NPM_MIRROR
          value: ${NPM_MIRROR}
        from:
          kind: ImageStreamTag
          name: nodejs:12
          namespace: ${NAMESPACE}
      type: Source
    triggers:
    - github:
        secret: ${GITHUB_WEBHOOK_SECRET}
      type: GitHub
    - generic:
        secret: ${GENERIC_WEBHOOK_SECRET}
      type: Generic
- apiVersion: v1
  kind: DeploymentConfig
  metadata:
    annotations:
      description: Defines how to deploy the application server
    name: ${NAME}
  spec:
    replicas: 1
    selector:
      name: ${NAME}
    strategy:
      type: Rolling
    template:
      metadata:
        labels:
          name: ${NAME}
        name: ${NAME}
      spec:
        containers:
        - env:
          - name: DATABASE_SERVICE_NAME
            value: ${DATABASE_SERVICE_NAME}
          - name: MONGODB_USER
            value: ${DATABASE_USER}
          - name: MONGODB_PASSWORD
            value: ${DATABASE_PASSWORD}
          - name: MONGODB_DATABASE
            value: ${DATABASE_NAME}
          - name: MONGODB_ADMIN_PASSWORD
            value: ${DATABASE_ADMIN_PASSWORD}
          image: ' '
          livenessProbe:
            httpGet:
              path: /pagecount
              port: 8080
            initialDelaySeconds: 30
            timeoutSeconds: 3
          name: nodejs-mongodb-example
          ports:
          - containerPort: 8080
          readinessProbe:
            httpGet:
              path: /pagecount
              port: 8080
            initialDelaySeconds: 3
            timeoutSeconds: 3
          resources:
            limits:
              memory: ${MEMORY_LIMIT}
    triggers:
    - imageChangeParams:
        automatic: false
        containerNames:
        - nodejs-mongodb-example
        from:
          kind: ImageStreamTag
          name: ${NAME}:latest
      type: ImageChange
    - type: ConfigChange
- apiVersion: v1
  kind: Service
  metadata:
    annotations:
      description: Exposes the database server
    name: ${DATABASE_SERVICE_NAME}
  spec:
    ports:
    - name: mongodb
      port: 27017
      targetPort: 27017
    selector:
      name: ${DATABASE_SERVICE_NAME}
- apiVersion: v1
  kind: DeploymentConfig
  metadata:
    annotations:
      description: Defines how to deploy the database
    name: ${DATABASE_SERVICE_NAME}
  spec:
    replicas: 1
    selector:
      name: ${DATABASE_SERVICE_NAME}
    strategy:
      type: Recreate
    template:
      metadata:
        labels:
          name: ${DATABASE_SERVICE_NAME}
        name: ${DATABASE_SERVICE_NAME}
      spec:
        containers:
        - env:
          - name: MONGODB_USER
            value: ${DATABASE_USER}
          - name: MONGODB_PASSWORD
            value: ${DATABASE_PASSWORD}
          - name: MONGODB_DATABASE
            value: ${DATABASE_NAME}
          - name: MONGODB_ADMIN_PASSWORD
            value: ${DATABASE_ADMIN_PASSWORD}
          image: ' '
          livenessProbe:
            initialDelaySeconds: 30
            tcpSocket:
              port: 27017
            timeoutSeconds: 1
          name: mongodb
          ports:
          - containerPort: 27017
          readinessProbe:
            exec:
              command:
              - /bin/sh
              - -i
              - -c
              - mongo 127.0.0.1:27017/$MONGODB_DATABASE -u $MONGODB_USER -p $MONGODB_PASSWORD
                --eval="quit()"
            initialDelaySeconds: 3
            timeoutSeconds: 1
          resources:
            limits:
              memory: ${MEMORY_MONGODB_LIMIT}
          volumeMounts:
          - mountPath: /var/lib/mongodb/data
            name: ${DATABASE_SERVICE_NAME}-data
        volumes:
        - emptyDir:
            medium: ""
          name: ${DATABASE_SERVICE_NAME}-data
    triggers:
    - imageChangeParams:
        automatic: true
        containerNames:
        - mongodb
        from:
          kind: ImageStreamTag
          name: mongodb:3.2
          namespace: ${NAMESPACE}
      type: ImageChange
    - type: ConfigChange
`)

func examplesJenkinsPipelineSamplepipelineYamlBytes() ([]byte, error) {
	return _examplesJenkinsPipelineSamplepipelineYaml, nil
}

func examplesJenkinsPipelineSamplepipelineYaml() (*asset, error) {
	bytes, err := examplesJenkinsPipelineSamplepipelineYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "examples/jenkins/pipeline/samplepipeline.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _examplesQuickstartsCakephpMysqlJsonCakephpMysqlJson = []byte(`{
    "apiVersion": "v1",
    "kind": "Template",
    "labels": {
        "app": "cakephp-mysql-example",
        "template": "cakephp-mysql-example"
    },
    "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/cakephp-ex/blob/master/README.md.",
    "metadata": {
        "annotations": {
            "description": "An example CakePHP application with a MySQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/cakephp-ex/blob/master/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.",
            "iconClass": "icon-php",
            "openshift.io/display-name": "CakePHP + MySQL (Ephemeral)",
            "openshift.io/documentation-url": "https://github.com/sclorg/cakephp-ex",
            "openshift.io/long-description": "This template defines resources needed to develop a CakePHP application, including a build configuration, application deployment configuration, and database deployment configuration.  The database is stored in non-persistent storage, so this configuration should be used for experimental purposes only.",
            "openshift.io/provider-display-name": "Red Hat, Inc.",
            "openshift.io/support-url": "https://access.redhat.com",
            "tags": "quickstart,php,cakephp",
            "template.openshift.io/bindable": "false"
        },
        "name": "cakephp-mysql-example"
    },
    "objects": [
        {
            "apiVersion": "v1",
            "kind": "Secret",
            "metadata": {
                "name": "${NAME}"
            },
            "stringData": {
                "cakephp-secret-token": "${CAKEPHP_SECRET_TOKEN}",
                "cakephp-security-salt": "${CAKEPHP_SECURITY_SALT}",
                "database-password": "${DATABASE_PASSWORD}",
                "database-user": "${DATABASE_USER}"
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Service",
            "metadata": {
                "annotations": {
                    "description": "Exposes and load balances the application pods",
                    "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]"
                },
                "name": "${NAME}"
            },
            "spec": {
                "ports": [
                    {
                        "name": "web",
                        "port": 8080,
                        "targetPort": 8080
                    }
                ],
                "selector": {
                    "name": "${NAME}"
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Route",
            "metadata": {
                "name": "${NAME}"
            },
            "spec": {
                "host": "${APPLICATION_DOMAIN}",
                "to": {
                    "kind": "Service",
                    "name": "${NAME}"
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "ImageStream",
            "metadata": {
                "annotations": {
                    "description": "Keeps track of changes in the application image"
                },
                "name": "${NAME}"
            }
        },
        {
            "apiVersion": "v1",
            "kind": "BuildConfig",
            "metadata": {
                "annotations": {
                    "description": "Defines how to build the application",
                    "template.alpha.openshift.io/wait-for-ready": "true"
                },
                "name": "${NAME}"
            },
            "spec": {
                "output": {
                    "to": {
                        "kind": "ImageStreamTag",
                        "name": "${NAME}:latest"
                    }
                },
                "postCommit": {
                    "script": "./vendor/bin/phpunit"
                },
                "source": {
                    "contextDir": "${CONTEXT_DIR}",
                    "git": {
                        "ref": "${SOURCE_REPOSITORY_REF}",
                        "uri": "${SOURCE_REPOSITORY_URL}"
                    },
                    "type": "Git"
                },
                "strategy": {
                    "sourceStrategy": {
                        "env": [
                            {
                                "name": "COMPOSER_MIRROR",
                                "value": "${COMPOSER_MIRROR}"
                            }
                        ],
                        "from": {
                            "kind": "ImageStreamTag",
                            "name": "php:${PHP_VERSION}",
                            "namespace": "${NAMESPACE}"
                        }
                    },
                    "type": "Source"
                },
                "triggers": [
                    {
                        "type": "ImageChange"
                    },
                    {
                        "type": "ConfigChange"
                    },
                    {
                        "github": {
                            "secret": "${GITHUB_WEBHOOK_SECRET}"
                        },
                        "type": "GitHub"
                    }
                ]
            }
        },
        {
            "apiVersion": "v1",
            "kind": "DeploymentConfig",
            "metadata": {
                "annotations": {
                    "description": "Defines how to deploy the application server",
                    "template.alpha.openshift.io/wait-for-ready": "true"
                },
                "name": "${NAME}"
            },
            "spec": {
                "replicas": 1,
                "selector": {
                    "name": "${NAME}"
                },
                "strategy": {
                    "recreateParams": {
                        "pre": {
                            "execNewPod": {
                                "command": [
                                    "./migrate-database.sh"
                                ],
                                "containerName": "cakephp-mysql-example"
                            },
                            "failurePolicy": "Retry"
                        }
                    },
                    "type": "Recreate"
                },
                "template": {
                    "metadata": {
                        "labels": {
                            "name": "${NAME}"
                        },
                        "name": "${NAME}"
                    },
                    "spec": {
                        "containers": [
                            {
                                "env": [
                                    {
                                        "name": "DATABASE_SERVICE_NAME",
                                        "value": "${DATABASE_SERVICE_NAME}"
                                    },
                                    {
                                        "name": "DATABASE_ENGINE",
                                        "value": "${DATABASE_ENGINE}"
                                    },
                                    {
                                        "name": "DATABASE_NAME",
                                        "value": "${DATABASE_NAME}"
                                    },
                                    {
                                        "name": "DATABASE_USER",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-user",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "DATABASE_PASSWORD",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-password",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "CAKEPHP_SECRET_TOKEN",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "cakephp-secret-token",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "CAKEPHP_SECURITY_SALT",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "cakephp-security-salt",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "OPCACHE_REVALIDATE_FREQ",
                                        "value": "${OPCACHE_REVALIDATE_FREQ}"
                                    }
                                ],
                                "image": " ",
                                "livenessProbe": {
                                    "httpGet": {
                                        "path": "/health.php",
                                        "port": 8080
                                    },
                                    "initialDelaySeconds": 30,
                                    "periodSeconds": 60,
                                    "timeoutSeconds": 3
                                },
                                "name": "cakephp-mysql-example",
                                "ports": [
                                    {
                                        "containerPort": 8080
                                    }
                                ],
                                "readinessProbe": {
                                    "httpGet": {
                                        "path": "/health.php",
                                        "port": 8080
                                    },
                                    "initialDelaySeconds": 3,
                                    "periodSeconds": 60,
                                    "timeoutSeconds": 3
                                },
                                "resources": {
                                    "limits": {
                                        "memory": "${MEMORY_LIMIT}"
                                    }
                                }
                            }
                        ]
                    }
                },
                "triggers": [
                    {
                        "imageChangeParams": {
                            "automatic": true,
                            "containerNames": [
                                "cakephp-mysql-example"
                            ],
                            "from": {
                                "kind": "ImageStreamTag",
                                "name": "${NAME}:latest"
                            }
                        },
                        "type": "ImageChange"
                    },
                    {
                        "type": "ConfigChange"
                    }
                ]
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Service",
            "metadata": {
                "annotations": {
                    "description": "Exposes the database server"
                },
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "spec": {
                "ports": [
                    {
                        "name": "mysql",
                        "port": 3306,
                        "targetPort": 3306
                    }
                ],
                "selector": {
                    "name": "${DATABASE_SERVICE_NAME}"
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "DeploymentConfig",
            "metadata": {
                "annotations": {
                    "description": "Defines how to deploy the database",
                    "template.alpha.openshift.io/wait-for-ready": "true"
                },
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "spec": {
                "replicas": 1,
                "selector": {
                    "name": "${DATABASE_SERVICE_NAME}"
                },
                "strategy": {
                    "type": "Recreate"
                },
                "template": {
                    "metadata": {
                        "labels": {
                            "name": "${DATABASE_SERVICE_NAME}"
                        },
                        "name": "${DATABASE_SERVICE_NAME}"
                    },
                    "spec": {
                        "containers": [
                            {
                                "env": [
                                    {
                                        "name": "MYSQL_USER",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-user",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "MYSQL_PASSWORD",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-password",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "MYSQL_DATABASE",
                                        "value": "${DATABASE_NAME}"
                                    }
                                ],
                                "image": " ",
                                "livenessProbe": {
                                    "initialDelaySeconds": 30,
                                    "tcpSocket": {
                                        "port": 3306
                                    },
                                    "timeoutSeconds": 1
                                },
                                "name": "mysql",
                                "ports": [
                                    {
                                        "containerPort": 3306
                                    }
                                ],
                                "readinessProbe": {
                                    "exec": {
                                        "command": [
                                            "/bin/sh",
                                            "-i",
                                            "-c",
                                            "MYSQL_PWD='${DATABASE_PASSWORD}' mysql -h 127.0.0.1 -u ${DATABASE_USER} -D ${DATABASE_NAME} -e 'SELECT 1'"
                                        ]
                                    },
                                    "initialDelaySeconds": 5,
                                    "timeoutSeconds": 1
                                },
                                "resources": {
                                    "limits": {
                                        "memory": "${MEMORY_MYSQL_LIMIT}"
                                    }
                                },
                                "volumeMounts": [
                                    {
                                        "mountPath": "/var/lib/mysql/data",
                                        "name": "data"
                                    }
                                ]
                            }
                        ],
                        "volumes": [
                            {
                                "emptyDir": {},
                                "name": "data"
                            }
                        ]
                    }
                },
                "triggers": [
                    {
                        "imageChangeParams": {
                            "automatic": true,
                            "containerNames": [
                                "mysql"
                            ],
                            "from": {
                                "kind": "ImageStreamTag",
                                "name": "mysql:5.7",
                                "namespace": "${NAMESPACE}"
                            }
                        },
                        "type": "ImageChange"
                    },
                    {
                        "type": "ConfigChange"
                    }
                ]
            }
        }
    ],
    "parameters": [
        {
            "description": "The name assigned to all of the frontend objects defined in this template.",
            "displayName": "Name",
            "name": "NAME",
            "required": true,
            "value": "cakephp-mysql-example"
        },
        {
            "description": "The OpenShift Namespace where the ImageStream resides.",
            "displayName": "Namespace",
            "name": "NAMESPACE",
            "required": true,
            "value": "openshift"
        },
        {
            "description": "Version of PHP image to be used (7.1 or latest).",
            "displayName": "PHP Version",
            "name": "PHP_VERSION",
            "required": true,
            "value": "7.1"
        },
        {
            "description": "Maximum amount of memory the CakePHP container can use.",
            "displayName": "Memory Limit",
            "name": "MEMORY_LIMIT",
            "required": true,
            "value": "512Mi"
        },
        {
            "description": "Maximum amount of memory the MySQL container can use.",
            "displayName": "Memory Limit (MySQL)",
            "name": "MEMORY_MYSQL_LIMIT",
            "required": true,
            "value": "512Mi"
        },
        {
            "description": "The URL of the repository with your application source code.",
            "displayName": "Git Repository URL",
            "name": "SOURCE_REPOSITORY_URL",
            "required": true,
            "value": "https://github.com/sclorg/cakephp-ex.git"
        },
        {
            "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.",
            "displayName": "Git Reference",
            "name": "SOURCE_REPOSITORY_REF"
        },
        {
            "description": "Set this to the relative path to your project if it is not in the root of your repository.",
            "displayName": "Context Directory",
            "name": "CONTEXT_DIR"
        },
        {
            "description": "The exposed hostname that will route to the CakePHP service, if left blank a value will be defaulted.",
            "displayName": "Application Hostname",
            "name": "APPLICATION_DOMAIN",
            "value": ""
        },
        {
            "description": "Github trigger secret.  A difficult to guess string encoded as part of the webhook URL.  Not encrypted.",
            "displayName": "GitHub Webhook Secret",
            "from": "[a-zA-Z0-9]{40}",
            "generate": "expression",
            "name": "GITHUB_WEBHOOK_SECRET"
        },
        {
            "displayName": "Database Service Name",
            "name": "DATABASE_SERVICE_NAME",
            "required": true,
            "value": "mysql"
        },
        {
            "description": "Database engine: postgresql, mysql or sqlite (default).",
            "displayName": "Database Engine",
            "name": "DATABASE_ENGINE",
            "required": true,
            "value": "mysql"
        },
        {
            "displayName": "Database Name",
            "name": "DATABASE_NAME",
            "required": true,
            "value": "default"
        },
        {
            "displayName": "Database User",
            "name": "DATABASE_USER",
            "required": true,
            "value": "cakephp"
        },
        {
            "displayName": "Database Password",
            "from": "[a-zA-Z0-9]{16}",
            "generate": "expression",
            "name": "DATABASE_PASSWORD"
        },
        {
            "description": "Set this to a long random string.",
            "displayName": "CakePHP secret token",
            "from": "[\\w]{50}",
            "generate": "expression",
            "name": "CAKEPHP_SECRET_TOKEN"
        },
        {
            "description": "Security salt for session hash.",
            "displayName": "CakePHP Security Salt",
            "from": "[a-zA-Z0-9]{40}",
            "generate": "expression",
            "name": "CAKEPHP_SECURITY_SALT"
        },
        {
            "description": "How often to check script timestamps for updates, in seconds. 0 will result in OPcache checking for updates on every request.",
            "displayName": "OPcache Revalidation Frequency",
            "name": "OPCACHE_REVALIDATE_FREQ",
            "value": "2"
        },
        {
            "description": "The custom Composer mirror URL",
            "displayName": "Custom Composer Mirror URL",
            "name": "COMPOSER_MIRROR",
            "value": ""
        }
    ]
}`)

func examplesQuickstartsCakephpMysqlJsonCakephpMysqlJsonBytes() ([]byte, error) {
	return _examplesQuickstartsCakephpMysqlJsonCakephpMysqlJson, nil
}

func examplesQuickstartsCakephpMysqlJsonCakephpMysqlJson() (*asset, error) {
	bytes, err := examplesQuickstartsCakephpMysqlJsonCakephpMysqlJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "examples/quickstarts/cakephp-mysql.json/cakephp-mysql.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataAggregatorKubeSystemAuthReaderYaml = []byte(`apiVersion: authorization.openshift.io/v1
kind: Role
metadata:
  name: extension-apiserver-authentication-reader
  namespace: kube-system
rules:
- verbs:
  - get
  apiGroups:
  - ""
  resources:
  - configmaps
  resourceNames:
  - extension-apiserver-authentication
`)

func testExtendedTestdataAggregatorKubeSystemAuthReaderYamlBytes() ([]byte, error) {
	return _testExtendedTestdataAggregatorKubeSystemAuthReaderYaml, nil
}

func testExtendedTestdataAggregatorKubeSystemAuthReaderYaml() (*asset, error) {
	bytes, err := testExtendedTestdataAggregatorKubeSystemAuthReaderYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/aggregator/kube-system-auth-reader.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataAggregatorSampleApiserverApiserviceYaml = []byte(`apiVersion: apiregistration.k8s.io/v1alpha1
kind: APIService
metadata:
  name: v1alpha1.wardle.k8s.io
spec:
  insecureSkipTLSVerify: true
  group: wardle.k8s.io
  priority: 200
  service:
    name: api
    namespace: wardle
  version: v1alpha1
`)

func testExtendedTestdataAggregatorSampleApiserverApiserviceYamlBytes() ([]byte, error) {
	return _testExtendedTestdataAggregatorSampleApiserverApiserviceYaml, nil
}

func testExtendedTestdataAggregatorSampleApiserverApiserviceYaml() (*asset, error) {
	bytes, err := testExtendedTestdataAggregatorSampleApiserverApiserviceYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/aggregator/sample-apiserver-apiservice.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataAggregatorSampleApiserverAuthdelegatorYaml = []byte(`apiVersion: authorization.openshift.io/v1
kind: ClusterRoleBinding
metadata:
  name: wardle:system:auth-delegator
roleRef:
  name: system:auth-delegator
subjects:
- kind: ServiceAccount
  name: apiserver
  namespace: wardle
`)

func testExtendedTestdataAggregatorSampleApiserverAuthdelegatorYamlBytes() ([]byte, error) {
	return _testExtendedTestdataAggregatorSampleApiserverAuthdelegatorYaml, nil
}

func testExtendedTestdataAggregatorSampleApiserverAuthdelegatorYaml() (*asset, error) {
	bytes, err := testExtendedTestdataAggregatorSampleApiserverAuthdelegatorYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/aggregator/sample-apiserver-authdelegator.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataAggregatorSampleApiserverAuthreaderYaml = []byte(`apiVersion: authorization.openshift.io/v1
kind: RoleBinding
metadata:
  name: wardle-auth-reader
  namespace: kube-system
roleRef:
  name: extension-apiserver-authentication-reader
  namespace: kube-system
subjects:
- kind: ServiceAccount
  name: apiserver
  namespace: wardle
`)

func testExtendedTestdataAggregatorSampleApiserverAuthreaderYamlBytes() ([]byte, error) {
	return _testExtendedTestdataAggregatorSampleApiserverAuthreaderYaml, nil
}

func testExtendedTestdataAggregatorSampleApiserverAuthreaderYaml() (*asset, error) {
	bytes, err := testExtendedTestdataAggregatorSampleApiserverAuthreaderYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/aggregator/sample-apiserver-authreader.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataAggregatorSampleApiserverRcYaml = []byte(`apiVersion: v1
kind: ReplicationController
metadata:
  name: wardle-server
  namespace: wardle
  labels:
    apiserver: "true"
spec:
  replicas: 1
  selector:
    apiserver: "true"
  template:
    metadata:
      labels:
        apiserver: "true"
    spec:
      serviceAccountName: apiserver
      containers:
      - name: wardle-server
        image: kube-sample-apiserver:latest
        imagePullPolicy: Never
        args:
        - "--etcd-servers=http://localhost:2379"
        - "--audit-log-path=-"
      - name: etcd
        image: quay.io/coreos/etcd:v3.0.17
        securityContext:
          runAsUser: 0
    securityContext:
      runAsUser: 0`)

func testExtendedTestdataAggregatorSampleApiserverRcYamlBytes() ([]byte, error) {
	return _testExtendedTestdataAggregatorSampleApiserverRcYaml, nil
}

func testExtendedTestdataAggregatorSampleApiserverRcYaml() (*asset, error) {
	bytes, err := testExtendedTestdataAggregatorSampleApiserverRcYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/aggregator/sample-apiserver-rc.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataAggregatorSampleApiserverSaYaml = []byte(`kind: ServiceAccount
apiVersion: v1
metadata:
  name: apiserver
  namespace: wardle
`)

func testExtendedTestdataAggregatorSampleApiserverSaYamlBytes() ([]byte, error) {
	return _testExtendedTestdataAggregatorSampleApiserverSaYaml, nil
}

func testExtendedTestdataAggregatorSampleApiserverSaYaml() (*asset, error) {
	bytes, err := testExtendedTestdataAggregatorSampleApiserverSaYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/aggregator/sample-apiserver-sa.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataAggregatorSampleApiserverServiceYaml = []byte(`apiVersion: v1
kind: Service
metadata:
  name: api
  namespace: wardle
spec:
  ports:
  - port: 443
    protocol: TCP
    targetPort: 443
  selector:
    apiserver: "true"
`)

func testExtendedTestdataAggregatorSampleApiserverServiceYamlBytes() ([]byte, error) {
	return _testExtendedTestdataAggregatorSampleApiserverServiceYaml, nil
}

func testExtendedTestdataAggregatorSampleApiserverServiceYaml() (*asset, error) {
	bytes, err := testExtendedTestdataAggregatorSampleApiserverServiceYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/aggregator/sample-apiserver-service.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsApplicationTemplateCustombuildJson = []byte(`{
  "kind": "Template",
  "apiVersion": "v1",
  "metadata": {
    "name": "ruby-helloworld-sample",
    "annotations": {
      "description": "This example shows how to create a simple ruby application in openshift origin v3",
      "iconClass": "icon-ruby",
      "tags": "instant-app,ruby,mysql"
    }
  },
  "objects": [
    {
      "kind": "Secret",
      "apiVersion": "v1",
      "metadata": {
        "name": "dbsecret"
      },
      "stringData" : {
        "mysql-user" : "${MYSQL_USER}",
        "mysql-password" : "${MYSQL_PASSWORD}"
      }
    },
    {
      "kind": "Service",
      "apiVersion": "v1",
      "metadata": {
        "name": "frontend"
      },
      "spec": {
        "ports": [
          {
            "name": "web",
            "protocol": "TCP",
            "port": 5432,
            "targetPort": 8080,
            "nodePort": 0
          }
        ],
        "selector": {
          "name": "frontend"
        },
        "type": "ClusterIP",
        "sessionAffinity": "None"
      },
      "status": {
        "loadBalancer": {}
      }
    },
    {
      "kind": "Route",
      "apiVersion": "v1",
      "metadata": {
        "name": "route-edge",
        "annotations": {
          "template.openshift.io/expose-uri": "http://{.spec.host}{.spec.path}"
        }
      },
      "spec": {
        "host": "www.example.com",
        "to": {
          "kind": "Service",
          "name": "frontend"
        },
        "tls": {
          "termination": "edge"
        }
      },
      "status": {}
    },
    {
      "kind": "ImageStream",
      "apiVersion": "v1",
      "metadata": {
        "name": "origin-ruby-sample"
      },
      "spec": {},
      "status": {
        "dockerImageRepository": ""
      }
    },
    {
      "kind": "ImageStream",
      "apiVersion": "v1",
      "metadata": {
        "name": "origin-custom-docker-builder"
      },
      "spec": {
        "dockerImageRepository": "openshift/origin-custom-docker-builder"
      },
      "status": {
        "dockerImageRepository": ""
      }
    },
    {
      "kind": "BuildConfig",
      "apiVersion": "v1",
      "metadata": {
        "name": "ruby-sample-build",
        "labels": {
          "name": "ruby-sample-build"
        },
        "annotations": {
          "template.alpha.openshift.io/wait-for-ready": "true"
        }
      },
      "spec": {
        "triggers": [
          {
            "type": "GitHub",
            "github": {
              "secret": "secret101"
            }
          },
          {
            "type": "Generic",
            "generic": {
              "secret": "secret101",
              "allowEnv": true
            }
          },
          {
            "type": "ImageChange",
            "imageChange": {}
          },
          {
            "type": "ConfigChange"
          }
        ],
        "source": {
          "type": "Git",
          "git": {
            "uri": "https://github.com/openshift/ruby-hello-world.git"
          }
        },
        "strategy": {
          "type": "Custom",
          "customStrategy": {
            "from": {
              "kind": "ImageStreamTag",
              "name": "origin-custom-docker-builder:latest"
            },
            "env": [
              {
                "name": "OPENSHIFT_CUSTOM_BUILD_BASE_IMAGE",
                "value": "openshift/origin-custom-docker-builder"
              }
            ],
            "exposeDockerSocket": true
          }
        },
        "output": {
          "to": {
            "kind": "ImageStreamTag",
            "name": "origin-ruby-sample:latest"
          }
        },
        "postCommit": {
          "script": "bundle exec rake test"
        },
        "resources": {}
      },
      "status": {
        "lastVersion": 0
      }
    },
    {
      "kind": "DeploymentConfig",
      "apiVersion": "v1",
      "metadata": {
        "name": "frontend",
        "annotations": {
          "template.alpha.openshift.io/wait-for-ready": "true"
        }
      },
      "spec": {
        "strategy": {
          "type": "Rolling",
          "rollingParams": {
            "updatePeriodSeconds": 1,
            "intervalSeconds": 1,
            "timeoutSeconds": 120,
            "pre": {
              "failurePolicy": "Abort",
              "execNewPod": {
                "command": [
                  "/bin/true"
                ],
                "env": [
                  {
                    "name": "CUSTOM_VAR1",
                    "value": "custom_value1"
                  }
                ],
                "containerName": "ruby-helloworld"
              }
            },
            "post": {
              "failurePolicy": "Ignore",
              "execNewPod": {
                "command": [
                  "/bin/true"
                ],
                "env": [
                  {
                    "name": "CUSTOM_VAR2",
                    "value": "custom_value2"
                  }
                ],
                "containerName": "ruby-helloworld"
              }
            }
          },
          "resources": {}
        },
        "triggers": [
          {
            "type": "ImageChange",
            "imageChangeParams": {
              "automatic": true,
              "containerNames": [
                "ruby-helloworld"
              ],
              "from": {
                "kind": "ImageStreamTag",
                "name": "origin-ruby-sample:latest"
              }
            }
          },
          {
            "type": "ConfigChange"
          }
        ],
        "replicas": 2,
        "selector": {
          "name": "frontend"
        },
        "template": {
          "metadata": {
            "labels": {
              "name": "frontend"
            }
          },
          "spec": {
            "containers": [
              {
                "name": "ruby-helloworld",
                "image": "origin-ruby-sample",
                "ports": [
                  {
                    "containerPort": 8080,
                    "protocol": "TCP"
                  }
                ],
                "env": [
                  {
                    "name": "MYSQL_USER",
                    "valueFrom": {
                      "secretKeyRef" : {
                        "name" : "dbsecret",
                        "key" : "mysql-user"
                      }
                    }
                  },
                  {
                    "name": "MYSQL_PASSWORD",
                    "valueFrom": {
                      "secretKeyRef" : {
                        "name" : "dbsecret",
                        "key" : "mysql-password"
                      }
                    }
                  },
                  {
                    "name": "MYSQL_DATABASE",
                    "value": "${MYSQL_DATABASE}"
                  }
                ],
                "resources": {},
                "terminationMessagePath": "/dev/termination-log",
                "imagePullPolicy": "IfNotPresent",
                "securityContext": {
                  "capabilities": {},
                  "privileged": false
                }
              }
            ],
            "restartPolicy": "Always",
            "dnsPolicy": "ClusterFirst"
          }
        }
      },
      "status": {}
    },
    {
      "kind": "Service",
      "apiVersion": "v1",
      "metadata": {
        "name": "database"
      },
      "spec": {
        "ports": [
          {
            "name": "db",
            "protocol": "TCP",
            "port": 5434,
            "targetPort": 3306,
            "nodePort": 0
          }
        ],
        "selector": {
          "name": "database"
        },
        "type": "ClusterIP",
        "sessionAffinity": "None"
      },
      "status": {
        "loadBalancer": {}
      }
    },
    {
      "kind": "DeploymentConfig",
      "apiVersion": "v1",
      "metadata": {
        "name": "database",
        "annotations": {
          "template.alpha.openshift.io/wait-for-ready": "true"
        }
      },
      "spec": {
        "strategy": {
          "type": "Recreate",
          "recreateParams": {
            "pre": {
              "failurePolicy": "Abort",
              "execNewPod": {
                "command": [
                  "/bin/true"
                ],
                "env": [
                  {
                    "name": "CUSTOM_VAR1",
                    "value": "custom_value1"
                  }
                ],
                "containerName": "ruby-helloworld-database",
                "volumes": ["ruby-helloworld-data"]
              }
            },
            "mid": {
              "failurePolicy": "Abort",
              "execNewPod": {
                "command": [
                  "/bin/true"
                ],
                "env": [
                  {
                    "name": "CUSTOM_VAR2",
                    "value": "custom_value2"
                  }
                ],
                "containerName": "ruby-helloworld-database",
                "volumes": ["ruby-helloworld-data"]
              }
            },
            "post": {
              "failurePolicy": "Ignore",
              "execNewPod": {
                "command": [
                  "/bin/true"
                ],
                "env": [
                  {
                    "name": "CUSTOM_VAR2",
                    "value": "custom_value2"
                  }
                ],
                "containerName": "ruby-helloworld-database",
                "volumes": ["ruby-helloworld-data"]
              }
            }
          },
          "resources": {}
        },
        "triggers": [
          {
            "type": "ConfigChange"
          }
        ],
        "replicas": 1,
        "selector": {
          "name": "database"
        },
        "template": {
          "metadata": {
            "labels": {
              "name": "database"
            }
          },
          "spec": {
            "containers": [
              {
                "name": "ruby-helloworld-database",
                "image": "centos/mysql-57-centos7:latest",
                "ports": [
                  {
                    "containerPort": 3306,
                    "protocol": "TCP"
                  }
                ],
                "env": [
                  {
                    "name": "MYSQL_USER",
                    "valueFrom": {
                      "secretKeyRef" : {
                        "name" : "dbsecret",
                        "key" : "mysql-user"
                      }
                    }
                  },
                  {
                    "name": "MYSQL_PASSWORD",
                    "valueFrom": {
                      "secretKeyRef" : {
                        "name" : "dbsecret",
                        "key" : "mysql-password"
                      }
                    }
                  },
                  {
                    "name": "MYSQL_DATABASE",
                    "value": "${MYSQL_DATABASE}"
                  }
                ],
                "resources": {},
                "volumeMounts": [
                  {
                    "name": "ruby-helloworld-data",
                    "mountPath": "/var/lib/mysql/data"
                  }
                ],
                "terminationMessagePath": "/dev/termination-log",
                "imagePullPolicy": "Always",
                "securityContext": {
                  "capabilities": {},
                  "privileged": false
                }
              }
            ],
            "volumes": [
              {
                "name": "ruby-helloworld-data",
                "emptyDir": {
                  "medium": ""
                }
              }
            ],
            "restartPolicy": "Always",
            "dnsPolicy": "ClusterFirst"
          }
        }
      },
      "status": {}
    }
  ],
  "parameters": [
    {
      "name": "MYSQL_USER",
      "description": "database username",
      "generate": "expression",
      "from": "user[A-Z0-9]{3}",
      "required": true
    },
    {
      "name": "MYSQL_PASSWORD",
      "description": "database password",
      "generate": "expression",
      "from": "[a-zA-Z0-9]{8}",
      "required": true
    },
    {
      "name": "MYSQL_DATABASE",
      "description": "database name",
      "value": "root",
      "required": true
    }
  ],
  "labels": {
    "template": "application-template-custombuild"
  }
}
`)

func testExtendedTestdataBuildsApplicationTemplateCustombuildJsonBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsApplicationTemplateCustombuildJson, nil
}

func testExtendedTestdataBuildsApplicationTemplateCustombuildJson() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsApplicationTemplateCustombuildJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/application-template-custombuild.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsBuildPostcommitDockerYaml = []byte(`apiVersion: v1
kind: List
metadata: {}
items:
- apiVersion: v1
  kind: BuildConfig
  metadata:
    name: mydockertest
    labels:
      name: test
  spec:
    triggers: []
    runPolicy: Serial
    source:
      dockerfile: |
        FROM busybox:latest
    strategy:
      type: Docker
      dockerStrategy:
        env:
          - name: BUILD_LOGLEVEL
            value: "5"
    resources: {}
    postCommit:
      command: ["touch"]
      args: ["/tmp/postCommit"]
    nodeSelector: null
  status:
    lastVersion: 0
- apiVersion: v1
  kind: DeploymentConfig
  metadata:
    name: mydockertest
  spec:
    replicas: 1
    selector:
      app: mydockertest
      deploymentconfig: mydockertest
    strategy:
      type: Rolling
    template:
      metadata:
        labels:
          app: mydockertest
          deploymentconfig: mydockertest
      spec:
        containers:
        - image:
          imagePullPolicy: Always
          readinessProbe:
            httpGet:
              port: 8080
          name: mydockertest
          ports:
          - containerPort: 8080
            protocol: TCP
          - containerPort: 8888
            protocol: TCP
          terminationMessagePath: /dev/termination-log
        dnsPolicy: ClusterFirst
        restartPolicy: Always
        securityContext: {}
    triggers:
    - imageChangeParams:
        automatic: true
        containerNames:
        - mydockertest
        from:
          kind: ImageStreamTag
          name: mydockertest:latest
      type: ImageChange
    - type: ConfigChange
`)

func testExtendedTestdataBuildsBuildPostcommitDockerYamlBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsBuildPostcommitDockerYaml, nil
}

func testExtendedTestdataBuildsBuildPostcommitDockerYaml() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsBuildPostcommitDockerYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/build-postcommit/docker.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsBuildPostcommitImagestreamsYaml = []byte(`apiVersion: v1
kind: List
metadata: {}
items:
- kind: ImageStream
  apiVersion: v1
  metadata:
    name: mydockertest
- kind: ImageStream
  apiVersion: v1
  metadata:
    name: mys2itest
`)

func testExtendedTestdataBuildsBuildPostcommitImagestreamsYamlBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsBuildPostcommitImagestreamsYaml, nil
}

func testExtendedTestdataBuildsBuildPostcommitImagestreamsYaml() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsBuildPostcommitImagestreamsYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/build-postcommit/imagestreams.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsBuildPostcommitStiYaml = []byte(`apiVersion: v1
kind: List
metadata: {}
items:
- apiVersion: v1
  kind: BuildConfig
  metadata:
    name: mys2itest
    labels:
      name: test
  spec:
    triggers: []
    runPolicy: Serial
    source:
      type: Git
      git:
        uri: 'https://github.com/sclorg/nodejs-ex'
    strategy:
      type: Source
      sourceStrategy:
        from:
          kind: DockerImage
          name: docker.io/openshift/test-build-simples2i:latest
    resources: {}
    postCommit: {}
    nodeSelector: null
  status:
    lastVersion: 0
- apiVersion: v1
  kind: DeploymentConfig
  metadata:
    name: mys2itest
  spec:
    replicas: 1
    selector:
      app: mys2itest
      deploymentconfig: mys2itest
    strategy:
      type: Rolling
    template:
      metadata:
        labels:
          app: mys2itest
          deploymentconfig: mys2itest
      spec:
        containers:
        - image:
          imagePullPolicy: Always
          name: mys2itest
          terminationMessagePath: /dev/termination-log
        dnsPolicy: ClusterFirst
        restartPolicy: Always
        securityContext: {}
    triggers:
    - imageChangeParams:
        automatic: true
        containerNames:
        - mys2itest
        from:
          kind: ImageStreamTag
          name: mys2itest:latest
      type: ImageChange
    - type: ConfigChange
`)

func testExtendedTestdataBuildsBuildPostcommitStiYamlBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsBuildPostcommitStiYaml, nil
}

func testExtendedTestdataBuildsBuildPostcommitStiYaml() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsBuildPostcommitStiYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/build-postcommit/sti.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsBuildPruningDefaultGroupBuildConfigYaml = []byte(`apiVersion: build.openshift.io/v1
kind: BuildConfig
metadata:
  name: myphp
spec:
  source:
    type: Git
    git:
      uri: 'https://github.com/sclorg/cakephp-ex.git'
  strategy:
    type: Source
    sourceStrategy:
      from:
        kind: ImageStreamTag
        namespace: openshift
        name: 'php:7.2'
`)

func testExtendedTestdataBuildsBuildPruningDefaultGroupBuildConfigYamlBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsBuildPruningDefaultGroupBuildConfigYaml, nil
}

func testExtendedTestdataBuildsBuildPruningDefaultGroupBuildConfigYaml() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsBuildPruningDefaultGroupBuildConfigYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/build-pruning/default-group-build-config.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsBuildPruningDefaultLegacyBuildConfigYaml = []byte(`{
  "apiVersion": "v1",
  "kind": "BuildConfig",
  "metadata": {
    "name": "myphp"
  },
  "spec": {
    "source": {
      "type": "Git",
      "git": {
        "uri": "https://github.com/sclorg/cakephp-ex.git"
      }
    },
    "strategy": {
      "type": "Source",
      "sourceStrategy": {
        "from": {
          "kind": "ImageStreamTag",
          "namespace": "openshift",
          "name": "php:7.2"
        }
      }
    }
  }
}`)

func testExtendedTestdataBuildsBuildPruningDefaultLegacyBuildConfigYamlBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsBuildPruningDefaultLegacyBuildConfigYaml, nil
}

func testExtendedTestdataBuildsBuildPruningDefaultLegacyBuildConfigYaml() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsBuildPruningDefaultLegacyBuildConfigYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/build-pruning/default-legacy-build-config.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsBuildPruningErroredBuildConfigYaml = []byte(`apiVersion: v1
kind: BuildConfig
metadata:
  name: myphp
spec:
  failedBuildsHistoryLimit: 2
  source:
    type: Git
    git:
      uri: 'https://github.com/sclorg/cakephp-ex.git'
      ref: master
  strategy:
    type: Source
    sourceStrategy:
      env:
        - name: FIELDREF_ENV
          valueFrom:
            fieldRef:
              fieldPath: metadata.nofield
      from:
        kind: ImageStreamTag
        namespace: openshift
        name: 'php:7.2'
`)

func testExtendedTestdataBuildsBuildPruningErroredBuildConfigYamlBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsBuildPruningErroredBuildConfigYaml, nil
}

func testExtendedTestdataBuildsBuildPruningErroredBuildConfigYaml() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsBuildPruningErroredBuildConfigYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/build-pruning/errored-build-config.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsBuildPruningFailedBuildConfigYaml = []byte(`apiVersion: v1
kind: BuildConfig
metadata:
  name: myphp
  labels:
    app: myphp
  annotations:
    openshift.io/generated-by: OpenShiftWebConsole
spec:
  failedBuildsHistoryLimit: 2
  source:
    type: Git
    git:
      uri: 'https://github.com/openshift/non-working-example.git'
  strategy:
    type: Source
    sourceStrategy:
      from:
        kind: ImageStreamTag
        namespace: openshift
        name: 'php:7.2'
`)

func testExtendedTestdataBuildsBuildPruningFailedBuildConfigYamlBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsBuildPruningFailedBuildConfigYaml, nil
}

func testExtendedTestdataBuildsBuildPruningFailedBuildConfigYaml() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsBuildPruningFailedBuildConfigYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/build-pruning/failed-build-config.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsBuildPruningFailedPipelineYaml = []byte(`kind: "BuildConfig"
apiVersion: "v1"
metadata:
  name: "failed-pipeline"
spec:
  failedBuildsHistoryLimit: 2
  strategy:
    jenkinsPipelineStrategy:
      jenkinsfile: |-
              node() {
                sh 'exit 1'
              }
      type: JenkinsPipeline
`)

func testExtendedTestdataBuildsBuildPruningFailedPipelineYamlBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsBuildPruningFailedPipelineYaml, nil
}

func testExtendedTestdataBuildsBuildPruningFailedPipelineYaml() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsBuildPruningFailedPipelineYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/build-pruning/failed-pipeline.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsBuildPruningImagestreamYaml = []byte(`apiVersion: v1
kind: ImageStream
metadata:
  name: myphp
`)

func testExtendedTestdataBuildsBuildPruningImagestreamYamlBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsBuildPruningImagestreamYaml, nil
}

func testExtendedTestdataBuildsBuildPruningImagestreamYaml() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsBuildPruningImagestreamYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/build-pruning/imagestream.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsBuildPruningSuccessfulBuildConfigYaml = []byte(`apiVersion: v1
kind: BuildConfig
metadata:
  name: myphp
  labels:
    app: myphp
  annotations:
    openshift.io/generated-by: OpenShiftWebConsole
spec:
  successfulBuildsHistoryLimit: 2
  source:
    dockerfile: |
      FROM busybox
      RUN touch /php-file
  strategy:
    dockerStrategy: {}`)

func testExtendedTestdataBuildsBuildPruningSuccessfulBuildConfigYamlBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsBuildPruningSuccessfulBuildConfigYaml, nil
}

func testExtendedTestdataBuildsBuildPruningSuccessfulBuildConfigYaml() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsBuildPruningSuccessfulBuildConfigYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/build-pruning/successful-build-config.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsBuildPruningSuccessfulPipelineYaml = []byte(`kind: "BuildConfig"
apiVersion: "v1"
metadata:
  name: "successful-pipeline"
spec:
  successfulBuildsHistoryLimit: 2
  strategy:
    jenkinsPipelineStrategy:
      jenkinsfile: |-
        node() {
          sh 'exit 0' 
        }
      type: JenkinsPipeline
`)

func testExtendedTestdataBuildsBuildPruningSuccessfulPipelineYamlBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsBuildPruningSuccessfulPipelineYaml, nil
}

func testExtendedTestdataBuildsBuildPruningSuccessfulPipelineYaml() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsBuildPruningSuccessfulPipelineYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/build-pruning/successful-pipeline.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsBuildQuotaS2iBinAssemble = []byte(`#!/bin/sh

# Seeing issues w/ buildah log output being intermingled with the container
# output, so adding a sleep in an attempt to let the buildah log output
# stop before the container output starts
sleep 10
echo -n MEMORY= && cat /sys/fs/cgroup/memory/memory.limit_in_bytes
echo -n MEMORYSWAP= && cat /sys/fs/cgroup/memory/memory.memsw.limit_in_bytes

if [ -e /sys/fs/cgroup/cpuacct,cpu ]; then
	quota=$(</sys/fs/cgroup/cpuacct,cpu/cpu.cfs_quota_us)
	echo -n QUOTA= && cat /sys/fs/cgroup/cpuacct,cpu/cpu.cfs_quota_us
	echo -n SHARES= && cat /sys/fs/cgroup/cpuacct,cpu/cpu.shares
	echo -n PERIOD= && cat /sys/fs/cgroup/cpuacct,cpu/cpu.cfs_period_us
else
	quota=$(</sys/fs/cgroup/cpu,cpuacct/cpu.cfs_quota_us)
	echo -n QUOTA= && cat /sys/fs/cgroup/cpu,cpuacct/cpu.cfs_quota_us
	echo -n SHARES= && cat /sys/fs/cgroup/cpu,cpuacct/cpu.shares
	echo -n PERIOD= && cat /sys/fs/cgroup/cpu,cpuacct/cpu.cfs_period_us
fi

if [ "${quota}" == "-1" ]; then
	cat /proc/self/cgroup
	cat /proc/self/mountinfo
	findmnt
fi
`)

func testExtendedTestdataBuildsBuildQuotaS2iBinAssembleBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsBuildQuotaS2iBinAssemble, nil
}

func testExtendedTestdataBuildsBuildQuotaS2iBinAssemble() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsBuildQuotaS2iBinAssembleBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/build-quota/.s2i/bin/assemble", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsBuildQuotaDockerfile = []byte(`FROM centos:7
USER root

ADD .s2i/bin/assemble .
RUN ./assemble

# exit 1 causes the docker build to fail which causes docker to show the output # of all commands like 'assemble' above.
RUN exit 1

`)

func testExtendedTestdataBuildsBuildQuotaDockerfileBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsBuildQuotaDockerfile, nil
}

func testExtendedTestdataBuildsBuildQuotaDockerfile() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsBuildQuotaDockerfileBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/build-quota/Dockerfile", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsBuildSecretsDockerfile = []byte(`FROM docker.io/busybox

USER root
ADD ./secret-dir /secrets
COPY ./secret2 /
ADD ./config-dir /configs
COPY ./this /

# Create a shell script that will output secrets and configMaps when the image is run
RUN echo '#!/bin/sh' > /secret_report.sh
RUN echo '(test -f /secrets/secret1 && echo -n "secret1=" && cat /secrets/secret1)' >> /secret_report.sh
RUN echo '(test -f /secret2 && echo -n "relative-secret2=" && cat /secret2)' >> /secret_report.sh
RUN echo '(test -f /configs/foo && echo -n "foo=" && cat /configs/foo)' >> /secret_report.sh
RUN echo '(test -f /this && echo -n "relative-this=" && cat /this)' >> /secret_report.sh
RUN chmod 755 /secret_report.sh

CMD ["/bin/sh", "-c", "/secret_report.sh"]
`)

func testExtendedTestdataBuildsBuildSecretsDockerfileBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsBuildSecretsDockerfile, nil
}

func testExtendedTestdataBuildsBuildSecretsDockerfile() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsBuildSecretsDockerfileBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/build-secrets/Dockerfile", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsBuildSecretsS2iBinaryDirS2iBinAssemble = []byte(`#!/bin/bash

# Copy secrets into a location they can be output during image run

mkdir -p "${HOME}/testsecret"
if [[ -f /tmp/secret1 ]]; then
    # Copy three secrets defined in testsecret fixture to directory
    cp /tmp/secret? "${HOME}/testsecret"
else
    echo "Unable to locate testsecret fixture files"
    exit 1
fi

mkdir -p "${HOME}/testsecret2"
if [[ -f secret1  ]]; then
    # Copy three secrets defined in testsecret2 fixture to directory
    cp secret? "${HOME}/testsecret2"
else
    echo "Unable to locate testsecret2 fixture files"
    exit 2
fi 

mkdir -p "${HOME}/testconfig"
if [[ -f /tmp/configmap/foo ]]; then
    # Copy three configMap entries defined in configmap1 fixture to directory
    cp /tmp/configmap/* "${HOME}/testconfig"
else
    echo "Unable to locate test-configmap fixture files"
    exit 3
fi

mkdir -p "${HOME}/testconfig2"
if [[ -f configmap2/foo  ]]; then
    # Copy three configMap entries defined in configmap2 fixture to directory
    cp configmap2/* "${HOME}/testconfig2"
else
    echo "Unable to locate test-configmap-2 fixture files"
    exit 4
fi
`)

func testExtendedTestdataBuildsBuildSecretsS2iBinaryDirS2iBinAssembleBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsBuildSecretsS2iBinaryDirS2iBinAssemble, nil
}

func testExtendedTestdataBuildsBuildSecretsS2iBinaryDirS2iBinAssemble() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsBuildSecretsS2iBinaryDirS2iBinAssembleBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/build-secrets/s2i-binary-dir/.s2i/bin/assemble", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsBuildSecretsS2iBinaryDirS2iBinRun = []byte(`#!/bin/bash

# Ensure none of the build config inject secrets still exist in the file system

secrets=(secret1 secret2 secret3)
configMaps=(foo this red)

function checkSecret() {
    dir=$1
    file=$2
    if [[ -e "${dir}/${file}" ]]; then
        echo "Found secret file which should have been deleted: ${dir}/${file}"
        exit 1
    fi
}

function checkConfigMap() {
    dir=$1
    file=$2
    if [[ -a "${dir}/${file}" ]]; then
        if [[ ! -s "${dir}/${file}" ]]; then
            echo "Found empty configMap file which should not have been truncated: ${dir}/${file}"
            exit 1
        fi
    else
        echo "ConfigMap file ${file} is missing from ${dir}."
        exit 1
    fi
}

for s in ${secrets[@]}; do
    checkSecret "/tmp" $s
    checkSecret "." $s
done

for c in ${configMaps[@]}; do
    checkConfigMap "/tmp/configmap" $c
    checkConfigMap "configmap2" $c
done

# Print out the secrets copied into the image during assemble
cd "${HOME}"
for s in testsecret/* testsecret2/* testconfig/* testconfig2/*; do
    echo -n "${s}=" && cat "${s}"
done`)

func testExtendedTestdataBuildsBuildSecretsS2iBinaryDirS2iBinRunBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsBuildSecretsS2iBinaryDirS2iBinRun, nil
}

func testExtendedTestdataBuildsBuildSecretsS2iBinaryDirS2iBinRun() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsBuildSecretsS2iBinaryDirS2iBinRunBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/build-secrets/s2i-binary-dir/.s2i/bin/run", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsBuildSecretsS2iBinaryDirGemfile = []byte(`source "https://rubygems.org"

gem "rack"
`)

func testExtendedTestdataBuildsBuildSecretsS2iBinaryDirGemfileBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsBuildSecretsS2iBinaryDirGemfile, nil
}

func testExtendedTestdataBuildsBuildSecretsS2iBinaryDirGemfile() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsBuildSecretsS2iBinaryDirGemfileBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/build-secrets/s2i-binary-dir/Gemfile", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsBuildSecretsS2iBinaryDirConfigRu = []byte(`run Proc.new {|env| [200, {"Content-Type" => "text/html"}, [ENV['TEST_ENV']]]}
`)

func testExtendedTestdataBuildsBuildSecretsS2iBinaryDirConfigRuBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsBuildSecretsS2iBinaryDirConfigRu, nil
}

func testExtendedTestdataBuildsBuildSecretsS2iBinaryDirConfigRu() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsBuildSecretsS2iBinaryDirConfigRuBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/build-secrets/s2i-binary-dir/config.ru", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsBuildSecretsTestConfigmap2Json = []byte(`{
    "kind": "ConfigMap",
    "apiVersion": "v1",
    "metadata": {
        "name": "test-configmap-2",
        "creationTimestamp": null
    },
    "data": {
        "foo": "bar\n",
        "this": "that\n",
        "red": "hat\n"
    }
}
`)

func testExtendedTestdataBuildsBuildSecretsTestConfigmap2JsonBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsBuildSecretsTestConfigmap2Json, nil
}

func testExtendedTestdataBuildsBuildSecretsTestConfigmap2Json() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsBuildSecretsTestConfigmap2JsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/build-secrets/test-configmap-2.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsBuildSecretsTestConfigmapJson = []byte(`{
    "kind": "ConfigMap",
    "apiVersion": "v1",
    "metadata": {
        "name": "test-configmap"
    },
    "data": {
        "foo": "bar\n",
        "this": "that\n",
        "red": "hat\n"
    }
}
`)

func testExtendedTestdataBuildsBuildSecretsTestConfigmapJsonBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsBuildSecretsTestConfigmapJson, nil
}

func testExtendedTestdataBuildsBuildSecretsTestConfigmapJson() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsBuildSecretsTestConfigmapJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/build-secrets/test-configmap.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsBuildSecretsTestDockerBuildJson = []byte(`{
  "kind": "BuildConfig",
  "apiVersion": "v1",
  "metadata": {
    "name": "test",
    "labels": {
      "name": "test"
    }
  },
  "spec": {
    "triggers": [],
    "source": {
      "type": "Binary",
      "binary": {},
      "secrets": [
        {
          "secret": {
            "name": "testsecret"
          },
          "destinationDir": "secret-dir"
        },
        {
          "secret": {
            "name": "testsecret2"
          }
        }
      ],
      "configMaps": [
        {
          "configMap": {
            "name": "test-configmap"
          },
          "destinationDir": "config-dir"
        },
        {
          "configMap": {
            "name": "test-configmap-2"
          }
        }
      ]
    },
    "strategy": {
      "type": "Docker",
      "dockerStrategy": {
        "from": {
          "kind": "DockerImage",
          "name": "docker.io/busybox:latest"
        },
        "env": [
          {
            "name": "BUILD_LOGLEVEL",
            "value": "5"
          }
        ]
      }
    },
    "output": {
      "to": {
        "kind": "ImageStreamTag",
        "name": "test:latest"
      }
    }
  }
}`)

func testExtendedTestdataBuildsBuildSecretsTestDockerBuildJsonBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsBuildSecretsTestDockerBuildJson, nil
}

func testExtendedTestdataBuildsBuildSecretsTestDockerBuildJson() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsBuildSecretsTestDockerBuildJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/build-secrets/test-docker-build.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsBuildSecretsTestIsJson = []byte(`{
  "kind": "ImageStream",
  "apiVersion": "v1",
  "metadata": {
    "name": "test"
  }
}
`)

func testExtendedTestdataBuildsBuildSecretsTestIsJsonBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsBuildSecretsTestIsJson, nil
}

func testExtendedTestdataBuildsBuildSecretsTestIsJson() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsBuildSecretsTestIsJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/build-secrets/test-is.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsBuildSecretsTestS2iBuildJson = []byte(`{
  "kind": "BuildConfig",
  "apiVersion": "v1",
  "metadata": {
    "name": "test",
    "labels": {
      "name": "test"
    }
  },
  "spec": {
    "triggers": [],
    "source": {
      "type": "Binary",
      "binary": {},
      "secrets": [
        {
          "secret": {
            "name": "testsecret"
          },
          "destinationDir": "/tmp"
        },
        {
          "secret": {
            "name": "testsecret2"
          }
        }
      ],
      "configMaps": [
        {
          "configMap": {
            "name": "test-configmap"
          },
          "destinationDir": "/tmp/configmap"
        },
        {
          "configMap": {
            "name": "test-configmap-2"
          },
          "destinationDir": "configmap2"
        }
      ]
    },
    "strategy": {
      "type": "Source",
      "sourceStrategy": {
        "from": {
          "kind": "DockerImage",
          "name": "docker.io/centos/ruby-25-centos7"
        },
        "env": [
          {
            "name": "BUILD_LOGLEVEL",
            "value": "5"
          }
        ]
      }
    },
    "output": {
      "to": {
        "kind": "ImageStreamTag",
        "name": "test:latest"
      }
    }
  }
}`)

func testExtendedTestdataBuildsBuildSecretsTestS2iBuildJsonBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsBuildSecretsTestS2iBuildJson, nil
}

func testExtendedTestdataBuildsBuildSecretsTestS2iBuildJson() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsBuildSecretsTestS2iBuildJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/build-secrets/test-s2i-build.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsBuildSecretsTestSecret2Json = []byte(`{
    "kind": "Secret",
    "apiVersion": "v1",
    "metadata": {
        "name": "testsecret2",
        "creationTimestamp": null
    },
    "data": {
        "secret1": "c2VjcmV0MQo=",
        "secret2": "c2VjcmV0Mgo=",
        "secret3": "c2VjcmV0Mwo="
    },
    "type": "Opaque"
}
`)

func testExtendedTestdataBuildsBuildSecretsTestSecret2JsonBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsBuildSecretsTestSecret2Json, nil
}

func testExtendedTestdataBuildsBuildSecretsTestSecret2Json() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsBuildSecretsTestSecret2JsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/build-secrets/test-secret-2.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsBuildSecretsTestSecretJson = []byte(`{
    "kind": "Secret",
    "apiVersion": "v1",
    "metadata": {
        "name": "testsecret",
        "creationTimestamp": null
    },
    "data": {
        "secret1": "c2VjcmV0MQo=",
        "secret2": "c2VjcmV0Mgo=",
        "secret3": "c2VjcmV0Mwo="
    },
    "type": "Opaque"
}
`)

func testExtendedTestdataBuildsBuildSecretsTestSecretJsonBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsBuildSecretsTestSecretJson, nil
}

func testExtendedTestdataBuildsBuildSecretsTestSecretJson() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsBuildSecretsTestSecretJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/build-secrets/test-secret.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsBuildTimingDockerfile = []byte(`FROM centos/ruby-25-centos7

USER root
`)

func testExtendedTestdataBuildsBuildTimingDockerfileBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsBuildTimingDockerfile, nil
}

func testExtendedTestdataBuildsBuildTimingDockerfile() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsBuildTimingDockerfileBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/build-timing/Dockerfile", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsBuildTimingS2iBinaryDirS2iBinAssemble = []byte(`#!/bin/sh

`)

func testExtendedTestdataBuildsBuildTimingS2iBinaryDirS2iBinAssembleBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsBuildTimingS2iBinaryDirS2iBinAssemble, nil
}

func testExtendedTestdataBuildsBuildTimingS2iBinaryDirS2iBinAssemble() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsBuildTimingS2iBinaryDirS2iBinAssembleBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/build-timing/s2i-binary-dir/.s2i/bin/assemble", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsBuildTimingS2iBinaryDirS2iBinRun = []byte(`#!/bin/sh

`)

func testExtendedTestdataBuildsBuildTimingS2iBinaryDirS2iBinRunBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsBuildTimingS2iBinaryDirS2iBinRun, nil
}

func testExtendedTestdataBuildsBuildTimingS2iBinaryDirS2iBinRun() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsBuildTimingS2iBinaryDirS2iBinRunBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/build-timing/s2i-binary-dir/.s2i/bin/run", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsBuildTimingS2iBinaryDirGemfile = []byte(`source "https://rubygems.org"

gem "rack"
`)

func testExtendedTestdataBuildsBuildTimingS2iBinaryDirGemfileBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsBuildTimingS2iBinaryDirGemfile, nil
}

func testExtendedTestdataBuildsBuildTimingS2iBinaryDirGemfile() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsBuildTimingS2iBinaryDirGemfileBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/build-timing/s2i-binary-dir/Gemfile", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsBuildTimingS2iBinaryDirConfigRu = []byte(`run Proc.new {|env| [200, {"Content-Type" => "text/html"}, [ENV['TEST_ENV']]]}
`)

func testExtendedTestdataBuildsBuildTimingS2iBinaryDirConfigRuBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsBuildTimingS2iBinaryDirConfigRu, nil
}

func testExtendedTestdataBuildsBuildTimingS2iBinaryDirConfigRu() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsBuildTimingS2iBinaryDirConfigRuBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/build-timing/s2i-binary-dir/config.ru", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsBuildTimingTestDockerBuildJson = []byte(`{
  "kind": "BuildConfig",
  "apiVersion": "v1",
  "metadata": {
    "name": "test",
    "labels": {
      "name": "test"
    }
  },
  "spec": {
    "triggers": [],
    "source": {
      "type": "Binary",
      "binary": {}
    },
    "strategy": {
      "type": "Docker",
      "dockerStrategy": {
        "forcePull": true,
        "from": {
          "kind": "DockerImage",
          "name": "docker.io/busybox:latest"
        },
        "env": [
          {
            "name": "BUILD_LOGLEVEL",
            "value": "5"
          }
        ]
      }
    },
    "output": {
      "to": {
        "kind": "ImageStreamTag",
        "name": "test:latest"
      }
    }
  }
}
`)

func testExtendedTestdataBuildsBuildTimingTestDockerBuildJsonBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsBuildTimingTestDockerBuildJson, nil
}

func testExtendedTestdataBuildsBuildTimingTestDockerBuildJson() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsBuildTimingTestDockerBuildJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/build-timing/test-docker-build.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsBuildTimingTestIsJson = []byte(`{
  "kind": "ImageStream",
  "apiVersion": "v1",
  "metadata": {
    "name": "test"
  }
}
`)

func testExtendedTestdataBuildsBuildTimingTestIsJsonBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsBuildTimingTestIsJson, nil
}

func testExtendedTestdataBuildsBuildTimingTestIsJson() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsBuildTimingTestIsJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/build-timing/test-is.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsBuildTimingTestS2iBuildJson = []byte(`{
  "kind": "BuildConfig",
  "apiVersion": "v1",
  "metadata": {
    "name": "test",
    "labels": {
      "name": "test"
    }
  },
  "spec": {
    "triggers": [],
    "source": {
      "type": "Binary",
      "binary": {}
    },
    "strategy": {
      "type": "Source",
      "sourceStrategy": {
        "from": {
          "kind": "DockerImage",
          "name": "docker.io/openshift/test-build-simples2i:latest"
        },
        "env": [
          {
            "name": "BUILD_LOGLEVEL",
            "value": "5"
          }
        ]
      }
    },
    "output": {
      "to": {
        "kind": "ImageStreamTag",
        "name": "test:latest"
      }
    }
  }
}
`)

func testExtendedTestdataBuildsBuildTimingTestS2iBuildJsonBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsBuildTimingTestS2iBuildJson, nil
}

func testExtendedTestdataBuildsBuildTimingTestS2iBuildJson() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsBuildTimingTestS2iBuildJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/build-timing/test-s2i-build.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsClusterConfigInvalidBuildClusterConfigYaml = []byte(`kind: Build
apiVersion: config.openshift.io/v1
metadata:
  name: cluster
spec:
  buildDefaults:
    defaultProxy:
       httpProxy: http://invalid.proxy.redhat.com:3288
       httpsProxy: http://invalid.proxy.redhat.com:3288
       noProxy: image-registry.openshift-image-registry.svc:5000
`)

func testExtendedTestdataBuildsClusterConfigInvalidBuildClusterConfigYamlBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsClusterConfigInvalidBuildClusterConfigYaml, nil
}

func testExtendedTestdataBuildsClusterConfigInvalidBuildClusterConfigYaml() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsClusterConfigInvalidBuildClusterConfigYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/cluster-config/invalid-build-cluster-config.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsClusterConfigRegistryBlacklistYaml = []byte(`kind: Image
apiVersion: config.openshift.io/v1
metadata:
  name: cluster
spec:
  registrySources:
      blockedRegistries:
      - docker.io
      - quay.io
`)

func testExtendedTestdataBuildsClusterConfigRegistryBlacklistYamlBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsClusterConfigRegistryBlacklistYaml, nil
}

func testExtendedTestdataBuildsClusterConfigRegistryBlacklistYaml() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsClusterConfigRegistryBlacklistYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/cluster-config/registry-blacklist.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsClusterConfigRegistryWhitelistYaml = []byte(`kind: Image
apiVersion: config.openshift.io/v1
metadata:
  name: cluster
spec:
  registrySources:
      allowedRegistries:
      - quay.io
`)

func testExtendedTestdataBuildsClusterConfigRegistryWhitelistYamlBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsClusterConfigRegistryWhitelistYaml, nil
}

func testExtendedTestdataBuildsClusterConfigRegistryWhitelistYaml() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsClusterConfigRegistryWhitelistYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/cluster-config/registry-whitelist.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsClusterConfigYaml = []byte(`kind: Image
apiVersion: config.openshift.io/v1
metadata:
  name: cluster
spec: {}
`)

func testExtendedTestdataBuildsClusterConfigYamlBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsClusterConfigYaml, nil
}

func testExtendedTestdataBuildsClusterConfigYaml() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsClusterConfigYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/cluster-config.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsCustomBuildDockerfile = []byte(`FROM quay.io/buildah/stable:latest
# For simplicity, /tmp/build contains the inputs we’ll be building when we
# run this custom builder image. Normally the custom builder image would
# fetch this content from some location at build time. (e.g. via git clone).
ADD Dockerfile.sample /tmp/input/Dockerfile
ADD build.sh /usr/bin
RUN chmod a+x /usr/bin/build.sh
# /tmp/build/build.sh contains the actual custom build logic that will be executed when
# this custom builder image is executed.
ENTRYPOINT ["/usr/bin/build.sh"]
`)

func testExtendedTestdataBuildsCustomBuildDockerfileBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsCustomBuildDockerfile, nil
}

func testExtendedTestdataBuildsCustomBuildDockerfile() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsCustomBuildDockerfileBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/custom-build/Dockerfile", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsCustomBuildDockerfileSample = []byte(`FROM docker.io/centos:7
RUN touch /tmp/built
`)

func testExtendedTestdataBuildsCustomBuildDockerfileSampleBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsCustomBuildDockerfileSample, nil
}

func testExtendedTestdataBuildsCustomBuildDockerfileSample() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsCustomBuildDockerfileSampleBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/custom-build/Dockerfile.sample", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsCustomBuildBuildSh = []byte(`#!/bin/sh
# Note that in this case the build inputs are part of the custom builder image, but normally this
# would be retrieved from an external source.
cd /tmp/input
# OUTPUT_REGISTRY and OUTPUT_IMAGE are env variables provided by the custom
# build framework
TAG="${OUTPUT_REGISTRY}/${OUTPUT_IMAGE}"
# performs the build of the new image defined by Dockerfile.sample
buildah --storage-driver vfs bud --isolation chroot -t ${TAG} .
# buildah requires a slight modification to the push secret provided by the service account in order to use it for pushing the image
cp /var/run/secrets/openshift.io/push/.dockercfg /tmp
(echo "{ \"auths\": " ; cat /var/run/secrets/openshift.io/push/.dockercfg ; echo "}") > /tmp/.dockercfg
# push the new image to the target for the build
buildah --storage-driver vfs push --tls-verify=false --authfile /tmp/.dockercfg ${TAG}

`)

func testExtendedTestdataBuildsCustomBuildBuildShBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsCustomBuildBuildSh, nil
}

func testExtendedTestdataBuildsCustomBuildBuildSh() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsCustomBuildBuildShBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/custom-build/build.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsDockerAddDockerfile = []byte(`FROM centos:7
ADD no-exist-file .
`)

func testExtendedTestdataBuildsDockerAddDockerfileBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsDockerAddDockerfile, nil
}

func testExtendedTestdataBuildsDockerAddDockerfile() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsDockerAddDockerfileBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/docker-add/Dockerfile", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsIncrementalAuthBuildJson = []byte(`{
  "kind": "Template",
  "apiVersion": "v1",
  "metadata": {
    "name": "push-pull-builder",
    "creationTimestamp": null,
    "annotations": {
      "description": "This defines a build which pulls from and pushes to the internal registry",
      "iconClass": "icon-ruby",
      "tags": "instant-app,ruby,mysql"
    }
  },
  "objects": [
    {
      "kind": "ImageStream",
      "apiVersion": "v1",
      "metadata": {
        "name": "incremental-image",
        "creationTimestamp": null
      },
      "spec": {}
    },
    {
      "kind": "BuildConfig",
      "apiVersion": "v1",
      "metadata": {
        "name": "incremental-build",
        "creationTimestamp": null,
        "labels": {
          "name": "incremental-build"
        }
      },
      "spec": {
        "source": {
          "type": "Git",
          "git": {
            "uri": "https://github.com/openshift/incremental-app.git"
          }
        },
        "strategy": {
          "type": "Source",
          "sourceStrategy": {
            "env": [
              {
                "name": "BUILD_LOGLEVEL",
                "value": "5"
              }
            ],
            "from": {
              "kind": "DockerImage",
              "name": "centos/ruby-25-centos7:latest"
            },
            "incremental": true
          }
        },
        "output": {
          "to": {
            "kind": "ImageStreamTag",
            "name": "incremental-image:latest"
          }
        }
      }
    }
  ],
  "parameters": [],
  "labels": {
    "template": "application-template-stibuild"
  }
}`)

func testExtendedTestdataBuildsIncrementalAuthBuildJsonBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsIncrementalAuthBuildJson, nil
}

func testExtendedTestdataBuildsIncrementalAuthBuildJson() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsIncrementalAuthBuildJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/incremental-auth-build.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsPullsecretLinkedNodejsBcYaml = []byte(`kind: BuildConfig
apiVersion: v1
metadata:
  name: linked-nodejs
spec:
  source:
    git:
      uri: "https://github.com/sclorg/nodejs-ex.git"
  strategy:
    type: Source
    sourceStrategy:
      from:
        kind: DockerImage
        name: registry.redhat.io/rhscl/nodejs-10-rhel7:latest
`)

func testExtendedTestdataBuildsPullsecretLinkedNodejsBcYamlBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsPullsecretLinkedNodejsBcYaml, nil
}

func testExtendedTestdataBuildsPullsecretLinkedNodejsBcYaml() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsPullsecretLinkedNodejsBcYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/pullsecret/linked-nodejs-bc.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsPullsecretPullsecretNodejsBcYaml = []byte(`kind: BuildConfig
apiVersion: v1
metadata:
  name: pullsecret-nodejs
spec:
  source:
    git:
      uri: "https://github.com/sclorg/nodejs-ex.git"
  strategy:
    type: Source
    sourceStrategy:
      from:
        kind: DockerImage
        name: registry.redhat.io/rhscl/nodejs-10-rhel7:latest
      pullSecret:
        name: local-ps
`)

func testExtendedTestdataBuildsPullsecretPullsecretNodejsBcYamlBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsPullsecretPullsecretNodejsBcYaml, nil
}

func testExtendedTestdataBuildsPullsecretPullsecretNodejsBcYaml() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsPullsecretPullsecretNodejsBcYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/pullsecret/pullsecret-nodejs-bc.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsS2iEnvironmentBuildAppS2iEnvironment = []byte(`TEST_ENV=success
`)

func testExtendedTestdataBuildsS2iEnvironmentBuildAppS2iEnvironmentBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsS2iEnvironmentBuildAppS2iEnvironment, nil
}

func testExtendedTestdataBuildsS2iEnvironmentBuildAppS2iEnvironment() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsS2iEnvironmentBuildAppS2iEnvironmentBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/s2i-environment-build-app/.s2i/environment", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsS2iEnvironmentBuildAppGemfile = []byte(`source "https://rubygems.org"

gem "rack"
`)

func testExtendedTestdataBuildsS2iEnvironmentBuildAppGemfileBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsS2iEnvironmentBuildAppGemfile, nil
}

func testExtendedTestdataBuildsS2iEnvironmentBuildAppGemfile() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsS2iEnvironmentBuildAppGemfileBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/s2i-environment-build-app/Gemfile", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsS2iEnvironmentBuildAppConfigRu = []byte(`run Proc.new {|env| [200, {"Content-Type" => "text/html"}, [ENV['TEST_ENV']]]}
`)

func testExtendedTestdataBuildsS2iEnvironmentBuildAppConfigRuBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsS2iEnvironmentBuildAppConfigRu, nil
}

func testExtendedTestdataBuildsS2iEnvironmentBuildAppConfigRu() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsS2iEnvironmentBuildAppConfigRuBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/s2i-environment-build-app/config.ru", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsStatusfailAssembleS2iBinAssemble = []byte(`#!/usr/bin/env bash

exit 123123
`)

func testExtendedTestdataBuildsStatusfailAssembleS2iBinAssembleBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsStatusfailAssembleS2iBinAssemble, nil
}

func testExtendedTestdataBuildsStatusfailAssembleS2iBinAssemble() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsStatusfailAssembleS2iBinAssembleBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/statusfail-assemble/.s2i/bin/assemble", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsStatusfailBadcontextdirs2iYaml = []byte(`kind: BuildConfig
apiVersion: v1
metadata:
  name: statusfail-badcontextdirsourcetoimage
spec:
  source:
    git:
      uri: "https://github.com/openshift/ruby-hello-world"
    contextDir: "foobar"
  strategy:
    type: Source
    sourceStrategy:
      from:
        kind: DockerImage
        name: centos/ruby-23-centos7:latest
`)

func testExtendedTestdataBuildsStatusfailBadcontextdirs2iYamlBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsStatusfailBadcontextdirs2iYaml, nil
}

func testExtendedTestdataBuildsStatusfailBadcontextdirs2iYaml() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsStatusfailBadcontextdirs2iYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/statusfail-badcontextdirs2i.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsStatusfailFailedassembleYaml = []byte(`kind: BuildConfig
apiVersion: v1
metadata:
  name: statusfail-assemblescript
spec:
  source:
      type: binary
  strategy:
    type: Source
    sourceStrategy:
      from:
        kind: DockerImage
        name: docker.io/openshift/test-build-simples2i:latest
`)

func testExtendedTestdataBuildsStatusfailFailedassembleYamlBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsStatusfailFailedassembleYaml, nil
}

func testExtendedTestdataBuildsStatusfailFailedassembleYaml() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsStatusfailFailedassembleYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/statusfail-failedassemble.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsStatusfailFetchbuilderimageYaml = []byte(`kind: BuildConfig
apiVersion: v1
metadata:
  name: statusfail-builderimage
spec:
  source:
    git:
      uri: "https://github.com/openshift/ruby-hello-world.git"
  strategy:
    type: Docker
    dockerStrategy:
      from:
        kind: DockerImage
        name: fail/me:latest
`)

func testExtendedTestdataBuildsStatusfailFetchbuilderimageYamlBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsStatusfailFetchbuilderimageYaml, nil
}

func testExtendedTestdataBuildsStatusfailFetchbuilderimageYaml() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsStatusfailFetchbuilderimageYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/statusfail-fetchbuilderimage.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsStatusfailFetchsourcedockerYaml = []byte(`kind: BuildConfig
apiVersion: v1
metadata:
  name: statusfail-fetchsourcedocker
spec:
  source:
    git:
      uri: "https://failure/docker/status"
  strategy:
    type: Docker
    dockerStrategy:
      from:
        kind: DockerImage
        name: centos/ruby-23-centos7:latest
`)

func testExtendedTestdataBuildsStatusfailFetchsourcedockerYamlBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsStatusfailFetchsourcedockerYaml, nil
}

func testExtendedTestdataBuildsStatusfailFetchsourcedockerYaml() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsStatusfailFetchsourcedockerYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/statusfail-fetchsourcedocker.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsStatusfailFetchsources2iYaml = []byte(`kind: BuildConfig
apiVersion: v1
metadata:
  name: statusfail-fetchsourcesourcetoimage
spec:
  source:
    git:
      uri: "https://failure/sourcetoimage/status"
  strategy:
    type: Source
    sourceStrategy:
      from:
        kind: DockerImage
        name: centos/ruby-23-centos7:latest
`)

func testExtendedTestdataBuildsStatusfailFetchsources2iYamlBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsStatusfailFetchsources2iYaml, nil
}

func testExtendedTestdataBuildsStatusfailFetchsources2iYaml() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsStatusfailFetchsources2iYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/statusfail-fetchsources2i.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsStatusfailGenericreasonYaml = []byte(`kind: BuildConfig
apiVersion: v1
metadata:
  name: statusfail-genericfailure
spec:
  source:
    git:
      uri: "https://github.com/sclorg/ruby-ex"
  strategy:
    type: Source
    sourceStrategy:
      from:
        kind: DockerImage
        name: centos/ruby-23-centos7:latest
      scripts: "http://example.org/scripts"
      env:
        - name: http_proxy
          value: "http://%"
`)

func testExtendedTestdataBuildsStatusfailGenericreasonYamlBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsStatusfailGenericreasonYaml, nil
}

func testExtendedTestdataBuildsStatusfailGenericreasonYaml() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsStatusfailGenericreasonYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/statusfail-genericreason.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsStatusfailOomkilledYaml = []byte(`kind: BuildConfig
apiVersion: v1
metadata:
  name: statusfail-oomkilled
spec:
  resources:
    limits:
      memory: 50Mi
  source:
    git:
      uri: "https://github.com/openshift/ruby-hello-world"
  strategy:
    type: Source
    sourceStrategy:
      from:
        kind: DockerImage
        name: centos/ruby-23-centos7:latest
      forcePull: true
`)

func testExtendedTestdataBuildsStatusfailOomkilledYamlBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsStatusfailOomkilledYaml, nil
}

func testExtendedTestdataBuildsStatusfailOomkilledYaml() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsStatusfailOomkilledYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/statusfail-oomkilled.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsStatusfailPostcommithookYaml = []byte(`kind: BuildConfig
apiVersion: v1
metadata:
  name: statusfail-postcommithook
spec:
  source:
    git:
      uri: "https://github.com/openshift/ruby-hello-world.git"
  postCommit:
    args:
      - failme
  strategy:
    sourceStrategy:
      from:
        kind: DockerImage
        name: docker.io/openshift/test-build-simples2i:latest
    type: Source
`)

func testExtendedTestdataBuildsStatusfailPostcommithookYamlBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsStatusfailPostcommithookYaml, nil
}

func testExtendedTestdataBuildsStatusfailPostcommithookYaml() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsStatusfailPostcommithookYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/statusfail-postcommithook.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsStatusfailPushtoregistryYaml = []byte(`kind: BuildConfig
apiVersion: v1
metadata:
  name: statusfail-pushtoregistry
spec:
  source:
    git:
      uri: "https://github.com/openshift/ruby-hello-world.git"
  output:
    to:
      kind: DockerImage
      # Bug 1746499: Image without tag should push with <imageid>:latest
      name: bogus.registry/image
  strategy:
    sourceStrategy:
      from:
        kind: DockerImage
        name: docker.io/openshift/test-build-simples2i:latest
    type: Source
`)

func testExtendedTestdataBuildsStatusfailPushtoregistryYamlBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsStatusfailPushtoregistryYaml, nil
}

func testExtendedTestdataBuildsStatusfailPushtoregistryYaml() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsStatusfailPushtoregistryYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/statusfail-pushtoregistry.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsTestAuthBuildYaml = []byte(`apiVersion: v1
kind: Template
labels:
  template: gitserver
metadata:
  name: gitserver
parameters:
- name: SOURCE_URL
  required: true
- name: SOURCE_SECRET
  required: true
objects:
- apiVersion: v1
  kind: ImageStream
  metadata:
    name: output
- apiVersion: v1
  kind: BuildConfig
  metadata:
    name: gitauthtest
  spec:
    source:
      git:
        uri: ${SOURCE_URL}
      type: Git
      sourceSecret:
        name: ${SOURCE_SECRET}
    strategy:
      sourceStrategy:
        env:
        - name: BUILD_LOGLEVEL
          value: "5"
        from:
          kind: DockerImage
          name: docker.io/openshift/test-build-simples2i:latest
      type: Source
    # this test specifically does a push, to help exercise the code that sets
    # environment variables on build pods (i.e., by having a source secret and
    # a push secret, multiple environment variables need to be set correctly for
    # the build to succeed).
    output:
      to:
        kind: ImageStreamTag
        name: output:latest
`)

func testExtendedTestdataBuildsTestAuthBuildYamlBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsTestAuthBuildYaml, nil
}

func testExtendedTestdataBuildsTestAuthBuildYaml() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsTestAuthBuildYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/test-auth-build.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsTestBcWithPrRefYaml = []byte(`kind: List
apiVersion: v1
items:
- kind: ImageStream
  apiVersion: v1
  metadata:
    name: bc-with-pr-ref
- kind: ImageStream
  apiVersion: v1
  metadata:
    name: bc-with-pr-ref-docker
- kind: BuildConfig
  apiVersion: v1
  metadata:
    name: bc-with-pr-ref
  spec:
    source:
      type: Git
      git:
        uri: https://github.com/sclorg/django-ex.git
        ref: refs/pull/121/head
    strategy:
      type: Source
      sourceStrategy:
        from:
          kind: ImageStreamTag
          name: python:latest
          namespace: openshift
    output:
      to:
        kind: ImageStreamTag
        name: bc-with-pr-ref:latest
- kind: BuildConfig
  apiVersion: v1
  metadata:
    name: bc-with-pr-ref-docker
  spec:
    source:
      type: Git
      git:
        uri: https://github.com/sclorg/django-ex.git
        ref: refs/pull/121/head
      dockerfile: FROM centos/python-36-centos7
    strategy:
      type: Docker
      dockerStrategy:
        from:
          kind: DockerImage
          name: centos/python-36-centos7
    output:
      to:
        kind: ImageStreamTag
        name: bc-with-pr-ref-docker:latest
`)

func testExtendedTestdataBuildsTestBcWithPrRefYamlBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsTestBcWithPrRefYaml, nil
}

func testExtendedTestdataBuildsTestBcWithPrRefYaml() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsTestBcWithPrRefYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/test-bc-with-pr-ref.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsTestBuildAppDockerfile = []byte(`FROM centos/ruby-25-centos7
USER default
EXPOSE 8080
ENV RACK_ENV production
ENV RAILS_ENV production
COPY . /opt/app-root/src/
RUN scl enable rh-ruby25 "bundle install"
CMD ["scl", "enable", "rh-ruby25", "./run.sh"]

USER default
`)

func testExtendedTestdataBuildsTestBuildAppDockerfileBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsTestBuildAppDockerfile, nil
}

func testExtendedTestdataBuildsTestBuildAppDockerfile() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsTestBuildAppDockerfileBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/test-build-app/Dockerfile", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsTestBuildAppGemfile = []byte(`source "https://rubygems.org"

gem "rack"
`)

func testExtendedTestdataBuildsTestBuildAppGemfileBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsTestBuildAppGemfile, nil
}

func testExtendedTestdataBuildsTestBuildAppGemfile() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsTestBuildAppGemfileBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/test-build-app/Gemfile", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsTestBuildAppConfigRu = []byte(`run Proc.new {|env| [200, {"Content-Type" => "text/html"}, [ENV['TEST_ENV']]]}
`)

func testExtendedTestdataBuildsTestBuildAppConfigRuBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsTestBuildAppConfigRu, nil
}

func testExtendedTestdataBuildsTestBuildAppConfigRu() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsTestBuildAppConfigRuBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/test-build-app/config.ru", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsTestBuildClusterConfigYaml = []byte(`kind: List
apiVersion: v1
metadata: {}
items:
- apiVersion: build.openshift.io/v1
  kind: BuildConfig
  metadata:
    name: simple-s2i-build
  spec:
    source:
      git:
        uri: https://github.com/sclorg/nodejs-ex
      type: Git
    strategy:
      sourceStrategy:
        from:
          kind: DockerImage
          name: docker.io/openshift/test-build-simples2i:latest
      type: Source
- apiVersion: build.openshift.io/v1
  kind: BuildConfig
  metadata:
    name: verbose-s2i-build
  spec:
    source:
      git:
        uri: https://github.com/sclorg/nodejs-ex
      type: Git
    strategy:
      sourceStrategy:
        env:
        - name: BUILD_LOGLEVEL
          value: "5"
        from:
          kind: DockerImage
          name: docker.io/openshift/test-build-simples2i:latest
      type: Source
`)

func testExtendedTestdataBuildsTestBuildClusterConfigYamlBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsTestBuildClusterConfigYaml, nil
}

func testExtendedTestdataBuildsTestBuildClusterConfigYaml() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsTestBuildClusterConfigYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/test-build-cluster-config.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsTestBuildPodsvcJson = []byte(`{
  "kind": "Template",
  "apiVersion": "v1",
  "parameters": [
    {
      "name": "IMAGE_NAME",
      "required": true
    }
  ],
  "objects": [
    {
      "kind":"Pod",
      "apiVersion":"v1",
      "metadata":{
        "name":"build-test-pod",
        "labels":{
          "name":"build-test-pod"
        }
      },
      "spec":{
        "containers":[
          {
            "name":"test",
            "image":"${IMAGE_NAME}",
            "readinessProbe": {
              "httpGet": {
                "port": 8080
              }
            }
          }
        ],
        "dnsPolicy":"ClusterFirst"
      }
    },
    {
      "kind": "Service",
      "apiVersion":"v1",
      "metadata": {
        "name":"build-test-svc"
      },
      "spec": {
        "ports": [
          {
            "name": "8080-tcp",
            "protocol": "TCP",
            "port": 8080,
            "targetPort": 8080
          }
        ],
        "selector": {
          "name": "build-test-pod"
        }
      }
    }
  ]
}
`)

func testExtendedTestdataBuildsTestBuildPodsvcJsonBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsTestBuildPodsvcJson, nil
}

func testExtendedTestdataBuildsTestBuildPodsvcJson() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsTestBuildPodsvcJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/test-build-podsvc.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsTestBuildProxyYaml = []byte(`kind: List
apiVersion: v1
metadata: {}
items:
- kind: ImageStream
  apiVersion: v1
  metadata:
    name: origin-ruby-sample
    creationTimestamp: 
  spec: {}
  status:
    dockerImageRepository: ''
- kind: BuildConfig
  apiVersion: v1
  metadata:
    name: sample-build
    creationTimestamp: 
  spec:
    triggers:
    - type: imageChange
      imageChange: {}
    source:
      type: Git
      git:
        uri: https://github.com/openshift/ruby-hello-world.git
        httpProxy: 127.0.0.1:3128
        httpsProxy: 127.0.0.1:3128
    strategy:
      type: Source
      sourceStrategy:
        env:
        - name: HTTPS_PROXY
          value: 127.0.0.1:3128
        - name: HTTP_PROXY
          value: 127.0.0.1:3128
        from:
          kind: DockerImage
          name: docker.io/openshift/test-build-simples2i:latest
- kind: BuildConfig
  apiVersion: v1
  metadata:
    name: sample-s2i-build-noproxy
    creationTimestamp: 
  spec:
    triggers:
    - type: imageChange
      imageChange: {}
    source:
      type: Git
      git:
        uri: https://github.com/openshift/ruby-hello-world.git
        httpProxy: http://gituser:password@proxy1.com
        httpsProxy: https://gituser:password@proxy2.com
        noProxy: github.com
    strategy:
      type: Source
      sourceStrategy:
        from:
          kind: DockerImage
          name: docker.io/openshift/test-build-simples2i:latest
        env:
        - name: SOME_HTTP_PROXY
          value: https://envuser:password@proxy3.com
        - name: SOME_HTTPS_PROXY
          value: https://envuser:password@proxy4.com
- kind: BuildConfig
  apiVersion: v1
  metadata:
    name: sample-docker-build-noproxy
    creationTimestamp: 
  spec:
    triggers:
    - type: imageChange
      imageChange: {}
    source:
      type: Git
      git:
        uri: https://github.com/openshift/ruby-hello-world.git
        httpProxy: http://gituser:password@proxy1.com
        httpsProxy: https://gituser:password@proxy2.com
        noProxy: github.com
    strategy:
      type: Docker
      dockerStrategy:
        from:
          kind: DockerImage
          name: docker.io/centos/ruby-25-centos7
        env:
        - name: SOME_HTTP_PROXY
          value: https://envuser:password@proxy3.com
        - name: SOME_HTTPS_PROXY
          value: https://envuser:password@proxy4.com
`)

func testExtendedTestdataBuildsTestBuildProxyYamlBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsTestBuildProxyYaml, nil
}

func testExtendedTestdataBuildsTestBuildProxyYaml() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsTestBuildProxyYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/test-build-proxy.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsTestBuildRevisionJson = []byte(`{
  "kind": "List",
  "apiVersion": "v1",
  "metadata": {},
  "items": [
    {
      "kind": "BuildConfig",
      "apiVersion": "v1",
      "metadata": {
        "name": "sample-build",
        "creationTimestamp": null
      },
      "spec": {
        "source": {
          "type": "Git",
          "git": {
            "uri": "git://github.com/openshift/ruby-hello-world.git"
          }
        },
        "strategy": {
          "type": "Source",
          "sourceStrategy": {
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/openshift/test-build-simples2i:latest"
            }
          }
        },
        "resources": {}
      },
      "status": {
        "lastVersion": 0
      }
    }
  ]
}
`)

func testExtendedTestdataBuildsTestBuildRevisionJsonBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsTestBuildRevisionJson, nil
}

func testExtendedTestdataBuildsTestBuildRevisionJson() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsTestBuildRevisionJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/test-build-revision.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsTestBuildYaml = []byte(`kind: List
apiVersion: v1
metadata: {}
items:
- kind: ImageStream
  apiVersion: v1
  metadata:
    name: origin-ruby-sample
    creationTimestamp: 
  spec: {}
  status:
    dockerImageRepository: ''
- kind: Secret
  apiVersion: v1
  metadata:
    name: webhooksecret
    creationTimestamp: 
  data:
    WebHookSecretKey: c2VjcmV0dmFsdWUx
  type: Opaque
- kind: BuildConfig
  apiVersion: v1
  metadata:
    name: sample-build
    creationTimestamp: 
  spec:
    triggers:
    - type: ImageChange
      imageChange: {}
    - type: Generic
      generic:
        secret: "mysecret"
        secretReference: 
          name: "webhooksecret"
    source:
      type: Git
      git:
        uri: git://github.com/openshift/ruby-hello-world.git
    strategy:
      type: Source
      sourceStrategy:
        env:
        - name: FOO
          value: test
        - name: BAR
          value: test
        - name: BUILD_LOGLEVEL
          value: '5'
        from:
          kind: DockerImage
          name: centos/ruby-25-centos7
    resources: {}
  status:
    lastVersion: 0
- kind: BuildConfig
  apiVersion: v1
  metadata:
    name: sample-verbose-build
    creationTimestamp: 
  spec:
    triggers:
    - type: imageChange
      imageChange: {}
    source:
      type: Git
      git:
        uri: git://github.com/openshift/ruby-hello-world.git
    strategy:
      type: Source
      sourceStrategy:
        env:
        - name: FOO
          value: test
        - name: BAR
          value: test
        - name: BUILD_LOGLEVEL
          value: '5'
        from:
          kind: DockerImage
          name: centos/ruby-25-centos7
    resources: {}
  status:
    lastVersion: 0
- kind: BuildConfig
  apiVersion: v1
  metadata:
    name: sample-build-binary
    creationTimestamp: 
  spec:
    triggers:
    - type: imageChange
      imageChange: {}
    source:
      type: Binary
      binary: {}
    strategy:
      type: Docker
      dockerStrategy:
        env:
        - name: FOO
          value: test
        - name: BAR
          value: test
        - name: BUILD_LOGLEVEL
          value: '5'
        from:
          kind: DockerImage
          name: centos/ruby-25-centos7
    resources: {}
  status:
    lastVersion: 0
- kind: BuildConfig
  apiVersion: v1
  metadata:
    name: sample-build-github-archive
    creationTimestamp: 
  spec:
    triggers:
    - type: imageChange
      imageChange: {}
    source:
      type: Binary
      binary: {}
      contextDir: ruby-hello-world-master
    strategy:
      type: Docker
      dockerStrategy:
        env:
        - name: FOO
          value: test
        - name: BAR
          value: test
        - name: BUILD_LOGLEVEL
          value: '5'
        from:
          kind: DockerImage
          name: centos/ruby-25-centos7
    resources: {}
  status:
    lastVersion: 0
- kind: BuildConfig
  apiVersion: v1
  metadata:
    name: sample-build-binary-invalidnodeselector
    creationTimestamp: 
  spec:
    triggers:
    - type: imageChange
      imageChange: {}
    source:
      type: Binary
      binary: {}
    strategy:
      type: Docker
      dockerStrategy:
        env:
        - name: FOO
          value: test
        - name: BAR
          value: test
        - name: BUILD_LOGLEVEL
          value: '5'
        from:
          kind: DockerImage
          name: centos/ruby-25-centos7
    resources: {}
    nodeSelector:
      nodelabelkey: nodelabelvalue
  status:
    lastVersion: 0
- kind: BuildConfig
  apiVersion: v1
  metadata:
    name: sample-build-docker-args
    creationTimestamp: 
  spec:
    triggers:
    - type: ImageChange
      imageChange: {}
    source:
      type: Dockerfile
      dockerfile: |-
        FROM centos/ruby-25-centos7
        ARG foo
        RUN echo $foo
    strategy:
      type: Docker
      dockerStrategy:
        from:
          kind: DockerImage
          name: docker.io/busybox:latest
    resources: {}
    postCommit: {}
    nodeSelector: 
  status:
    lastVersion: 0
- kind: BuildConfig
  apiVersion: v1
  metadata:
    name: sample-build-docker-args-preset
    creationTimestamp: 
  spec:
    triggers:
    - type: ImageChange
      imageChange: {}
    source:
      type: Dockerfile
      dockerfile: |-
        FROM centos/ruby-25-centos7
        ARG foo
        RUN echo $foo
    strategy:
      type: Docker
      dockerStrategy:
        from:
          kind: DockerImage
          name: docker.io/busybox:latest
        buildArgs:
        - name: foo
          value: default
    resources: {}
    postCommit: {}
    nodeSelector: 
  status:
    lastVersion: 0
`)

func testExtendedTestdataBuildsTestBuildYamlBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsTestBuildYaml, nil
}

func testExtendedTestdataBuildsTestBuildYaml() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsTestBuildYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/test-build.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsTestBuildconfigsecretinjectorYaml = []byte(`kind: List
apiVersion: v1
items:
- kind: Secret
  apiVersion: v1
  type: kubernetes.io/basic-auth
  metadata:
    name: secret1
    annotations:
      build.openshift.io/source-secret-match-uri-1: '*://*.example.com/*'
  data:
    username: AA==
- kind: Secret
  apiVersion: v1
  type: kubernetes.io/ssh-auth
  metadata:
    name: secret2
    annotations:
      build.openshift.io/source-secret-match-uri-1: '*://*.example.com/*'
  data:
    ssh-privatekey: AA==
- kind: Secret
  apiVersion: v1
  type: kubernetes.io/basic-auth
  metadata:
    name: secret3
    annotations:
      build.openshift.io/source-secret-match-uri-1: 'https://*.com/*'
  data:
    username: AA==
- kind: BuildConfig
  apiVersion: v1
  metadata:
    name: test1
  spec:
    source:
      type: Git
      git:
        uri: https://server1.example.com/path
    strategy:
      type: Source
      sourceStrategy:
        from:
          kind: ImageStream
          name: test
- kind: BuildConfig
  apiVersion: v1
  metadata:
    name: test2
  spec:
    source:
      type: Git
      git:
        uri: ssh://server1.example.com/path
    strategy:
      type: Source
      sourceStrategy:
        from:
          kind: ImageStream
          name: test
- kind: BuildConfig
  apiVersion: v1
  metadata:
    name: test3
  spec:
    source:
      type: Git
      git:
        uri: https://test.com/path
    strategy:
      type: Source
      sourceStrategy:
        from:
          kind: ImageStream
          name: test
- kind: BuildConfig
  apiVersion: v1
  metadata:
    name: test4
  spec:
    source:
      type: Git
      git:
        uri: http://test.com/path
    strategy:
      type: Source
      sourceStrategy:
        from:
          kind: ImageStream
          name: test
`)

func testExtendedTestdataBuildsTestBuildconfigsecretinjectorYamlBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsTestBuildconfigsecretinjectorYaml, nil
}

func testExtendedTestdataBuildsTestBuildconfigsecretinjectorYaml() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsTestBuildconfigsecretinjectorYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/test-buildconfigsecretinjector.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsTestCdsDockerbuildJson = []byte(`{
  "kind":"BuildConfig",
  "apiVersion":"v1",
  "metadata":{
    "name":"docker-build"
  },
  "spec":{
    "completionDeadlineSeconds": 5,
    "triggers":[],
    "source":{
      "type":"Dockerfile",
      "dockerfile":"FROM docker.io/busybox:latest\nRUN sleep 10m"
    },
    "strategy":{
      "type":"Docker",
      "dockerStrategy":{
        "from":{
          "kind":"DockerImage",
          "name":"docker.io/busybox:latest"
        }
      }
    }
  }
}
`)

func testExtendedTestdataBuildsTestCdsDockerbuildJsonBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsTestCdsDockerbuildJson, nil
}

func testExtendedTestdataBuildsTestCdsDockerbuildJson() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsTestCdsDockerbuildJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/test-cds-dockerbuild.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsTestCdsSourcebuildJson = []byte(`{
  "kind": "List",
  "apiVersion": "v1",
  "metadata": {},
  "items": [
    {
      "kind": "ImageStream",
      "apiVersion": "v1",
      "metadata": {
        "name": "origin-ruby-sample"
      },
      "spec": {},
      "status": {
        "dockerImageRepository": ""
      }
    },
    {
      "kind": "BuildConfig",
      "apiVersion": "v1",
      "metadata": {
        "name": "source-build"
      },
      "spec": {
        "completionDeadlineSeconds": 5,
        "triggers": [],
        "source":{
          "type":"Dockerfile",
          "dockerfile":"FROM centos:7\nRUN sleep 10m"
        },
        "strategy": {
          "type": "Source",
          "sourceStrategy": {
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/busybox:latest"
            }
          }
        }
      }
    }
  ]
}
`)

func testExtendedTestdataBuildsTestCdsSourcebuildJsonBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsTestCdsSourcebuildJson, nil
}

func testExtendedTestdataBuildsTestCdsSourcebuildJson() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsTestCdsSourcebuildJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/test-cds-sourcebuild.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsTestContextBuildJson = []byte(`{
  "kind": "List",
  "apiVersion": "v1",
  "metadata": {},
  "items": [
    {
      "kind": "BuildConfig",
      "apiVersion": "v1",
      "metadata": {
        "name": "dockercontext"
      },
      "spec": {
        "triggers": [],
        "source": {
          "type": "binary",
          "binary": {},
          "contextDir": "2.3"
        },
        "strategy": {
          "type": "Docker",
          "dockerStrategy": {
            "env": [
              {
                "name": "BUILD_LOGLEVEL",
                "value": "5"
              }
            ]
          }
        }
      }
    },
    {
      "kind": "BuildConfig",
      "apiVersion": "v1",
      "metadata": {
        "name": "s2icontext"
      },
      "spec": {
        "triggers": [],
        "source": {
          "type": "Git",
          "git": {
            "uri":"https://github.com/sclorg/s2i-ruby-container"
          },
          "contextDir": "2.3/test/puma-test-app"
        },
        "strategy": {
          "type": "Source",
          "sourceStrategy": {
            "env": [
              {
                "name": "BUILD_LOGLEVEL",
                "value": "5"
              }
            ],
            "from": {
              "kind": "DockerImage",
              "name": "centos/ruby-23-centos7"
            }
          }
        },
        "output": {
          "to": {
            "kind": "ImageStreamTag",
            "name": "test:latest"
          }
        }
      }
    },
    {
      "kind": "ImageStream",
      "apiVersion": "v1",
      "metadata": {
        "name": "test"
      }
    },    
    {
      "kind": "DeploymentConfig",
      "apiVersion": "v1",
      "metadata": {
        "name": "frontend"
      },
      "spec": {
        "triggers": [
          {
            "type": "ImageChange",
            "imageChangeParams": {
              "automatic": true,
              "containerNames": [
                "frontend"
              ],
              "from": {
                "kind": "ImageStreamTag",
                "name": "test:latest"
              }
            }
          }
        ],
        "replicas": 1,
        "selector": {
          "name":"frontend"
        },
        "template": {
          "metadata": {
            "labels": {
              "name": "frontend"
            }
          },
          "spec": {
            "containers": [
              {
                "name": "frontend",
                "image": "",
                "ports": [
                  {
                    "containerPort": 8080,
                    "protocol": "TCP"
                  }
                ]
              }
            ]
          }
        }
      }
    },
    {
      "kind": "Service",
      "apiVersion": "v1",
      "metadata": {
        "name": "frontend"
      },
      "spec": {
        "ports": [
          {
            "name": "web",
            "protocol": "TCP",
            "port": 5432,
            "targetPort": 8080,
            "nodePort": 0
          }
        ],
        "selector": {
          "name": "frontend"
        },
        "type": "ClusterIP",
        "sessionAffinity": "None"
      },
      "status": {
        "loadBalancer": {}
      }
    }
  ]
}
`)

func testExtendedTestdataBuildsTestContextBuildJsonBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsTestContextBuildJson, nil
}

func testExtendedTestdataBuildsTestContextBuildJson() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsTestContextBuildJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/test-context-build.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsTestCustomBuildYaml = []byte(`kind: List
apiVersion: v1
items:
- kind: ImageStream
  apiVersion: v1
  metadata:
    name: sample-custom
- kind: BuildConfig
  apiVersion: v1
  metadata:
    name: sample-custom-build
    labels:
      name: sample-custom-build
    annotations:
      template.alpha.openshift.io/wait-for-ready: 'true'
  spec:
    strategy:
      type: Custom
      customStrategy:
        forcePull: true
        from:
          kind: ImageStreamTag
          name: custom-builder-image:latest
    output:
      to:
        kind: ImageStreamTag
        name: sample-custom:latest
`)

func testExtendedTestdataBuildsTestCustomBuildYamlBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsTestCustomBuildYaml, nil
}

func testExtendedTestdataBuildsTestCustomBuildYaml() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsTestCustomBuildYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/test-custom-build.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsTestDockerAppDockerfile = []byte(`FROM image-registry.openshift-image-registry.svc:5000/openshift/nodejs
RUN touch /tmp/foo`)

func testExtendedTestdataBuildsTestDockerAppDockerfileBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsTestDockerAppDockerfile, nil
}

func testExtendedTestdataBuildsTestDockerAppDockerfile() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsTestDockerAppDockerfileBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/test-docker-app/Dockerfile", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsTestDockerBuildPullsecretJson = []byte(`{
  "kind": "List",
  "apiVersion": "v1",
  "metadata": {},
  "items": [{
    "kind": "ImageStream",
    "apiVersion": "v1",
    "metadata": {
      "name": "image1",
      "creationTimestamp": null
    },
    "spec": {},
    "status": {
      "dockerImageRepository": ""
    }
  }, {
    "kind": "BuildConfig",
    "apiVersion": "v1",
    "metadata": {
      "name": "docker-build",
      "creationTimestamp": null,
      "labels": {
        "name": "docker-build"
      }
    },
    "spec": {
      "source": {
        "dockerfile": "FROM docker.io/busybox:latest"
      },
      "strategy": {
        "type": "Docker",
        "dockerStrategy": {
          "from": {
            "kind": "DockerImage",
            "name": "docker.io/busybox:latest"
          }
        }
      },
      "output": {
        "to": {
          "kind": "ImageStreamTag",
          "name": "image1:latest"
        }
      }
    }
  }, {
    "kind": "BuildConfig",
    "apiVersion": "v1",
    "metadata": {
      "name": "docker-build-pull",
      "creationTimestamp": null,
      "labels": {
        "name": "docker-build-pull"
      }
    },
    "spec": {
      "source": {
        "dockerfile": "FROM docker.io/busybox:latest"
      },
      "strategy": {
        "type": "Docker",
        "dockerStrategy": {
          "from": {
            "kind": "ImageStreamTag",
            "name": "image1:latest"
          },
          "forcePull": true
        }
      }
    }
  }]
}
`)

func testExtendedTestdataBuildsTestDockerBuildPullsecretJsonBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsTestDockerBuildPullsecretJson, nil
}

func testExtendedTestdataBuildsTestDockerBuildPullsecretJson() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsTestDockerBuildPullsecretJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/test-docker-build-pullsecret.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsTestDockerBuildJson = []byte(`{
  "kind":"BuildConfig",
  "apiVersion":"v1",
  "metadata":{
    "name":"test",
    "labels":{
      "name":"test"
    }
  },
  "spec":{
    "triggers":[],
    "source":{
      "git": {
        "uri":"https://github.com/sclorg/nodejs-ex"        
      },
      "dockerfile": "FROM docker.io/busybox:latest"
    },
    "strategy":{
      "type":"Docker",
      "dockerStrategy":{
        "from":{
          "kind":"DockerImage",
          "name":"docker.io/busybox:latest"
        }
      }
    },
    "output":{
      "to":{
        "kind":"ImageStreamTag",
        "name":"test:latest"
      },
      "imageLabels": [
        {
          "name": "user-specified-label",
          "value": "arbitrary-value"
        },
        {
          "name": "io.k8s.display-name",
          "value": "overridden"
        },
        {
          "name": "io.openshift.builder-version",
          "value": "overridden2"
        }
      ]
    }
  }
}
`)

func testExtendedTestdataBuildsTestDockerBuildJsonBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsTestDockerBuildJson, nil
}

func testExtendedTestdataBuildsTestDockerBuildJson() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsTestDockerBuildJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/test-docker-build.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsTestDockerNoOutputnameJson = []byte(`{
  "kind": "BuildConfig",
  "apiVersion": "v1",
  "metadata": {
    "name": "test-docker",
    "labels": {
      "name": "test-docker"
    }
  },
  "spec": {
    "triggers": [],
    "source": {
      "type": "Git",
      "dockerfile": "FROM docker.io/busybox:latest"
    },
    "strategy": {
      "type": "Docker",
      "dockerStrategy": {
        "env": [
          {
            "name": "BUILD_LOGLEVEL",
            "value": "5"
          }
        ],
        "from": {
          "kind": "DockerImage",
          "name": "docker.io/busybox:latest"
        }
      }
    }
  }
}`)

func testExtendedTestdataBuildsTestDockerNoOutputnameJsonBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsTestDockerNoOutputnameJson, nil
}

func testExtendedTestdataBuildsTestDockerNoOutputnameJson() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsTestDockerNoOutputnameJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/test-docker-no-outputname.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsTestEnvBuildJson = []byte(`{
  "kind":"BuildConfig",
  "apiVersion":"v1",
  "metadata":{
    "name":"test",
    "labels":{
      "name":"test"
    }
  },
  "spec":{
    "triggers":[],
    "source":{
      "type":"Binary"
    },
    "strategy":{
      "type":"Source",
      "sourceStrategy":{
        "from":{
          "kind":"DockerImage",
          "name":"centos/ruby-25-centos7"
        }
      }
    },
    "output":{
      "to":{
        "kind":"ImageStreamTag",
        "name":"test:latest"
      }
    }
  }
}
`)

func testExtendedTestdataBuildsTestEnvBuildJsonBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsTestEnvBuildJson, nil
}

func testExtendedTestdataBuildsTestEnvBuildJson() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsTestEnvBuildJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/test-env-build.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsTestImagechangetriggersYaml = []byte(`kind: List
apiVersion: v1
items:
- kind: ImageStream
  apiVersion: v1
  metadata:
    name: nodejs-ex
  spec:
    tags:
    - name: latest
      from:
        kind: DockerImage
        name: centos/nodejs-6-centos7:latest

- kind: BuildConfig
  apiVersion: v1
  metadata:
    name: bc-source
  spec:
    source:
      type: Git
      git:
        uri: https://github.com/sclorg/nodejs-ex.git
    strategy:
      type: Source
      sourceStrategy:
        from:
          kind: ImageStreamTag
          name: nodejs-ex:latest
    triggers:
    - type: ImageChange
      imageChange:
        from:
          kind: ImageStreamTag
          name: nodejs-ex:latest

- kind: BuildConfig
  apiVersion: v1
  metadata:
    name: bc-docker
  spec:
    source:
      type: Dockerfile
      dockerfile: FROM nodejs
    strategy:
      type: Docker
      dockerStrategy:
        from:
          kind: ImageStreamTag
          name: nodejs-ex:latest
    triggers:
    - type: ImageChange
      imageChange:
        from:
          kind: ImageStreamTag
          name: nodejs-ex:latest

- kind: BuildConfig
  apiVersion: v1
  metadata:
    name: bc-custom
  spec:
    strategy:
      type: Custom
      customStrategy:
        from:
          kind: ImageStreamTag
          name: nodejs-ex:latest
    triggers:
    - type: ImageChange
      imageChange:
        from:
          kind: ImageStreamTag
          name: nodejs-ex:latest

- kind: BuildConfig
  apiVersion: v1
  metadata:
    name: bc-jenkins
  spec:
    strategy:
      type: Jenkins
      jenkinsPipelineStrategy:
        jenkinsfile: node {}
    triggers:
    - type: ImageChange
      imageChange:
        from:
          kind: ImageStreamTag
          name: nodejs-ex:latest
`)

func testExtendedTestdataBuildsTestImagechangetriggersYamlBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsTestImagechangetriggersYaml, nil
}

func testExtendedTestdataBuildsTestImagechangetriggersYaml() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsTestImagechangetriggersYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/test-imagechangetriggers.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsTestImageresolutionCustomBuildYaml = []byte(`apiVersion: v1
kind: List
metadata: {}
items:
- apiVersion: v1
  kind: Build
  metadata:
    labels:
      build: imagecustombuild
    name: imagecustombuild
  spec:
    output:
      to:
        kind: ImageStreamTag
        name: imagesourceapp:latest
    source:
      git:
        uri: https://github.com/openshift/ruby-hello-world.git
      images:
      - from:
          kind: ImageStreamTag
          name: inputimage:latest
        paths:
        - destinationDir: injected/dir
          sourcePath: /opt/rh/rh-ruby25/root/usr/bin/ruby
    strategy:
      customStrategy:
        from:
          kind: ImageStreamTag
          name: inputimage:latest
`)

func testExtendedTestdataBuildsTestImageresolutionCustomBuildYamlBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsTestImageresolutionCustomBuildYaml, nil
}

func testExtendedTestdataBuildsTestImageresolutionCustomBuildYaml() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsTestImageresolutionCustomBuildYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/test-imageresolution-custom-build.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsTestImageresolutionDockerBuildYaml = []byte(`apiVersion: v1
kind: List
metadata: {}
items:
- apiVersion: v1
  kind: Build
  metadata:
    labels:
      build: imagedockerbuild
    name: imagedockerbuild
  spec:
    output:
      to:
        kind: ImageStreamTag
        name: imagedockerapp:latest
    source:
      git:
        uri: https://github.com/openshift/ruby-hello-world.git
      images:
      - from:
          kind: ImageStreamTag
          name: inputimage:latest
        paths:
        - destinationDir: injected/dir
          sourcePath: /opt/rh/rh-ruby25/root/usr/bin/ruby
    strategy:
      dockerStrategy:
        from:
          kind: ImageStreamTag
          name: inputimage:latest
`)

func testExtendedTestdataBuildsTestImageresolutionDockerBuildYamlBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsTestImageresolutionDockerBuildYaml, nil
}

func testExtendedTestdataBuildsTestImageresolutionDockerBuildYaml() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsTestImageresolutionDockerBuildYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/test-imageresolution-docker-build.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsTestImageresolutionS2iBuildYaml = []byte(`apiVersion: v1
kind: List
metadata: {}
items:
- apiVersion: v1
  kind: Build
  metadata:
    labels:
      build: imagesourcebuild
    name: imagesourcebuild
  spec:
    output:
      to:
        kind: ImageStreamTag
        name: imagesourceapp:latest
    source:
      git:
        uri: https://github.com/openshift/ruby-hello-world.git
      images:
      - from:
          kind: ImageStreamTag
          name: inputimage:latest
        paths:
        - destinationDir: injected/dir
          sourcePath: /opt/rh/rh-ruby25/root/usr/bin/ruby
    strategy:
      sourceStrategy:
        from:
          kind: ImageStreamTag
          name: inputimage:latest
`)

func testExtendedTestdataBuildsTestImageresolutionS2iBuildYamlBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsTestImageresolutionS2iBuildYaml, nil
}

func testExtendedTestdataBuildsTestImageresolutionS2iBuildYaml() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsTestImageresolutionS2iBuildYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/test-imageresolution-s2i-build.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsTestImagesourceBuildconfigYaml = []byte(`apiVersion: v1
kind: List
metadata: {}
items:
- apiVersion: v1
  kind: BuildConfig
  metadata:
    labels:
      build: inputimage
    name: inputimage
  spec:
    output:
      to:
        kind: ImageStreamTag
        name: inputimage:latest
    source:
      dockerfile: |-
        # Bug 1694859: ensure symlinks are followed
        FROM ruby
        RUN mkdir -p /opt/app-root/test-links && \
            ln -s ../../rh/rh-ruby25/root/usr/bin /opt/app-root/test-links/bin
    strategy:
      dockerStrategy:
        from: 
          kind: ImageStreamTag
          name: ruby:2.5
          namespace: openshift
- apiVersion: v1
  kind: BuildConfig
  metadata:
    labels:
      build: imagesourcebuild
    name: imagesourcebuildconfig
  spec:
    output:
      to:
        kind: ImageStreamTag
        name: imagesourceapp:latest
    source:
      git:
        uri: https://github.com/openshift/ruby-hello-world.git
      images:
      - from:
          kind: ImageStreamTag
          name: inputimage:latest
        paths:
        # Bug 1698152: ensure image source copy behavior is correct
        - destinationDir: injected/opt/app-root/test-links
          sourcePath: /opt/app-root/test-links/.
        - destinationDir: injected/opt/rh/rh-ruby-25/root/usr/bin
          sourcePath: /opt/rh/rh-ruby25/root/usr/bin/ruby
    strategy:
      sourceStrategy:
        from:
          kind: ImageStreamTag
          name: ruby:latest
          namespace: openshift
- apiVersion: v1
  kind: BuildConfig
  metadata:
    labels:
      build: imagedockerbuild
    name: imagedockerbuildconfig
  spec:
    output:
      to:
        kind: ImageStreamTag
        name: imagedockerapp:latest
    source:
      git:
        uri: https://github.com/openshift/ruby-hello-world.git
      images:
      - from:
          kind: ImageStreamTag
          name: inputimage:latest
        paths:
        # Bug 1698152: ensure image source copy behavior is correct
        - destinationDir: injected/opt/app-root/test-links
          sourcePath: /opt/app-root/test-links/.
        - destinationDir: injected/opt/rh/rh-ruby-25/root/usr/bin
          sourcePath: /opt/rh/rh-ruby25/root/usr/bin/ruby
    strategy:
      dockerStrategy: {}

- apiVersion: v1
  kind: ImageStream
  metadata:
    name: inputimage
  spec: {}
- apiVersion: v1
  kind: ImageStream
  metadata:
    name: imagesourceapp
  spec: {}
- apiVersion: v1
  kind: ImageStream
  metadata:
    name: imagedockerapp
  spec: {}

- apiVersion: v1
  kind: DeploymentConfig
  metadata:
    name: imagesourceapp
  spec:
    replicas: 1
    selector:
      app: imagesourceapp
      deploymentconfig: imagesourceapp
    strategy:
      type: Rolling
    template:
      metadata:
        labels:
          app: imagesourceapp
          deploymentconfig: imagesourceapp
      spec:
        containers:
        - image:
          imagePullPolicy: Always
          readinessProbe:
            httpGet:
              port: 8080
          name: imagesourceapp
          ports:
          - containerPort: 8080
            protocol: TCP
          - containerPort: 8888
            protocol: TCP
          terminationMessagePath: /dev/termination-log
        dnsPolicy: ClusterFirst
        restartPolicy: Always
        securityContext: {}
    triggers:
    - imageChangeParams:
        automatic: true
        containerNames:
        - imagesourceapp
        from:
          kind: ImageStreamTag
          name: imagesourceapp:latest
      type: ImageChange
    - type: ConfigChange

- apiVersion: v1
  kind: DeploymentConfig
  metadata:
    name: imagedockerapp
  spec:
    replicas: 1
    selector:
      app: imagedockerapp
      deploymentconfig: imagedockerapp
    strategy:
      type: Rolling
    template:
      metadata:
        labels:
          app: imagedockerapp
          deploymentconfig: imagedockerapp
      spec:
        containers:
        - image:
          imagePullPolicy: Always
          readinessProbe:
            httpGet:
              port: 8080
          name: imagedockerapp
          ports:
          - containerPort: 8080
            protocol: TCP
          - containerPort: 8888
            protocol: TCP
          terminationMessagePath: /dev/termination-log
        dnsPolicy: ClusterFirst
        restartPolicy: Always
        securityContext: {}
    triggers:
    - imageChangeParams:
        automatic: true
        containerNames:
        - imagedockerapp
        from:
          kind: ImageStreamTag
          name: imagedockerapp:latest
      type: ImageChange
    - type: ConfigChange
`)

func testExtendedTestdataBuildsTestImagesourceBuildconfigYamlBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsTestImagesourceBuildconfigYaml, nil
}

func testExtendedTestdataBuildsTestImagesourceBuildconfigYaml() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsTestImagesourceBuildconfigYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/test-imagesource-buildconfig.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsTestNosrcBuildJson = []byte(`{
  "kind": "List",
  "apiVersion": "v1",
  "metadata": {},
  "items": [
    {
      "kind": "ImageStream",
      "apiVersion": "v1",
      "metadata": {
        "name": "nosrc-stream",
        "creationTimestamp": null
      },
      "spec": {},
      "status": {
        "dockerImageRepository": ""
      }
    },
    {
      "kind": "BuildConfig",
      "apiVersion": "v1",
      "metadata": {
        "name": "nosrc-build",
        "creationTimestamp": null
      },
      "spec": {
        "triggers": [
        ],
        "source": {
        },
        "strategy": {
          "type": "Source",
          "sourceStrategy": {
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/openshift/test-build-simples2i:latest"
            }
          }
        }
      }
    }
  ]
}
`)

func testExtendedTestdataBuildsTestNosrcBuildJsonBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsTestNosrcBuildJson, nil
}

func testExtendedTestdataBuildsTestNosrcBuildJson() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsTestNosrcBuildJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/test-nosrc-build.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsTestS2iBuildQuotaJson = []byte(`{
  "kind": "BuildConfig",
  "apiVersion": "v1",
  "metadata": {
    "name": "s2i-build-quota",
    "creationTimestamp": null,
    "labels": {
      "name": "s2i-build-quota"
    }
  },
  "spec": {
    "resources": {
      "limits": {
        "cpu": "60m",
        "memory": "400Mi"
      }
    },
    "source": {
      "binary": {
        "asFile": ""
      }          
    },
    "strategy": {
      "type": "Source",
      "sourceStrategy": {
        "from": {
          "kind":"DockerImage",
          "name":"docker.io/openshift/test-build-simples2i:latest"
        },
        "env": [
          {
            "name": "BUILD_LOGLEVEL",
            "value": "6"
          }
        ]
      }
    }
  }
}
`)

func testExtendedTestdataBuildsTestS2iBuildQuotaJsonBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsTestS2iBuildQuotaJson, nil
}

func testExtendedTestdataBuildsTestS2iBuildQuotaJson() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsTestS2iBuildQuotaJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/test-s2i-build-quota.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsTestS2iBuildJson = []byte(`{
  "kind": "BuildConfig",
  "apiVersion": "v1",
  "metadata": {
    "name": "test",
    "labels": {
      "name": "test"
    }
  },
  "spec": {
    "triggers": [],
    "source": {
      "type": "Git",
      "git": {
        "uri":"https://github.com/sclorg/nodejs-ex"        
      }
    },
    "strategy": {
      "type": "Source",
      "sourceStrategy": {
        "env": [
          {
            "name": "BUILD_LOGLEVEL",
            "value": "5"
          }
        ],
        "from": {
          "kind": "DockerImage",
          "name": "docker.io/openshift/test-build-simples2i:latest"
        }
      }
    },
    "output": {
      "to": {
        "kind": "ImageStreamTag",
        "name": "test:latest"
      },
      "imageLabels": [
        {
          "name": "user-specified-label",
          "value": "arbitrary-value"
        },
        {
          "name": "io.k8s.display-name",
          "value": "overridden"
        },
        {
          "name": "io.openshift.builder-version",
          "value": "overridden2"
        }
      ]
    }
  }
}
`)

func testExtendedTestdataBuildsTestS2iBuildJsonBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsTestS2iBuildJson, nil
}

func testExtendedTestdataBuildsTestS2iBuildJson() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsTestS2iBuildJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/test-s2i-build.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsTestS2iNoOutputnameJson = []byte(`{
  "kind": "BuildConfig",
  "apiVersion": "v1",
  "metadata": {
    "name": "test-sti",
    "labels": {
      "name": "test-sti"
    }
  },
  "spec": {
    "triggers": [],
    "source": {
      "type": "Git",
      "git": {
        "uri": "https://github.com/openshift/ruby-hello-world"
      }
    },
    "strategy": {
      "type": "Source",
      "sourceStrategy": {
        "env": [
          {
            "name": "BUILD_LOGLEVEL",
            "value": "5"
          }
        ],
        "from": {
          "kind": "DockerImage",
          "name": "docker.io/openshift/test-build-simples2i:latest"
        }
      }
    }
  }
}`)

func testExtendedTestdataBuildsTestS2iNoOutputnameJsonBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsTestS2iNoOutputnameJson, nil
}

func testExtendedTestdataBuildsTestS2iNoOutputnameJson() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsTestS2iNoOutputnameJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/test-s2i-no-outputname.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsTestSymlinkBuildYaml = []byte(`kind: List
apiVersion: v1
items:
- kind: ImageStream
  apiVersion: v1
  metadata:
    name: symlink-is
- kind: BuildConfig
  apiVersion: v1
  metadata:
    name: symlink-bc
  spec:
    source:
      type: binary
      binary: {}
    strategy:
      type: Source
      sourceStrategy:
        from:
          kind: ImageStreamTag
          name: nodejs:latest
          namespace: openshift
    output:
      to:
        kind: ImageStreamTag
        name: symlink-is:latest
`)

func testExtendedTestdataBuildsTestSymlinkBuildYamlBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsTestSymlinkBuildYaml, nil
}

func testExtendedTestdataBuildsTestSymlinkBuildYaml() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsTestSymlinkBuildYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/test-symlink-build.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsValuefromFailedDockerBuildValueFromConfigYaml = []byte(`
apiVersion: v1
kind: BuildConfig
metadata:
  name: mydockertest
  labels:
    name: test
spec:
  triggers: []
  runPolicy: Serial
  source:
    dockerfile:
      'FROM busybox@sha256:a59906e33509d14c036c8678d687bd4eec81ed7c4b8ce907b888c607f6a1e0e6'
  strategy:
    type: Docker
    dockerStrategy:
      env:
        - name: BUILD_LOGLEVEL
          value: "5"
        - name: FIELDREF_ENV
          valueFrom:
            fieldRef:
                fieldPath: metadata.nofield
        - name: CONFIGMAPKEYREF_ENV
          valueFrom:
            configMapKeyRef:
              name: myconfigmap
              key: nokey
        - name: SECRETKEYREF_ENV
          valueFrom:
            secretKeyRef:
              name: mysecret
              key: nousername

  output:
    to:
      kind: ImageStreamTag
      name: 'test:latest'
    imageLabels:
      - name: user-specified-label
        value: arbitrary-value
  resources: {}
  postCommit: {}
  nodeSelector: null
status:
  lastVersion: 0
`)

func testExtendedTestdataBuildsValuefromFailedDockerBuildValueFromConfigYamlBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsValuefromFailedDockerBuildValueFromConfigYaml, nil
}

func testExtendedTestdataBuildsValuefromFailedDockerBuildValueFromConfigYaml() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsValuefromFailedDockerBuildValueFromConfigYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/valuefrom/failed-docker-build-value-from-config.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsValuefromFailedStiBuildValueFromConfigYaml = []byte(`apiVersion: v1
kind: BuildConfig
metadata:
  name: mys2itest
  labels:
    name: test
spec:
  triggers: []
  runPolicy: Serial
  source:
    type: Git
    git:
      uri: 'https://github.com/sclorg/nodejs-ex'
  strategy:
    type: Source
    sourceStrategy:
      from:
        kind: DockerImage
        name: docker.io/openshift/test-build-simples2i:latest
      env:
        - name: BUILD_LOGLEVEL
          value: "5"
        - name: FIELDREF_ENV
          valueFrom:
            fieldRef:
              fieldPath: metadata.nofield
        - name: CONFIGMAPKEYREF_ENV
          valueFrom:
            configMapKeyRef:
              name: myconfigmap
              key: nokey
        - name: SECRETKEYREF_ENV
          valueFrom:
            secretKeyRef:
              name: mysecret
              key: nousername
  output:
    to:
      kind: ImageStreamTag
      name: 'test:latest'
    imageLabels:
      - name: user-specified-label
        value: arbitrary-value
  resources: {}
  postCommit: {}
  nodeSelector: null
status:
  lastVersion: 0
`)

func testExtendedTestdataBuildsValuefromFailedStiBuildValueFromConfigYamlBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsValuefromFailedStiBuildValueFromConfigYaml, nil
}

func testExtendedTestdataBuildsValuefromFailedStiBuildValueFromConfigYaml() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsValuefromFailedStiBuildValueFromConfigYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/valuefrom/failed-sti-build-value-from-config.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsValuefromSuccessfulDockerBuildValueFromConfigYaml = []byte(`
apiVersion: v1
kind: BuildConfig
metadata:
  name: mydockertest
  labels:
    name: test
spec:
  triggers: []
  runPolicy: Serial
  source:
    dockerfile:
      'FROM busybox@sha256:a59906e33509d14c036c8678d687bd4eec81ed7c4b8ce907b888c607f6a1e0e6'
  strategy:
    type: Docker
    dockerStrategy:
      env:
        - name: BUILD_LOGLEVEL
          value: "5"
        - name: FIELDREF_ENV
          valueFrom:
            fieldRef:
                fieldPath: metadata.name
        - name: CONFIGMAPKEYREF_ENV
          valueFrom:
            configMapKeyRef:
              name: myconfigmap
              key: mykey
        - name: SECRETKEYREF_ENV
          valueFrom:
            secretKeyRef:
              name: mysecret
              key: username
        - name: FIELDREF_CLONE_ENV
          value: $(FIELDREF_ENV)
        - name: FIELDREF_CLONE_CLONE_ENV
          value: $(FIELDREF_CLONE_ENV)
        - name: UNAVAILABLE_ENV
          value: $(SOME_OTHER_ENV)
        - name: ESCAPED_ENV
          value: $$(MY_ESCAPED_VALUE)

  output:
    to:
      kind: ImageStreamTag
      name: 'test:latest'
    imageLabels:
      - name: user-specified-label
        value: arbitrary-value
  resources: {}
  postCommit: {}
  nodeSelector: null
status:
  lastVersion: 0
`)

func testExtendedTestdataBuildsValuefromSuccessfulDockerBuildValueFromConfigYamlBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsValuefromSuccessfulDockerBuildValueFromConfigYaml, nil
}

func testExtendedTestdataBuildsValuefromSuccessfulDockerBuildValueFromConfigYaml() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsValuefromSuccessfulDockerBuildValueFromConfigYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/valuefrom/successful-docker-build-value-from-config.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsValuefromSuccessfulStiBuildValueFromConfigYaml = []byte(`apiVersion: v1
kind: BuildConfig
metadata:
  name: mys2itest
  labels:
    name: test
spec:
  triggers: []
  runPolicy: Serial
  source:
    type: Git
    git:
      uri: 'https://github.com/sclorg/nodejs-ex'
  strategy:
    type: Source
    sourceStrategy:
      from:
        kind: DockerImage
        name: docker.io/openshift/test-build-simples2i:latest
      env:
        - name: BUILD_LOGLEVEL
          value: "5"
        - name: FIELDREF_ENV
          valueFrom:
            fieldRef:
              fieldPath: metadata.name
        - name: CONFIGMAPKEYREF_ENV
          valueFrom:
            configMapKeyRef:
              name: myconfigmap
              key: mykey
        - name: SECRETKEYREF_ENV
          valueFrom:
            secretKeyRef:
              name: mysecret
              key: username
        - name: FIELDREF_CLONE_ENV 
          value: $(FIELDREF_ENV)
        - name: FIELDREF_CLONE_CLONE_ENV
          value: $(FIELDREF_CLONE_ENV)
        - name: UNAVAILABLE_ENV
          value: $(SOME_OTHER_ENV)
        - name: ESCAPED_ENV
          value: $$(MY_ESCAPED_VALUE)
  output:
    to:
      kind: ImageStreamTag
      name: 'test:latest'
    imageLabels:
      - name: user-specified-label
        value: arbitrary-value
  resources: {}
  postCommit: {}
  nodeSelector: null
status:
  lastVersion: 0
`)

func testExtendedTestdataBuildsValuefromSuccessfulStiBuildValueFromConfigYamlBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsValuefromSuccessfulStiBuildValueFromConfigYaml, nil
}

func testExtendedTestdataBuildsValuefromSuccessfulStiBuildValueFromConfigYaml() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsValuefromSuccessfulStiBuildValueFromConfigYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/valuefrom/successful-sti-build-value-from-config.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsValuefromTestConfigmapYaml = []byte(`apiVersion: v1
kind: ConfigMap
metadata:
  name: myconfigmap
data:
  mykey: myvalue
`)

func testExtendedTestdataBuildsValuefromTestConfigmapYamlBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsValuefromTestConfigmapYaml, nil
}

func testExtendedTestdataBuildsValuefromTestConfigmapYaml() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsValuefromTestConfigmapYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/valuefrom/test-configmap.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsValuefromTestIsJson = []byte(`{
  "kind": "ImageStream",
  "apiVersion": "v1",
  "metadata": {
    "name": "test"
  }
}
`)

func testExtendedTestdataBuildsValuefromTestIsJsonBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsValuefromTestIsJson, nil
}

func testExtendedTestdataBuildsValuefromTestIsJson() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsValuefromTestIsJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/valuefrom/test-is.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsValuefromTestSecretYaml = []byte(`apiVersion: v1
kind: Secret
metadata:
  name: mysecret
data:
  password: cGFzc3dvcmQ=
  username: ZGV2ZWxvcGVy
type: kubernetes.io/basic-auth
`)

func testExtendedTestdataBuildsValuefromTestSecretYamlBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsValuefromTestSecretYaml, nil
}

func testExtendedTestdataBuildsValuefromTestSecretYaml() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsValuefromTestSecretYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/valuefrom/test-secret.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsWebhookBitbucketTestdataPusheventNotMasterJson = []byte(`{
	"actor": {
		"type": "user",
		"username": "emmap1",
		"display_name": "Emma",
		"uuid": "{a54f16da-24e9-4d7f-a3a7-b1ba2cd98aa3}",
		"links": {
			"self": {
				"href": "https://api.bitbucket.org/api/2.0/users/emmap1"
			},
			"html": {
				"href": "https://api.bitbucket.org/emmap1"
			},
			"avatar": {
				"href": "https://bitbucket-api-assetroot.s3.amazonaws.com/c/photos/2015/Feb/26/3613917261-0-emmap1-avatar_avatar.png"
			}
		}
	},
	"repository": {
		"type": "repository",
		"links": {
			"self": {
				"href": "https://api.bitbucket.org/api/2.0/repositories/bitbucket/bitbucket"
			},
			"html": {
				"href": "https://api.bitbucket.org/bitbucket/bitbucket"
			},
			"avatar": {
				"href": "https://api-staging-assetroot.s3.amazonaws.com/c/photos/2014/Aug/01/bitbucket-logo-2629490769-3_avatar.png"
			}
		},
		"uuid": "{673a6070-3421-46c9-9d48-90745f7bfe8e}",
		"project": {
			"type": "project",
			"project": "Untitled project",
			"uuid": "{3b7898dc-6891-4225-ae60-24613bb83080}",
			"links": {
				"html": {
					"href": "https://bitbucket.org/account/user/teamawesome/projects/proj"
				},
				"avatar": {
					"href": "https://bitbucket.org/account/user/teamawesome/projects/proj/avatar/32"
				}
			},
			"key": "proj"
		},
		"full_name": "team_name/repo_name",
		"name": "repo_name",
		"website": "https://mywebsite.com/",
		"owner": {
			"type": "user",
			"username": "emmap1",
			"display_name": "Emma",
			"uuid": "{a54f16da-24e9-4d7f-a3a7-b1ba2cd98aa3}",
			"links": {
				"self": {
					"href": "https://api.bitbucket.org/api/2.0/users/emmap1"
				},
				"html": {
					"href": "https://api.bitbucket.org/emmap1"
				},
				"avatar": {
					"href": "https://bitbucket-api-assetroot.s3.amazonaws.com/c/photos/2015/Feb/26/3613917261-0-emmap1-avatar_avatar.png"
				}
			}
		},
		"scm": "git",
		"is_private": true
	},
	"push": {
		"changes": [
			{
				"new": {
					"type": "branch",
					"name": "this-is-not-master",
					"target": {
						"type": "commit",
						"hash": "709d658dc5b6d6afcd46049c2f332ee3f515a67d",
						"author": {
							"type": "user",
							"username": "emmap1",
							"display_name": "Emma",
							"uuid": "{a54f16da-24e9-4d7f-a3a7-b1ba2cd98aa3}",
							"links": {
								"self": {
									"href": "https://api.bitbucket.org/api/2.0/users/emmap1"
								},
								"html": {
									"href": "https://api.bitbucket.org/emmap1"
								},
								"avatar": {
									"href": "https://bitbucket-api-assetroot.s3.amazonaws.com/c/photos/2015/Feb/26/3613917261-0-emmap1-avatar_avatar.png"
								}
							}
						},
						"message": "new commit message\n",
						"date": "2015-06-09T03:34:49+00:00",
						"parents": [
							{
								"type": "commit",
								"hash": "1e65c05c1d5171631d92438a13901ca7dae9618c",
								"links": {
									"self": {
										"href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/commit/8cbbd65829c7ad834a97841e0defc965718036a0"
									},
									"html": {
										"href": "https://bitbucket.org/user_name/repo_name/commits/8cbbd65829c7ad834a97841e0defc965718036a0"
									}
								}
							}
						],
						"links": {
							"self": {
								"href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/commit/c4b2b7914156a878aa7c9da452a09fb50c2091f2"
							},
							"html": {
								"href": "https://bitbucket.org/user_name/repo_name/commits/c4b2b7914156a878aa7c9da452a09fb50c2091f2"
							}
						}
					},
					"links": {
						"self": {
							"href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/refs/branches/master"
						},
						"commits": {
							"href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/commits/master"
						},
						"html": {
							"href": "https://bitbucket.org/user_name/repo_name/branch/master"
						}
					}
				},
				"old": {
					"type": "branch",
					"name": "this-is-not-master",
					"target": {
						"type": "commit",
						"hash": "1e65c05c1d5171631d92438a13901ca7dae9618c",
						"author": {
							"type": "user",
							"username": "emmap1",
							"display_name": "Emma",
							"uuid": "{a54f16da-24e9-4d7f-a3a7-b1ba2cd98aa3}",
							"links": {
								"self": {
									"href": "https://api.bitbucket.org/api/2.0/users/emmap1"
								},
								"html": {
									"href": "https://api.bitbucket.org/emmap1"
								},
								"avatar": {
									"href": "https://bitbucket-api-assetroot.s3.amazonaws.com/c/photos/2015/Feb/26/3613917261-0-emmap1-avatar_avatar.png"
								}
							}
						},
						"message": "old commit message\n",
						"date": "2015-06-08T21:34:56+00:00",
						"parents": [
							{
								"type": "commit",
								"hash": "e0d0c2041e09746be5ce4b55067d5a8e3098c843",
								"links": {
									"self": {
										"href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/commit/9c4a3452da3bc4f37af5a6bb9c784246f44406f7"
									},
									"html": {
										"href": "https://bitbucket.org/user_name/repo_name/commits/9c4a3452da3bc4f37af5a6bb9c784246f44406f7"
									}
								}
							}
						],
						"links": {
							"self": {
								"href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/commit/b99ea6dad8f416e57c5ca78c1ccef590600d841b"
							},
							"html": {
								"href": "https://bitbucket.org/user_name/repo_name/commits/b99ea6dad8f416e57c5ca78c1ccef590600d841b"
							}
						}
					},
					"links": {
						"self": {
							"href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/refs/branches/master"
						},
						"commits": {
							"href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/commits/master"
						},
						"html": {
							"href": "https://bitbucket.org/user_name/repo_name/branch/master"
						}
					}
				},
				"links": {
					"html": {
						"href": "https://bitbucket.org/user_name/repo_name/branches/compare/c4b2b7914156a878aa7c9da452a09fb50c2091f2..b99ea6dad8f416e57c5ca78c1ccef590600d841b"
					},
					"diff": {
						"href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/diff/c4b2b7914156a878aa7c9da452a09fb50c2091f2..b99ea6dad8f416e57c5ca78c1ccef590600d841b"
					},
					"commits": {
						"href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/commits?include=c4b2b7914156a878aa7c9da452a09fb50c2091f2&exclude=b99ea6dad8f416e57c5ca78c1ccef590600d841b"
					}
				},
				"created": false,
				"forced": false,
				"closed": false,
				"commits": [
					{
						"hash": "03f4a7270240708834de475bcf21532d6134777e",
						"type": "commit",
						"message": "First commit",
						"author": {
							"type": "user",
							"username": "emmap1",
							"display_name": "Emma",
							"uuid": "{a54f16da-24e9-4d7f-a3a7-b1ba2cd98aa3}",
							"links": {
								"self": {
									"href": "https://api.bitbucket.org/api/2.0/users/emmap1"
								},
								"html": {
									"href": "https://api.bitbucket.org/emmap1"
								},
								"avatar": {
									"href": "https://bitbucket-api-assetroot.s3.amazonaws.com/c/photos/2015/Feb/26/3613917261-0-emmap1-avatar_avatar.png"
								}
							}
						},
						"links": {
							"self": {
								"href": "https://api.bitbucket.org/2.0/repositories/user/repo/commit/03f4a7270240708834de475bcf21532d6134777e"
							},
							"html": {
								"href": "https://bitbucket.org/user/repo/commits/03f4a7270240708834de475bcf21532d6134777e"
							}
						}
					},
					{
						"hash": "ffffffffffffffffffffffffffffffffffffffff",
						"type": "commit",
						"message": "Second commit",
						"author": {
							"type": "user",
							"username": "emmap1",
							"display_name": "Emma",
							"uuid": "{a54f16da-24e9-4d7f-a3a7-b1ba2cd98aa3}",
							"links": {
								"self": {
									"href": "https://api.bitbucket.org/api/2.0/users/emmap1"
								},
								"html": {
									"href": "https://api.bitbucket.org/emmap1"
								},
								"avatar": {
									"href": "https://bitbucket-api-assetroot.s3.amazonaws.com/c/photos/2015/Feb/26/3613917261-0-emmap1-avatar_avatar.png"
								}
							}
						},
						"links": {
							"self": {
								"href": "https://api.bitbucket.org/2.0/repositories/user/repo/commit/03f4a7270240708834de475bcf21532d6134777e"
							},
							"html": {
								"href": "https://bitbucket.org/user/repo/commits/03f4a7270240708834de475bcf21532d6134777e"
							}
						}
					}
				],
				"truncated": false
			}
		]
	}
}
`)

func testExtendedTestdataBuildsWebhookBitbucketTestdataPusheventNotMasterJsonBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsWebhookBitbucketTestdataPusheventNotMasterJson, nil
}

func testExtendedTestdataBuildsWebhookBitbucketTestdataPusheventNotMasterJson() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsWebhookBitbucketTestdataPusheventNotMasterJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/webhook/bitbucket/testdata/pushevent-not-master.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsWebhookBitbucketTestdataPusheventJson = []byte(`{
	"actor": {
		"type": "user",
		"username": "emmap1",
		"display_name": "Emma",
		"uuid": "{a54f16da-24e9-4d7f-a3a7-b1ba2cd98aa3}",
		"links": {
			"self": {
				"href": "https://api.bitbucket.org/api/2.0/users/emmap1"
			},
			"html": {
				"href": "https://api.bitbucket.org/emmap1"
			},
			"avatar": {
				"href": "https://bitbucket-api-assetroot.s3.amazonaws.com/c/photos/2015/Feb/26/3613917261-0-emmap1-avatar_avatar.png"
			}
		}
	},
	"repository": {
		"type": "repository",
		"links": {
			"self": {
				"href": "https://api.bitbucket.org/api/2.0/repositories/bitbucket/bitbucket"
			},
			"html": {
				"href": "https://api.bitbucket.org/bitbucket/bitbucket"
			},
			"avatar": {
				"href": "https://api-staging-assetroot.s3.amazonaws.com/c/photos/2014/Aug/01/bitbucket-logo-2629490769-3_avatar.png"
			}
		},
		"uuid": "{673a6070-3421-46c9-9d48-90745f7bfe8e}",
		"project": {
			"type": "project",
			"project": "Untitled project",
			"uuid": "{3b7898dc-6891-4225-ae60-24613bb83080}",
			"links": {
				"html": {
					"href": "https://bitbucket.org/account/user/teamawesome/projects/proj"
				},
				"avatar": {
					"href": "https://bitbucket.org/account/user/teamawesome/projects/proj/avatar/32"
				}
			},
			"key": "proj"
		},
		"full_name": "team_name/repo_name",
		"name": "repo_name",
		"website": "https://mywebsite.com/",
		"owner": {
			"type": "user",
			"username": "emmap1",
			"display_name": "Emma",
			"uuid": "{a54f16da-24e9-4d7f-a3a7-b1ba2cd98aa3}",
			"links": {
				"self": {
					"href": "https://api.bitbucket.org/api/2.0/users/emmap1"
				},
				"html": {
					"href": "https://api.bitbucket.org/emmap1"
				},
				"avatar": {
					"href": "https://bitbucket-api-assetroot.s3.amazonaws.com/c/photos/2015/Feb/26/3613917261-0-emmap1-avatar_avatar.png"
				}
			}
		},
		"scm": "git",
		"is_private": true
	},
	"push": {
		"changes": [
			{
				"new": {
					"type": "branch",
					"name": "master",
					"target": {
						"type": "commit",
						"hash": "709d658dc5b6d6afcd46049c2f332ee3f515a67d",
						"author": {
							"type": "user",
							"username": "emmap1",
							"display_name": "Emma",
							"uuid": "{a54f16da-24e9-4d7f-a3a7-b1ba2cd98aa3}",
							"links": {
								"self": {
									"href": "https://api.bitbucket.org/api/2.0/users/emmap1"
								},
								"html": {
									"href": "https://api.bitbucket.org/emmap1"
								},
								"avatar": {
									"href": "https://bitbucket-api-assetroot.s3.amazonaws.com/c/photos/2015/Feb/26/3613917261-0-emmap1-avatar_avatar.png"
								}
							}
						},
						"message": "new commit message\n",
						"date": "2015-06-09T03:34:49+00:00",
						"parents": [
							{
								"type": "commit",
								"hash": "1e65c05c1d5171631d92438a13901ca7dae9618c",
								"links": {
									"self": {
										"href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/commit/8cbbd65829c7ad834a97841e0defc965718036a0"
									},
									"html": {
										"href": "https://bitbucket.org/user_name/repo_name/commits/8cbbd65829c7ad834a97841e0defc965718036a0"
									}
								}
							}
						],
						"links": {
							"self": {
								"href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/commit/c4b2b7914156a878aa7c9da452a09fb50c2091f2"
							},
							"html": {
								"href": "https://bitbucket.org/user_name/repo_name/commits/c4b2b7914156a878aa7c9da452a09fb50c2091f2"
							}
						}
					},
					"links": {
						"self": {
							"href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/refs/branches/master"
						},
						"commits": {
							"href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/commits/master"
						},
						"html": {
							"href": "https://bitbucket.org/user_name/repo_name/branch/master"
						}
					}
				},
				"old": {
					"type": "branch",
					"name": "master",
					"target": {
						"type": "commit",
						"hash": "1e65c05c1d5171631d92438a13901ca7dae9618c",
						"author": {
							"type": "user",
							"username": "emmap1",
							"display_name": "Emma",
							"uuid": "{a54f16da-24e9-4d7f-a3a7-b1ba2cd98aa3}",
							"links": {
								"self": {
									"href": "https://api.bitbucket.org/api/2.0/users/emmap1"
								},
								"html": {
									"href": "https://api.bitbucket.org/emmap1"
								},
								"avatar": {
									"href": "https://bitbucket-api-assetroot.s3.amazonaws.com/c/photos/2015/Feb/26/3613917261-0-emmap1-avatar_avatar.png"
								}
							}
						},
						"message": "old commit message\n",
						"date": "2015-06-08T21:34:56+00:00",
						"parents": [
							{
								"type": "commit",
								"hash": "e0d0c2041e09746be5ce4b55067d5a8e3098c843",
								"links": {
									"self": {
										"href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/commit/9c4a3452da3bc4f37af5a6bb9c784246f44406f7"
									},
									"html": {
										"href": "https://bitbucket.org/user_name/repo_name/commits/9c4a3452da3bc4f37af5a6bb9c784246f44406f7"
									}
								}
							}
						],
						"links": {
							"self": {
								"href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/commit/b99ea6dad8f416e57c5ca78c1ccef590600d841b"
							},
							"html": {
								"href": "https://bitbucket.org/user_name/repo_name/commits/b99ea6dad8f416e57c5ca78c1ccef590600d841b"
							}
						}
					},
					"links": {
						"self": {
							"href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/refs/branches/master"
						},
						"commits": {
							"href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/commits/master"
						},
						"html": {
							"href": "https://bitbucket.org/user_name/repo_name/branch/master"
						}
					}
				},
				"links": {
					"html": {
						"href": "https://bitbucket.org/user_name/repo_name/branches/compare/c4b2b7914156a878aa7c9da452a09fb50c2091f2..b99ea6dad8f416e57c5ca78c1ccef590600d841b"
					},
					"diff": {
						"href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/diff/c4b2b7914156a878aa7c9da452a09fb50c2091f2..b99ea6dad8f416e57c5ca78c1ccef590600d841b"
					},
					"commits": {
						"href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/commits?include=c4b2b7914156a878aa7c9da452a09fb50c2091f2&exclude=b99ea6dad8f416e57c5ca78c1ccef590600d841b"
					}
				},
				"created": false,
				"forced": false,
				"closed": false,
				"commits": [
					{
						"hash": "03f4a7270240708834de475bcf21532d6134777e",
						"type": "commit",
						"message": "First commit",
						"author": {
							"type": "user",
							"username": "emmap1",
							"display_name": "Emma",
							"uuid": "{a54f16da-24e9-4d7f-a3a7-b1ba2cd98aa3}",
							"links": {
								"self": {
									"href": "https://api.bitbucket.org/api/2.0/users/emmap1"
								},
								"html": {
									"href": "https://api.bitbucket.org/emmap1"
								},
								"avatar": {
									"href": "https://bitbucket-api-assetroot.s3.amazonaws.com/c/photos/2015/Feb/26/3613917261-0-emmap1-avatar_avatar.png"
								}
							}
						},
						"links": {
							"self": {
								"href": "https://api.bitbucket.org/2.0/repositories/user/repo/commit/03f4a7270240708834de475bcf21532d6134777e"
							},
							"html": {
								"href": "https://bitbucket.org/user/repo/commits/03f4a7270240708834de475bcf21532d6134777e"
							}
						}
					},
					{
						"hash": "ffffffffffffffffffffffffffffffffffffffff",
						"type": "commit",
						"message": "Second commit",
						"author": {
							"type": "user",
							"username": "emmap1",
							"display_name": "Emma",
							"uuid": "{a54f16da-24e9-4d7f-a3a7-b1ba2cd98aa3}",
							"links": {
								"self": {
									"href": "https://api.bitbucket.org/api/2.0/users/emmap1"
								},
								"html": {
									"href": "https://api.bitbucket.org/emmap1"
								},
								"avatar": {
									"href": "https://bitbucket-api-assetroot.s3.amazonaws.com/c/photos/2015/Feb/26/3613917261-0-emmap1-avatar_avatar.png"
								}
							}
						},
						"links": {
							"self": {
								"href": "https://api.bitbucket.org/2.0/repositories/user/repo/commit/03f4a7270240708834de475bcf21532d6134777e"
							},
							"html": {
								"href": "https://bitbucket.org/user/repo/commits/03f4a7270240708834de475bcf21532d6134777e"
							}
						}
					}
				],
				"truncated": false
			}
		]
	}
}
`)

func testExtendedTestdataBuildsWebhookBitbucketTestdataPusheventJsonBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsWebhookBitbucketTestdataPusheventJson, nil
}

func testExtendedTestdataBuildsWebhookBitbucketTestdataPusheventJson() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsWebhookBitbucketTestdataPusheventJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/webhook/bitbucket/testdata/pushevent.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsWebhookBitbucketTestdataPushevent54NotMasterJson = []byte(`{  
  "eventKey":"repo:refs_changed",
  "date":"2017-09-19T09:45:32+1000",
  "actor":{  
    "name":"admin",
    "emailAddress":"admin@example.com",
    "id":1,
    "displayName":"Administrator",
    "active":true,
    "slug":"admin",
    "type":"NORMAL"
  },
  "repository":{  
    "slug":"repository",
    "id":84,
    "name":"repository",
    "scmId":"git",
    "state":"AVAILABLE",
    "statusMessage":"Available",
    "forkable":true,
    "project":{  
      "key":"PROJ",
      "id":84,
      "name":"project",
      "public":false,
      "type":"NORMAL"
    },
    "public":false
  },
  "changes":[  
    {  
      "ref":{  
        "id":"refs/heads/other",
        "displayId":"other",
        "type":"BRANCH"
      },
      "refId":"refs/heads/other",
      "fromHash":"ecddabb624f6f5ba43816f5926e580a5f680a932",
      "toHash":"178864a7d521b6f5e720b386b2c2b0ef8563e0dc",
      "type":"UPDATE"
    }
  ]
}`)

func testExtendedTestdataBuildsWebhookBitbucketTestdataPushevent54NotMasterJsonBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsWebhookBitbucketTestdataPushevent54NotMasterJson, nil
}

func testExtendedTestdataBuildsWebhookBitbucketTestdataPushevent54NotMasterJson() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsWebhookBitbucketTestdataPushevent54NotMasterJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/webhook/bitbucket/testdata/pushevent54-not-master.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsWebhookBitbucketTestdataPushevent54Json = []byte(`{  
  "eventKey":"repo:refs_changed",
  "date":"2017-09-19T09:45:32+1000",
  "actor":{  
    "name":"admin",
    "emailAddress":"admin@example.com",
    "id":1,
    "displayName":"Administrator",
    "active":true,
    "slug":"admin",
    "type":"NORMAL"
  },
  "repository":{  
    "slug":"repository",
    "id":84,
    "name":"repository",
    "scmId":"git",
    "state":"AVAILABLE",
    "statusMessage":"Available",
    "forkable":true,
    "project":{  
      "key":"PROJ",
      "id":84,
      "name":"project",
      "public":false,
      "type":"NORMAL"
    },
    "public":false
  },
  "changes":[  
    {  
      "ref":{  
        "id":"refs/heads/master",
        "displayId":"master",
        "type":"BRANCH"
      },
      "refId":"refs/heads/master",
      "fromHash":"ecddabb624f6f5ba43816f5926e580a5f680a932",
      "toHash":"178864a7d521b6f5e720b386b2c2b0ef8563e0dc",
      "type":"UPDATE"
    }
  ]
}`)

func testExtendedTestdataBuildsWebhookBitbucketTestdataPushevent54JsonBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsWebhookBitbucketTestdataPushevent54Json, nil
}

func testExtendedTestdataBuildsWebhookBitbucketTestdataPushevent54Json() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsWebhookBitbucketTestdataPushevent54JsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/webhook/bitbucket/testdata/pushevent54.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsWebhookGenericTestdataPostReceiveGitJson = []byte(`{
  "type": "Git",
  "git": {
    "author": {},
    "committer": {},
    "refs": [
      {
        "ref": "refs/heads/master",
        "commit": "2602ace61490de0513dfbd7c7de949356cf9bd17",
        "author": {
          "name": "Joe Smith",
          "email": "joe.smith@gmail.com"
        },
        "committer": {
          "name": "Joe Smith",
          "email": "joe.smith@gmail.com"
        },
        "message": "Merge pull request #31 from mnagy/prepare_for_new_mysql_image\n\nPrepare for new centos/mysql-56-centos7 image"
      }
    ]
  }
}`)

func testExtendedTestdataBuildsWebhookGenericTestdataPostReceiveGitJsonBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsWebhookGenericTestdataPostReceiveGitJson, nil
}

func testExtendedTestdataBuildsWebhookGenericTestdataPostReceiveGitJson() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsWebhookGenericTestdataPostReceiveGitJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/webhook/generic/testdata/post-receive-git.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsWebhookGenericTestdataPushGenericEnvsJson = []byte(`{
  "type" : "Git",
  "git" : {
    "uri" : "git://mygitserver/myrepo.git",
    "ref" : "refs/heads/master",
    "commit" : "9bdc3a26ff933b32f3e558636b58aea86a69f051",
    "message" : "Random act of kindness",
    "author" : {
      "name" : "Jon Doe",
      "email" : "jondoe@email.com"
    },
    "committer" : {
      "name" : "Jon Doe",
      "email" : "jondoe@email.com"
    }
  },
  "env": [
      {
          "name": "EXAMPLE",
          "value": "sample-app"
      }
  ]
}
`)

func testExtendedTestdataBuildsWebhookGenericTestdataPushGenericEnvsJsonBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsWebhookGenericTestdataPushGenericEnvsJson, nil
}

func testExtendedTestdataBuildsWebhookGenericTestdataPushGenericEnvsJson() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsWebhookGenericTestdataPushGenericEnvsJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/webhook/generic/testdata/push-generic-envs.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsWebhookGenericTestdataPushGenericEnvsYaml = []byte(`---
  type: "Git"
  git: 
    uri: "git://mygitserver/myrepo.git"
    ref: "refs/heads/master"
    commit: "9bdc3a26ff933b32f3e558636b58aea86a69f051"
    message: "Random act of kindness"
    author: 
      name: "Jon Doe"
      email: "jondoe@email.com"
    committer: 
      name: "Jon Doe"
      email: "jondoe@email.com"
  env: 
    - 
      name: "EXAMPLE"
      value: "sample-app"
`)

func testExtendedTestdataBuildsWebhookGenericTestdataPushGenericEnvsYamlBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsWebhookGenericTestdataPushGenericEnvsYaml, nil
}

func testExtendedTestdataBuildsWebhookGenericTestdataPushGenericEnvsYaml() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsWebhookGenericTestdataPushGenericEnvsYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/webhook/generic/testdata/push-generic-envs.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsWebhookGenericTestdataPushGenericJson = []byte(`{
  "type" : "Git",
  "git" : {
    "uri" : "git://mygitserver/myrepo.git",
    "ref" : "refs/heads/master",
    "commit" : "9bdc3a26ff933b32f3e558636b58aea86a69f051",
    "message" : "Random act of kindness",
    "author" : {
      "name" : "Jon Doe",
      "email" : "jondoe@email.com"
    },
    "committer" : {
      "name" : "Jon Doe",
      "email" : "jondoe@email.com"
    }
  }
}
`)

func testExtendedTestdataBuildsWebhookGenericTestdataPushGenericJsonBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsWebhookGenericTestdataPushGenericJson, nil
}

func testExtendedTestdataBuildsWebhookGenericTestdataPushGenericJson() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsWebhookGenericTestdataPushGenericJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/webhook/generic/testdata/push-generic.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsWebhookGenericTestdataPushGitlabJson = []byte(`{
  "object_kind":"push",
  "before":"cf1fa898d2a78685ccde72f14b4922b474f73cd1",
  "after":"2602ace61490de0513dfbd7c7de949356cf9bd17",
  "ref":"refs/heads/master",
  "checkout_sha":"2602ace61490de0513dfbd7c7de949356cf9bd17",
  "message":null,
  "user_id":12345,
  "user_name":"Jon Doe",
  "user_email":"jondoe@email.com",
  "project_id":12345,
  "repository":{
    "name":"ruby-hello-world",
    "url":"git@gitlab.com:jondoe/repo.git",
    "description":"",
    "homepage":"https://gitlab.com/jondoe/repo",
    "git_http_url":"https://gitlab.com/jondoe/repo",
    "git_ssh_url":"git@gitlab.com:jondoe/repo",
    "visibility_level":20
  },
  "commits":[
    {
      "id":"2602ace61490de0513dfbd7c7de949356cf9bd17",
      "message":"Random act of kindness",
      "timestamp":"2015-03-17T09:23:58+01:00",
      "url":"https://gitlab.com/jondoe/repo/commit/2602ace61490de0513dfbd7c7de949356cf9bd17",
      "author":{
        "name":"Jon Doe",
        "email":"jondoe@email.com"
      }
    }
  ],
  "total_commits_count":3
}
`)

func testExtendedTestdataBuildsWebhookGenericTestdataPushGitlabJsonBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsWebhookGenericTestdataPushGitlabJson, nil
}

func testExtendedTestdataBuildsWebhookGenericTestdataPushGitlabJson() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsWebhookGenericTestdataPushGitlabJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/webhook/generic/testdata/push-gitlab.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsWebhookGithubTestdataPingeventJson = []byte(`{
   "zen":"Encourage flow.",
   "hook":{
      "url":"https://api.github.com/repos/anonUser/anonRepo/hooks/2896466",
      "test_url":"https://api.github.com/repos/anonUser/anonRepo/hooks/2896466/test",
      "id":2896466,
      "name":"web",
      "active":true,
      "events":[
         "push"
      ],
      "config":{
         "secret":"",
         "url":"http://example.com/gitwebhook",
         "content_type":"json",
         "insecure_ssl":"0"
      },
      "last_response":{
         "code":null,
         "status":"unused",
         "message":null
      },
      "updated_at":"2014-08-28T14:25:47Z",
      "created_at":"2014-08-28T14:25:47Z"
   },
   "hook_id":2896466
}
`)

func testExtendedTestdataBuildsWebhookGithubTestdataPingeventJsonBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsWebhookGithubTestdataPingeventJson, nil
}

func testExtendedTestdataBuildsWebhookGithubTestdataPingeventJson() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsWebhookGithubTestdataPingeventJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/webhook/github/testdata/pingevent.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsWebhookGithubTestdataPusheventNotMasterBranchJson = []byte(`{
   "ref":"refs/heads/my_other_branch",
   "after":"9bdc3a26ff933b32f3e558636b58aea86a69f051",
   "before":"0000000000000000000000000000000000000000",
   "created":true,
   "deleted":false,
   "forced":true,
   "compare":"https://github.com/anonUser/anonRepo/commit/9bdc3a26ff93",
   "commits":[
      {
         "id":"9bdc3a26ff933b32f3e558636b58aea86a69f051",
         "distinct":true,
         "message":"Added license",
         "timestamp":"2014-08-28T16:55:36+02:00",
         "url":"https://github.com/anonUser/anonRepo/commit/9bdc3a26ff933b32f3e558636b58aea86a69f051",
         "author":{
            "name":"Anonymous User",
            "email":"anonUser@example.com"
         },
         "committer":{
            "name":"Anonymous User",
            "email":"anonUser@example.com"
         },
         "added":[
            "LICENSE"
         ],
         "removed":[

         ],
         "modified":[

         ]
      }
   ],
   "head_commit":{
      "id":"9bdc3a26ff933b32f3e558636b58aea86a69f051",
      "distinct":true,
      "message":"Added license",
      "timestamp":"2014-08-28T16:55:36+02:00",
      "url":"https://github.com/anonUser/anonRepo/commit/9bdc3a26ff933b32f3e558636b58aea86a69f051",
      "author":{
         "name":"Anonymous User",
         "email":"anonUser@example.com"
      },
      "committer":{
         "name":"Anonymous User",
         "email":"anonUser@example.com"
      },
      "added":[
         "LICENSE"
      ],
      "removed":[

      ],
      "modified":[

      ]
   },
   "repository":{
      "id":23354788,
      "name":"anonRepo",
      "full_name":"anonUser/anonRepo",
      "owner":{
         "name":"anonUser",
         "email":"anonUser@example.com"
      },
      "private":false,
      "html_url":"https://github.com/anonUser/anonRepo",
      "description":"Git webhook implementation in Go.",
      "fork":false,
      "url":"https://github.com/anonUser/anonRepo",
      "forks_url":"https://api.github.com/repos/anonUser/anonRepo/forks",
      "keys_url":"https://api.github.com/repos/anonUser/anonRepo/keys{/key_id}",
      "collaborators_url":"https://api.github.com/repos/anonUser/anonRepo/collaborators{/collaborator}",
      "teams_url":"https://api.github.com/repos/anonUser/anonRepo/teams",
      "hooks_url":"https://api.github.com/repos/anonUser/anonRepo/hooks",
      "issue_events_url":"https://api.github.com/repos/anonUser/anonRepo/issues/events{/number}",
      "events_url":"https://api.github.com/repos/anonUser/anonRepo/events",
      "assignees_url":"https://api.github.com/repos/anonUser/anonRepo/assignees{/user}",
      "branches_url":"https://api.github.com/repos/anonUser/anonRepo/branches{/branch}",
      "tags_url":"https://api.github.com/repos/anonUser/anonRepo/tags",
      "blobs_url":"https://api.github.com/repos/anonUser/anonRepo/git/blobs{/sha}",
      "git_tags_url":"https://api.github.com/repos/anonUser/anonRepo/git/tags{/sha}",
      "git_refs_url":"https://api.github.com/repos/anonUser/anonRepo/git/refs{/sha}",
      "trees_url":"https://api.github.com/repos/anonUser/anonRepo/git/trees{/sha}",
      "statuses_url":"https://api.github.com/repos/anonUser/anonRepo/statuses/{sha}",
      "languages_url":"https://api.github.com/repos/anonUser/anonRepo/languages",
      "stargazers_url":"https://api.github.com/repos/anonUser/anonRepo/stargazers",
      "contributors_url":"https://api.github.com/repos/anonUser/anonRepo/contributors",
      "subscribers_url":"https://api.github.com/repos/anonUser/anonRepo/subscribers",
      "subscription_url":"https://api.github.com/repos/anonUser/anonRepo/subscription",
      "commits_url":"https://api.github.com/repos/anonUser/anonRepo/commits{/sha}",
      "git_commits_url":"https://api.github.com/repos/anonUser/anonRepo/git/commits{/sha}",
      "comments_url":"https://api.github.com/repos/anonUser/anonRepo/comments{/number}",
      "issue_comment_url":"https://api.github.com/repos/anonUser/anonRepo/issues/comments/{number}",
      "contents_url":"https://api.github.com/repos/anonUser/anonRepo/contents/{+path}",
      "compare_url":"https://api.github.com/repos/anonUser/anonRepo/compare/{base}...{head}",
      "merges_url":"https://api.github.com/repos/anonUser/anonRepo/merges",
      "archive_url":"https://api.github.com/repos/anonUser/anonRepo/{archive_format}{/ref}",
      "downloads_url":"https://api.github.com/repos/anonUser/anonRepo/downloads",
      "issues_url":"https://api.github.com/repos/anonUser/anonRepo/issues{/number}",
      "pulls_url":"https://api.github.com/repos/anonUser/anonRepo/pulls{/number}",
      "milestones_url":"https://api.github.com/repos/anonUser/anonRepo/milestones{/number}",
      "notifications_url":"https://api.github.com/repos/anonUser/anonRepo/notifications{?since,all,participating}",
      "labels_url":"https://api.github.com/repos/anonUser/anonRepo/labels{/name}",
      "releases_url":"https://api.github.com/repos/anonUser/anonRepo/releases{/id}",
      "created_at":1409063699,
      "updated_at":"2014-08-26T14:34:59Z",
      "pushed_at":1409238007,
      "git_url":"git://github.com/anonUser/anonRepo.git",
      "ssh_url":"git@github.com:anonUser/anonRepo.git",
      "clone_url":"https://github.com/anonUser/anonRepo.git",
      "svn_url":"https://github.com/anonUser/anonRepo",
      "homepage":null,
      "size":0,
      "stargazers_count":0,
      "watchers_count":0,
      "language":null,
      "has_issues":true,
      "has_downloads":true,
      "has_wiki":true,
      "forks_count":0,
      "mirror_url":null,
      "open_issues_count":0,
      "forks":0,
      "open_issues":0,
      "watchers":0,
      "default_branch":"master",
      "stargazers":0,
      "master_branch":"master"
   },
   "pusher":{
      "name":"anonUser",
      "email":"anonUser@example.com"
   }
}
`)

func testExtendedTestdataBuildsWebhookGithubTestdataPusheventNotMasterBranchJsonBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsWebhookGithubTestdataPusheventNotMasterBranchJson, nil
}

func testExtendedTestdataBuildsWebhookGithubTestdataPusheventNotMasterBranchJson() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsWebhookGithubTestdataPusheventNotMasterBranchJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/webhook/github/testdata/pushevent-not-master-branch.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsWebhookGithubTestdataPusheventJson = []byte(`{
   "ref":"refs/heads/master",
   "after":"9bdc3a26ff933b32f3e558636b58aea86a69f051",
   "before":"0000000000000000000000000000000000000000",
   "created":true,
   "deleted":false,
   "forced":true,
   "compare":"https://github.com/anonUser/anonRepo/commit/9bdc3a26ff93",
   "commits":[
      {
         "id":"9bdc3a26ff933b32f3e558636b58aea86a69f051",
         "distinct":true,
         "message":"Added license",
         "timestamp":"2014-08-28T16:55:36+02:00",
         "url":"https://github.com/anonUser/anonRepo/commit/9bdc3a26ff933b32f3e558636b58aea86a69f051",
         "author":{
            "name":"Anonymous User",
            "email":"anonUser@example.com"
         },
         "committer":{
            "name":"Anonymous User",
            "email":"anonUser@example.com"
         },
         "added":[
            "LICENSE"
         ],
         "removed":[

         ],
         "modified":[

         ]
      }
   ],
   "head_commit":{
      "id":"9bdc3a26ff933b32f3e558636b58aea86a69f051",
      "distinct":true,
      "message":"Added license",
      "timestamp":"2014-08-28T16:55:36+02:00",
      "url":"https://github.com/anonUser/anonRepo/commit/9bdc3a26ff933b32f3e558636b58aea86a69f051",
      "author":{
         "name":"Anonymous User",
         "email":"anonUser@example.com"
      },
      "committer":{
         "name":"Anonymous User",
         "email":"anonUser@example.com"
      },
      "added":[
         "LICENSE"
      ],
      "removed":[

      ],
      "modified":[

      ]
   },
   "repository":{
      "id":23354788,
      "name":"anonRepo",
      "full_name":"anonUser/anonRepo",
      "owner":{
         "name":"anonUser",
         "email":"anonUser@example.com"
      },
      "private":false,
      "html_url":"https://github.com/anonUser/anonRepo",
      "description":"Git webhook implementation in Go.",
      "fork":false,
      "url":"https://github.com/anonUser/anonRepo",
      "forks_url":"https://api.github.com/repos/anonUser/anonRepo/forks",
      "keys_url":"https://api.github.com/repos/anonUser/anonRepo/keys{/key_id}",
      "collaborators_url":"https://api.github.com/repos/anonUser/anonRepo/collaborators{/collaborator}",
      "teams_url":"https://api.github.com/repos/anonUser/anonRepo/teams",
      "hooks_url":"https://api.github.com/repos/anonUser/anonRepo/hooks",
      "issue_events_url":"https://api.github.com/repos/anonUser/anonRepo/issues/events{/number}",
      "events_url":"https://api.github.com/repos/anonUser/anonRepo/events",
      "assignees_url":"https://api.github.com/repos/anonUser/anonRepo/assignees{/user}",
      "branches_url":"https://api.github.com/repos/anonUser/anonRepo/branches{/branch}",
      "tags_url":"https://api.github.com/repos/anonUser/anonRepo/tags",
      "blobs_url":"https://api.github.com/repos/anonUser/anonRepo/git/blobs{/sha}",
      "git_tags_url":"https://api.github.com/repos/anonUser/anonRepo/git/tags{/sha}",
      "git_refs_url":"https://api.github.com/repos/anonUser/anonRepo/git/refs{/sha}",
      "trees_url":"https://api.github.com/repos/anonUser/anonRepo/git/trees{/sha}",
      "statuses_url":"https://api.github.com/repos/anonUser/anonRepo/statuses/{sha}",
      "languages_url":"https://api.github.com/repos/anonUser/anonRepo/languages",
      "stargazers_url":"https://api.github.com/repos/anonUser/anonRepo/stargazers",
      "contributors_url":"https://api.github.com/repos/anonUser/anonRepo/contributors",
      "subscribers_url":"https://api.github.com/repos/anonUser/anonRepo/subscribers",
      "subscription_url":"https://api.github.com/repos/anonUser/anonRepo/subscription",
      "commits_url":"https://api.github.com/repos/anonUser/anonRepo/commits{/sha}",
      "git_commits_url":"https://api.github.com/repos/anonUser/anonRepo/git/commits{/sha}",
      "comments_url":"https://api.github.com/repos/anonUser/anonRepo/comments{/number}",
      "issue_comment_url":"https://api.github.com/repos/anonUser/anonRepo/issues/comments/{number}",
      "contents_url":"https://api.github.com/repos/anonUser/anonRepo/contents/{+path}",
      "compare_url":"https://api.github.com/repos/anonUser/anonRepo/compare/{base}...{head}",
      "merges_url":"https://api.github.com/repos/anonUser/anonRepo/merges",
      "archive_url":"https://api.github.com/repos/anonUser/anonRepo/{archive_format}{/ref}",
      "downloads_url":"https://api.github.com/repos/anonUser/anonRepo/downloads",
      "issues_url":"https://api.github.com/repos/anonUser/anonRepo/issues{/number}",
      "pulls_url":"https://api.github.com/repos/anonUser/anonRepo/pulls{/number}",
      "milestones_url":"https://api.github.com/repos/anonUser/anonRepo/milestones{/number}",
      "notifications_url":"https://api.github.com/repos/anonUser/anonRepo/notifications{?since,all,participating}",
      "labels_url":"https://api.github.com/repos/anonUser/anonRepo/labels{/name}",
      "releases_url":"https://api.github.com/repos/anonUser/anonRepo/releases{/id}",
      "created_at":1409063699,
      "updated_at":"2014-08-26T14:34:59Z",
      "pushed_at":1409238007,
      "git_url":"git://github.com/anonUser/anonRepo.git",
      "ssh_url":"git@github.com:anonUser/anonRepo.git",
      "clone_url":"https://github.com/anonUser/anonRepo.git",
      "svn_url":"https://github.com/anonUser/anonRepo",
      "homepage":null,
      "size":0,
      "stargazers_count":0,
      "watchers_count":0,
      "language":null,
      "has_issues":true,
      "has_downloads":true,
      "has_wiki":true,
      "forks_count":0,
      "mirror_url":null,
      "open_issues_count":0,
      "forks":0,
      "open_issues":0,
      "watchers":0,
      "default_branch":"master",
      "stargazers":0,
      "master_branch":"master"
   },
   "pusher":{
      "name":"anonUser",
      "email":"anonUser@example.com"
   }
}
`)

func testExtendedTestdataBuildsWebhookGithubTestdataPusheventJsonBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsWebhookGithubTestdataPusheventJson, nil
}

func testExtendedTestdataBuildsWebhookGithubTestdataPusheventJson() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsWebhookGithubTestdataPusheventJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/webhook/github/testdata/pushevent.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsWebhookGitlabTestdataPusheventNotMasterBranchJson = []byte(`{
  "object_kind": "push",
  "before": "95790bf891e76fee5e1747ab589903a6a1f80f22",
  "after": "da1560886d4f094c3e6c9ef40349f7d38b5d27d7",
  "ref": "refs/heads/my_other_branch",
  "checkout_sha": "da1560886d4f094c3e6c9ef40349f7d38b5d27d7",
  "user_id": 4,
  "user_name": "John Smith",
  "user_email": "john@example.com",
  "user_avatar": "https://s.gravatar.com/avatar/d4c74594d841139328695756648b6bd6?s=8://s.gravatar.com/avatar/d4c74594d841139328695756648b6bd6?s=80",
  "project_id": 15,
  "project":{
    "name":"Diaspora",
    "description":"",
    "web_url":"http://example.com/mike/diaspora",
    "avatar_url":null,
    "git_ssh_url":"git@example.com:mike/diaspora.git",
    "git_http_url":"http://example.com/mike/diaspora.git",
    "namespace":"Mike",
    "visibility_level":0,
    "path_with_namespace":"mike/diaspora",
    "default_branch":"master",
    "homepage":"http://example.com/mike/diaspora",
    "url":"git@example.com:mike/diaspora.git",
    "ssh_url":"git@example.com:mike/diaspora.git",
    "http_url":"http://example.com/mike/diaspora.git"
  },
  "repository":{
    "name": "Diaspora",
    "url": "git@example.com:mike/diaspora.git",
    "description": "",
    "homepage": "http://example.com/mike/diaspora",
    "git_http_url":"http://example.com/mike/diaspora.git",
    "git_ssh_url":"git@example.com:mike/diaspora.git",
    "visibility_level":0
  },
  "commits": [
    {
      "id": "b6568db1bc1dcd7f8b4d5a946b0b91f9dacd7327",
      "message": "Update Catalan translation to e38cb41.",
      "timestamp": "2011-12-12T14:27:31+02:00",
      "url": "http://example.com/mike/diaspora/commit/b6568db1bc1dcd7f8b4d5a946b0b91f9dacd7327",
      "author": {
        "name": "Jordi Mallach",
        "email": "jordi@softcatala.org"
      },
      "added": ["CHANGELOG"],
      "modified": ["app/controller/application.rb"],
      "removed": []
    },
    {
      "id": "da1560886d4f094c3e6c9ef40349f7d38b5d27d7",
      "message": "fixed readme",
      "timestamp": "2012-01-03T23:36:29+02:00",
      "url": "http://example.com/mike/diaspora/commit/da1560886d4f094c3e6c9ef40349f7d38b5d27d7",
      "author": {
        "name": "GitLab dev user",
        "email": "gitlabdev@dv6700.(none)"
      },
      "added": ["CHANGELOG"],
      "modified": ["app/controller/application.rb"],
      "removed": []
    }
  ],
  "total_commits_count": 4
}
`)

func testExtendedTestdataBuildsWebhookGitlabTestdataPusheventNotMasterBranchJsonBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsWebhookGitlabTestdataPusheventNotMasterBranchJson, nil
}

func testExtendedTestdataBuildsWebhookGitlabTestdataPusheventNotMasterBranchJson() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsWebhookGitlabTestdataPusheventNotMasterBranchJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/webhook/gitlab/testdata/pushevent-not-master-branch.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataBuildsWebhookGitlabTestdataPusheventJson = []byte(`{
  "object_kind": "push",
  "before": "95790bf891e76fee5e1747ab589903a6a1f80f22",
  "after": "da1560886d4f094c3e6c9ef40349f7d38b5d27d7",
  "ref": "refs/heads/master",
  "checkout_sha": "da1560886d4f094c3e6c9ef40349f7d38b5d27d7",
  "user_id": 4,
  "user_name": "John Smith",
  "user_email": "john@example.com",
  "user_avatar": "https://s.gravatar.com/avatar/d4c74594d841139328695756648b6bd6?s=8://s.gravatar.com/avatar/d4c74594d841139328695756648b6bd6?s=80",
  "project_id": 15,
  "project":{
    "name":"Diaspora",
    "description":"",
    "web_url":"http://example.com/mike/diaspora",
    "avatar_url":null,
    "git_ssh_url":"git@example.com:mike/diaspora.git",
    "git_http_url":"http://example.com/mike/diaspora.git",
    "namespace":"Mike",
    "visibility_level":0,
    "path_with_namespace":"mike/diaspora",
    "default_branch":"master",
    "homepage":"http://example.com/mike/diaspora",
    "url":"git@example.com:mike/diaspora.git",
    "ssh_url":"git@example.com:mike/diaspora.git",
    "http_url":"http://example.com/mike/diaspora.git"
  },
  "repository":{
    "name": "Diaspora",
    "url": "git@example.com:mike/diaspora.git",
    "description": "",
    "homepage": "http://example.com/mike/diaspora",
    "git_http_url":"http://example.com/mike/diaspora.git",
    "git_ssh_url":"git@example.com:mike/diaspora.git",
    "visibility_level":0
  },
  "commits": [
    {
      "id": "b6568db1bc1dcd7f8b4d5a946b0b91f9dacd7327",
      "message": "Update Catalan translation to e38cb41.",
      "timestamp": "2011-12-12T14:27:31+02:00",
      "url": "http://example.com/mike/diaspora/commit/b6568db1bc1dcd7f8b4d5a946b0b91f9dacd7327",
      "author": {
        "name": "Jordi Mallach",
        "email": "jordi@softcatala.org"
      },
      "added": ["CHANGELOG"],
      "modified": ["app/controller/application.rb"],
      "removed": []
    },
    {
      "id": "da1560886d4f094c3e6c9ef40349f7d38b5d27d7",
      "message": "fixed readme",
      "timestamp": "2012-01-03T23:36:29+02:00",
      "url": "http://example.com/mike/diaspora/commit/da1560886d4f094c3e6c9ef40349f7d38b5d27d7",
      "author": {
        "name": "GitLab dev user",
        "email": "gitlabdev@dv6700.(none)"
      },
      "added": ["CHANGELOG"],
      "modified": ["app/controller/application.rb"],
      "removed": []
    }
  ],
  "total_commits_count": 4
}
`)

func testExtendedTestdataBuildsWebhookGitlabTestdataPusheventJsonBytes() ([]byte, error) {
	return _testExtendedTestdataBuildsWebhookGitlabTestdataPusheventJson, nil
}

func testExtendedTestdataBuildsWebhookGitlabTestdataPusheventJson() (*asset, error) {
	bytes, err := testExtendedTestdataBuildsWebhookGitlabTestdataPusheventJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/builds/webhook/gitlab/testdata/pushevent.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCliPodWithTwoContainersYaml = []byte(`kind: Pod
apiVersion: v1
metadata:
  name: doublecontainers
  labels:
    name: hello-centos
spec:
  containers:
  - name: hello-centos
    image: docker.io/centos:centos7
    command:
      - /bin/sleep
      - infinity
    resources:
      limits:
        memory: 256Mi
    terminationMessagePath: "/dev/termination-log"
    imagePullPolicy: IfNotPresent
    capabilities: {}
    securityContext: {}
  - name: hello-centos-2
    image: docker.io/centos:centos7
    command:
      - /bin/sleep
      - infinity
    resources:
      limits:
        memory: 256Mi
    terminationMessagePath: "/dev/termination-log1"
    imagePullPolicy: IfNotPresent
    capabilities: {}
    securityContext: {}
  restartPolicy: Always
  dnsPolicy: ClusterFirst
  serviceAccount: ''
status: {}
`)

func testExtendedTestdataCliPodWithTwoContainersYamlBytes() ([]byte, error) {
	return _testExtendedTestdataCliPodWithTwoContainersYaml, nil
}

func testExtendedTestdataCliPodWithTwoContainersYaml() (*asset, error) {
	bytes, err := testExtendedTestdataCliPodWithTwoContainersYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cli/pod-with-two-containers.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataClusterMasterVertYaml = []byte(`provider: local
ClusterLoader:
  cleanup: true
  ifexists: delete
  projects:
    - num: 1
      basename: clusterloader-cakephp-mysql
      ifexists: delete
      tuning: default
      templates:
        - num: 1
          file: ./quickstarts/cakephp-mysql.json
  
    - num: 1
      basename: clusterloader-dancer-mysql
      ifexists: delete
      tuning: default
      templates:
        - num: 1
          file: ./quickstarts/dancer-mysql.json
  
    - num: 1
      basename: clusterloader-django-postgresql
      ifexists: delete
      tuning: default
      templates:
        - num: 1
          file: ./quickstarts/django-postgresql.json
  
    - num: 1
      basename: clusterloader-nodejs-mongodb
      ifexists: delete
      tuning: default
      templates:
        - num: 1
          file: ./quickstarts/nodejs-mongodb.json
  
    - num: 1
      basename: clusterloader-rails-postgresql
      ifexists: delete
      tuning: default
      templates:
        - num: 1
          file: ./quickstarts/rails-postgresql.json
  
  tuningsets:
    - name: default
      pods:
        stepping:
          stepsize: 5
          pause: 0 min
        rate_limit:
          delay: 0 ms
`)

func testExtendedTestdataClusterMasterVertYamlBytes() ([]byte, error) {
	return _testExtendedTestdataClusterMasterVertYaml, nil
}

func testExtendedTestdataClusterMasterVertYaml() (*asset, error) {
	bytes, err := testExtendedTestdataClusterMasterVertYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cluster/master-vert.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataClusterQuickstartsCakephpMysqlJson = []byte(`{
    "apiVersion": "v1",
    "kind": "Template",
    "labels": {
        "app": "cakephp-mysql-example",
        "template": "cakephp-mysql-example"
    },
    "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/cakephp-ex/blob/master/README.md.",
    "metadata": {
        "annotations": {
            "description": "An example CakePHP application with a MySQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/cakephp-ex/blob/master/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.",
            "iconClass": "icon-php",
            "openshift.io/display-name": "CakePHP + MySQL (Ephemeral)",
            "openshift.io/documentation-url": "https://github.com/sclorg/cakephp-ex",
            "openshift.io/long-description": "This template defines resources needed to develop a CakePHP application, including a build configuration, application deployment configuration, and database deployment configuration.  The database is stored in non-persistent storage, so this configuration should be used for experimental purposes only.",
            "openshift.io/provider-display-name": "Red Hat, Inc.",
            "openshift.io/support-url": "https://access.redhat.com",
            "tags": "quickstart,php,cakephp",
            "template.openshift.io/bindable": "false"
        },
        "name": "cakephp-mysql-example"
    },
    "objects": [
        {
            "apiVersion": "v1",
            "kind": "Secret",
            "metadata": {
                "name": "${NAME}"
            },
            "stringData": {
                "cakephp-secret-token": "${CAKEPHP_SECRET_TOKEN}",
                "cakephp-security-salt": "${CAKEPHP_SECURITY_SALT}",
                "database-password": "${DATABASE_PASSWORD}",
                "database-user": "${DATABASE_USER}"
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Service",
            "metadata": {
                "annotations": {
                    "description": "Exposes and load balances the application pods",
                    "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]"
                },
                "name": "${NAME}"
            },
            "spec": {
                "ports": [
                    {
                        "name": "web",
                        "port": 8080,
                        "targetPort": 8080
                    }
                ],
                "selector": {
                    "name": "${NAME}"
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Route",
            "metadata": {
                "name": "${NAME}"
            },
            "spec": {
                "host": "${APPLICATION_DOMAIN}",
                "to": {
                    "kind": "Service",
                    "name": "${NAME}"
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "ImageStream",
            "metadata": {
                "annotations": {
                    "description": "Keeps track of changes in the application image"
                },
                "name": "${NAME}"
            }
        },
        {
            "apiVersion": "v1",
            "kind": "BuildConfig",
            "metadata": {
                "annotations": {
                    "description": "Defines how to build the application",
                    "template.alpha.openshift.io/wait-for-ready": "true"
                },
                "name": "${NAME}"
            },
            "spec": {
                "output": {
                    "to": {
                        "kind": "ImageStreamTag",
                        "name": "${NAME}:latest"
                    }
                },
                "postCommit": {
                    "script": "./vendor/bin/phpunit"
                },
                "source": {
                    "contextDir": "${CONTEXT_DIR}",
                    "git": {
                        "ref": "${SOURCE_REPOSITORY_REF}",
                        "uri": "${SOURCE_REPOSITORY_URL}"
                    },
                    "type": "Git"
                },
                "strategy": {
                    "sourceStrategy": {
                        "env": [
                            {
                                "name": "COMPOSER_MIRROR",
                                "value": "${COMPOSER_MIRROR}"
                            }
                        ],
                        "from": {
                            "kind": "ImageStreamTag",
                            "name": "php:${PHP_VERSION}",
                            "namespace": "${NAMESPACE}"
                        }
                    },
                    "type": "Source"
                },
                "triggers": [
                    {
                        "type": "ImageChange"
                    },
                    {
                        "type": "ConfigChange"
                    },
                    {
                        "github": {
                            "secret": "${GITHUB_WEBHOOK_SECRET}"
                        },
                        "type": "GitHub"
                    }
                ]
            }
        },
        {
            "apiVersion": "v1",
            "kind": "DeploymentConfig",
            "metadata": {
                "annotations": {
                    "description": "Defines how to deploy the application server",
                    "template.alpha.openshift.io/wait-for-ready": "true"
                },
                "name": "${NAME}"
            },
            "spec": {
                "replicas": 1,
                "selector": {
                    "name": "${NAME}"
                },
                "strategy": {
                    "recreateParams": {
                        "pre": {
                            "execNewPod": {
                                "command": [
                                    "./migrate-database.sh"
                                ],
                                "containerName": "cakephp-mysql-example"
                            },
                            "failurePolicy": "Retry"
                        }
                    },
                    "type": "Recreate"
                },
                "template": {
                    "metadata": {
                        "labels": {
                            "name": "${NAME}"
                        },
                        "name": "${NAME}"
                    },
                    "spec": {
                        "containers": [
                            {
                                "env": [
                                    {
                                        "name": "DATABASE_SERVICE_NAME",
                                        "value": "${DATABASE_SERVICE_NAME}"
                                    },
                                    {
                                        "name": "DATABASE_ENGINE",
                                        "value": "${DATABASE_ENGINE}"
                                    },
                                    {
                                        "name": "DATABASE_NAME",
                                        "value": "${DATABASE_NAME}"
                                    },
                                    {
                                        "name": "DATABASE_USER",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-user",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "DATABASE_PASSWORD",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-password",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "CAKEPHP_SECRET_TOKEN",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "cakephp-secret-token",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "CAKEPHP_SECURITY_SALT",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "cakephp-security-salt",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "OPCACHE_REVALIDATE_FREQ",
                                        "value": "${OPCACHE_REVALIDATE_FREQ}"
                                    }
                                ],
                                "image": " ",
                                "livenessProbe": {
                                    "httpGet": {
                                        "path": "/health.php",
                                        "port": 8080
                                    },
                                    "initialDelaySeconds": 30,
                                    "periodSeconds": 60,
                                    "timeoutSeconds": 3
                                },
                                "name": "cakephp-mysql-example",
                                "ports": [
                                    {
                                        "containerPort": 8080
                                    }
                                ],
                                "readinessProbe": {
                                    "httpGet": {
                                        "path": "/health.php",
                                        "port": 8080
                                    },
                                    "initialDelaySeconds": 3,
                                    "periodSeconds": 60,
                                    "timeoutSeconds": 3
                                },
                                "resources": {
                                    "limits": {
                                        "memory": "${MEMORY_LIMIT}"
                                    }
                                }
                            }
                        ]
                    }
                },
                "triggers": [
                    {
                        "imageChangeParams": {
                            "automatic": true,
                            "containerNames": [
                                "cakephp-mysql-example"
                            ],
                            "from": {
                                "kind": "ImageStreamTag",
                                "name": "${NAME}:latest"
                            }
                        },
                        "type": "ImageChange"
                    },
                    {
                        "type": "ConfigChange"
                    }
                ]
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Service",
            "metadata": {
                "annotations": {
                    "description": "Exposes the database server"
                },
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "spec": {
                "ports": [
                    {
                        "name": "mysql",
                        "port": 3306,
                        "targetPort": 3306
                    }
                ],
                "selector": {
                    "name": "${DATABASE_SERVICE_NAME}"
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "DeploymentConfig",
            "metadata": {
                "annotations": {
                    "description": "Defines how to deploy the database",
                    "template.alpha.openshift.io/wait-for-ready": "true"
                },
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "spec": {
                "replicas": 1,
                "selector": {
                    "name": "${DATABASE_SERVICE_NAME}"
                },
                "strategy": {
                    "type": "Recreate"
                },
                "template": {
                    "metadata": {
                        "labels": {
                            "name": "${DATABASE_SERVICE_NAME}"
                        },
                        "name": "${DATABASE_SERVICE_NAME}"
                    },
                    "spec": {
                        "containers": [
                            {
                                "env": [
                                    {
                                        "name": "MYSQL_USER",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-user",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "MYSQL_PASSWORD",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-password",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "MYSQL_DATABASE",
                                        "value": "${DATABASE_NAME}"
                                    }
                                ],
                                "image": " ",
                                "livenessProbe": {
                                    "initialDelaySeconds": 30,
                                    "tcpSocket": {
                                        "port": 3306
                                    },
                                    "timeoutSeconds": 1
                                },
                                "name": "mysql",
                                "ports": [
                                    {
                                        "containerPort": 3306
                                    }
                                ],
                                "readinessProbe": {
                                    "exec": {
                                        "command": [
                                            "/bin/sh",
                                            "-i",
                                            "-c",
                                            "MYSQL_PWD='${DATABASE_PASSWORD}' mysql -h 127.0.0.1 -u ${DATABASE_USER} -D ${DATABASE_NAME} -e 'SELECT 1'"
                                        ]
                                    },
                                    "initialDelaySeconds": 5,
                                    "timeoutSeconds": 1
                                },
                                "resources": {
                                    "limits": {
                                        "memory": "${MEMORY_MYSQL_LIMIT}"
                                    }
                                },
                                "volumeMounts": [
                                    {
                                        "mountPath": "/var/lib/mysql/data",
                                        "name": "data"
                                    }
                                ]
                            }
                        ],
                        "volumes": [
                            {
                                "emptyDir": {},
                                "name": "data"
                            }
                        ]
                    }
                },
                "triggers": [
                    {
                        "imageChangeParams": {
                            "automatic": true,
                            "containerNames": [
                                "mysql"
                            ],
                            "from": {
                                "kind": "ImageStreamTag",
                                "name": "mysql:5.7",
                                "namespace": "${NAMESPACE}"
                            }
                        },
                        "type": "ImageChange"
                    },
                    {
                        "type": "ConfigChange"
                    }
                ]
            }
        }
    ],
    "parameters": [
        {
            "description": "The name assigned to all of the frontend objects defined in this template.",
            "displayName": "Name",
            "name": "NAME",
            "required": true,
            "value": "cakephp-mysql-example"
        },
        {
            "description": "The OpenShift Namespace where the ImageStream resides.",
            "displayName": "Namespace",
            "name": "NAMESPACE",
            "required": true,
            "value": "openshift"
        },
        {
            "description": "Version of PHP image to be used (7.1 or latest).",
            "displayName": "PHP Version",
            "name": "PHP_VERSION",
            "required": true,
            "value": "7.1"
        },
        {
            "description": "Maximum amount of memory the CakePHP container can use.",
            "displayName": "Memory Limit",
            "name": "MEMORY_LIMIT",
            "required": true,
            "value": "512Mi"
        },
        {
            "description": "Maximum amount of memory the MySQL container can use.",
            "displayName": "Memory Limit (MySQL)",
            "name": "MEMORY_MYSQL_LIMIT",
            "required": true,
            "value": "512Mi"
        },
        {
            "description": "The URL of the repository with your application source code.",
            "displayName": "Git Repository URL",
            "name": "SOURCE_REPOSITORY_URL",
            "required": true,
            "value": "https://github.com/sclorg/cakephp-ex.git"
        },
        {
            "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.",
            "displayName": "Git Reference",
            "name": "SOURCE_REPOSITORY_REF"
        },
        {
            "description": "Set this to the relative path to your project if it is not in the root of your repository.",
            "displayName": "Context Directory",
            "name": "CONTEXT_DIR"
        },
        {
            "description": "The exposed hostname that will route to the CakePHP service, if left blank a value will be defaulted.",
            "displayName": "Application Hostname",
            "name": "APPLICATION_DOMAIN",
            "value": ""
        },
        {
            "description": "Github trigger secret.  A difficult to guess string encoded as part of the webhook URL.  Not encrypted.",
            "displayName": "GitHub Webhook Secret",
            "from": "[a-zA-Z0-9]{40}",
            "generate": "expression",
            "name": "GITHUB_WEBHOOK_SECRET"
        },
        {
            "displayName": "Database Service Name",
            "name": "DATABASE_SERVICE_NAME",
            "required": true,
            "value": "mysql"
        },
        {
            "description": "Database engine: postgresql, mysql or sqlite (default).",
            "displayName": "Database Engine",
            "name": "DATABASE_ENGINE",
            "required": true,
            "value": "mysql"
        },
        {
            "displayName": "Database Name",
            "name": "DATABASE_NAME",
            "required": true,
            "value": "default"
        },
        {
            "displayName": "Database User",
            "name": "DATABASE_USER",
            "required": true,
            "value": "cakephp"
        },
        {
            "displayName": "Database Password",
            "from": "[a-zA-Z0-9]{16}",
            "generate": "expression",
            "name": "DATABASE_PASSWORD"
        },
        {
            "description": "Set this to a long random string.",
            "displayName": "CakePHP secret token",
            "from": "[\\w]{50}",
            "generate": "expression",
            "name": "CAKEPHP_SECRET_TOKEN"
        },
        {
            "description": "Security salt for session hash.",
            "displayName": "CakePHP Security Salt",
            "from": "[a-zA-Z0-9]{40}",
            "generate": "expression",
            "name": "CAKEPHP_SECURITY_SALT"
        },
        {
            "description": "How often to check script timestamps for updates, in seconds. 0 will result in OPcache checking for updates on every request.",
            "displayName": "OPcache Revalidation Frequency",
            "name": "OPCACHE_REVALIDATE_FREQ",
            "value": "2"
        },
        {
            "description": "The custom Composer mirror URL",
            "displayName": "Custom Composer Mirror URL",
            "name": "COMPOSER_MIRROR",
            "value": ""
        },
        {
            "description": "Unique template ID to prevent name conflict",
            "displayName": "CL generation ID",
            "name": "IDENTIFIER",
            "value": "0"
        }
    ]
}
`)

func testExtendedTestdataClusterQuickstartsCakephpMysqlJsonBytes() ([]byte, error) {
	return _testExtendedTestdataClusterQuickstartsCakephpMysqlJson, nil
}

func testExtendedTestdataClusterQuickstartsCakephpMysqlJson() (*asset, error) {
	bytes, err := testExtendedTestdataClusterQuickstartsCakephpMysqlJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cluster/quickstarts/cakephp-mysql.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataClusterQuickstartsDancerMysqlJson = []byte(`{
    "apiVersion": "v1",
    "kind": "Template",
    "labels": {
        "app": "dancer-mysql-example",
        "template": "dancer-mysql-example"
    },
    "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/dancer-ex/blob/master/README.md.",
    "metadata": {
        "annotations": {
            "description": "An example Dancer application with a MySQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/dancer-ex/blob/master/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.",
            "iconClass": "icon-perl",
            "openshift.io/display-name": "Dancer + MySQL (Ephemeral)",
            "openshift.io/documentation-url": "https://github.com/sclorg/dancer-ex",
            "openshift.io/long-description": "This template defines resources needed to develop a Dancer based application, including a build configuration, application deployment configuration, and database deployment configuration.  The database is stored in non-persistent storage, so this configuration should be used for experimental purposes only.",
            "openshift.io/provider-display-name": "Red Hat, Inc.",
            "openshift.io/support-url": "https://access.redhat.com",
            "tags": "quickstart,perl,dancer",
            "template.openshift.io/bindable": "false"
        },
        "name": "dancer-mysql-example"
    },
    "objects": [
        {
            "apiVersion": "v1",
            "kind": "Secret",
            "metadata": {
                "name": "${NAME}"
            },
            "stringData": {
                "database-password": "${DATABASE_PASSWORD}",
                "database-user": "${DATABASE_USER}",
                "keybase": "${SECRET_KEY_BASE}"
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Service",
            "metadata": {
                "annotations": {
                    "description": "Exposes and load balances the application pods",
                    "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]"
                },
                "name": "${NAME}"
            },
            "spec": {
                "ports": [
                    {
                        "name": "web",
                        "port": 8080,
                        "targetPort": 8080
                    }
                ],
                "selector": {
                    "name": "${NAME}"
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Route",
            "metadata": {
                "name": "${NAME}"
            },
            "spec": {
                "host": "${APPLICATION_DOMAIN}",
                "to": {
                    "kind": "Service",
                    "name": "${NAME}"
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "ImageStream",
            "metadata": {
                "annotations": {
                    "description": "Keeps track of changes in the application image"
                },
                "name": "${NAME}"
            }
        },
        {
            "apiVersion": "v1",
            "kind": "BuildConfig",
            "metadata": {
                "annotations": {
                    "description": "Defines how to build the application",
                    "template.alpha.openshift.io/wait-for-ready": "true"
                },
                "name": "${NAME}"
            },
            "spec": {
                "output": {
                    "to": {
                        "kind": "ImageStreamTag",
                        "name": "${NAME}:latest"
                    }
                },
                "postCommit": {
                    "script": "perl -I extlib/lib/perl5 -I lib t/*"
                },
                "source": {
                    "contextDir": "${CONTEXT_DIR}",
                    "git": {
                        "ref": "${SOURCE_REPOSITORY_REF}",
                        "uri": "${SOURCE_REPOSITORY_URL}"
                    },
                    "type": "Git"
                },
                "strategy": {
                    "sourceStrategy": {
                        "env": [
                            {
                                "name": "CPAN_MIRROR",
                                "value": "${CPAN_MIRROR}"
                            }
                        ],
                        "from": {
                            "kind": "ImageStreamTag",
                            "name": "perl:5.26",
                            "namespace": "${NAMESPACE}"
                        }
                    },
                    "type": "Source"
                },
                "triggers": [
                    {
                        "type": "ImageChange"
                    },
                    {
                        "type": "ConfigChange"
                    },
                    {
                        "github": {
                            "secret": "${GITHUB_WEBHOOK_SECRET}"
                        },
                        "type": "GitHub"
                    }
                ]
            }
        },
        {
            "apiVersion": "v1",
            "kind": "DeploymentConfig",
            "metadata": {
                "annotations": {
                    "description": "Defines how to deploy the application server",
                    "template.alpha.openshift.io/wait-for-ready": "true"
                },
                "name": "${NAME}"
            },
            "spec": {
                "replicas": 1,
                "selector": {
                    "name": "${NAME}"
                },
                "strategy": {
                    "type": "Recreate"
                },
                "template": {
                    "metadata": {
                        "labels": {
                            "name": "${NAME}"
                        },
                        "name": "${NAME}"
                    },
                    "spec": {
                        "containers": [
                            {
                                "env": [
                                    {
                                        "name": "DATABASE_SERVICE_NAME",
                                        "value": "${DATABASE_SERVICE_NAME}"
                                    },
                                    {
                                        "name": "MYSQL_USER",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-user",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "MYSQL_PASSWORD",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-password",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "MYSQL_DATABASE",
                                        "value": "${DATABASE_NAME}"
                                    },
                                    {
                                        "name": "SECRET_KEY_BASE",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "keybase",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "PERL_APACHE2_RELOAD",
                                        "value": "${PERL_APACHE2_RELOAD}"
                                    }
                                ],
                                "image": " ",
                                "livenessProbe": {
                                    "httpGet": {
                                        "path": "/health",
                                        "port": 8080
                                    },
                                    "initialDelaySeconds": 30,
                                    "timeoutSeconds": 3
                                },
                                "name": "dancer-mysql-example",
                                "ports": [
                                    {
                                        "containerPort": 8080
                                    }
                                ],
                                "readinessProbe": {
                                    "httpGet": {
                                        "path": "/health",
                                        "port": 8080
                                    },
                                    "initialDelaySeconds": 3,
                                    "timeoutSeconds": 3
                                },
                                "resources": {
                                    "limits": {
                                        "memory": "${MEMORY_LIMIT}"
                                    }
                                }
                            }
                        ]
                    }
                },
                "triggers": [
                    {
                        "imageChangeParams": {
                            "automatic": true,
                            "containerNames": [
                                "dancer-mysql-example"
                            ],
                            "from": {
                                "kind": "ImageStreamTag",
                                "name": "${NAME}:latest"
                            }
                        },
                        "type": "ImageChange"
                    },
                    {
                        "type": "ConfigChange"
                    }
                ]
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Service",
            "metadata": {
                "annotations": {
                    "description": "Exposes the database server"
                },
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "spec": {
                "ports": [
                    {
                        "name": "mysql",
                        "port": 3306,
                        "targetPort": 3306
                    }
                ],
                "selector": {
                    "name": "${DATABASE_SERVICE_NAME}"
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "DeploymentConfig",
            "metadata": {
                "annotations": {
                    "description": "Defines how to deploy the database",
                    "template.alpha.openshift.io/wait-for-ready": "true"
                },
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "spec": {
                "replicas": 1,
                "selector": {
                    "name": "${DATABASE_SERVICE_NAME}"
                },
                "strategy": {
                    "type": "Recreate"
                },
                "template": {
                    "metadata": {
                        "labels": {
                            "name": "${DATABASE_SERVICE_NAME}"
                        },
                        "name": "${DATABASE_SERVICE_NAME}"
                    },
                    "spec": {
                        "containers": [
                            {
                                "env": [
                                    {
                                        "name": "MYSQL_USER",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-user",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "MYSQL_PASSWORD",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-password",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "MYSQL_DATABASE",
                                        "value": "${DATABASE_NAME}"
                                    }
                                ],
                                "image": " ",
                                "livenessProbe": {
                                    "initialDelaySeconds": 30,
                                    "tcpSocket": {
                                        "port": 3306
                                    },
                                    "timeoutSeconds": 1
                                },
                                "name": "mysql",
                                "ports": [
                                    {
                                        "containerPort": 3306
                                    }
                                ],
                                "readinessProbe": {
                                    "exec": {
                                        "command": [
                                            "/bin/sh",
                                            "-i",
                                            "-c",
                                            "MYSQL_PWD='${DATABASE_PASSWORD}' mysql -h 127.0.0.1 -u ${DATABASE_USER} -D ${DATABASE_NAME} -e 'SELECT 1'"
                                        ]
                                    },
                                    "initialDelaySeconds": 5,
                                    "timeoutSeconds": 1
                                },
                                "resources": {
                                    "limits": {
                                        "memory": "${MEMORY_MYSQL_LIMIT}"
                                    }
                                },
                                "volumeMounts": [
                                    {
                                        "mountPath": "/var/lib/mysql/data",
                                        "name": "data"
                                    }
                                ]
                            }
                        ],
                        "volumes": [
                            {
                                "emptyDir": {},
                                "name": "data"
                            }
                        ]
                    }
                },
                "triggers": [
                    {
                        "imageChangeParams": {
                            "automatic": true,
                            "containerNames": [
                                "mysql"
                            ],
                            "from": {
                                "kind": "ImageStreamTag",
                                "name": "mysql:5.7",
                                "namespace": "${NAMESPACE}"
                            }
                        },
                        "type": "ImageChange"
                    },
                    {
                        "type": "ConfigChange"
                    }
                ]
            }
        }
    ],
    "parameters": [
        {
            "description": "The name assigned to all of the frontend objects defined in this template.",
            "displayName": "Name",
            "name": "NAME",
            "required": true,
            "value": "dancer-mysql-example"
        },
        {
            "description": "The OpenShift Namespace where the ImageStream resides.",
            "displayName": "Namespace",
            "name": "NAMESPACE",
            "required": true,
            "value": "openshift"
        },
        {
            "description": "Maximum amount of memory the Perl Dancer container can use.",
            "displayName": "Memory Limit",
            "name": "MEMORY_LIMIT",
            "required": true,
            "value": "512Mi"
        },
        {
            "description": "Maximum amount of memory the MySQL container can use.",
            "displayName": "Memory Limit (MySQL)",
            "name": "MEMORY_MYSQL_LIMIT",
            "required": true,
            "value": "512Mi"
        },
        {
            "description": "The URL of the repository with your application source code.",
            "displayName": "Git Repository URL",
            "name": "SOURCE_REPOSITORY_URL",
            "required": true,
            "value": "https://github.com/sclorg/dancer-ex.git"
        },
        {
            "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.",
            "displayName": "Git Reference",
            "name": "SOURCE_REPOSITORY_REF"
        },
        {
            "description": "Set this to the relative path to your project if it is not in the root of your repository.",
            "displayName": "Context Directory",
            "name": "CONTEXT_DIR"
        },
        {
            "description": "The exposed hostname that will route to the Dancer service, if left blank a value will be defaulted.",
            "displayName": "Application Hostname",
            "name": "APPLICATION_DOMAIN",
            "value": ""
        },
        {
            "description": "Github trigger secret.  A difficult to guess string encoded as part of the webhook URL.  Not encrypted.",
            "displayName": "GitHub Webhook Secret",
            "from": "[a-zA-Z0-9]{40}",
            "generate": "expression",
            "name": "GITHUB_WEBHOOK_SECRET"
        },
        {
            "displayName": "Database Service Name",
            "name": "DATABASE_SERVICE_NAME",
            "required": true,
            "value": "database"
        },
        {
            "displayName": "Database Username",
            "from": "user[A-Z0-9]{3}",
            "generate": "expression",
            "name": "DATABASE_USER"
        },
        {
            "displayName": "Database Password",
            "from": "[a-zA-Z0-9]{8}",
            "generate": "expression",
            "name": "DATABASE_PASSWORD"
        },
        {
            "displayName": "Database Name",
            "name": "DATABASE_NAME",
            "required": true,
            "value": "sampledb"
        },
        {
            "description": "Set this to \"true\" to enable automatic reloading of modified Perl modules.",
            "displayName": "Perl Module Reload",
            "name": "PERL_APACHE2_RELOAD",
            "value": ""
        },
        {
            "description": "Your secret key for verifying the integrity of signed cookies.",
            "displayName": "Secret Key",
            "from": "[a-z0-9]{127}",
            "generate": "expression",
            "name": "SECRET_KEY_BASE"
        },
        {
            "description": "The custom CPAN mirror URL",
            "displayName": "Custom CPAN Mirror URL",
            "name": "CPAN_MIRROR",
            "value": ""
        },
        {
            "description": "Unique template ID to prevent name conflict",
            "displayName": "CL generation ID",
            "name": "IDENTIFIER",
            "value": "0"
        }
    ]
}
`)

func testExtendedTestdataClusterQuickstartsDancerMysqlJsonBytes() ([]byte, error) {
	return _testExtendedTestdataClusterQuickstartsDancerMysqlJson, nil
}

func testExtendedTestdataClusterQuickstartsDancerMysqlJson() (*asset, error) {
	bytes, err := testExtendedTestdataClusterQuickstartsDancerMysqlJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cluster/quickstarts/dancer-mysql.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataClusterQuickstartsDjangoPostgresqlJson = []byte(`{
    "apiVersion": "v1",
    "kind": "Template",
    "labels": {
        "app": "django-psql-example",
        "template": "django-psql-example"
    },
    "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/django-ex/blob/master/README.md.",
    "metadata": {
        "annotations": {
            "description": "An example Django application with a PostgreSQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/django-ex/blob/master/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.",
            "iconClass": "icon-python",
            "openshift.io/display-name": "Django + PostgreSQL (Ephemeral)",
            "openshift.io/documentation-url": "https://github.com/sclorg/django-ex",
            "openshift.io/long-description": "This template defines resources needed to develop a Django based application, including a build configuration, application deployment configuration, and database deployment configuration.  The database is stored in non-persistent storage, so this configuration should be used for experimental purposes only.",
            "openshift.io/provider-display-name": "Red Hat, Inc.",
            "openshift.io/support-url": "https://access.redhat.com",
            "tags": "quickstart,python,django",
            "template.openshift.io/bindable": "false"
        },
        "name": "django-psql-example"
    },
    "objects": [
        {
            "apiVersion": "v1",
            "kind": "Secret",
            "metadata": {
                "name": "${NAME}"
            },
            "stringData": {
                "database-password": "${DATABASE_PASSWORD}",
                "database-user": "${DATABASE_USER}",
                "django-secret-key": "${DJANGO_SECRET_KEY}"
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Service",
            "metadata": {
                "annotations": {
                    "description": "Exposes and load balances the application pods",
                    "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]"
                },
                "name": "${NAME}"
            },
            "spec": {
                "ports": [
                    {
                        "name": "web",
                        "port": 8080,
                        "targetPort": 8080
                    }
                ],
                "selector": {
                    "name": "${NAME}"
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Route",
            "metadata": {
                "name": "${NAME}"
            },
            "spec": {
                "host": "${APPLICATION_DOMAIN}",
                "to": {
                    "kind": "Service",
                    "name": "${NAME}"
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "ImageStream",
            "metadata": {
                "annotations": {
                    "description": "Keeps track of changes in the application image"
                },
                "name": "${NAME}"
            }
        },
        {
            "apiVersion": "v1",
            "kind": "BuildConfig",
            "metadata": {
                "annotations": {
                    "description": "Defines how to build the application",
                    "template.alpha.openshift.io/wait-for-ready": "true"
                },
                "name": "${NAME}"
            },
            "spec": {
                "output": {
                    "to": {
                        "kind": "ImageStreamTag",
                        "name": "${NAME}:latest"
                    }
                },
                "postCommit": {
                    "script": "./manage.py test"
                },
                "source": {
                    "contextDir": "${CONTEXT_DIR}",
                    "git": {
                        "ref": "${SOURCE_REPOSITORY_REF}",
                        "uri": "${SOURCE_REPOSITORY_URL}"
                    },
                    "type": "Git"
                },
                "strategy": {
                    "sourceStrategy": {
                        "env": [
                            {
                                "name": "PIP_INDEX_URL",
                                "value": "${PIP_INDEX_URL}"
                            }
                        ],
                        "from": {
                            "kind": "ImageStreamTag",
                            "name": "python:${PYTHON_VERSION}",
                            "namespace": "${NAMESPACE}"
                        }
                    },
                    "type": "Source"
                },
                "triggers": [
                    {
                        "type": "ImageChange"
                    },
                    {
                        "type": "ConfigChange"
                    },
                    {
                        "github": {
                            "secret": "${GITHUB_WEBHOOK_SECRET}"
                        },
                        "type": "GitHub"
                    }
                ]
            }
        },
        {
            "apiVersion": "v1",
            "kind": "DeploymentConfig",
            "metadata": {
                "annotations": {
                    "description": "Defines how to deploy the application server",
                    "template.alpha.openshift.io/wait-for-ready": "true"
                },
                "name": "${NAME}"
            },
            "spec": {
                "replicas": 1,
                "selector": {
                    "name": "${NAME}"
                },
                "strategy": {
                    "type": "Recreate"
                },
                "template": {
                    "metadata": {
                        "labels": {
                            "name": "${NAME}"
                        },
                        "name": "${NAME}"
                    },
                    "spec": {
                        "containers": [
                            {
                                "env": [
                                    {
                                        "name": "DATABASE_SERVICE_NAME",
                                        "value": "${DATABASE_SERVICE_NAME}"
                                    },
                                    {
                                        "name": "DATABASE_ENGINE",
                                        "value": "${DATABASE_ENGINE}"
                                    },
                                    {
                                        "name": "DATABASE_NAME",
                                        "value": "${DATABASE_NAME}"
                                    },
                                    {
                                        "name": "DATABASE_USER",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-user",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "DATABASE_PASSWORD",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-password",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "APP_CONFIG",
                                        "value": "${APP_CONFIG}"
                                    },
                                    {
                                        "name": "DJANGO_SECRET_KEY",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "django-secret-key",
                                                "name": "${NAME}"
                                            }
                                        }
                                    }
                                ],
                                "image": " ",
                                "livenessProbe": {
                                    "httpGet": {
                                        "path": "/health",
                                        "port": 8080
                                    },
                                    "initialDelaySeconds": 30,
                                    "timeoutSeconds": 3
                                },
                                "name": "django-psql-example",
                                "ports": [
                                    {
                                        "containerPort": 8080
                                    }
                                ],
                                "readinessProbe": {
                                    "httpGet": {
                                        "path": "/health",
                                        "port": 8080
                                    },
                                    "initialDelaySeconds": 3,
                                    "timeoutSeconds": 3
                                },
                                "resources": {
                                    "limits": {
                                        "memory": "${MEMORY_LIMIT}"
                                    }
                                }
                            }
                        ]
                    }
                },
                "triggers": [
                    {
                        "imageChangeParams": {
                            "automatic": true,
                            "containerNames": [
                                "django-psql-example"
                            ],
                            "from": {
                                "kind": "ImageStreamTag",
                                "name": "${NAME}:latest"
                            }
                        },
                        "type": "ImageChange"
                    },
                    {
                        "type": "ConfigChange"
                    }
                ]
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Service",
            "metadata": {
                "annotations": {
                    "description": "Exposes the database server"
                },
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "spec": {
                "ports": [
                    {
                        "name": "postgresql",
                        "port": 5432,
                        "targetPort": 5432
                    }
                ],
                "selector": {
                    "name": "${DATABASE_SERVICE_NAME}"
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "DeploymentConfig",
            "metadata": {
                "annotations": {
                    "description": "Defines how to deploy the database",
                    "template.alpha.openshift.io/wait-for-ready": "true"
                },
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "spec": {
                "replicas": 1,
                "selector": {
                    "name": "${DATABASE_SERVICE_NAME}"
                },
                "strategy": {
                    "type": "Recreate"
                },
                "template": {
                    "metadata": {
                        "labels": {
                            "name": "${DATABASE_SERVICE_NAME}"
                        },
                        "name": "${DATABASE_SERVICE_NAME}"
                    },
                    "spec": {
                        "containers": [
                            {
                                "env": [
                                    {
                                        "name": "POSTGRESQL_USER",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-user",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "POSTGRESQL_PASSWORD",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-password",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "POSTGRESQL_DATABASE",
                                        "value": "${DATABASE_NAME}"
                                    }
                                ],
                                "image": " ",
                                "livenessProbe": {
                                    "exec": {
                                        "command": [
                                            "/usr/libexec/check-container",
                                            "--live"
                                        ]
                                    },
                                    "initialDelaySeconds": 120,
                                    "timeoutSeconds": 10
                                },
                                "name": "postgresql",
                                "ports": [
                                    {
                                        "containerPort": 5432
                                    }
                                ],
                                "readinessProbe": {
                                    "exec": {
                                        "command": [
                                            "/usr/libexec/check-container"
                                        ]
                                    },
                                    "initialDelaySeconds": 5,
                                    "timeoutSeconds": 1
                                },
                                "resources": {
                                    "limits": {
                                        "memory": "${MEMORY_POSTGRESQL_LIMIT}"
                                    }
                                },
                                "volumeMounts": [
                                    {
                                        "mountPath": "/var/lib/pgsql/data",
                                        "name": "data"
                                    }
                                ]
                            }
                        ],
                        "volumes": [
                            {
                                "emptyDir": {},
                                "name": "data"
                            }
                        ]
                    }
                },
                "triggers": [
                    {
                        "imageChangeParams": {
                            "automatic": true,
                            "containerNames": [
                                "postgresql"
                            ],
                            "from": {
                                "kind": "ImageStreamTag",
                                "name": "postgresql:${POSTGRESQL_VERSION}",
                                "namespace": "${NAMESPACE}"
                            }
                        },
                        "type": "ImageChange"
                    },
                    {
                        "type": "ConfigChange"
                    }
                ]
            }
        }
    ],
    "parameters": [
        {
            "description": "The name assigned to all of the frontend objects defined in this template.",
            "displayName": "Name",
            "name": "NAME",
            "required": true,
            "value": "django-psql-example"
        },
        {
            "description": "The OpenShift Namespace where the ImageStream resides.",
            "displayName": "Namespace",
            "name": "NAMESPACE",
            "required": true,
            "value": "openshift"
        },
        {
            "description": "Version of Python image to be used (3.6 or latest).",
            "displayName": "Version of Python Image",
            "name": "PYTHON_VERSION",
            "required": true,
            "value": "3.6"
        },
        {
            "description": "Version of PostgreSQL image to be used (10 or latest).",
            "displayName": "Version of PostgreSQL Image",
            "name": "POSTGRESQL_VERSION",
            "required": true,
            "value": "10"
        },
        {
            "description": "Maximum amount of memory the Django container can use.",
            "displayName": "Memory Limit",
            "name": "MEMORY_LIMIT",
            "required": true,
            "value": "512Mi"
        },
        {
            "description": "Maximum amount of memory the PostgreSQL container can use.",
            "displayName": "Memory Limit (PostgreSQL)",
            "name": "MEMORY_POSTGRESQL_LIMIT",
            "required": true,
            "value": "512Mi"
        },
        {
            "description": "The URL of the repository with your application source code.",
            "displayName": "Git Repository URL",
            "name": "SOURCE_REPOSITORY_URL",
            "required": true,
            "value": "https://github.com/sclorg/django-ex.git"
        },
        {
            "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.",
            "displayName": "Git Reference",
            "name": "SOURCE_REPOSITORY_REF"
        },
        {
            "description": "Set this to the relative path to your project if it is not in the root of your repository.",
            "displayName": "Context Directory",
            "name": "CONTEXT_DIR"
        },
        {
            "description": "The exposed hostname that will route to the Django service, if left blank a value will be defaulted.",
            "displayName": "Application Hostname",
            "name": "APPLICATION_DOMAIN",
            "value": ""
        },
        {
            "description": "Github trigger secret.  A difficult to guess string encoded as part of the webhook URL.  Not encrypted.",
            "displayName": "GitHub Webhook Secret",
            "from": "[a-zA-Z0-9]{40}",
            "generate": "expression",
            "name": "GITHUB_WEBHOOK_SECRET"
        },
        {
            "displayName": "Database Service Name",
            "name": "DATABASE_SERVICE_NAME",
            "required": true,
            "value": "postgresql"
        },
        {
            "description": "Database engine: postgresql, mysql or sqlite (default).",
            "displayName": "Database Engine",
            "name": "DATABASE_ENGINE",
            "required": true,
            "value": "postgresql"
        },
        {
            "displayName": "Database Name",
            "name": "DATABASE_NAME",
            "required": true,
            "value": "default"
        },
        {
            "displayName": "Database Username",
            "name": "DATABASE_USER",
            "required": true,
            "value": "django"
        },
        {
            "displayName": "Database User Password",
            "from": "[a-zA-Z0-9]{16}",
            "generate": "expression",
            "name": "DATABASE_PASSWORD"
        },
        {
            "description": "Relative path to Gunicorn configuration file (optional).",
            "displayName": "Application Configuration File Path",
            "name": "APP_CONFIG"
        },
        {
            "description": "Set this to a long random string.",
            "displayName": "Django Secret Key",
            "from": "[\\w]{50}",
            "generate": "expression",
            "name": "DJANGO_SECRET_KEY"
        },
        {
            "description": "The custom PyPi index URL",
            "displayName": "Custom PyPi Index URL",
            "name": "PIP_INDEX_URL",
            "value": ""
        },
        {
            "description": "Unique template ID to prevent name conflict",
            "displayName": "CL generation ID",
            "name": "IDENTIFIER",
            "value": "0"
        }
    ]
}
`)

func testExtendedTestdataClusterQuickstartsDjangoPostgresqlJsonBytes() ([]byte, error) {
	return _testExtendedTestdataClusterQuickstartsDjangoPostgresqlJson, nil
}

func testExtendedTestdataClusterQuickstartsDjangoPostgresqlJson() (*asset, error) {
	bytes, err := testExtendedTestdataClusterQuickstartsDjangoPostgresqlJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cluster/quickstarts/django-postgresql.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataClusterQuickstartsNodejsMongodbJson = []byte(`{
    "apiVersion": "v1",
    "kind": "Template",
    "labels": {
        "app": "nodejs-mongodb-example",
        "template": "nodejs-mongodb-example"
    },
    "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/nodejs-ex/blob/master/README.md.",
    "metadata": {
        "annotations": {
            "description": "An example Node.js application with a MongoDB database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/nodejs-ex/blob/master/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.",
            "iconClass": "icon-nodejs",
            "openshift.io/display-name": "Node.js + MongoDB (Ephemeral)",
            "openshift.io/documentation-url": "https://github.com/sclorg/nodejs-ex",
            "openshift.io/long-description": "This template defines resources needed to develop a NodeJS application, including a build configuration, application deployment configuration, and database deployment configuration.  The database is stored in non-persistent storage, so this configuration should be used for experimental purposes only.",
            "openshift.io/provider-display-name": "Red Hat, Inc.",
            "openshift.io/support-url": "https://access.redhat.com",
            "tags": "quickstart,nodejs",
            "template.openshift.io/bindable": "false"
        },
        "name": "nodejs-mongodb-example"
    },
    "objects": [
        {
            "apiVersion": "v1",
            "kind": "Secret",
            "metadata": {
                "name": "${NAME}"
            },
            "stringData": {
                "database-admin-password": "${DATABASE_ADMIN_PASSWORD}",
                "database-password": "${DATABASE_PASSWORD}",
                "database-user": "${DATABASE_USER}"
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Service",
            "metadata": {
                "annotations": {
                    "description": "Exposes and load balances the application pods",
                    "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]"
                },
                "name": "${NAME}"
            },
            "spec": {
                "ports": [
                    {
                        "name": "web",
                        "port": 8080,
                        "targetPort": 8080
                    }
                ],
                "selector": {
                    "name": "${NAME}"
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Route",
            "metadata": {
                "name": "${NAME}"
            },
            "spec": {
                "host": "${APPLICATION_DOMAIN}",
                "to": {
                    "kind": "Service",
                    "name": "${NAME}"
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "ImageStream",
            "metadata": {
                "annotations": {
                    "description": "Keeps track of changes in the application image"
                },
                "name": "${NAME}"
            }
        },
        {
            "apiVersion": "v1",
            "kind": "BuildConfig",
            "metadata": {
                "annotations": {
                    "description": "Defines how to build the application",
                    "template.alpha.openshift.io/wait-for-ready": "true"
                },
                "name": "${NAME}"
            },
            "spec": {
                "output": {
                    "to": {
                        "kind": "ImageStreamTag",
                        "name": "${NAME}:latest"
                    }
                },
                "postCommit": {
                    "script": "npm test"
                },
                "source": {
                    "contextDir": "${CONTEXT_DIR}",
                    "git": {
                        "ref": "${SOURCE_REPOSITORY_REF}",
                        "uri": "${SOURCE_REPOSITORY_URL}"
                    },
                    "type": "Git"
                },
                "strategy": {
                    "sourceStrategy": {
                        "env": [
                            {
                                "name": "NPM_MIRROR",
                                "value": "${NPM_MIRROR}"
                            }
                        ],
                        "from": {
                            "kind": "ImageStreamTag",
                            "name": "nodejs:${NODEJS_VERSION}",
                            "namespace": "${NAMESPACE}"
                        }
                    },
                    "type": "Source"
                },
                "triggers": [
                    {
                        "type": "ImageChange"
                    },
                    {
                        "type": "ConfigChange"
                    },
                    {
                        "github": {
                            "secret": "${GITHUB_WEBHOOK_SECRET}"
                        },
                        "type": "GitHub"
                    },
                    {
                        "generic": {
                            "secret": "${GENERIC_WEBHOOK_SECRET}"
                        },
                        "type": "Generic"
                    }
                ]
            }
        },
        {
            "apiVersion": "v1",
            "kind": "DeploymentConfig",
            "metadata": {
                "annotations": {
                    "description": "Defines how to deploy the application server",
                    "template.alpha.openshift.io/wait-for-ready": "true"
                },
                "name": "${NAME}"
            },
            "spec": {
                "replicas": 1,
                "selector": {
                    "name": "${NAME}"
                },
                "strategy": {
                    "type": "Recreate"
                },
                "template": {
                    "metadata": {
                        "labels": {
                            "name": "${NAME}"
                        },
                        "name": "${NAME}"
                    },
                    "spec": {
                        "containers": [
                            {
                                "env": [
                                    {
                                        "name": "DATABASE_SERVICE_NAME",
                                        "value": "${DATABASE_SERVICE_NAME}"
                                    },
                                    {
                                        "name": "MONGODB_USER",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-user",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "MONGODB_PASSWORD",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-password",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "MONGODB_DATABASE",
                                        "value": "${DATABASE_NAME}"
                                    },
                                    {
                                        "name": "MONGODB_ADMIN_PASSWORD",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-admin-password",
                                                "name": "${NAME}"
                                            }
                                        }
                                    }
                                ],
                                "image": " ",
                                "livenessProbe": {
                                    "httpGet": {
                                        "path": "/",
                                        "port": 8080
                                    },
                                    "initialDelaySeconds": 30,
                                    "timeoutSeconds": 3
                                },
                                "name": "nodejs-mongodb-example",
                                "ports": [
                                    {
                                        "containerPort": 8080
                                    }
                                ],
                                "readinessProbe": {
                                    "httpGet": {
                                        "path": "/",
                                        "port": 8080
                                    },
                                    "initialDelaySeconds": 3,
                                    "timeoutSeconds": 3
                                },
                                "resources": {
                                    "limits": {
                                        "memory": "${MEMORY_LIMIT}"
                                    }
                                }
                            }
                        ]
                    }
                },
                "triggers": [
                    {
                        "imageChangeParams": {
                            "automatic": true,
                            "containerNames": [
                                "nodejs-mongodb-example"
                            ],
                            "from": {
                                "kind": "ImageStreamTag",
                                "name": "${NAME}:latest"
                            }
                        },
                        "type": "ImageChange"
                    },
                    {
                        "type": "ConfigChange"
                    }
                ]
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Service",
            "metadata": {
                "annotations": {
                    "description": "Exposes the database server"
                },
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "spec": {
                "ports": [
                    {
                        "name": "mongodb",
                        "port": 27017,
                        "targetPort": 27017
                    }
                ],
                "selector": {
                    "name": "${DATABASE_SERVICE_NAME}"
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "DeploymentConfig",
            "metadata": {
                "annotations": {
                    "description": "Defines how to deploy the database",
                    "template.alpha.openshift.io/wait-for-ready": "true"
                },
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "spec": {
                "replicas": 1,
                "selector": {
                    "name": "${DATABASE_SERVICE_NAME}"
                },
                "strategy": {
                    "type": "Recreate"
                },
                "template": {
                    "metadata": {
                        "labels": {
                            "name": "${DATABASE_SERVICE_NAME}"
                        },
                        "name": "${DATABASE_SERVICE_NAME}"
                    },
                    "spec": {
                        "containers": [
                            {
                                "env": [
                                    {
                                        "name": "MONGODB_USER",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-user",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "MONGODB_PASSWORD",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-password",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "MONGODB_DATABASE",
                                        "value": "${DATABASE_NAME}"
                                    },
                                    {
                                        "name": "MONGODB_ADMIN_PASSWORD",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-admin-password",
                                                "name": "${NAME}"
                                            }
                                        }
                                    }
                                ],
                                "image": " ",
                                "livenessProbe": {
                                    "initialDelaySeconds": 30,
                                    "tcpSocket": {
                                        "port": 27017
                                    },
                                    "timeoutSeconds": 1
                                },
                                "name": "mongodb",
                                "ports": [
                                    {
                                        "containerPort": 27017
                                    }
                                ],
                                "readinessProbe": {
                                    "exec": {
                                        "command": [
                                            "/bin/sh",
                                            "-i",
                                            "-c",
                                            "mongo 127.0.0.1:27017/$MONGODB_DATABASE -u $MONGODB_USER -p $MONGODB_PASSWORD --eval=\"quit()\""
                                        ]
                                    },
                                    "initialDelaySeconds": 3,
                                    "timeoutSeconds": 1
                                },
                                "resources": {
                                    "limits": {
                                        "memory": "${MEMORY_MONGODB_LIMIT}"
                                    }
                                },
                                "volumeMounts": [
                                    {
                                        "mountPath": "/var/lib/mongodb/data",
                                        "name": "${DATABASE_SERVICE_NAME}-data"
                                    }
                                ]
                            }
                        ],
                        "volumes": [
                            {
                                "emptyDir": {
                                    "medium": ""
                                },
                                "name": "${DATABASE_SERVICE_NAME}-data"
                            }
                        ]
                    }
                },
                "triggers": [
                    {
                        "imageChangeParams": {
                            "automatic": true,
                            "containerNames": [
                                "mongodb"
                            ],
                            "from": {
                                "kind": "ImageStreamTag",
                                "name": "mongodb:${MONGODB_VERSION}",
                                "namespace": "${NAMESPACE}"
                            }
                        },
                        "type": "ImageChange"
                    },
                    {
                        "type": "ConfigChange"
                    }
                ]
            }
        }
    ],
    "parameters": [
        {
            "description": "The name assigned to all of the frontend objects defined in this template.",
            "displayName": "Name",
            "name": "NAME",
            "required": true,
            "value": "nodejs-mongodb-example"
        },
        {
            "description": "The OpenShift Namespace where the ImageStream resides.",
            "displayName": "Namespace",
            "name": "NAMESPACE",
            "required": true,
            "value": "openshift"
        },
        {
            "description": "Version of NodeJS image to be used (6, 8, or latest).",
            "displayName": "Version of NodeJS Image",
            "name": "NODEJS_VERSION",
            "required": true,
            "value": "8"
        },
        {
            "description": "Version of MongoDB image to be used (3.6 or latest).",
            "displayName": "Version of MongoDB Image",
            "name": "MONGODB_VERSION",
            "required": true,
            "value": "3.6"
        },
        {
            "description": "Maximum amount of memory the Node.js container can use.",
            "displayName": "Memory Limit",
            "name": "MEMORY_LIMIT",
            "required": true,
            "value": "512Mi"
        },
        {
            "description": "Maximum amount of memory the MongoDB container can use.",
            "displayName": "Memory Limit (MongoDB)",
            "name": "MEMORY_MONGODB_LIMIT",
            "required": true,
            "value": "512Mi"
        },
        {
            "description": "The URL of the repository with your application source code.",
            "displayName": "Git Repository URL",
            "name": "SOURCE_REPOSITORY_URL",
            "required": true,
            "value": "https://github.com/sclorg/nodejs-ex.git"
        },
        {
            "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.",
            "displayName": "Git Reference",
            "name": "SOURCE_REPOSITORY_REF"
        },
        {
            "description": "Set this to the relative path to your project if it is not in the root of your repository.",
            "displayName": "Context Directory",
            "name": "CONTEXT_DIR"
        },
        {
            "description": "The exposed hostname that will route to the Node.js service, if left blank a value will be defaulted.",
            "displayName": "Application Hostname",
            "name": "APPLICATION_DOMAIN",
            "value": ""
        },
        {
            "description": "Github trigger secret.  A difficult to guess string encoded as part of the webhook URL.  Not encrypted.",
            "displayName": "GitHub Webhook Secret",
            "from": "[a-zA-Z0-9]{40}",
            "generate": "expression",
            "name": "GITHUB_WEBHOOK_SECRET"
        },
        {
            "description": "A secret string used to configure the Generic webhook.",
            "displayName": "Generic Webhook Secret",
            "from": "[a-zA-Z0-9]{40}",
            "generate": "expression",
            "name": "GENERIC_WEBHOOK_SECRET"
        },
        {
            "displayName": "Database Service Name",
            "name": "DATABASE_SERVICE_NAME",
            "required": true,
            "value": "mongodb"
        },
        {
            "description": "Username for MongoDB user that will be used for accessing the database.",
            "displayName": "MongoDB Username",
            "from": "user[A-Z0-9]{3}",
            "generate": "expression",
            "name": "DATABASE_USER"
        },
        {
            "description": "Password for the MongoDB user.",
            "displayName": "MongoDB Password",
            "from": "[a-zA-Z0-9]{16}",
            "generate": "expression",
            "name": "DATABASE_PASSWORD"
        },
        {
            "displayName": "Database Name",
            "name": "DATABASE_NAME",
            "required": true,
            "value": "sampledb"
        },
        {
            "description": "Password for the database admin user.",
            "displayName": "Database Administrator Password",
            "from": "[a-zA-Z0-9]{16}",
            "generate": "expression",
            "name": "DATABASE_ADMIN_PASSWORD"
        },
        {
            "description": "The custom NPM mirror URL",
            "displayName": "Custom NPM Mirror URL",
            "name": "NPM_MIRROR",
            "value": ""
        },
        {
            "description": "Unique template ID to prevent name conflict",
            "displayName": "CL generation ID",
            "name": "IDENTIFIER",
            "value": "0"
        }
    ]
}
`)

func testExtendedTestdataClusterQuickstartsNodejsMongodbJsonBytes() ([]byte, error) {
	return _testExtendedTestdataClusterQuickstartsNodejsMongodbJson, nil
}

func testExtendedTestdataClusterQuickstartsNodejsMongodbJson() (*asset, error) {
	bytes, err := testExtendedTestdataClusterQuickstartsNodejsMongodbJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cluster/quickstarts/nodejs-mongodb.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataClusterQuickstartsRailsPostgresqlJson = []byte(`{
    "apiVersion": "v1",
    "kind": "Template",
    "labels": {
        "app": "rails-postgresql-example",
        "template": "rails-postgresql-example"
    },
    "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/rails-ex/blob/master/README.md.",
    "metadata": {
        "annotations": {
            "description": "An example Rails application with a PostgreSQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/rails-ex/blob/master/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.",
            "iconClass": "icon-ruby",
            "openshift.io/display-name": "Rails + PostgreSQL (Ephemeral)",
            "openshift.io/documentation-url": "https://github.com/sclorg/rails-ex",
            "openshift.io/long-description": "This template defines resources needed to develop a Rails application, including a build configuration, application deployment configuration, and database deployment configuration.  The database is stored in non-persistent storage, so this configuration should be used for experimental purposes only.",
            "openshift.io/provider-display-name": "Red Hat, Inc.",
            "openshift.io/support-url": "https://access.redhat.com",
            "tags": "quickstart,ruby,rails",
            "template.openshift.io/bindable": "false"
        },
        "name": "rails-postgresql-example"
    },
    "objects": [
        {
            "apiVersion": "v1",
            "kind": "Secret",
            "metadata": {
                "name": "${NAME}"
            },
            "stringData": {
                "application-password": "${APPLICATION_PASSWORD}",
                "application-user": "${APPLICATION_USER}",
                "database-password": "${DATABASE_PASSWORD}",
                "database-user": "${DATABASE_USER}",
                "keybase": "${SECRET_KEY_BASE}"
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Service",
            "metadata": {
                "annotations": {
                    "description": "Exposes and load balances the application pods",
                    "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]"
                },
                "name": "${NAME}"
            },
            "spec": {
                "ports": [
                    {
                        "name": "web",
                        "port": 8080,
                        "targetPort": 8080
                    }
                ],
                "selector": {
                    "name": "${NAME}"
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Route",
            "metadata": {
                "name": "${NAME}"
            },
            "spec": {
                "host": "${APPLICATION_DOMAIN}",
                "to": {
                    "kind": "Service",
                    "name": "${NAME}"
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "ImageStream",
            "metadata": {
                "annotations": {
                    "description": "Keeps track of changes in the application image"
                },
                "name": "${NAME}"
            }
        },
        {
            "apiVersion": "v1",
            "kind": "BuildConfig",
            "metadata": {
                "annotations": {
                    "description": "Defines how to build the application",
                    "template.alpha.openshift.io/wait-for-ready": "true"
                },
                "name": "${NAME}"
            },
            "spec": {
                "output": {
                    "to": {
                        "kind": "ImageStreamTag",
                        "name": "${NAME}:latest"
                    }
                },
                "postCommit": {
                    "script": "bundle exec rake test"
                },
                "source": {
                    "contextDir": "${CONTEXT_DIR}",
                    "git": {
                        "ref": "${SOURCE_REPOSITORY_REF}",
                        "uri": "${SOURCE_REPOSITORY_URL}"
                    },
                    "type": "Git"
                },
                "strategy": {
                    "sourceStrategy": {
                        "env": [
                            {
                                "name": "RUBYGEM_MIRROR",
                                "value": "${RUBYGEM_MIRROR}"
                            }
                        ],
                        "from": {
                            "kind": "ImageStreamTag",
                            "name": "ruby:2.5",
                            "namespace": "${NAMESPACE}"
                        }
                    },
                    "type": "Source"
                },
                "triggers": [
                    {
                        "type": "ImageChange"
                    },
                    {
                        "type": "ConfigChange"
                    },
                    {
                        "github": {
                            "secret": "${GITHUB_WEBHOOK_SECRET}"
                        },
                        "type": "GitHub"
                    }
                ]
            }
        },
        {
            "apiVersion": "v1",
            "kind": "DeploymentConfig",
            "metadata": {
                "annotations": {
                    "description": "Defines how to deploy the application server",
                    "template.alpha.openshift.io/wait-for-ready": "true"
                },
                "name": "${NAME}"
            },
            "spec": {
                "replicas": 1,
                "selector": {
                    "name": "${NAME}"
                },
                "strategy": {
                    "recreateParams": {
                        "pre": {
                            "execNewPod": {
                                "command": [
                                    "./migrate-database.sh"
                                ],
                                "containerName": "${NAME}"
                            },
                            "failurePolicy": "Abort"
                        }
                    },
                    "type": "Recreate"
                },
                "template": {
                    "metadata": {
                        "labels": {
                            "name": "${NAME}"
                        },
                        "name": "${NAME}"
                    },
                    "spec": {
                        "containers": [
                            {
                                "env": [
                                    {
                                        "name": "DATABASE_SERVICE_NAME",
                                        "value": "${DATABASE_SERVICE_NAME}"
                                    },
                                    {
                                        "name": "POSTGRESQL_USER",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-user",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "POSTGRESQL_PASSWORD",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-password",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "POSTGRESQL_DATABASE",
                                        "value": "${DATABASE_NAME}"
                                    },
                                    {
                                        "name": "SECRET_KEY_BASE",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "keybase",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "POSTGRESQL_MAX_CONNECTIONS",
                                        "value": "${POSTGRESQL_MAX_CONNECTIONS}"
                                    },
                                    {
                                        "name": "POSTGRESQL_SHARED_BUFFERS",
                                        "value": "${POSTGRESQL_SHARED_BUFFERS}"
                                    },
                                    {
                                        "name": "APPLICATION_DOMAIN",
                                        "value": "${APPLICATION_DOMAIN}"
                                    },
                                    {
                                        "name": "APPLICATION_USER",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "application-user",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "APPLICATION_PASSWORD",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "application-password",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "RAILS_ENV",
                                        "value": "${RAILS_ENV}"
                                    }
                                ],
                                "image": " ",
                                "livenessProbe": {
                                    "httpGet": {
                                        "path": "/articles",
                                        "port": 8080
                                    },
                                    "initialDelaySeconds": 10,
                                    "timeoutSeconds": 3
                                },
                                "name": "${NAME}",
                                "ports": [
                                    {
                                        "containerPort": 8080
                                    }
                                ],
                                "readinessProbe": {
                                    "httpGet": {
                                        "path": "/articles",
                                        "port": 8080
                                    },
                                    "initialDelaySeconds": 5,
                                    "timeoutSeconds": 3
                                },
                                "resources": {
                                    "limits": {
                                        "memory": "${MEMORY_LIMIT}"
                                    }
                                }
                            }
                        ]
                    }
                },
                "triggers": [
                    {
                        "imageChangeParams": {
                            "automatic": true,
                            "containerNames": [
                                "${NAME}"
                            ],
                            "from": {
                                "kind": "ImageStreamTag",
                                "name": "${NAME}:latest"
                            }
                        },
                        "type": "ImageChange"
                    },
                    {
                        "type": "ConfigChange"
                    }
                ]
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Service",
            "metadata": {
                "annotations": {
                    "description": "Exposes the database server"
                },
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "spec": {
                "ports": [
                    {
                        "name": "postgresql",
                        "port": 5432,
                        "targetPort": 5432
                    }
                ],
                "selector": {
                    "name": "${DATABASE_SERVICE_NAME}"
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "DeploymentConfig",
            "metadata": {
                "annotations": {
                    "description": "Defines how to deploy the database",
                    "template.alpha.openshift.io/wait-for-ready": "true"
                },
                "name": "${DATABASE_SERVICE_NAME}"
            },
            "spec": {
                "replicas": 1,
                "selector": {
                    "name": "${DATABASE_SERVICE_NAME}"
                },
                "strategy": {
                    "type": "Recreate"
                },
                "template": {
                    "metadata": {
                        "labels": {
                            "name": "${DATABASE_SERVICE_NAME}"
                        },
                        "name": "${DATABASE_SERVICE_NAME}"
                    },
                    "spec": {
                        "containers": [
                            {
                                "env": [
                                    {
                                        "name": "POSTGRESQL_USER",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-user",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "POSTGRESQL_PASSWORD",
                                        "valueFrom": {
                                            "secretKeyRef": {
                                                "key": "database-password",
                                                "name": "${NAME}"
                                            }
                                        }
                                    },
                                    {
                                        "name": "POSTGRESQL_DATABASE",
                                        "value": "${DATABASE_NAME}"
                                    },
                                    {
                                        "name": "POSTGRESQL_MAX_CONNECTIONS",
                                        "value": "${POSTGRESQL_MAX_CONNECTIONS}"
                                    },
                                    {
                                        "name": "POSTGRESQL_SHARED_BUFFERS",
                                        "value": "${POSTGRESQL_SHARED_BUFFERS}"
                                    }
                                ],
                                "image": " ",
                                "livenessProbe": {
                                    "exec": {
                                        "command": [
                                            "/usr/libexec/check-container",
                                            "--live"
                                        ]
                                    },
                                    "initialDelaySeconds": 120,
                                    "timeoutSeconds": 10
                                },
                                "name": "postgresql",
                                "ports": [
                                    {
                                        "containerPort": 5432
                                    }
                                ],
                                "readinessProbe": {
                                    "exec": {
                                        "command": [
                                            "/usr/libexec/check-container"
                                        ]
                                    },
                                    "initialDelaySeconds": 5,
                                    "timeoutSeconds": 1
                                },
                                "resources": {
                                    "limits": {
                                        "memory": "${MEMORY_POSTGRESQL_LIMIT}"
                                    }
                                },
                                "volumeMounts": [
                                    {
                                        "mountPath": "/var/lib/pgsql/data",
                                        "name": "data"
                                    }
                                ]
                            }
                        ],
                        "volumes": [
                            {
                                "emptyDir": {},
                                "name": "data"
                            }
                        ]
                    }
                },
                "triggers": [
                    {
                        "imageChangeParams": {
                            "automatic": true,
                            "containerNames": [
                                "postgresql"
                            ],
                            "from": {
                                "kind": "ImageStreamTag",
                                "name": "postgresql:10",
                                "namespace": "${NAMESPACE}"
                            }
                        },
                        "type": "ImageChange"
                    },
                    {
                        "type": "ConfigChange"
                    }
                ]
            }
        }
    ],
    "parameters": [
        {
            "description": "The name assigned to all of the frontend objects defined in this template.",
            "displayName": "Name",
            "name": "NAME",
            "required": true,
            "value": "rails-postgresql-example"
        },
        {
            "description": "The OpenShift Namespace where the ImageStream resides.",
            "displayName": "Namespace",
            "name": "NAMESPACE",
            "required": true,
            "value": "openshift"
        },
        {
            "description": "Maximum amount of memory the Rails container can use.",
            "displayName": "Memory Limit",
            "name": "MEMORY_LIMIT",
            "required": true,
            "value": "512Mi"
        },
        {
            "description": "Maximum amount of memory the PostgreSQL container can use.",
            "displayName": "Memory Limit (PostgreSQL)",
            "name": "MEMORY_POSTGRESQL_LIMIT",
            "required": true,
            "value": "512Mi"
        },
        {
            "description": "The URL of the repository with your application source code.",
            "displayName": "Git Repository URL",
            "name": "SOURCE_REPOSITORY_URL",
            "required": true,
            "value": "https://github.com/sclorg/rails-ex.git"
        },
        {
            "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.",
            "displayName": "Git Reference",
            "name": "SOURCE_REPOSITORY_REF"
        },
        {
            "description": "Set this to the relative path to your project if it is not in the root of your repository.",
            "displayName": "Context Directory",
            "name": "CONTEXT_DIR"
        },
        {
            "description": "The exposed hostname that will route to the Rails service, if left blank a value will be defaulted.",
            "displayName": "Application Hostname",
            "name": "APPLICATION_DOMAIN",
            "value": ""
        },
        {
            "description": "Github trigger secret.  A difficult to guess string encoded as part of the webhook URL.  Not encrypted.",
            "displayName": "GitHub Webhook Secret",
            "from": "[a-zA-Z0-9]{40}",
            "generate": "expression",
            "name": "GITHUB_WEBHOOK_SECRET"
        },
        {
            "description": "Your secret key for verifying the integrity of signed cookies.",
            "displayName": "Secret Key",
            "from": "[a-z0-9]{127}",
            "generate": "expression",
            "name": "SECRET_KEY_BASE"
        },
        {
            "description": "The application user that is used within the sample application to authorize access on pages.",
            "displayName": "Application Username",
            "name": "APPLICATION_USER",
            "required": true,
            "value": "openshift"
        },
        {
            "description": "The application password that is used within the sample application to authorize access on pages.",
            "displayName": "Application Password",
            "name": "APPLICATION_PASSWORD",
            "required": true,
            "value": "secret"
        },
        {
            "description": "Environment under which the sample application will run. Could be set to production, development or test.",
            "displayName": "Rails Environment",
            "name": "RAILS_ENV",
            "required": true,
            "value": "production"
        },
        {
            "displayName": "Database Service Name",
            "name": "DATABASE_SERVICE_NAME",
            "required": true,
            "value": "postgresql"
        },
        {
            "displayName": "Database Username",
            "from": "user[A-Z0-9]{3}",
            "generate": "expression",
            "name": "DATABASE_USER"
        },
        {
            "displayName": "Database Password",
            "from": "[a-zA-Z0-9]{8}",
            "generate": "expression",
            "name": "DATABASE_PASSWORD"
        },
        {
            "displayName": "Database Name",
            "name": "DATABASE_NAME",
            "required": true,
            "value": "root"
        },
        {
            "displayName": "Maximum Database Connections",
            "name": "POSTGRESQL_MAX_CONNECTIONS",
            "value": "100"
        },
        {
            "displayName": "Shared Buffer Amount",
            "name": "POSTGRESQL_SHARED_BUFFERS",
            "value": "12MB"
        },
        {
            "description": "The custom RubyGems mirror URL",
            "displayName": "Custom RubyGems Mirror URL",
            "name": "RUBYGEM_MIRROR",
            "value": ""
        },
        {
            "description": "Unique template ID to prevent name conflict",
            "displayName": "CL generation ID",
            "name": "IDENTIFIER",
            "value": "0"
        }
    ]
}
`)

func testExtendedTestdataClusterQuickstartsRailsPostgresqlJsonBytes() ([]byte, error) {
	return _testExtendedTestdataClusterQuickstartsRailsPostgresqlJson, nil
}

func testExtendedTestdataClusterQuickstartsRailsPostgresqlJson() (*asset, error) {
	bytes, err := testExtendedTestdataClusterQuickstartsRailsPostgresqlJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cluster/quickstarts/rails-postgresql.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdHackLibCmdSh = []byte(`#!/usr/bin/env bash
# This utility file contains functions that wrap commands to be tested. All wrapper functions run commands
# in a sub-shell and redirect all output. Tests in test-cmd *must* use these functions for testing.

# expect_success runs the cmd and expects an exit code of 0
function os::cmd::expect_success() {
	if [[ $# -ne 1 ]]; then echo "os::cmd::expect_success expects only one argument, got $#"; return 1; fi
	local cmd=$1

	os::cmd::internal::expect_exit_code_run_grep "${cmd}"
}
readonly -f os::cmd::expect_success

# expect_failure runs the cmd and expects a non-zero exit code
function os::cmd::expect_failure() {
	if [[ $# -ne 1 ]]; then echo "os::cmd::expect_failure expects only one argument, got $#"; return 1; fi
	local cmd=$1

	os::cmd::internal::expect_exit_code_run_grep "${cmd}" "os::cmd::internal::failure_func"
}
readonly -f os::cmd::expect_failure

# expect_success_and_text runs the cmd and expects an exit code of 0
# as well as running a grep test to find the given string in the output
function os::cmd::expect_success_and_text() {
	if [[ $# -ne 2 ]]; then echo "os::cmd::expect_success_and_text expects two arguments, got $#"; return 1; fi
	local cmd=$1
	local expected_text=$2

	os::cmd::internal::expect_exit_code_run_grep "${cmd}" "os::cmd::internal::success_func" "${expected_text}"
}
readonly -f os::cmd::expect_success_and_text

# expect_failure_and_text runs the cmd and expects a non-zero exit code
# as well as running a grep test to find the given string in the output
function os::cmd::expect_failure_and_text() {
	if [[ $# -ne 2 ]]; then echo "os::cmd::expect_failure_and_text expects two arguments, got $#"; return 1; fi
	local cmd=$1
	local expected_text=$2

	os::cmd::internal::expect_exit_code_run_grep "${cmd}" "os::cmd::internal::failure_func" "${expected_text}"
}
readonly -f os::cmd::expect_failure_and_text

# expect_success_and_not_text runs the cmd and expects an exit code of 0
# as well as running a grep test to ensure the given string is not in the output
function os::cmd::expect_success_and_not_text() {
	if [[ $# -ne 2 ]]; then echo "os::cmd::expect_success_and_not_text expects two arguments, got $#"; return 1; fi
	local cmd=$1
	local expected_text=$2

	os::cmd::internal::expect_exit_code_run_grep "${cmd}" "os::cmd::internal::success_func" "${expected_text}" "os::cmd::internal::failure_func"
}
readonly -f os::cmd::expect_success_and_not_text

# expect_failure_and_not_text runs the cmd and expects a non-zero exit code
# as well as running a grep test to ensure the given string is not in the output
function os::cmd::expect_failure_and_not_text() {
	if [[ $# -ne 2 ]]; then echo "os::cmd::expect_failure_and_not_text expects two arguments, got $#"; return 1; fi
	local cmd=$1
	local expected_text=$2

	os::cmd::internal::expect_exit_code_run_grep "${cmd}" "os::cmd::internal::failure_func" "${expected_text}" "os::cmd::internal::failure_func"
}
readonly -f os::cmd::expect_failure_and_not_text

# expect_code runs the cmd and expects a given exit code
function os::cmd::expect_code() {
	if [[ $# -ne 2 ]]; then echo "os::cmd::expect_code expects two arguments, got $#"; return 1; fi
	local cmd=$1
	local expected_cmd_code=$2

	os::cmd::internal::expect_exit_code_run_grep "${cmd}" "os::cmd::internal::specific_code_func ${expected_cmd_code}"
}
readonly -f os::cmd::expect_code

# expect_code_and_text runs the cmd and expects the given exit code
# as well as running a grep test to find the given string in the output
function os::cmd::expect_code_and_text() {
	if [[ $# -ne 3 ]]; then echo "os::cmd::expect_code_and_text expects three arguments, got $#"; return 1; fi
	local cmd=$1
	local expected_cmd_code=$2
	local expected_text=$3

	os::cmd::internal::expect_exit_code_run_grep "${cmd}" "os::cmd::internal::specific_code_func ${expected_cmd_code}" "${expected_text}"
}
readonly -f os::cmd::expect_code_and_text

# expect_code_and_not_text runs the cmd and expects the given exit code
# as well as running a grep test to ensure the given string is not in the output
function os::cmd::expect_code_and_not_text() {
	if [[ $# -ne 3 ]]; then echo "os::cmd::expect_code_and_not_text expects three arguments, got $#"; return 1; fi
	local cmd=$1
	local expected_cmd_code=$2
	local expected_text=$3

	os::cmd::internal::expect_exit_code_run_grep "${cmd}" "os::cmd::internal::specific_code_func ${expected_cmd_code}" "${expected_text}" "os::cmd::internal::failure_func"
}
readonly -f os::cmd::expect_code_and_not_text

millisecond=1
second=$(( 1000 * millisecond ))
minute=$(( 60 * second ))

# os::cmd::try_until_success runs the cmd in a small interval until either the command succeeds or times out
# the default time-out for os::cmd::try_until_success is 60 seconds.
# the default interval for os::cmd::try_until_success is 200ms
function os::cmd::try_until_success() {
	if [[ $# -lt 1 ]]; then echo "os::cmd::try_until_success expects at least one arguments, got $#"; return 1; fi
	local cmd=$1
	local duration=${2:-$minute}
	local interval=${3:-0.2}

	os::cmd::internal::run_until_exit_code "${cmd}" "os::cmd::internal::success_func" "${duration}" "${interval}"
}
readonly -f os::cmd::try_until_success

# os::cmd::try_until_failure runs the cmd until either the command fails or times out
# the default time-out for os::cmd::try_until_failure is 60 seconds.
function os::cmd::try_until_failure() {
	if [[ $# -lt 1 ]]; then echo "os::cmd::try_until_failure expects at least one argument, got $#"; return 1; fi
	local cmd=$1
	local duration=${2:-$minute}
	local interval=${3:-0.2}

	os::cmd::internal::run_until_exit_code "${cmd}" "os::cmd::internal::failure_func" "${duration}" "${interval}"
}
readonly -f os::cmd::try_until_failure

# os::cmd::try_until_text runs the cmd until either the command outputs the desired text or times out
# the default time-out for os::cmd::try_until_text is 60 seconds.
function os::cmd::try_until_text() {
	if [[ $# -lt 2 ]]; then echo "os::cmd::try_until_text expects at least two arguments, got $#"; return 1; fi
	local cmd=$1
	local text=$2
	local duration=${3:-$minute}
	local interval=${4:-0.2}

	os::cmd::internal::run_until_text "${cmd}" "${text}" "os::cmd::internal::success_func" "${duration}" "${interval}"
}
readonly -f os::cmd::try_until_text

# os::cmd::try_until_not_text runs the cmd until either the command doesnot output the text or times out
# the default time-out for os::cmd::try_until_not_text is 60 seconds.
function os::cmd::try_until_not_text() {
	if [[ $# -lt 2 ]]; then echo "os::cmd::try_until_not_text expects at least two arguments, got $#"; return 1; fi
	local cmd=$1
	local text=$2
	local duration=${3:-$minute}
	local interval=${4:-0.2}

	os::cmd::internal::run_until_text "${cmd}" "${text}" "os::cmd::internal::failure_func" "${duration}" "${interval}"
}
readonly -f os::cmd::try_until_text

# Functions in the os::cmd::internal namespace are discouraged from being used outside of os::cmd

# In order to harvest stderr and stdout at the same time into different buckets, we need to stick them into files
# in an intermediate step
os_cmd_internal_tmpdir="${TMPDIR:-"/tmp"}/cmd"
os_cmd_internal_tmpout="${os_cmd_internal_tmpdir}/tmp_stdout.log"
os_cmd_internal_tmperr="${os_cmd_internal_tmpdir}/tmp_stderr.log"

# os::cmd::internal::expect_exit_code_run_grep runs the provided test command and expects a specific
# exit code from that command as well as the success of a specified `+"`"+`grep`+"`"+` invocation. Output from the
# command to be tested is suppressed unless either `+"`"+`VERBOSE=1`+"`"+` or the test fails. This function bypasses
# any error exiting settings or traps set by upstream callers by masking the return code of the command
# with the return code of setting the result variable on failure.
#
# Globals:
#  - JUNIT_REPORT_OUTPUT
#  - VERBOSE
# Arguments:
#  - 1: the command to run
#  - 2: command evaluation assertion to use
#  - 3: text to test for
#  - 4: text assertion to use
# Returns:
#  - 0: if all assertions met
#  - 1: if any assertions fail
function os::cmd::internal::expect_exit_code_run_grep() {
	local cmd=$1
	# default expected cmd code to 0 for success
	local cmd_eval_func=${2:-os::cmd::internal::success_func}
	# default to nothing
	local grep_args=${3:-}
	# default expected test code to 0 for success
	local test_eval_func=${4:-os::cmd::internal::success_func}

	local -a junit_log

	os::cmd::internal::init_tempdir
	os::test::junit::declare_test_start

	local name=$(os::cmd::internal::describe_call "${cmd}" "${cmd_eval_func}" "${grep_args}" "${test_eval_func}")
	local preamble="Running ${name}..."
	echo "${preamble}"
	# for ease of parsing, we want the entire declaration on one line, so we replace '\n' with ';'
	junit_log+=( "${name//$'\n'/;}" )

	local start_time=$(os::cmd::internal::seconds_since_epoch)

	local cmd_result=$( os::cmd::internal::run_collecting_output "${cmd}"; echo $? )
	local cmd_succeeded=$( ${cmd_eval_func} "${cmd_result}"; echo $? )

	local test_result=0
	if [[ -n "${grep_args}" ]]; then
		test_result=$( os::cmd::internal::run_collecting_output 'grep -Eq "${grep_args}" <(os::cmd::internal::get_results)'; echo $? )
	fi
	local test_succeeded=$( ${test_eval_func} "${test_result}"; echo $? )

	local end_time=$(os::cmd::internal::seconds_since_epoch)
	local time_elapsed=$(echo $(( ${end_time} - ${start_time} )) | xargs printf '%5.3f') # in decimal seconds, we need leading zeroes for parsing later

	# clear the preamble so we can print out the success or error message
	os::text::clear_string "${preamble}"

	local return_code
	if (( cmd_succeeded && test_succeeded )); then
		os::text::print_green "SUCCESS after ${time_elapsed}s: ${name}"
		junit_log+=( "SUCCESS after ${time_elapsed}s: ${name//$'\n'/;}" )

		if [[ -n ${VERBOSE-} ]]; then
			os::cmd::internal::print_results
		fi
		return_code=0
	else
		local cause=$(os::cmd::internal::assemble_causes "${cmd_succeeded}" "${test_succeeded}")

		os::text::print_red_bold "FAILURE after ${time_elapsed}s: ${name}: ${cause}"
		junit_log+=( "FAILURE after ${time_elapsed}s: ${name//$'\n'/;}: ${cause}" )

		os::text::print_red "$(os::cmd::internal::print_results)"
		return_code=1
	fi

	junit_log+=( "$(os::cmd::internal::print_results)" )
	# append inside of a subshell so that IFS doesn't get propagated out
	( IFS=$'\n'; echo "${junit_log[*]}" >> "${JUNIT_REPORT_OUTPUT:-/dev/null}" )
	os::test::junit::declare_test_end
	return "${return_code}"
}
readonly -f os::cmd::internal::expect_exit_code_run_grep

# os::cmd::internal::init_tempdir initializes the temporary directory
function os::cmd::internal::init_tempdir() {
	mkdir -p "${os_cmd_internal_tmpdir}"
	rm -f "${os_cmd_internal_tmpdir}"/tmp_std{out,err}.log
}
readonly -f os::cmd::internal::init_tempdir

# os::cmd::internal::describe_call determines the file:line of the latest function call made
# from outside of this file in the call stack, and the name of the function being called from
# that line, returning a string describing the call
function os::cmd::internal::describe_call() {
	local cmd=$1
	local cmd_eval_func=$2
	local grep_args=${3:-}
	local test_eval_func=${4:-}

	local caller_id=$(os::cmd::internal::determine_caller)
	local full_name="${caller_id}: executing '${cmd}'"

	local cmd_expectation=$(os::cmd::internal::describe_expectation "${cmd_eval_func}")
	local full_name="${full_name} expecting ${cmd_expectation}"

	if [[ -n "${grep_args}" ]]; then
		local text_expecting=
		case "${test_eval_func}" in
		"os::cmd::internal::success_func")
			text_expecting="text" ;;
		"os::cmd::internal::failure_func")
			text_expecting="not text" ;;
		esac
		full_name="${full_name} and ${text_expecting} '${grep_args}'"
	fi

	echo "${full_name}"
}
readonly -f os::cmd::internal::describe_call

# os::cmd::internal::determine_caller determines the file relative to the OpenShift Origin root directory
# and line number of the function call to the outer os::cmd wrapper function
function os::cmd::internal::determine_caller() {
	local call_depth=
	local len_sources="${#BASH_SOURCE[@]}"
	for (( i=0; i<${len_sources}; i++ )); do
		if [ ! $(echo "${BASH_SOURCE[i]}" | grep "hack/lib/cmd\.sh$") ]; then
			call_depth=i
			break
		fi
	done

	local caller_file="${BASH_SOURCE[${call_depth}]}"
    caller_file="$( os::util::repository_relative_path "${caller_file}" )"
	local caller_line="${BASH_LINENO[${call_depth}-1]}"
	echo "${caller_file}:${caller_line}"
}
readonly -f os::cmd::internal::determine_caller

# os::cmd::internal::describe_expectation describes a command return code evaluation function
function os::cmd::internal::describe_expectation() {
	local func=$1
	case "${func}" in
	"os::cmd::internal::success_func")
		echo "success" ;;
	"os::cmd::internal::failure_func")
		echo "failure" ;;
	"os::cmd::internal::specific_code_func"*[0-9])
		local code=$(echo "${func}" | grep -Eo "[0-9]+$")
		echo "exit code ${code}" ;;
	"")
		echo "any result"
	esac
}
readonly -f os::cmd::internal::describe_expectation

# os::cmd::internal::seconds_since_epoch returns the number of seconds elapsed since the epoch
# with milli-second precision
function os::cmd::internal::seconds_since_epoch() {
	local ns=$(date +%s%N)
	# if `+"`"+`date`+"`"+` doesn't support nanoseconds, return second precision
	if [[ "$ns" == *N ]]; then
		date "+%s.000"
		return
	fi
	echo $(( ${ns}/1000000000 ))
}
readonly -f os::cmd::internal::seconds_since_epoch

# os::cmd::internal::run_collecting_output runs the command given, piping stdout and stderr into
# the given files, and returning the exit code of the command
function os::cmd::internal::run_collecting_output() {
	local cmd=$1

	local result=
	$( eval "${cmd}" 1>>"${os_cmd_internal_tmpout}" 2>>"${os_cmd_internal_tmperr}" ) || result=$?
	local result=${result:-0} # if we haven't set result yet, the command succeeded

	return "${result}"
}
readonly -f os::cmd::internal::run_collecting_output

# os::cmd::internal::success_func determines if the input exit code denotes success
# this function returns 0 for false and 1 for true to be compatible with arithmetic tests
function os::cmd::internal::success_func() {
	local exit_code=$1

	# use a negated test to get output correct for (( ))
	[[ "${exit_code}" -ne "0" ]]
	return $?
}
readonly -f os::cmd::internal::success_func

# os::cmd::internal::failure_func determines if the input exit code denotes failure
# this function returns 0 for false and 1 for true to be compatible with arithmetic tests
function os::cmd::internal::failure_func() {
	local exit_code=$1

	# use a negated test to get output correct for (( ))
	[[ "${exit_code}" -eq "0" ]]
	return $?
}
readonly -f os::cmd::internal::failure_func

# os::cmd::internal::specific_code_func determines if the input exit code matches the given code
# this function returns 0 for false and 1 for true to be compatible with arithmetic tests
function os::cmd::internal::specific_code_func() {
	local expected_code=$1
	local exit_code=$2

	# use a negated test to get output correct for (( ))
	[[ "${exit_code}" -ne "${expected_code}" ]]
	return $?
}
readonly -f os::cmd::internal::specific_code_func

# os::cmd::internal::get_results prints the stderr and stdout files
function os::cmd::internal::get_results() {
	cat "${os_cmd_internal_tmpout}" "${os_cmd_internal_tmperr}"
}
readonly -f os::cmd::internal::get_results

# os::cmd::internal::get_last_results prints the stderr and stdout from the last attempt
function os::cmd::internal::get_last_results() {
	cat "${os_cmd_internal_tmpout}" | awk 'BEGIN { RS = "\x1e" } END { print $0 }'
	cat "${os_cmd_internal_tmperr}" | awk 'BEGIN { RS = "\x1e" } END { print $0 }'
}
readonly -f os::cmd::internal::get_last_results

# os::cmd::internal::mark_attempt marks the end of an attempt in the stdout and stderr log files
# this is used to make the try_until_* output more concise
function os::cmd::internal::mark_attempt() {
	echo -e '\x1e' >> "${os_cmd_internal_tmpout}"
	echo -e '\x1e' >> "${os_cmd_internal_tmperr}"
}
readonly -f os::cmd::internal::mark_attempt

# os::cmd::internal::compress_output compresses an output file into timeline representation
function os::cmd::internal::compress_output() {
	local logfile=$1

	awk -f ${OS_ROOT}/hack/lib/compress.awk $logfile
}
readonly -f os::cmd::internal::compress_output

# os::cmd::internal::print_results pretty-prints the stderr and stdout files. If attempt separators
# are present, this function returns a concise view of the stdout and stderr output files using a
# timeline format, where consecutive output lines that are the same are condensed into one line
# with a counter
function os::cmd::internal::print_results() {
	if [[ -s "${os_cmd_internal_tmpout}" ]]; then
		echo "Standard output from the command:"
		if grep -q $'\x1e' "${os_cmd_internal_tmpout}"; then
			os::cmd::internal::compress_output "${os_cmd_internal_tmpout}"
		else
			cat "${os_cmd_internal_tmpout}"; echo
		fi
	else
		echo "There was no output from the command."
	fi

	if [[ -s "${os_cmd_internal_tmperr}" ]]; then
		echo "Standard error from the command:"
		if grep -q $'\x1e' "${os_cmd_internal_tmperr}"; then
			os::cmd::internal::compress_output "${os_cmd_internal_tmperr}"
		else
			cat "${os_cmd_internal_tmperr}"; echo
		fi
	else
		echo "There was no error output from the command."
	fi
}
readonly -f os::cmd::internal::print_results

# os::cmd::internal::assemble_causes determines from the two input booleans which part of the test
# failed and generates a nice delimited list of failure causes
function os::cmd::internal::assemble_causes() {
	local cmd_succeeded=$1
	local test_succeeded=$2

	local causes=()
	if (( ! cmd_succeeded )); then
		causes+=("the command returned the wrong error code")
	fi
	if (( ! test_succeeded )); then
		causes+=("the output content test failed")
	fi

	local list=$(printf '; %s' "${causes[@]}")
	echo "${list:2}"
}
readonly -f os::cmd::internal::assemble_causes

# os::cmd::internal::run_until_exit_code runs the provided command until the exit code test given
# succeeds or the timeout given runs out. Output from the command to be tested is suppressed unless
# either `+"`"+`VERBOSE=1`+"`"+` or the test fails. This function bypasses any error exiting settings or traps
# set by upstream callers by masking the return code of the command with the return code of setting
# the result variable on failure.
#
# Globals:
#  - JUNIT_REPORT_OUTPUT
#  - VERBOSE
# Arguments:
#  - 1: the command to run
#  - 2: command evaluation assertion to use
#  - 3: timeout duration
#  - 4: interval duration
# Returns:
#  - 0: if all assertions met before timeout
#  - 1: if timeout occurs
function os::cmd::internal::run_until_exit_code() {
	local cmd=$1
	local cmd_eval_func=$2
	local duration=$3
	local interval=$4

	local -a junit_log

	os::cmd::internal::init_tempdir
	os::test::junit::declare_test_start

	local description=$(os::cmd::internal::describe_call "${cmd}" "${cmd_eval_func}")
	local duration_seconds=`+"`"+`echo $(( $(( duration )) / 1000 )) | xargs printf '%5.3f'`+"`"+`
	local description="${description}; re-trying every ${interval}s until completion or ${duration_seconds}s"
	local preamble="Running ${description}..."
	echo "${preamble}"
	# for ease of parsing, we want the entire declaration on one line, so we replace '\n' with ';'
	junit_log+=( "${description//$'\n'/;}" )

	local start_time=$(os::cmd::internal::seconds_since_epoch)

	local deadline=$(( $(date +%s000) + $duration ))
	local cmd_succeeded=0
	while [ $(date +%s000) -lt $deadline ]; do
		local cmd_result=$( os::cmd::internal::run_collecting_output "${cmd}"; echo $? )
		cmd_succeeded=$( ${cmd_eval_func} "${cmd_result}"; echo $? )
		if (( cmd_succeeded )); then
			break
		fi
		sleep "${interval}"
		os::cmd::internal::mark_attempt
	done

	local end_time=$(os::cmd::internal::seconds_since_epoch)
	local time_elapsed=$(echo $(( ${end_time} - ${start_time} )) | xargs printf '%5.3f') # in decimal seconds, we need leading zeroes for parsing later

	# clear the preamble so we can print out the success or error message
	os::text::clear_string "${preamble}"

	local return_code
	if (( cmd_succeeded )); then
		os::text::print_green "SUCCESS after ${time_elapsed}s: ${description}"
		junit_log+=( "SUCCESS after ${time_elapsed}s: ${description//$'\n'/;}" )

		if [[ -n ${VERBOSE-} ]]; then
			os::cmd::internal::print_results
		fi
		return_code=0
	else
		os::text::print_red_bold "FAILURE after ${time_elapsed}s: ${description}: the command timed out"
		junit_log+=( "FAILURE after ${time_elapsed}s: ${description//$'\n'/;}: the command timed out" )

		os::text::print_red "$(os::cmd::internal::print_results)"
		return_code=1
	fi

	junit_log+=( "$(os::cmd::internal::print_results)" )
	( IFS=$'\n'; echo "${junit_log[*]}" >> "${JUNIT_REPORT_OUTPUT:-/dev/null}" )
	os::test::junit::declare_test_end
	return "${return_code}"
}
readonly -f os::cmd::internal::run_until_exit_code

# os::cmd::internal::run_until_text runs the provided command until the assertion function succeeds with
# the given text on the command output or the timeout given runs out. This can be used to run until the
# output does or does not contain some text. Output from the command to be tested is suppressed unless
# either `+"`"+`VERBOSE=1`+"`"+` or the test fails. This function bypasses any error exiting settings or traps
# set by upstream callers by masking the return code of the command with the return code of setting
# the result variable on failure.
#
# Globals:
#  - JUNIT_REPORT_OUTPUT
#  - VERBOSE
# Arguments:
#  - 1: the command to run
#  - 2: text to test for
#  - 3: text assertion to use
#  - 4: timeout duration
#  - 5: interval duration
# Returns:
#  - 0: if all assertions met before timeout
#  - 1: if timeout occurs
function os::cmd::internal::run_until_text() {
	local cmd=$1
	local text=$2
	local test_eval_func=${3:-os::cmd::internal::success_func}
	local duration=$4
	local interval=$5

	local -a junit_log

	os::cmd::internal::init_tempdir
	os::test::junit::declare_test_start

	local description=$(os::cmd::internal::describe_call "${cmd}" "" "${text}" "${test_eval_func}")
	local duration_seconds=$(echo $(( $(( duration )) / 1000)) | xargs printf '%5.3f')
	local description="${description}; re-trying every ${interval}s until completion or ${duration_seconds}s"
	local preamble="Running ${description}..."
	echo "${preamble}"
	# for ease of parsing, we want the entire declaration on one line, so we replace '\n' with ';'
	junit_log+=( "${description//$'\n'/;}" )

	local start_time=$(os::cmd::internal::seconds_since_epoch)

	local deadline=$(( $(date +%s000) + $duration ))
	local test_succeeded=0
	while [ $(date +%s000) -lt $deadline ]; do
		local cmd_result=$( os::cmd::internal::run_collecting_output "${cmd}"; echo $? )
		local test_result
		test_result=$( os::cmd::internal::run_collecting_output 'grep -Eq "${text}" <(os::cmd::internal::get_last_results)'; echo $? )
		test_succeeded=$( ${test_eval_func} "${test_result}"; echo $? )

		if (( test_succeeded )); then
			break
		fi
		sleep "${interval}"
		os::cmd::internal::mark_attempt
	done

	local end_time=$(os::cmd::internal::seconds_since_epoch)
	local time_elapsed=$(echo $(( ${end_time} - ${start_time} )) | xargs printf '%5.3f') # in decimal seconds, we need leading zeroes for parsing later

    # clear the preamble so we can print out the success or error message
    os::text::clear_string "${preamble}"

	local return_code
	if (( test_succeeded )); then
		os::text::print_green "SUCCESS after ${time_elapsed}s: ${description}"
		junit_log+=( "SUCCESS after ${time_elapsed}s: ${description//$'\n'/;}" )

		if [[ -n ${VERBOSE-} ]]; then
			os::cmd::internal::print_results
		fi
		return_code=0
	else
		os::text::print_red_bold "FAILURE after ${time_elapsed}s: ${description}: the command timed out"
		junit_log+=( "FAILURE after ${time_elapsed}s: ${description//$'\n'/;}: the command timed out" )

		os::text::print_red "$(os::cmd::internal::print_results)"
		return_code=1
	fi

	junit_log+=( "$(os::cmd::internal::print_results)" )
	( IFS=$'\n'; echo "${junit_log[*]}" >> "${JUNIT_REPORT_OUTPUT:-/dev/null}" )
	os::test::junit::declare_test_end
	return "${return_code}"
}
readonly -f os::cmd::internal::run_until_text
`)

func testExtendedTestdataCmdHackLibCmdShBytes() ([]byte, error) {
	return _testExtendedTestdataCmdHackLibCmdSh, nil
}

func testExtendedTestdataCmdHackLibCmdSh() (*asset, error) {
	bytes, err := testExtendedTestdataCmdHackLibCmdShBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/hack/lib/cmd.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdHackLibCompressAwk = []byte(`# Helper functions
function trim(s) {
	gsub(/^[ \t\r\n]+|[ \t\r\n]+$/, "", s);
	return s;
}

function printRecordAndCount(record, count) {
	print record;
	if (count > 1) {
		printf("... repeated %d times\n", count)
	}
}

BEGIN {
	# Before processing, set the record separator to the ASCII record separator character \x1e
	RS = "\x1e";
}

# This action is executed for each record
{
	# Build our current var from the trimmed record
	current = trim($0);

	# Bump the count of times we have seen it
	seen[current]++;

	# Print the previous record and its count (if it is not identical to the current record)
	if (previous && previous != current) {
		printRecordAndCount(previous, seen[previous]);
	}

	# Store the current record as the previous record
	previous = current;
}

END {
	# After processing, print the last record and count if it is non-empty
	if (previous) {
		printRecordAndCount(previous, seen[previous]);
	}
}`)

func testExtendedTestdataCmdHackLibCompressAwkBytes() ([]byte, error) {
	return _testExtendedTestdataCmdHackLibCompressAwk, nil
}

func testExtendedTestdataCmdHackLibCompressAwk() (*asset, error) {
	bytes, err := testExtendedTestdataCmdHackLibCompressAwkBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/hack/lib/compress.awk", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdHackLibConstantsSh = []byte(`#!/usr/bin/env bash

readonly OS_OUTPUT_BASEPATH="${OS_OUTPUT_BASEPATH:-_output}"
readonly OS_BASE_OUTPUT="${OS_ROOT}/${OS_OUTPUT_BASEPATH}"
readonly OS_OUTPUT_SCRIPTPATH="${OS_OUTPUT_SCRIPTPATH:-"${OS_BASE_OUTPUT}/scripts"}"
`)

func testExtendedTestdataCmdHackLibConstantsShBytes() ([]byte, error) {
	return _testExtendedTestdataCmdHackLibConstantsSh, nil
}

func testExtendedTestdataCmdHackLibConstantsSh() (*asset, error) {
	bytes, err := testExtendedTestdataCmdHackLibConstantsShBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/hack/lib/constants.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdHackLibInitSh = []byte(`#!/usr/bin/env bash

# This script is meant to be the entrypoint for OpenShift Bash scripts to import all of the support
# libraries at once in order to make Bash script preambles as minimal as possible. This script recur-
# sively `+"`"+`source`+"`"+`s *.sh files in this directory tree. As such, no files should be `+"`"+`source`+"`"+`ed outside
# of this script to ensure that we do not attempt to overwrite read-only variables.

set -o errexit
set -o nounset
set -o pipefail

OS_SCRIPT_START_TIME="$( date +%s )"; export OS_SCRIPT_START_TIME

# os::util::absolute_path returns the absolute path to the directory provided
function os::util::absolute_path() {
	local relative_path="$1"
	local absolute_path

	pushd "${relative_path}" >/dev/null
	relative_path="$( pwd )"
	if [[ -h "${relative_path}" ]]; then
		absolute_path="$( readlink "${relative_path}" )"
	else
		absolute_path="${relative_path}"
	fi
	popd >/dev/null

	echo "${absolute_path}"
}
readonly -f os::util::absolute_path

# find the absolute path to the root of the Origin source tree
init_source="$( dirname "${BASH_SOURCE[0]}" )/../.."
OS_ROOT="$( os::util::absolute_path "${init_source}" )"
export OS_ROOT
cd "${OS_ROOT}"

source "${OS_ROOT}/hack/lib/constants.sh"
source "${OS_ROOT}/hack/lib/cmd.sh"

for library_file in $( find "${OS_ROOT}/hack/lib/log" -type f -name '*.sh' -not -path '*/hack/lib/init.sh' ); do
	source "${library_file}"
done
for library_file in $( find "${OS_ROOT}/hack/lib/test" -type f -name '*.sh' -not -path '*/hack/lib/init.sh' ); do
	source "${library_file}"
done
for library_file in $( find "${OS_ROOT}/hack/lib/util" -type f -name '*.sh' -not -path '*/hack/lib/init.sh' ); do
	source "${library_file}"
done

unset library_files library_file init_source

# all of our Bash scripts need to have the stacktrace
# handler installed to deal with errors
os::log::stacktrace::install

# All of our Bash scripts need to have access to the
# binaries that we build so we don't have to find
# them before every invocation.
os::util::environment::update_path_var

if [[ -z "${OS_TMP_ENV_SET-}" ]]; then
	# if this file is run via 'source', then $0 will be "-bash" and won't work with basename
	if [[ "${0}" =~ .*\.sh ]]; then
		os::util::environment::setup_tmpdir_vars "$( basename "${0}" ".sh" )"
	else
		os::util::environment::setup_tmpdir_vars "shell"
	fi
fi

# Allow setting $JUNIT_REPORT to toggle output behavior
if [[ -n "${JUNIT_REPORT:-}" ]]; then
  export JUNIT_REPORT_OUTPUT="${LOG_DIR}/raw_test_output.log"
fi


cp ${KUBECONFIG_TESTS} /kubeconfig
chmod 644 /kubeconfig
export KUBECONFIG=/kubeconfig

namespace="cmd-${TEST_NAME}"
oc new-project "${namespace}"
`)

func testExtendedTestdataCmdHackLibInitShBytes() ([]byte, error) {
	return _testExtendedTestdataCmdHackLibInitSh, nil
}

func testExtendedTestdataCmdHackLibInitSh() (*asset, error) {
	bytes, err := testExtendedTestdataCmdHackLibInitShBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/hack/lib/init.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdHackLibLogOutputSh = []byte(`#!/usr/bin/env bash

# This file contains functions used for writing log messages
# to stdout and stderr from scripts while they run.

# os::log::info writes the message to stdout.
#
# Arguments:
#  - all: message to write
function os::log::info() {
	local message; message="$( os::log::internal::prefix_lines "[INFO]" "$*" )"
	os::log::internal::to_logfile "${message}"
	echo "${message}"
}
readonly -f os::log::info

# os::log::warning writes the message to stderr.
# A warning indicates something went wrong but
# not so wrong that we cannot recover.
#
# Arguments:
#  - all: message to write
function os::log::warning() {
	local message; message="$( os::log::internal::prefix_lines "[WARNING]" "$*" )"
	os::log::internal::to_logfile "${message}"
	os::text::print_yellow "${message}" 1>&2
}
readonly -f os::log::warning

# os::log::error writes the message to stderr.
# An error indicates that something went wrong
# and we will most likely fail after this.
#
# Arguments:
#  - all: message to write
function os::log::error() {
	local message; message="$( os::log::internal::prefix_lines "[ERROR]" "$*" )"
	os::log::internal::to_logfile "${message}"
	os::text::print_red "${message}" 1>&2
}
readonly -f os::log::error

# os::log::fatal writes the message to stderr and
# returns a non-zero code to force a process exit.
# A fatal error indicates that there is no chance
# of recovery.
#
# Arguments:
#  - all: message to write
function os::log::fatal() {
	local message; message="$( os::log::internal::prefix_lines "[FATAL]" "$*" )"
	os::log::internal::to_logfile "${message}"
	os::text::print_red "${message}" 1>&2
	exit 1
}
readonly -f os::log::fatal

# os::log::debug writes the message to stderr if
# the ${OS_DEBUG} variable is set.
#
# Globals:
#  - OS_DEBUG
# Arguments:
#  - all: message to write
function os::log::debug() {
	local message; message="$( os::log::internal::prefix_lines "[DEBUG]" "$*" )"
	os::log::internal::to_logfile "${message}"
	if [[ -n "${OS_DEBUG:-}" ]]; then
		os::text::print_blue "${message}" 1>&2
	fi
}
readonly -f os::log::debug

# os::log::internal::to_logfile makes a best-effort
# attempt to write the message to the script logfile
#
# Globals:
#  - LOG_DIR
# Arguments:
#  - all: message to write
function os::log::internal::to_logfile() {
	if [[ -n "${LOG_DIR:-}" && -d "${LOG_DIR-}" ]]; then
		echo "$*" >>"${LOG_DIR}/scripts.log"
	fi
}

# os::log::internal::prefix_lines prints out the
# original content with the given prefix at the
# start of every line.
#
# Arguments:
#  - 1: prefix for lines
#  - 2: content to prefix
function os::log::internal::prefix_lines() {
	local prefix="$1"
	local content="$2"

	local old_ifs="${IFS}"
	IFS=$'\n'
	for line in ${content}; do
		echo "${prefix} ${line}"
	done
	IFS="${old_ifs}"
}`)

func testExtendedTestdataCmdHackLibLogOutputShBytes() ([]byte, error) {
	return _testExtendedTestdataCmdHackLibLogOutputSh, nil
}

func testExtendedTestdataCmdHackLibLogOutputSh() (*asset, error) {
	bytes, err := testExtendedTestdataCmdHackLibLogOutputShBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/hack/lib/log/output.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdHackLibLogStacktraceSh = []byte(`#!/usr/bin/env bash
#
# This library contains an implementation of a stack trace for Bash scripts.

# os::log::stacktrace::install installs the stacktrace as a handler for the ERR signal if one
# has not already been installed and sets `+"`"+`set -o errtrace`+"`"+` in order to propagate the handler
# If the ERR trap is not initialized, installing this plugin will initialize it.
#
# Globals:
#  None
# Arguments:
#  None
# Returns:
#  - export OS_USE_STACKTRACE
function os::log::stacktrace::install() {
    # setting 'errtrace' propagates our ERR handler to functions, expansions and subshells
    set -o errtrace

    # OS_USE_STACKTRACE is read by os::util::trap at runtime to request a stacktrace
    export OS_USE_STACKTRACE=true

    os::util::trap::init_err
}
readonly -f os::log::stacktrace::install

# os::log::stacktrace::print prints the stacktrace and exits with the return code from the script that
# called for a stack trace. This function will always return 0 if it is not handling the signal, and if it
# is handling the signal, this function will always `+"`"+`exit`+"`"+`, not return, the return code it receives as
# its first argument.
#
# Globals:
#  - BASH_SOURCE
#  - BASH_LINENO
#  - FUNCNAME
# Arguments:
#  - 1: the return code of the command in the script that generated the ERR signal
#  - 2: the last command that ran before handlers were invoked
#  - 3: whether or not `+"`"+`set -o errexit`+"`"+` was set in the script that generated the ERR signal
# Returns:
#  None
function os::log::stacktrace::print() {
    local return_code=$1
    local last_command=$2
    local errexit_set=${3:-}

    if [[ "${return_code}" = "0" ]]; then
        # we're not supposed to respond when no error has occurred
        return 0
    fi

    if [[ -z "${errexit_set}" ]]; then
        # if errexit wasn't set in the shell when the ERR signal was issued, then we can ignore the signal
        # as this is not cause for failure
        return 0
    fi

    # dump the entire stack for debugging purposes
    os::log::debug "$( os::util::repository_relative_path "${BASH_SOURCE[0]}:${LINENO}: ${BASH_COMMAND}" )"
    for (( i = 0; i < ${#BASH_LINENO[@]}; i++ )); do
        os::log::debug "$( os::util::repository_relative_path "${BASH_SOURCE[$i+1]:-"$( os::util::repository_relative_path "$0" )"}" ):${BASH_LINENO[$i]}: ${FUNCNAME[$i]}"
    done

    # iterate backwards through the stack until we leave library files, so we can be sure we start logging
    # actual script code and not this handler's call
    local stack_begin_index
    for (( stack_begin_index = 0; stack_begin_index < ${#BASH_SOURCE[@]}; stack_begin_index++ )); do
        if [[ ! "${BASH_SOURCE[${stack_begin_index}]}" =~ hack/lib/(log/stacktrace|util/trap)\.sh ]]; then
            break
        fi
    done

    local preamble_finished
    local stack_index=1
    local i
    for (( i = stack_begin_index; i < ${#BASH_SOURCE[@]}; i++ )); do
        local bash_source
        bash_source="$( os::util::repository_relative_path "${BASH_SOURCE[$i]}" )"
        if [[ -z "${preamble_finished:-}" ]]; then
            preamble_finished=true
            os::log::error "${bash_source}:${BASH_LINENO[$i-1]}: \`+"`"+`${last_command}\`+"`"+` exited with status ${return_code}." >&2
            exit "${return_code}"
        fi
        stack_index=$(( stack_index + 1 ))
    done

    # we know we're the privileged handler in this chain, so we can safely exit the shell without
    # starving another handler of the privilege of reacting to this signal
    os::log::info "  Exiting with code ${return_code}." >&2
    exit "${return_code}"
}
readonly -f os::log::stacktrace::print
`)

func testExtendedTestdataCmdHackLibLogStacktraceShBytes() ([]byte, error) {
	return _testExtendedTestdataCmdHackLibLogStacktraceSh, nil
}

func testExtendedTestdataCmdHackLibLogStacktraceSh() (*asset, error) {
	bytes, err := testExtendedTestdataCmdHackLibLogStacktraceShBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/hack/lib/log/stacktrace.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdHackLibLogSystemSh = []byte(`#!/usr/bin/env bash
#
# This library holds all of the system logging functions for OpenShift bash scripts.

# os::log::system::install_cleanup installs os::log::system::clean_up as a trap on exit.
# If any traps are currently set for these signals, os::log::system::clean_up is prefixed.
#
# Globals:
#  None
# Arguments:
#  None
# Returns:
#  None
function os::log::system::install_cleanup() {
    trap "os::log::system::clean_up; $(trap -p EXIT | awk -F"'" '{print $2}')" EXIT
}
readonly -f os::log::system::install_cleanup

# os::log::system::clean_up should be trapped so that it can stop the logging utility once the script that
# installed it is finished.
# This function stops logging and generates plots of data for easy consumption.
#
# Globals:
#  - LOG_DIR
#  - LOGGER_PID
#  - SAR_LOGFILE
# Arguments:
#  None
# Returns:
#  None
function os::log::system::clean_up() {
    local return_code=$?

    # we don't want failures in this logger to
    set +o errexit

    if jobs -pr | grep -q "${LOGGER_PID}"; then
        kill -SIGTERM "${LOGGER_PID}"
        # give logger ten seconds to gracefully exit before killing it
        for (( i = 0; i < 10; i++ )); do
            if ! jobs -pr | grep -q "${LOGGER_PID}"; then
                # the logger has shutdown, we don't need to wait on it any longer
                break
            fi
        done

        if jobs -pr | grep -q "${LOGGER_PID}"; then
            # the logger has not shutdown, so kill it
            kill -SIGKILL "${LOGGER_PID}"
        fi
    fi

    if ! which sadf  >/dev/null 2>&1; then
        os::log::warning "System logger data could not be unpacked and graphed, 'sadf' binary not found in this environment."
        return 0
    fi

    if [[ ! -s "${SAR_LOGFILE:-}" ]]; then
        os::log::warning "No system logger data could be found, log file missing."
        return 0
    fi

    local log_subset_flags=( "-b" "-B" "-u ALL" "-q" "-r" )

    local log_subset_names=( "iops" "paging" "cpu" "queue" "memory" )

    local log_subset_file
    local i
    for (( i = 0; i < "${#log_subset_flags[@]}"; i++ )); do
        log_subset_file="${LOG_DIR}/${log_subset_names[$i]}.txt"
        # use sadf utility to extract data into easily-parseable format
        sadf -d "${SAR_LOGFILE}" -- ${log_subset_flags[$i]} > "${log_subset_file}"

        local ignored_columns="hostname,interval,"

        # special cases for special output from SAR, because the tool often gives us columns full of baloney
        if [[ "${log_subset_names[$i]}" == "cpu" ]]; then
            ignored_columns="${ignored_columns}CPU,"
        fi

        os::log::system::internal::prune_datafile "${log_subset_file}" "${ignored_columns}"
        os::log::system::internal::plot "${log_subset_file}"
    done

    # remove the `+"`"+`sar`+"`"+` log file for space constraints
    rm -f "${SAR_LOGFILE}"

    return "${return_code}"
}
readonly -f os::log::system::clean_up

# os::log::system::internal::prune_datafile removes the given columns from a datafile created by 'sadf -d'
#
# Globals:
#  None
# Arguments:
#  - 1: datafile
#  - 2: comma-delimited columns to remove, with trailing comma
# Returns:
#  None
function os::log::system::internal::prune_datafile() {
    local datafile=$1
    local column_names=$2

    if [[ "${#column_names}" -eq 0 ]]; then
        return 0
    fi

    local columns_in_order
    columns_in_order=( $( head -n 1 "${datafile}" | sed 's/^# //g' | tr ';' ' ' ) )

    local columns_to_keep
    local i
    for (( i = 0; i < "${#columns_in_order[@]}"; i++ )); do
        if ! echo "${column_names}" | grep -q "${columns_in_order[$i]},"; then
            # this is a column we need to keep, adding one as 'cut' is 1-indexed
            columns_to_keep+=( "$(( i + 1 ))" )
        fi
    done

    # for the proper flag format for 'cut', we join the list delimiting with commas
    columns_to_keep="$( IFS=','; echo "${columns_to_keep[*]}" )"

    cut --delimiter=';' -f"${columns_to_keep}" "${datafile}" > "${datafile}.tmp"
    sed -i '1s/^/# /' "${datafile}.tmp"
    mv "${datafile}.tmp" "${datafile}"
}
readonly -f os::log::system::internal::prune_datafile

# os::log::system::internal::plot uses gnuplot to make a plot of some data across time points. This function is intended to be used
# on the output of a 'sar -f' read of a sar binary file. Plots will be made of all columns and stacked on each other with one x axis.
# This function needs the non-data columns of the file to be prefixed with comments.
#
# Globals:
#  - LOG_DIR
# Arguments:
#  - 1: data file
# Returns:
#  None
function os::log::system::internal::plot() {
    local datafile=$1
    local plotname
    plotname="$(basename "${datafile}" .txt)"

    # we are expecting the output of a 'sadf -d' read, so the headers will be on the first line of the file
    local headers
    headers=( $( head -n 1 "${datafile}" | sed 's/^# //g' | tr ';' ' ' ) )

    local records
    local width
    records="$(( $( wc -l < "${datafile}" ) - 1 ))" # one of these lines will be the header comment
    if [[ "${records}" -gt 90 ]]; then
        width="$(echo "8.5 + ${records}*0.025" | bc )"
    else
        width="8.5"
    fi

    local gnuplot_directive=( "set terminal pdf size ${width}in,$(( 2 * (${#headers[@]} - 1) ))in" \
                              "set output \"${LOG_DIR}/${plotname}.pdf\"" \
                              "set datafile separator \";\"" \
                              "set xdata time" \
                              "set timefmt '%Y-%m-%d %H:%M:%S UTC'" \
                              "set tmargin 1" \
                              "set bmargin 1" \
                              "set lmargin 20" \
                              "set rmargin 20" \
                              "set multiplot layout ${#headers[@]},1 title \"\n${plotname}\n\"" \
                              "unset title" )

    local i
    for (( i = 1; i < "${#headers[@]}"; i++ )); do
        local header
        header="${headers[$i]}"

        if (( i == ${#headers[@]} - 1 )); then
            # we need x-tick labels on the bottom plot
            gnuplot_directive+=( "set xtics format '%H:%M:%S' rotate by -90" )
        else
            gnuplot_directive+=( "set format x ''" )
        fi

        gnuplot_directive+=( "plot \"${datafile}\" using 1:$(( i + 1 )) title \"${header}\" with lines" )
    done

    # concatenate the array with newlines to get the final directive to send to gnuplot
    gnuplot_directive="$( IFS=$'\n'; echo "${gnuplot_directive[*]}" )"

    {
        printf '$ gnuplot <<< %s\n' "${gnuplot_directive}"
        gnuplot <<< "${gnuplot_directive}" 2>&1
        printf '\n\n'
    } >> "${LOG_DIR}/gnuplot.log"

    os::log::debug "Stacked plot for log subset \"${plotname}\" written to ${LOG_DIR}/${plotname}.pdf"
}
readonly -f os::log::system::internal::plot

# os::log::system::start installs the system logger and begins logging
#
# Globals:
#  - LOG_DIR
# Arguments:
#  None
# Returns:
#  - export LOGGER_PID
#  - export SAR_LOGFILE
function os::log::system::start() {
    if ! which sar >/dev/null 2>&1; then
        os::log::debug "System logger could not be started, 'sar' binary not found in this environment."
        return 0
    fi

    readonly SAR_LOGFILE="${LOG_DIR}/sar.log"
    export SAR_LOGFILE

    os::log::system::internal::run "${SAR_LOGFILE}" "${LOG_DIR}/sar_stderr.log"

    os::log::system::install_cleanup
}
readonly -f os::log::system::start

# os::log::system::internal::run runs the system logger in the background.
# 'sar' is configured to run once a second for 24 hours, so the cleanup trap should be installed to ensure that
# the process is killed once the parent script is finished.
#
# Globals:
#  None
# Arguments:
#  - 1: file to log binary outut to
#  - 2: file to log stderr of the logger to
# Returns:
#  None
function os::log::system::internal::run() {
    local binary_logfile=$1
    local stderr_logfile=$2

    sar -A -o "${binary_logfile}" 1 86400 1>/dev/null 2>"${stderr_logfile}" &

    LOGGER_PID=$!
    readonly LOGGER_PID
    export LOGGER_PID
}
readonly -f os::log::system::internal::run
`)

func testExtendedTestdataCmdHackLibLogSystemShBytes() ([]byte, error) {
	return _testExtendedTestdataCmdHackLibLogSystemSh, nil
}

func testExtendedTestdataCmdHackLibLogSystemSh() (*asset, error) {
	bytes, err := testExtendedTestdataCmdHackLibLogSystemShBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/hack/lib/log/system.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdHackLibTestJunitSh = []byte(`#!/usr/bin/env bash
# This utility file contains functions that format test output to be parsed into jUnit XML

# os::test::junit::declare_suite_start prints a message declaring the start of a test suite
# Any number of suites can be in flight at any time, so there is no failure condition for this
# script based on the number of suites in flight.
#
# Globals:
#  - JUNIT_REPORT_OUTPUT
#  - NUM_OS_JUNIT_SUITES_IN_FLIGHT
# Arguments:
#  - 1: the suite name that is starting
# Returns:
#  - increment NUM_OS_JUNIT_SUITES_IN_FLIGHT
function os::test::junit::declare_suite_start() {
    local suite_name=$1
    local num_suites=${NUM_OS_JUNIT_SUITES_IN_FLIGHT:-0}

    echo "=== BEGIN TEST SUITE github.com/openshift/origin/test/${suite_name} ===" >> "${JUNIT_REPORT_OUTPUT:-/dev/null}"
    NUM_OS_JUNIT_SUITES_IN_FLIGHT=$(( ${num_suites} + 1 ))
    export NUM_OS_JUNIT_SUITES_IN_FLIGHT
}
readonly -f os::test::junit::declare_suite_start

# os::test::junit::declare_suite_end prints a message declaring the end of a test suite
# If there aren't any suites in flight, this function will fail.
#
# Globals:
#  - JUNIT_REPORT_OUTPUT
#  - NUM_OS_JUNIT_SUITES_IN_FLIGHT
# Arguments:
#  - 1: the suite name that is starting
# Returns:
#  - export/decrement NUM_OS_JUNIT_SUITES_IN_FLIGHT
function os::test::junit::declare_suite_end() {
    local num_suites=${NUM_OS_JUNIT_SUITES_IN_FLIGHT:-0}
    if [[ "${num_suites}" -lt "1" ]]; then
        # we can't end a suite if none have been started yet
        echo "[ERROR] jUnit suite marker could not be placed, expected suites in flight, got ${num_suites}"
        return 1
    fi

    echo "=== END TEST SUITE ===" >> "${JUNIT_REPORT_OUTPUT:-/dev/null}"
    NUM_OS_JUNIT_SUITES_IN_FLIGHT=$(( ${num_suites} - 1 ))
    export NUM_OS_JUNIT_SUITES_IN_FLIGHT
}
readonly -f os::test::junit::declare_suite_end

# os::test::junit::declare_test_start prints a message declaring the start of a test case
# If there is already a test marked as being in flight, this function will fail.
#
# Globals:
#  - JUNIT_REPORT_OUTPUT
#  - NUM_OS_JUNIT_TESTS_IN_FLIGHT
# Arguments:
#  None
# Returns:
#  - increment NUM_OS_JUNIT_TESTS_IN_FLIGHT
function os::test::junit::declare_test_start() {
    local num_tests=${NUM_OS_JUNIT_TESTS_IN_FLIGHT:-0}
    if [[ "${num_tests}" -ne "0" ]]; then
        # someone's declaring the starting of a test when a test is already in flight
        echo "[ERROR] jUnit test marker could not be placed, expected no tests in flight, got ${num_tests}"
        return 1
    fi

    local num_suites=${NUM_OS_JUNIT_SUITES_IN_FLIGHT:-0}
    if [[ "${num_suites}" -lt "1" ]]; then
        # we can't end a test if no suites are in flight
        echo "[ERROR] jUnit test marker could not be placed, expected suites in flight, got ${num_suites}"
        return 1
    fi

    echo "=== BEGIN TEST CASE ===" >> "${JUNIT_REPORT_OUTPUT:-/dev/null}"
    NUM_OS_JUNIT_TESTS_IN_FLIGHT=$(( ${num_tests} + 1 ))
    export NUM_OS_JUNIT_TESTS_IN_FLIGHT
}
readonly -f os::test::junit::declare_test_start

# os::test::junit::declare_test_end prints a message declaring the end of a test case
# If there is no test marked as being in flight, this function will fail.
#
# Globals:
#  - JUNIT_REPORT_OUTPUT
#  - NUM_OS_JUNIT_TESTS_IN_FLIGHT
# Arguments:
#  None
# Returns:
#  - decrement NUM_OS_JUNIT_TESTS_IN_FLIGHT
function os::test::junit::declare_test_end() {
    local num_tests=${NUM_OS_JUNIT_TESTS_IN_FLIGHT:-0}
    if [[ "${num_tests}" -ne "1" ]]; then
        # someone's declaring the end of a test when a test is not in flight
        echo "[ERROR] jUnit test marker could not be placed, expected one test in flight, got ${num_tests}"
        return 1
    fi

    echo "=== END TEST CASE ===" >> "${JUNIT_REPORT_OUTPUT:-/dev/null}"
    NUM_OS_JUNIT_TESTS_IN_FLIGHT=$(( ${num_tests} - 1 ))
    export NUM_OS_JUNIT_TESTS_IN_FLIGHT
}
readonly -f os::test::junit::declare_test_end

# os::test::junit::check_test_counters checks that we do not have any test suites or test cases in flight
# This function should be called at the very end of any test script using jUnit markers to make sure no error in
# marking has occurred.
#
# Globals:
#  - NUM_OS_JUNIT_SUITES_IN_FLIGHT
#  - NUM_OS_JUNIT_TESTS_IN_FLIGHT
# Arguments:
#  None
# Returns:
#  None
function os::test::junit::check_test_counters() {
    if [[ "${NUM_OS_JUNIT_SUITES_IN_FLIGHT-}" -ne "0" ]]; then
        echo "[ERROR] Expected no test suites to be marked as in-flight at the end of testing, got ${NUM_OS_JUNIT_SUITES_IN_FLIGHT-}"
        return 1
    elif [[ "${NUM_OS_JUNIT_TESTS_IN_FLIGHT-}" -ne "0" ]]; then
        echo "[ERROR] Expected no test cases to be marked as in-flight at the end of testing, got ${NUM_OS_JUNIT_TESTS_IN_FLIGHT-}"
        return 1
    fi
}
readonly -f os::test::junit::check_test_counters

# os::test::junit::reconcile_output appends the necessary suite and test end statements to the jUnit output file
# in order to ensure that the file is in a consistent state to allow for parsing
#
# Globals:
#  - NUM_OS_JUNIT_SUITES_IN_FLIGHT
#  - NUM_OS_JUNIT_TESTS_IN_FLIGHT
# Arguments:
#  None
# Returns:
#  None
function os::test::junit::reconcile_output() {
    if [[ "${NUM_OS_JUNIT_TESTS_IN_FLIGHT:-0}" = "1" ]]; then
        os::test::junit::declare_test_end
    fi

    for (( i = 0; i < ${NUM_OS_JUNIT_SUITES_IN_FLIGHT:-0}; i++ )); do
        os::test::junit::declare_suite_end
    done
}
readonly -f os::test::junit::reconcile_output

# os::test::junit::generate_report determines which type of report is to
# be generated and does so from the raw output of the tests.
#
# Globals:
#  - JUNIT_REPORT_OUTPUT
#  - ARTIFACT_DIR
# Arguments:
#  None
# Returns:
#  None
function os::test::junit::generate_report() {
    if [[ -z "${JUNIT_REPORT_OUTPUT:-}" ||
          -n "${JUNIT_REPORT_OUTPUT:-}" && ! -s "${JUNIT_REPORT_OUTPUT:-}" ]]; then
        # we can't generate a report
        return 0
    fi

    if grep -q "=== END TEST CASE ===" "${JUNIT_REPORT_OUTPUT}"; then
        os::test::junit::reconcile_output
        os::test::junit::check_test_counters
        os::test::junit::internal::generate_report "oscmd"
    fi
}

# os::test::junit::internal::generate_report generats an XML jUnit
# report for either `+"`"+`os::cmd`+"`"+` or `+"`"+`go test`+"`"+`, based on the passed
# argument. If the `+"`"+`junitreport`+"`"+` binary is not present, it will be built.
#
# Globals:
#  - JUNIT_REPORT_OUTPUT
#  - ARTIFACT_DIR
# Arguments:
#  - 1: specify which type of tests command output should junitreport read
# Returns:
#  export JUNIT_REPORT_NUM_FAILED
function os::test::junit::internal::generate_report() {
    local report_type="$1"
    os::util::ensure::built_binary_exists 'junitreport'

    local report_file
    report_file="$( mktemp "${ARTIFACT_DIR}/${report_type}_report_XXXXX" ).xml"
    os::log::info "jUnit XML report placed at $( os::util::repository_relative_path ${report_file} )"
    junitreport --type "${report_type}"             \
                --suites nested                     \
                --roots github.com/openshift/origin \
                --output "${report_file}"           \
                <"${JUNIT_REPORT_OUTPUT}"

    local summary
    summary=$( junitreport summarize <"${report_file}" )

    JUNIT_REPORT_NUM_FAILED="$( grep -oE "[0-9]+ failed" <<<"${summary}" )"
    export JUNIT_REPORT_NUM_FAILED

    echo "${summary}"
}`)

func testExtendedTestdataCmdHackLibTestJunitShBytes() ([]byte, error) {
	return _testExtendedTestdataCmdHackLibTestJunitSh, nil
}

func testExtendedTestdataCmdHackLibTestJunitSh() (*asset, error) {
	bytes, err := testExtendedTestdataCmdHackLibTestJunitShBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/hack/lib/test/junit.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdHackLibUtilEnvironmentSh = []byte(`#!/usr/bin/env bash

# This script holds library functions for setting up the shell environment for OpenShift scripts

# os::util::environment::use_sudo updates $USE_SUDO to be 'true', so that later scripts choosing between
# execution using 'sudo' and execution without it chose to use 'sudo'
#
# Globals:
#  None
# Arguments:
#  None
# Returns:
#  - export USE_SUDO
function os::util::environment::use_sudo() {
    USE_SUDO=true
    export USE_SUDO
}
readonly -f os::util::environment::use_sudo

# os::util::environment::setup_time_vars sets up environment variables that describe durations of time
# These variables can be used to specify times for other utility functions
#
# Globals:
#  None
# Arguments:
#  None
# Returns:
#  - export TIME_MS
#  - export TIME_SEC
#  - export TIME_MIN
function os::util::environment::setup_time_vars() {
    TIME_MS=1
    export TIME_MS
    TIME_SEC="$(( 1000  * ${TIME_MS} ))"
    export TIME_SEC
    TIME_MIN="$(( 60 * ${TIME_SEC} ))"
    export TIME_MIN
}
readonly -f os::util::environment::setup_time_vars

# os::util::environment::setup_all_server_vars sets up all environment variables necessary to configure and start an OpenShift server
#
# Globals:
#  - OS_ROOT
#  - PATH
#  - TMPDIR
#  - LOG_DIR
#  - ARTIFACT_DIR
#  - KUBELET_SCHEME
#  - KUBELET_BIND_HOST
#  - KUBELET_HOST
#  - KUBELET_PORT
#  - BASETMPDIR
#  - ETCD_PORT
#  - ETCD_PEER_PORT
#  - API_BIND_HOST
#  - API_HOST
#  - API_PORT
#  - API_SCHEME
#  - PUBLIC_MASTER_HOST
#  - USE_IMAGES
# Arguments:
#  - 1: the path under the root temporary directory for OpenShift where these subdirectories should be made
# Returns:
#  - export PATH
#  - export BASETMPDIR
#  - export LOG_DIR
#  - export VOLUME_DIR
#  - export ARTIFACT_DIR
#  - export FAKE_HOME_DIR
#  - export KUBELET_SCHEME
#  - export KUBELET_BIND_HOST
#  - export KUBELET_HOST
#  - export KUBELET_PORT
#  - export ETCD_PORT
#  - export ETCD_PEER_PORT
#  - export ETCD_DATA_DIR
#  - export API_BIND_HOST
#  - export API_HOST
#  - export API_PORT
#  - export API_SCHEME
#  - export SERVER_CONFIG_DIR
#  - export MASTER_CONFIG_DIR
#  - export NODE_CONFIG_DIR
#  - export USE_IMAGES
#  - export TAG
function os::util::environment::setup_all_server_vars() {
    os::util::environment::setup_kubelet_vars
    os::util::environment::setup_etcd_vars
    os::util::environment::setup_server_vars
    os::util::environment::setup_images_vars
}
readonly -f os::util::environment::setup_all_server_vars

# os::util::environment::update_path_var updates $PATH so that OpenShift binaries are available
#
# Globals:
#  - OS_ROOT
#  - PATH
# Arguments:
#  None
# Returns:
#  - export PATH
function os::util::environment::update_path_var() {
    local prefix
    if os::util::find::system_binary 'go' >/dev/null 2>&1; then
        prefix+="${OS_OUTPUT_BINPATH}/$(os::build::host_platform):"
    fi
    if [[ -n "${GOPATH:-}" ]]; then
        prefix+="${GOPATH}/bin:"
    fi

    PATH="${prefix:-}${PATH}"
    export PATH
}
readonly -f os::util::environment::update_path_var

# os::util::environment::setup_tmpdir_vars sets up temporary directory path variables
#
# Globals:
#  - TMPDIR
# Arguments:
#  - 1: the path under the root temporary directory for OpenShift where these subdirectories should be made
# Returns:
#  - export BASETMPDIR
#  - export BASEOUTDIR
#  - export LOG_DIR
#  - export VOLUME_DIR
#  - export ARTIFACT_DIR
#  - export FAKE_HOME_DIR
#  - export OS_TMP_ENV_SET
function os::util::environment::setup_tmpdir_vars() {
    local sub_dir=$1

    BASETMPDIR="${TMPDIR:-/tmp}/openshift/${sub_dir}"
    export BASETMPDIR
    VOLUME_DIR="${BASETMPDIR}/volumes"
    export VOLUME_DIR

    BASEOUTDIR="${OS_OUTPUT_SCRIPTPATH}/${sub_dir}"
    export BASEOUTDIR
    LOG_DIR="${ARTIFACT_DIR:-${BASEOUTDIR}}/logs"
    export LOG_DIR
    ARTIFACT_DIR="${ARTIFACT_DIR:-${BASEOUTDIR}/artifacts}"
    export ARTIFACT_DIR
    FAKE_HOME_DIR="${BASEOUTDIR}/openshift.local.home"
    export FAKE_HOME_DIR

    mkdir -p "${LOG_DIR}" "${VOLUME_DIR}" "${ARTIFACT_DIR}" "${FAKE_HOME_DIR}"

    export OS_TMP_ENV_SET="${sub_dir}"
}
readonly -f os::util::environment::setup_tmpdir_vars

# os::util::environment::setup_kubelet_vars sets up environment variables necessary for interacting with the kubelet
#
# Globals:
#  - KUBELET_SCHEME
#  - KUBELET_BIND_HOST
#  - KUBELET_HOST
#  - KUBELET_PORT
# Arguments:
#  None
# Returns:
#  - export KUBELET_SCHEME
#  - export KUBELET_BIND_HOST
#  - export KUBELET_HOST
#  - export KUBELET_PORT
function os::util::environment::setup_kubelet_vars() {
    KUBELET_SCHEME="${KUBELET_SCHEME:-https}"
    export KUBELET_SCHEME
    KUBELET_BIND_HOST="${KUBELET_BIND_HOST:-127.0.0.1}"
    export KUBELET_BIND_HOST
    KUBELET_HOST="${KUBELET_HOST:-${KUBELET_BIND_HOST}}"
    export KUBELET_HOST
    KUBELET_PORT="${KUBELET_PORT:-10250}"
    export KUBELET_PORT
}
readonly -f os::util::environment::setup_kubelet_vars

# os::util::environment::setup_etcd_vars sets up environment variables necessary for interacting with etcd
#
# Globals:
#  - BASETMPDIR
#  - ETCD_HOST
#  - ETCD_PORT
#  - ETCD_PEER_PORT
# Arguments:
#  None
# Returns:
#  - export ETCD_HOST
#  - export ETCD_PORT
#  - export ETCD_PEER_PORT
#  - export ETCD_DATA_DIR
function os::util::environment::setup_etcd_vars() {
    ETCD_HOST="${ETCD_HOST:-127.0.0.1}"
    export ETCD_HOST
    ETCD_PORT="${ETCD_PORT:-4001}"
    export ETCD_PORT
    ETCD_PEER_PORT="${ETCD_PEER_PORT:-7001}"
    export ETCD_PEER_PORT

    ETCD_DATA_DIR="${BASETMPDIR}/etcd"
    export ETCD_DATA_DIR

    mkdir -p "${ETCD_DATA_DIR}"
}
readonly -f os::util::environment::setup_etcd_vars

# os::util::environment::setup_server_vars sets up environment variables necessary for interacting with the server
#
# Globals:
#  - BASETMPDIR
#  - KUBELET_HOST
#  - API_BIND_HOST
#  - API_HOST
#  - API_PORT
#  - API_SCHEME
#  - PUBLIC_MASTER_HOST
# Arguments:
#  None
# Returns:
#  - export API_BIND_HOST
#  - export API_HOST
#  - export API_PORT
#  - export API_SCHEME
#  - export SERVER_CONFIG_DIR
#  - export MASTER_CONFIG_DIR
#  - export NODE_CONFIG_DIR
function os::util::environment::setup_server_vars() {
    # turn on cache mutation detector every time we start a server
    KUBE_CACHE_MUTATION_DETECTOR="${KUBE_CACHE_MUTATION_DETECTOR:-true}"
    export KUBE_CACHE_MUTATION_DETECTOR

    API_BIND_HOST="${API_BIND_HOST:-127.0.0.1}"
    export API_BIND_HOST
    API_HOST="${API_HOST:-${API_BIND_HOST}}"
    export API_HOST
    API_PORT="${API_PORT:-8443}"
    export API_PORT
    API_SCHEME="${API_SCHEME:-https}"
    export API_SCHEME

    MASTER_ADDR="${API_SCHEME}://${API_HOST}:${API_PORT}"
    export MASTER_ADDR
    PUBLIC_MASTER_HOST="${PUBLIC_MASTER_HOST:-${API_HOST}}"
    export PUBLIC_MASTER_HOST

    SERVER_CONFIG_DIR="${BASETMPDIR}/openshift.local.config"
    export SERVER_CONFIG_DIR
    MASTER_CONFIG_DIR="${SERVER_CONFIG_DIR}/master"
    export MASTER_CONFIG_DIR
    NODE_CONFIG_DIR="${SERVER_CONFIG_DIR}/node-${KUBELET_HOST}"
    export NODE_CONFIG_DIR

    ETCD_CLIENT_CERT="${MASTER_CONFIG_DIR}/master.etcd-client.crt"
    export ETCD_CLIENT_CERT
    ETCD_CLIENT_KEY="${MASTER_CONFIG_DIR}/master.etcd-client.key"
    export ETCD_CLIENT_KEY
    ETCD_CA_BUNDLE="${MASTER_CONFIG_DIR}/ca-bundle.crt"
    export ETCD_CA_BUNDLE

    mkdir -p "${SERVER_CONFIG_DIR}" "${MASTER_CONFIG_DIR}" "${NODE_CONFIG_DIR}"
}
readonly -f os::util::environment::setup_server_vars

# os::util::environment::setup_images_vars sets up environment variables necessary for interacting with release images
#
# Globals:
#  - OS_ROOT
#  - USE_IMAGES
# Arguments:
#  None
# Returns:
#  - export USE_IMAGES
#  - export TAG
#  - export MAX_IMAGES_BULK_IMPORTED_PER_REPOSITORY
function os::util::environment::setup_images_vars() {
    # Use either the latest release built images, or latest.
    IMAGE_PREFIX="${OS_IMAGE_PREFIX:-"openshift/origin"}"
    if [[ -z "${USE_IMAGES-}" ]]; then
        TAG='latest'
        export TAG
        USE_IMAGES="${IMAGE_PREFIX}-\${component}:latest"
        export USE_IMAGES

        if [[ -e "${OS_ROOT}/_output/local/releases/.commit" ]]; then
            TAG="$(cat "${OS_ROOT}/_output/local/releases/.commit")"
            export TAG
            USE_IMAGES="${IMAGE_PREFIX}-\${component}:${TAG}"
            export USE_IMAGES
        fi
    fi
	export MAX_IMAGES_BULK_IMPORTED_PER_REPOSITORY="${MAX_IMAGES_BULK_IMPORTED_PER_REPOSITORY:-3}"
}
readonly -f os::util::environment::setup_images_vars
`)

func testExtendedTestdataCmdHackLibUtilEnvironmentShBytes() ([]byte, error) {
	return _testExtendedTestdataCmdHackLibUtilEnvironmentSh, nil
}

func testExtendedTestdataCmdHackLibUtilEnvironmentSh() (*asset, error) {
	bytes, err := testExtendedTestdataCmdHackLibUtilEnvironmentShBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/hack/lib/util/environment.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdHackLibUtilMiscSh = []byte(`#!/usr/bin/env bash
#
# This library holds miscellaneous utility functions. If there begin to be groups of functions in this
# file that share intent or are thematically similar, they should be split into their own files.

# os::util::describe_return_code describes an exit code
#
# Globals:
#  - OS_SCRIPT_START_TIME
# Arguments:
#  - 1: exit code to describe
# Returns:
#  None
function os::util::describe_return_code() {
	local return_code=$1
	local message="$( os::util::repository_relative_path $0 ) exited with code ${return_code} "

	if [[ -n "${OS_SCRIPT_START_TIME:-}" ]]; then
		local end_time
        end_time="$(date +%s)"
		local elapsed_time
        elapsed_time="$(( end_time - OS_SCRIPT_START_TIME ))"
		local formatted_time
        formatted_time="$( os::util::format_seconds "${elapsed_time}" )"
		message+="after ${formatted_time}"
	fi

	if [[ "${return_code}" = "0" ]]; then
		os::log::info "${message}"
	else
		os::log::error "${message}"
	fi
}
readonly -f os::util::describe_return_code

# os::util::install_describe_return_code installs the return code describer for the EXIT trap
# If the EXIT trap is not initialized, installing this plugin will initialize it.
#
# Globals:
#  None
# Arguments:
#  None
# Returns:
#  - export OS_DESCRIBE_RETURN_CODE
#  - export OS_SCRIPT_START_TIME
function os::util::install_describe_return_code() {
	export OS_DESCRIBE_RETURN_CODE="true"
	OS_SCRIPT_START_TIME="$( date +%s )"; export OS_SCRIPT_START_TIME
	os::util::trap::init_exit
}
readonly -f os::util::install_describe_return_code

# OS_ORIGINAL_WD is the original working directory the script sourcing this utility file was called
# from. This is an important directory as if $0 is a relative path, we cannot use the following path
# utility without knowing from where $0 is relative.
if [[ -z "${OS_ORIGINAL_WD:-}" ]]; then
	# since this could be sourced in a context where the utilities are already loaded,
	# we want to ensure that this is re-entrant, so we only set $OS_ORIGINAL_WD if it
	# is not set already
	OS_ORIGINAL_WD="$( pwd )"
	readonly OS_ORIGINAL_WD
	export OS_ORIGINAL_WD
fi

# os::util::repository_relative_path returns the relative path from the $OS_ROOT directory to the
# given file, if the file is inside of the $OS_ROOT directory. If the file is outside of $OS_ROOT,
# this function will return the absolute path to the file
#
# Globals:
#  - OS_ROOT
# Arguments:
#  - 1: the path to relativize
# Returns:
#  None
function os::util::repository_relative_path() {
	local filename=$1
	local directory; directory="$( dirname "${filename}" )"
	filename="$( basename "${filename}" )"

	if [[ "${directory}" != "${OS_ROOT}"* ]]; then
		pushd "${OS_ORIGINAL_WD}" >/dev/null 2>&1
		directory="$( os::util::absolute_path "${directory}" )"
		popd >/dev/null 2>&1
	fi

	directory="${directory##*${OS_ROOT}/}"

	echo "${directory}/${filename}"
}
readonly -f os::util::repository_relative_path

# os::util::format_seconds formats a duration of time in seconds to print in HHh MMm SSs
#
# Globals:
#  None
# Arguments:
#  - 1: time in seconds to format
# Return:
#  None
function os::util::format_seconds() {
	local raw_seconds=$1

	local hours minutes seconds
	(( hours=raw_seconds/3600 ))
	(( minutes=(raw_seconds%3600)/60 ))
	(( seconds=raw_seconds%60 ))

	printf '%02dh %02dm %02ds' "${hours}" "${minutes}" "${seconds}"
}
readonly -f os::util::format_seconds

# os::util::sed attempts to make our Bash scripts agnostic to the platform
# on which they run `+"`"+`sed`+"`"+` by glossing over a discrepancy in flag use in GNU.
#
# Globals:
#  None
# Arguments:
#  - all: arguments to pass to `+"`"+`sed -i`+"`"+`
# Return:
#  None
function os::util::sed() {
	local sudo="${USE_SUDO:+sudo}"
	if LANG=C sed --help 2>&1 | grep -q "GNU sed"; then
		${sudo} sed -i'' "$@"
	else
		${sudo} sed -i '' "$@"
	fi
}
readonly -f os::util::sed

# os::util::base64decode attempts to make our Bash scripts agnostic to the platform
# on which they run `+"`"+`base64decode`+"`"+` by glossing over a discrepancy in flag use in GNU.
#
# Globals:
#  None
# Arguments:
#  - all: arguments to pass to `+"`"+`base64decode`+"`"+`
# Return:
#  None
function os::util::base64decode() {
	if [[ "$(go env GOHOSTOS)" == "darwin" ]]; then
		base64 -D "$@"
	else
		base64 -d "$@"
	fi
}
readonly -f os::util::base64decode

# os::util::curl_etcd sends a request to the backing etcd store for the master.
# We use the administrative client cert and key for access and re-encode them
# as necessary for OSX clients.
#
# Globals:
#  MASTER_CONFIG_DIR
#  API_SCHEME
#  API_HOST
#  ETCD_PORT
# Arguments:
#  - 1: etcd-relative URL to curl, with leading slash
# Returns:
#  None
function os::util::curl_etcd() {
	local url="$1"
	local full_url="${API_SCHEME}://${API_HOST}:${ETCD_PORT}${url}"

	local etcd_client_cert="${MASTER_CONFIG_DIR}/master.etcd-client.crt"
	local etcd_client_key="${MASTER_CONFIG_DIR}/master.etcd-client.key"
	local ca_bundle="${MASTER_CONFIG_DIR}/ca-bundle.crt"

	if curl -V | grep -q 'SecureTransport'; then
		# on newer OSX `+"`"+`curl`+"`"+` implementations, SSL is not used and client certs
		# and keys are expected to be encoded in P12 format instead of PEM format,
		# so we need to convert the secrets that the server wrote if we haven't
		# already done so
		local etcd_client_cert_p12="${MASTER_CONFIG_DIR}/master.etcd-client.crt.p12"
		local etcd_client_cert_p12_password="${CURL_CERT_P12_PASSWORD:-'password'}"
		if [[ ! -f "${etcd_client_cert_p12}" ]]; then
			openssl pkcs12 -export                        \
			               -in "${etcd_client_cert}"      \
			               -inkey "${etcd_client_key}"    \
			               -out "${etcd_client_cert_p12}" \
			               -password "pass:${etcd_client_cert_p12_password}"
		fi

		curl --fail --silent --cacert "${ca_bundle}" \
		     --cert "${etcd_client_cert_p12}:${etcd_client_cert_p12_password}" "${full_url}"
	else
		curl --fail --silent --cacert "${ca_bundle}" \
		     --cert "${etcd_client_cert}" --key "${etcd_client_key}" "${full_url}"
	fi
}

# os::util::ensure_tmpfs ensures that the target dir is mounted on tmpfs
#
# Globals:
#  OS_TMPFS_REQUIRED
# Arguments:
#  - 1: target to check
# Returns:
#  None
function os::util::ensure_tmpfs() {
	if [[ -z "${OS_TMPFS_REQUIRED:-}" ]]; then
		return 0
	fi

	local target="$1"
	if [[ ! -d "${target}" ]]; then
		os::log::fatal "Target dir ${target} does not exist, cannot perform fstype check."
	fi

	os::log::debug "Filesystem information:
$( df -h -T )"

	os::log::debug "Mount information:
$( findmnt --all )"

	local fstype
	fstype="$( df --output=fstype "${target}" | tail -n 1 )"
	if [[ "${fstype}" != "tmpfs" ]]; then
		local message="Expected \`+"`"+`${target}\`+"`"+` to be mounted on \`+"`"+`tmpfs\`+"`"+` but found \`+"`"+`${fstype}\`+"`"+` instead."
		os::log::fatal "${message}"
	fi
}`)

func testExtendedTestdataCmdHackLibUtilMiscShBytes() ([]byte, error) {
	return _testExtendedTestdataCmdHackLibUtilMiscSh, nil
}

func testExtendedTestdataCmdHackLibUtilMiscSh() (*asset, error) {
	bytes, err := testExtendedTestdataCmdHackLibUtilMiscShBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/hack/lib/util/misc.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdHackLibUtilTextSh = []byte(`#!/usr/bin/env bash

# This file contains helpful aliases for manipulating the output text to the terminal as
# well as functions for one-command augmented printing.

# os::text::reset resets the terminal output to default if it is called in a TTY
function os::text::reset() {
	if os::text::internal::is_tty; then
		tput sgr0
	fi
}
readonly -f os::text::reset

# os::text::bold sets the terminal output to bold text if it is called in a TTY
function os::text::bold() {
	if os::text::internal::is_tty; then
		tput bold
	fi
}
readonly -f os::text::bold

# os::text::red sets the terminal output to red text if it is called in a TTY
function os::text::red() {
	if os::text::internal::is_tty; then
		tput setaf 1
	fi
}
readonly -f os::text::red

# os::text::green sets the terminal output to green text if it is called in a TTY
function os::text::green() {
	if os::text::internal::is_tty; then
		tput setaf 2
	fi
}
readonly -f os::text::green

# os::text::blue sets the terminal output to blue text if it is called in a TTY
function os::text::blue() {
	if os::text::internal::is_tty; then
		tput setaf 4
	fi
}
readonly -f os::text::blue

# os::text::yellow sets the terminal output to yellow text if it is called in a TTY
function os::text::yellow() {
	if os::text::internal::is_tty; then
		tput setaf 11
	fi
}
readonly -f os::text::yellow

# os::text::clear_last_line clears the text from the last line of output to the
# terminal and leaves the cursor on that line to allow for overwriting that text
# if it is called in a TTY
function os::text::clear_last_line() {
	if os::text::internal::is_tty; then
		tput cuu 1
		tput el
	fi
}
readonly -f os::text::clear_last_line

# os::text::clear_string attempts to clear the entirety of a string from the terminal.
# If the string contains literal tabs or other characters that take up more than one
# character space in output, or if the window size is changed before this function
# is called, it will not function correctly.
# No action is taken if this is called outside of a TTY
function os::text::clear_string() {
    local -r string="$1"
    if os::text::internal::is_tty; then
        echo "${string}" | while read line; do
            # num_lines is the number of terminal lines this one line of output
            # would have taken up with the current terminal width in columns
            local num_lines=$(( ${#line} / $( tput cols ) ))
            for (( i = 0; i <= num_lines; i++ )); do
                os::text::clear_last_line
            done
        done
    fi
}

# os::text::internal::is_tty determines if we are outputting to a TTY
function os::text::internal::is_tty() {
	[[ -t 1 && -n "${TERM:-}" ]]
}
readonly -f os::text::internal::is_tty

# os::text::print_bold prints all input in bold text
function os::text::print_bold() {
	os::text::bold
	echo "${*}"
	os::text::reset
}
readonly -f os::text::print_bold

# os::text::print_red prints all input in red text
function os::text::print_red() {
	os::text::red
	echo "${*}"
	os::text::reset
}
readonly -f os::text::print_red

# os::text::print_red_bold prints all input in bold red text
function os::text::print_red_bold() {
	os::text::red
	os::text::bold
	echo "${*}"
	os::text::reset
}
readonly -f os::text::print_red_bold

# os::text::print_green prints all input in green text
function os::text::print_green() {
	os::text::green
	echo "${*}"
	os::text::reset
}
readonly -f os::text::print_green

# os::text::print_green_bold prints all input in bold green text
function os::text::print_green_bold() {
	os::text::green
	os::text::bold
	echo "${*}"
	os::text::reset
}
readonly -f os::text::print_green_bold

# os::text::print_blue prints all input in blue text
function os::text::print_blue() {
	os::text::blue
	echo "${*}"
	os::text::reset
}
readonly -f os::text::print_blue

# os::text::print_blue_bold prints all input in bold blue text
function os::text::print_blue_bold() {
	os::text::blue
	os::text::bold
	echo "${*}"
	os::text::reset
}
readonly -f os::text::print_blue_bold

# os::text::print_yellow prints all input in yellow text
function os::text::print_yellow() {
	os::text::yellow
	echo "${*}"
	os::text::reset
}
readonly -f os::text::print_yellow

# os::text::print_yellow_bold prints all input in bold yellow text
function os::text::print_yellow_bold() {
	os::text::yellow
	os::text::bold
	echo "${*}"
	os::text::reset
}
readonly -f os::text::print_yellow_bold
`)

func testExtendedTestdataCmdHackLibUtilTextShBytes() ([]byte, error) {
	return _testExtendedTestdataCmdHackLibUtilTextSh, nil
}

func testExtendedTestdataCmdHackLibUtilTextSh() (*asset, error) {
	bytes, err := testExtendedTestdataCmdHackLibUtilTextShBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/hack/lib/util/text.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdHackLibUtilTrapSh = []byte(`#!/usr/bin/env bash
#
# This library defines the trap handlers for the ERR and EXIT signals. Any new handler for these signals
# must be added to these handlers and activated by the environment variable mechanism that the rest use.
# These functions ensure that no handler can ever alter the exit code that was emitted by a command
# in a test script.

# os::util::trap::init_err initializes the privileged handler for the ERR signal if it hasn't
# been registered already. This will overwrite any other handlers registered on the signal.
#
# Globals:
#  None
# Arguments:
#  None
# Returns:
#  None
function os::util::trap::init_err() {
    if ! trap -p ERR | grep -q 'os::util::trap::err_handler'; then
        trap 'os::util::trap::err_handler;' ERR
    fi
}
readonly -f os::util::trap::init_err

# os::util::trap::init_exit initializes the privileged handler for the EXIT signal if it hasn't
# been registered already. This will overwrite any other handlers registered on the signal.
#
# Globals:
#  None
# Arguments:
#  None
# Returns:
#  None
function os::util::trap::init_exit() {
    if ! trap -p EXIT | grep -q 'os::util::trap::exit_handler'; then
        trap 'os::util::trap::exit_handler;' EXIT
    fi
}
readonly -f os::util::trap::init_exit

# os::util::trap::err_handler is the handler for the ERR signal.
#
# Globals:
#  - OS_TRAP_DEBUG
#  - OS_USE_STACKTRACE
# Arguments:
#  None
# Returns:
#  - returns original return code, allows privileged handler to exit if necessary
function os::util::trap::err_handler() {
    local -r return_code=$?
    local -r last_command="${BASH_COMMAND}"

    if set +o | grep -q '\-o errexit'; then
        local -r errexit_set=true
    fi

    if [[ "${OS_TRAP_DEBUG:-}" = "true" ]]; then
        echo "[DEBUG] Error handler executing with return code \`+"`"+`${return_code}\`+"`"+`, last command \`+"`"+`${last_command}\`+"`"+`, and errexit set \`+"`"+`${errexit_set:-}\`+"`"+`"
    fi

    if [[ "${OS_USE_STACKTRACE:-}" = "true" ]]; then
        # the OpenShift stacktrace function is treated as a privileged handler for this signal
        # and is therefore allowed to run outside of a subshell in order to allow it to `+"`"+`exit`+"`"+`
        # if necessary
        os::log::stacktrace::print "${return_code}" "${last_command}" "${errexit_set:-}"
    fi

    return "${return_code}"
}
readonly -f os::util::trap::err_handler

# os::util::trap::exit_handler is the handler for the EXIT signal.
#
# Globals:
#  - OS_TRAP_DEBUG
#  - OS_DESCRIBE_RETURN_CODE
# Arguments:
#  None
# Returns:
#  - original exit code of the script that exited
function os::util::trap::exit_handler() {
    local -r return_code=$?

    # we do not want these traps to be able to trigger more errors, we can let them fail silently
    set +o errexit

    if [[ "${OS_TRAP_DEBUG:-}" = "true" ]]; then
        echo "[DEBUG] Exit handler executing with return code \`+"`"+`${return_code}\`+"`"+`"
    fi

    # the following envars selectively enable optional exit traps, all of which are run inside of
    # a subshell in order to sandbox them and not allow them to influence how this script will exit
    if [[ "${OS_DESCRIBE_RETURN_CODE:-}" = "true" ]]; then
        ( os::util::describe_return_code "${return_code}" )
    fi

    exit "${return_code}"
}
readonly -f os::util::trap::exit_handler
`)

func testExtendedTestdataCmdHackLibUtilTrapShBytes() ([]byte, error) {
	return _testExtendedTestdataCmdHackLibUtilTrapSh, nil
}

func testExtendedTestdataCmdHackLibUtilTrapSh() (*asset, error) {
	bytes, err := testExtendedTestdataCmdHackLibUtilTrapShBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/hack/lib/util/trap.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdAdminSh = []byte(`#!/bin/bash
source "$(dirname "${BASH_SOURCE}")/../../hack/lib/init.sh"
trap os::test::junit::reconcile_output EXIT

# Cleanup cluster resources created by this test
(
  set +e
  oc delete project/example project/ui-test-project project/recreated-project &>/dev/null || true
  oc delete groups/shortoutputgroup &>/dev/null || true
  oc delete groups/group1 &>/dev/null || true
  oc delete groups/cascaded-group &>/dev/null || true
  oc delete groups/orphaned-group &>/dev/null || true
  oc delete users/cascaded-user &>/dev/null || true
  oc delete users/orphaned-user &>/dev/null || true
  oc delete identities/alwaysallow:orphaned-user &>/dev/null || true
  oc delete identities/alwaysallow:cascaded-user &>/dev/null || true
  oc delete clusterroles/basic-users2 &>/dev/null || true
  oc delete clusterroles/basic-user2 &>/dev/null || true
  oc delete clusterrolebindings/basic-users2 &>/dev/null || true
  oc delete clusterrolebindings/basic-user2 &>/dev/null || true
  oc delete user/test-cmd-user &>/dev/null || true
  oc delete namespace example &>/dev/null || true
  oc delete identities.user.openshift.io/test-idp:test-uid &>/dev/null || true
  oc delete images.image.openshift.io/sha256:a59906e33509d14c036c8678d687bd4eec81ed7c4b8ce907b888c607f6a1e0e6 &>/dev/null || true
  oc delete -n default imagestreams.image.openshift.io/busybox &>/dev/null || true
  oc wait --for=delete namespace/example --timeout=60s || true
#  oc auth reconcile --remove-extra-permissions --remove-extra-subjects -f "${BASE_RBAC_DATA}"
  exit 0
) &>/dev/null

project="$( oc project -q )"

defaultimage="openshift/origin-\${component}:latest"
USE_IMAGES=${USE_IMAGES:-$defaultimage}

os::test::junit::declare_suite_start "cmd/admin"
# This test validates admin level commands including system policy

os::test::junit::declare_suite_start "cmd/admin/start"
# Check failure modes of various system commands

os::test::junit::declare_suite_start "cmd/admin/certs"
# check encrypt/decrypt of plain text
os::cmd::expect_success          "echo -n 'secret data 1' | oc adm ca encrypt --genkey='${ARTIFACT_DIR}/secret.key' --out='${ARTIFACT_DIR}/secret.encrypted'"
os::cmd::expect_success_and_text "oc adm ca decrypt --in='${ARTIFACT_DIR}/secret.encrypted' --key='${ARTIFACT_DIR}/secret.key'" 'secret data 1'
# create a file with trailing whitespace
echo "data with newline" > "${ARTIFACT_DIR}/secret.whitespace.data"
os::cmd::expect_success_and_text "oc adm ca encrypt --key='${ARTIFACT_DIR}/secret.key' --in='${ARTIFACT_DIR}/secret.whitespace.data'      --out='${ARTIFACT_DIR}/secret.whitespace.encrypted'" 'Warning.*whitespace'
os::cmd::expect_success          "oc adm ca decrypt --key='${ARTIFACT_DIR}/secret.key' --in='${ARTIFACT_DIR}/secret.whitespace.encrypted' --out='${ARTIFACT_DIR}/secret.whitespace.decrypted'"
os::cmd::expect_success          "diff '${ARTIFACT_DIR}/secret.whitespace.data' '${ARTIFACT_DIR}/secret.whitespace.decrypted'"
# create a binary file
echo "hello" | gzip > "${ARTIFACT_DIR}/secret.data"
# encrypt using file and pipe input/output
os::cmd::expect_success "oc adm ca encrypt --key='${ARTIFACT_DIR}/secret.key' --in='${ARTIFACT_DIR}/secret.data' --out='${ARTIFACT_DIR}/secret.file-in-file-out.encrypted'"
os::cmd::expect_success "oc adm ca encrypt --key='${ARTIFACT_DIR}/secret.key' --in='${ARTIFACT_DIR}/secret.data'     > '${ARTIFACT_DIR}/secret.file-in-pipe-out.encrypted'"
os::cmd::expect_success "oc adm ca encrypt --key='${ARTIFACT_DIR}/secret.key'    < '${ARTIFACT_DIR}/secret.data'     > '${ARTIFACT_DIR}/secret.pipe-in-pipe-out.encrypted'"
# decrypt using all three methods
os::cmd::expect_success "oc adm ca decrypt --key='${ARTIFACT_DIR}/secret.key' --in='${ARTIFACT_DIR}/secret.file-in-file-out.encrypted' --out='${ARTIFACT_DIR}/secret.file-in-file-out.decrypted'"
os::cmd::expect_success "oc adm ca decrypt --key='${ARTIFACT_DIR}/secret.key' --in='${ARTIFACT_DIR}/secret.file-in-pipe-out.encrypted'     > '${ARTIFACT_DIR}/secret.file-in-pipe-out.decrypted'"
os::cmd::expect_success "oc adm ca decrypt --key='${ARTIFACT_DIR}/secret.key'    < '${ARTIFACT_DIR}/secret.pipe-in-pipe-out.encrypted'     > '${ARTIFACT_DIR}/secret.pipe-in-pipe-out.decrypted'"
# verify lossless roundtrip
os::cmd::expect_success "diff '${ARTIFACT_DIR}/secret.data' '${ARTIFACT_DIR}/secret.file-in-file-out.decrypted'"
os::cmd::expect_success "diff '${ARTIFACT_DIR}/secret.data' '${ARTIFACT_DIR}/secret.file-in-pipe-out.decrypted'"
os::cmd::expect_success "diff '${ARTIFACT_DIR}/secret.data' '${ARTIFACT_DIR}/secret.pipe-in-pipe-out.decrypted'"
echo "certs: ok"
os::test::junit::declare_suite_end

os::test::junit::declare_suite_start "cmd/admin/groups"
os::cmd::expect_success_and_text 'oc adm groups new shortoutputgroup -o name' 'group.user.openshift.io/shortoutputgroup'
# test --dry-run flag for this command
os::cmd::expect_success_and_text 'oc adm groups new mygroup --dry-run' 'group.user.openshift.io/mygroup created \(dry run\)'
os::cmd::expect_success_and_text 'oc adm groups new mygroup --dry-run -o name' 'group.user.openshift.io/mygroup'
# ensure group was not actually created
os::cmd::expect_failure_and_text 'oc get groups mygroup' 'groups.user.openshift.io "mygroup" not found'
os::cmd::expect_success_and_text 'oc adm groups new shortoutputgroup -o name --dry-run' 'group.user.openshift.io/shortoutputgroup'
os::cmd::expect_failure_and_text 'oc adm groups new shortoutputgroup' 'groups.user.openshift.io "shortoutputgroup" already exists'
os::cmd::expect_failure_and_text 'oc adm groups new errorgroup -o blah' 'unable to match a printer suitable for the output format "blah"'
os::cmd::expect_failure_and_text 'oc get groups/errorgroup' 'groups.user.openshift.io "errorgroup" not found'
# update cmd to use --template once it is wired across all Origin commands.
# see
os::cmd::expect_success_and_text 'oc adm groups new group1 foo bar -o yaml' '\- foo'
os::cmd::expect_success_and_text 'oc get groups/group1 --no-headers' 'foo, bar'
os::cmd::expect_success 'oc adm groups add-users group1 baz'
os::cmd::expect_success_and_text 'oc get groups/group1 --no-headers' 'baz'
os::cmd::expect_success 'oc adm groups remove-users group1 bar'
os::cmd::expect_success_and_not_text 'oc get groups/group1 --no-headers' 'bar'
os::cmd::expect_success_and_text 'oc adm prune auth users/baz' 'group.user.openshift.io/group1 updated'
echo "groups: ok"
os::test::junit::declare_suite_end

os::test::junit::declare_suite_start "cmd/admin/admin-scc"
os::cmd::expect_success 'oc adm policy who-can get pods'
os::cmd::expect_success 'oc adm policy who-can get pods -n default'
os::cmd::expect_success 'oc adm policy who-can get pods --all-namespaces'
# check to make sure that the resource arg conforms to resource rules
os::cmd::expect_success_and_text 'oc adm policy who-can get Pod' "Resource:  pods"
os::cmd::expect_success_and_text 'oc adm policy who-can get PodASDF' "Resource:  PodASDF"
os::cmd::expect_success_and_text 'oc adm policy who-can get hpa.autoscaling -n default' "Resource:  horizontalpodautoscalers.autoscaling"
os::cmd::expect_success_and_text 'oc adm policy who-can get hpa.v1.autoscaling -n default' "Resource:  horizontalpodautoscalers.autoscaling"
os::cmd::expect_success_and_text 'oc adm policy who-can get hpa -n default' "Resource:  horizontalpodautoscalers.autoscaling"

os::cmd::expect_success 'oc adm policy add-role-to-group --rolebinding-name=cluster-admin cluster-admin system:unauthenticated'
os::cmd::expect_success 'oc adm policy add-role-to-user --rolebinding-name=cluster-admin cluster-admin system:no-user'
os::cmd::expect_success 'oc adm policy add-role-to-user --rolebinding-name=admin admin -z fake-sa'
os::cmd::expect_success_and_text 'oc get rolebinding/admin -o jsonpath={.subjects}' 'fake-sa'
os::cmd::expect_success 'oc adm policy remove-role-from-user admin -z fake-sa'
os::cmd::expect_success_and_not_text 'oc get rolebinding/admin -o jsonpath={.subjects}' 'fake-sa'
os::cmd::expect_success 'oc adm policy add-role-to-user --rolebinding-name=admin admin -z fake-sa'
os::cmd::expect_success_and_text 'oc get rolebinding/admin -o jsonpath={.subjects}' 'fake-sa'
os::cmd::expect_success "oc adm policy remove-role-from-user admin system:serviceaccount:$(oc project -q):fake-sa"
os::cmd::expect_success_and_not_text 'oc get rolebinding/admin -o jsonpath={.subjects}' 'fake-sa'
os::cmd::expect_success 'oc adm policy remove-role-from-group cluster-admin system:unauthenticated'
os::cmd::expect_success 'oc adm policy remove-role-from-user cluster-admin system:no-user'
os::cmd::expect_failure_and_text 'oc adm policy remove-role-from-user admin ghost' 'error: unable to find target \[ghost\]'
os::cmd::expect_failure_and_text 'oc adm policy remove-role-from-user admin -z ghost' 'error: unable to find target \[ghost\]'
os::cmd::expect_success 'oc adm policy remove-group system:unauthenticated'
os::cmd::expect_success 'oc adm policy remove-user system:no-user'
os::cmd::expect_success 'oc adm policy add-cluster-role-to-group cluster-admin system:unauthenticated'
os::cmd::expect_success 'oc adm policy remove-cluster-role-from-group cluster-admin system:unauthenticated'
os::cmd::expect_success 'oc adm policy add-cluster-role-to-user cluster-admin system:no-user'
os::cmd::expect_success 'oc adm policy remove-cluster-role-from-user cluster-admin system:no-user'
os::cmd::expect_success 'oc adm policy add-role-to-user view foo'
os::cmd::expect_success 'oc adm policy add-role-to-user view bar --rolebinding-name=custom'
os::cmd::expect_success 'oc adm policy add-role-to-user view baz --rolebinding-name=custom'
#os::cmd::expect_success_and_text 'oc get rolebinding/view -o jsonpath="{.metadata.name},{.roleRef.name},{.userNames[*]}"' '^view,view,foo$'
#os::cmd::expect_success_and_text 'oc get rolebinding/custom -o jsonpath="{.metadata.name},{.roleRef.name},{.userNames[*]}"' '^custom,view,bar baz$'
os::cmd::expect_failure_and_text 'oc adm policy add-role-to-user other fuz --rolebinding-name=custom' '^error: rolebinding custom found for role view, not other$'
#os::cmd::expect_success_and_text 'oc adm policy remove-cluster-role-from-group self-provisioner system:authenticated:oauth' "Warning: Your changes may get lost whenever a master is restarted, unless you prevent reconciliation of this rolebinding using the following command: oc annotate clusterrolebinding.rbac self-provisioners 'rbac.authorization.kubernetes.io/autoupdate=false' --overwrite"
os::cmd::expect_success 'oc adm policy add-cluster-role-to-group --rolebinding-name=self-provisioners self-provisioner system:authenticated:oauth'
#os::cmd::expect_success 'oc annotate clusterrolebinding.rbac self-provisioners "rbac.authorization.kubernetes.io/autoupdate=false" --overwrite'
#os::cmd::expect_success_and_not_text 'oc adm policy remove-cluster-role-from-group self-provisioner system:authenticated:oauth' "Warning"
#os::cmd::expect_success 'oc adm policy add-cluster-role-to-group --rolebinding-name=self-provisioners self-provisioner system:authenticated:oauth'

os::cmd::expect_success 'oc adm policy add-scc-to-user privileged fake-user'
os::cmd::expect_success_and_text 'oc get scc/privileged -o yaml' 'fake-user'
os::cmd::expect_success 'oc adm policy add-scc-to-user privileged -z fake-sa'
os::cmd::expect_success_and_text 'oc get scc/privileged -o yaml' "system:serviceaccount:$(oc project -q):fake-sa"
os::cmd::expect_success 'oc adm policy add-scc-to-group privileged fake-group'
os::cmd::expect_success_and_text 'oc get scc/privileged -o yaml' 'fake-group'
os::cmd::expect_success 'oc adm policy remove-scc-from-user privileged fake-user'
os::cmd::expect_success_and_not_text 'oc get scc/privileged -o yaml' 'fake-user'
os::cmd::expect_success 'oc adm policy remove-scc-from-user privileged -z fake-sa'
os::cmd::expect_success_and_not_text 'oc get scc/privileged -o yaml' "system:serviceaccount:$(oc project -q):fake-sa"
os::cmd::expect_success 'oc adm policy remove-scc-from-group privileged fake-group'
os::cmd::expect_success_and_not_text 'oc get scc/privileged -o yaml' 'fake-group'

# check pruning
os::cmd::expect_success 'oc adm policy add-scc-to-user privileged fake-user'
os::cmd::expect_success_and_text 'oc adm prune auth users/fake-user' 'securitycontextconstraints.security.openshift.io/privileged updated'
os::cmd::expect_success 'oc adm policy add-scc-to-group privileged fake-group'
os::cmd::expect_success_and_text 'oc adm prune auth groups/fake-group' 'securitycontextconstraints.security.openshift.io/privileged updated'
echo "admin-scc: ok"
os::test::junit::declare_suite_end

os::test::junit::declare_suite_start "cmd/admin/role-reapers"
#os::cmd::expect_success "oc process -f ${TEST_DATA}/roles/policy-roles.yaml -p NAMESPACE='${project}' | oc create -f -"
#os::cmd::expect_success "oc get rolebinding/basic-users"
#os::cmd::expect_success "oc adm prune auth role/basic-user"
#os::cmd::try_until_failure "oc get rolebinding/basic-users"
#os::cmd::expect_success "oc delete role/basic-user"
#os::cmd::expect_success "oc create -f ${TEST_DATA}/roles/policy-clusterroles.yaml"
#os::cmd::expect_success "oc get clusterrolebinding/basic-users2"
#os::cmd::expect_success "oc adm prune auth clusterrole/basic-user2"
#os::cmd::try_until_failure "oc get clusterrolebinding/basic-users2"
#os::cmd::expect_success "oc delete clusterrole/basic-user2"
#os::cmd::expect_success "oc policy add-role-to-user edit foo"
#os::cmd::expect_success "oc get rolebinding/edit"
#os::cmd::expect_success "oc adm prune auth clusterrole/edit"
#os::cmd::try_until_failure "oc get rolebinding/edit"
#os::cmd::expect_success "oc delete clusterrole/edit"
#os::cmd::expect_success 'oc auth reconcile --remove-extra-permissions --remove-extra-subjects -f "${BASE_RBAC_DATA}"'
#
#os::cmd::expect_success "oc process -f ${TEST_DATA}/roles/policy-roles.yaml -p NAMESPACE='${project}' | oc create -f -"
#os::cmd::expect_success "oc get rolebinding/basic-users"
#os::cmd::expect_success_and_text "oc adm prune auth role/basic-user" "rolebinding.rbac.authorization.k8s.io/basic-users deleted"
#os::cmd::expect_success "oc get role/basic-user"
#os::cmd::expect_success "oc delete role/basic-user"
#
#os::cmd::expect_success "oc create -f ${TEST_DATA}/roles/policy-clusterroles.yaml"
#os::cmd::expect_success "oc get clusterrolebinding/basic-users2"
#os::cmd::expect_success_and_text "oc adm prune auth clusterrole/basic-user2"  "clusterrolebinding.rbac.authorization.k8s.io/basic-users2 deleted"
#os::cmd::expect_success "oc get clusterrole/basic-user2"
#os::cmd::expect_success "oc delete clusterrole/basic-user2"
echo "admin-role-reapers: ok"
os::test::junit::declare_suite_end

os::test::junit::declare_suite_start "cmd/admin/role-selectors"
os::cmd::expect_success "oc create -f ${TEST_DATA}/roles/policy-clusterroles.yaml"
os::cmd::expect_success "oc get clusterrole/basic-user2"
os::cmd::expect_success "oc label clusterrole/basic-user2 foo=bar"
os::cmd::expect_success_and_not_text "oc get clusterroles --selector=foo=bar" "No resources found"
os::cmd::expect_success_and_text "oc get clusterroles --selector=foo=unknown" "No resources found"
os::cmd::expect_success "oc get clusterrolebinding/basic-users2"
os::cmd::expect_success "oc label clusterrolebinding/basic-users2 foo=bar"
os::cmd::expect_success_and_not_text "oc get clusterrolebindings --selector=foo=bar" "No resources found"
os::cmd::expect_success_and_text "oc get clusterroles --selector=foo=unknown" "No resources found"
os::cmd::expect_success "oc delete clusterrole/basic-user2"
os::test::junit::declare_suite_end
echo "admin-role-selectors: ok"

os::test::junit::declare_suite_start "cmd/admin/ui-project-commands"
# Test the commands the UI projects page tells users to run
# These should match what is described in projects.html
os::cmd::expect_success 'oc adm new-project ui-test-project --admin="createuser"'
os::cmd::expect_success 'oc adm policy add-role-to-user --rolebinding-name=admin admin adduser -n ui-test-project'
# Make sure project can be listed by oc (after auth cache syncs)
os::cmd::try_until_text 'oc get projects' 'ui\-test\-project'
# Make sure users got added
os::cmd::expect_success_and_text "oc get rolebinding admin -n ui-test-project -o jsonpath='{.subjects[*].name}'" '^createuser adduser$'
echo "ui-project-commands: ok"
os::test::junit::declare_suite_end

os::test::junit::declare_suite_start "cmd/admin/new-project"
# Test deleting and recreating a project
os::cmd::expect_success 'oc adm new-project recreated-project --admin="createuser1"'
os::cmd::expect_success 'oc delete project recreated-project'
os::cmd::try_until_failure 'oc get project recreated-project'
os::cmd::expect_success 'oc adm new-project recreated-project --admin="createuser2"'
os::cmd::expect_success_and_text "oc get rolebinding admin -n recreated-project -o jsonpath='{.subjects[*].name}'" '^createuser2$'
echo "new-project: ok"
os::test::junit::declare_suite_end

os::test::junit::declare_suite_start "cmd/admin/build-chain"
# Test building a dependency tree
os::cmd::expect_success 'oc process -f ${TEST_DATA}/application-template-stibuild.json -l build=sti | oc create -f -'
# Test both the type/name resource syntax and the fact that istag/origin-ruby-sample:latest is still
# not created but due to a buildConfig pointing to it, we get back its graph of deps.
os::cmd::expect_success_and_text 'oc adm build-chain istag/origin-ruby-sample' 'istag/origin-ruby-sample:latest'
os::cmd::expect_success_and_text 'oc adm build-chain ruby-25-centos7 -o dot' 'digraph "ruby-25-centos7:latest"'
os::cmd::expect_success 'oc delete all -l build=sti'
echo "ex build-chain: ok"
os::test::junit::declare_suite_end

os::test::junit::declare_suite_start "cmd/admin/complex-scenarios"
# Make sure no one commits data with allocated values that could flake
os::cmd::expect_failure 'grep -r "clusterIP.*172" ${TEST_DATA}/app-scenarios'
os::cmd::expect_success 'oc adm new-project example --admin="createuser"'
os::cmd::expect_success 'oc project example'
os::cmd::try_until_success 'oc get serviceaccount default'
#os::cmd::expect_success 'oc create -f ${TEST_DATA}/app-scenarios'
os::cmd::expect_success 'oc status'
os::cmd::expect_success_and_text 'oc status -o dot' '"example"'
echo "complex-scenarios: ok"
os::test::junit::declare_suite_end

os::test::junit::declare_suite_start "cmd/admin/rolebinding-allowed"
# Admin can bind local roles without cluster-admin permissions
#os::cmd::expect_success "oc create -f ${TEST_DATA}/roles/empty-role.yaml -n '${project}'"
#os::cmd::expect_success 'oc adm policy add-role-to-user admin local-admin  -n '${project}''
#os::cmd::expect_success 'oc login -u local-admin -p pw'
#os::cmd::expect_success 'oc policy add-role-to-user empty-role other --role-namespace='${project}' -n '${project}''
#os::cmd::expect_success 'oc login -u system:admin'
#os::cmd::expect_success "oc delete role/empty-role -n '${project}'"
echo "cmd/admin/rolebinding-allowed: ok"
os::test::junit::declare_suite_end

os::test::junit::declare_suite_start "cmd/admin/rolebinding-local-only"
# Admin cannot bind local roles from different namespace
otherproject='someotherproject'
#os::cmd::expect_success "oc new-project '${otherproject}'"
#os::cmd::expect_success "oc create -f ${TEST_DATA}/roles/empty-role.yaml -n '${project}'"
#os::cmd::expect_success 'oc adm policy add-role-to-user admin local-admin  -n '${otherproject}''
#os::cmd::expect_success 'oc login -u local-admin -p pw'
#os::cmd::expect_failure_and_text 'oc policy add-role-to-user empty-role other --role-namespace='${project}' -n '${otherproject}'' "role binding in namespace \"${otherproject}\" can't reference role in different namespace \"${project}\""
#os::cmd::expect_success 'oc login -u system:admin'
#os::cmd::expect_success "oc delete role/empty-role -n '${project}'"
echo "rolebinding-local-only: ok"
os::test::junit::declare_suite_end

#os::test::junit::declare_suite_start "cmd/admin/user-group-cascade"
## Create test users/identities and groups
#os::cmd::expect_success 'oc login -u cascaded-user -p pw'
#os::cmd::expect_success 'oc login -u orphaned-user -p pw'
#os::cmd::expect_success 'oc login -u system:admin'
## switch to using --template once template printing is available to all cmds through the genericclioptions printer
#os::cmd::expect_success_and_text 'oc adm groups new cascaded-group cascaded-user orphaned-user -o yaml' '\- cascaded\-user'
## switch to using --template once template printing is available to all cmds through the genericclioptions printer
#os::cmd::expect_success_and_text 'oc adm groups new orphaned-group cascaded-user orphaned-user -o yaml' '\- orphaned\-user'
## Add roles, sccs to users/groups
#os::cmd::expect_success 'oc adm policy add-scc-to-user           restricted    cascaded-user  orphaned-user'
#os::cmd::expect_success 'oc adm policy add-scc-to-group          restricted    cascaded-group orphaned-group'
#os::cmd::expect_success 'oc adm policy add-role-to-user --rolebinding-name=cluster-admin cluster-admin cascaded-user  orphaned-user  -n default'
#os::cmd::expect_success 'oc adm policy add-role-to-group --rolebinding-name=cluster-admin cluster-admin cascaded-group orphaned-group -n default'
#os::cmd::expect_success 'oc adm policy add-cluster-role-to-user --rolebinding-name=cluster-admin cluster-admin cascaded-user  orphaned-user'
#os::cmd::expect_success 'oc adm policy add-cluster-role-to-group --rolebinding-name=cluster-admin cluster-admin cascaded-group orphaned-group'
#
## Delete users
#os::cmd::expect_success 'oc adm prune auth user/cascaded-user'
#os::cmd::expect_success 'oc delete user  cascaded-user'
#os::cmd::expect_success 'oc delete user  orphaned-user  --cascade=false'
## Verify all identities remain
#os::cmd::expect_success 'oc get identities/alwaysallow:cascaded-user'
#os::cmd::expect_success 'oc get identities/alwaysallow:orphaned-user'
## Verify orphaned user references are left
#os::cmd::expect_success_and_text     "oc get clusterrolebindings/cluster-admins clusterrolebindings/cluster-admin -o jsonpath='{ .items[*].subjects }'" 'orphaned-user'
#os::cmd::expect_success_and_text     "oc get rolebindings/cluster-admin         --template='{{.subjects}}' -n default" 'orphaned-user'
#os::cmd::expect_success_and_text     "oc get scc/restricted                     --template='{{.users}}'"               'orphaned-user'
#os::cmd::expect_success_and_text     "oc get group/cascaded-group               --template='{{.users}}'"               'orphaned-user'
## Verify cascaded user references are removed
#os::cmd::expect_success_and_not_text "oc get clusterrolebindings/cluster-admins clusterrolebindings/cluster-admin -o jsonpath='{ .items[*].subjects }'" 'cascaded-user'
#os::cmd::expect_success_and_not_text "oc get rolebindings/cluster-admin         --template='{{.subjects}}' -n default" 'cascaded-user'
#os::cmd::expect_success_and_not_text "oc get scc/restricted                     --template='{{.users}}'"               'cascaded-user'
#os::cmd::expect_success_and_not_text "oc get group/cascaded-group               --template='{{.users}}'"               'cascaded-user'
#
## Delete groups
#os::cmd::expect_success "oc adm prune auth group/cascaded-group"
#os::cmd::expect_success 'oc delete group cascaded-group'
#os::cmd::expect_success 'oc delete group orphaned-group --cascade=false'
## Verify orphaned group references are left
#os::cmd::expect_success_and_text     "oc get clusterrolebindings/cluster-admins clusterrolebindings/cluster-admin -o jsonpath='{ .items[*].subjects }'" 'orphaned-group'
#os::cmd::expect_success_and_text     "oc get rolebindings/cluster-admin         --template='{{.subjects}}' -n default" 'orphaned-group'
#os::cmd::expect_success_and_text     "oc get scc/restricted                     --template='{{.groups}}'"              'orphaned-group'
## Verify cascaded group references are removed
#os::cmd::expect_success_and_not_text "oc get clusterrolebindings/cluster-admins clusterrolebindings/cluster-admin -o jsonpath='{ .items[*].subjects }'" 'cascaded-group'
#os::cmd::expect_success_and_not_text "oc get rolebindings/cluster-admin         --template='{{.subjects}}' -n default" 'cascaded-group'
#os::cmd::expect_success_and_not_text "oc get scc/restricted                     --template='{{.groups}}'"              'cascaded-group'
#echo "user-group-cascade: ok"
#os::test::junit::declare_suite_end

os::test::junit::declare_suite_start "cmd/admin/serviceaccounts"
# create a new service account
os::cmd::expect_success_and_text 'oc create serviceaccount my-sa-name' 'serviceaccount/my-sa-name created'
os::cmd::expect_success 'oc get sa my-sa-name'

# extract token and ensure it links us back to the service account
os::cmd::try_until_success 'oc sa get-token my-sa-name'
# TODO re-enable once we can use tokens instead of certs
#os::cmd::expect_success_and_text 'oc get user/~ --token="$( oc sa get-token my-sa-name )"' 'system:serviceaccount:.+:my-sa-name'

# add a new token and ensure it links us back to the service account
# TODO re-enable once we can use tokens instead of certs
#os::cmd::expect_success_and_text 'oc get user/~ --token="$( oc sa new-token my-sa-name )"' 'system:serviceaccount:.+:my-sa-name'

# add a new labeled token and ensure the label stuck
os::cmd::expect_success 'oc sa new-token my-sa-name --labels="mykey=myvalue,myotherkey=myothervalue"'
os::cmd::expect_success_and_text 'oc get secrets --selector="mykey=myvalue"' 'my-sa-name'
os::cmd::expect_success_and_text 'oc get secrets --selector="myotherkey=myothervalue"' 'my-sa-name'
os::cmd::expect_success_and_text 'oc get secrets --selector="mykey=myvalue,myotherkey=myothervalue"' 'my-sa-name'
echo "serviceacounts: ok"
os::test::junit::declare_suite_end

# user creation
os::test::junit::declare_suite_start "cmd/admin/user-creation"
os::cmd::expect_success 'oc create user                test-cmd-user'
os::cmd::expect_success 'oc create identity            test-idp:test-uid'
os::cmd::expect_success 'oc create useridentitymapping test-idp:test-uid test-cmd-user'
os::cmd::expect_success_and_text 'oc describe identity test-idp:test-uid' 'test-cmd-user'
os::cmd::expect_success_and_text 'oc describe user     test-cmd-user' 'test-idp:test-uid'
os::test::junit::declare_suite_end

# images
os::test::junit::declare_suite_start "cmd/admin/images"

# import image and check its information
os::cmd::expect_success "oc create -f ${TEST_DATA}/stable-busybox.yaml"
os::cmd::expect_success_and_text "oc adm top images" "sha256:a59906e33509d14c036c8678d687bd4eec81ed7c4b8ce907b888c607f6a1e0e6\W+default/busybox \(latest\)\W+<none>\W+<none>\W+yes\W+653\.4KiB"
os::cmd::expect_success_and_text "oc adm top imagestreams" "default/busybox\W+653\.4KiB\W+1\W+1"
os::cmd::expect_success "oc delete is/busybox -n default"

# log in as an image-pruner and test that oc adm prune images works against the atomic binary
#os::cmd::expect_success "oc adm policy add-cluster-role-to-user system:image-pruner pruner --config='${MASTER_CONFIG_DIR}/admin.kubeconfig'"
#os::cmd::expect_success "oc login --server=${KUBERNETES_MASTER} --certificate-authority='${MASTER_CONFIG_DIR}/server-ca.crt' -u pruner -p anything"
#os::cmd::expect_success_and_text "oc adm prune images" "Dry run enabled - no modifications will be made. Add --confirm to remove images"

echo "images: ok"
os::test::junit::declare_suite_end

# oc adm must-gather
os::test::junit::declare_suite_start "cmd/admin/must-gather"
os::cmd::expect_success "oc adm must-gather --help"
os::test::junit::declare_suite_end

os::test::junit::declare_suite_end
`)

func testExtendedTestdataCmdTestCmdAdminShBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdAdminSh, nil
}

func testExtendedTestdataCmdTestCmdAdminSh() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdAdminShBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/admin.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdAnnotationsSh = []byte(`#!/bin/bash
source "$(dirname "${BASH_SOURCE}")/../../hack/lib/init.sh"
trap os::test::junit::reconcile_output EXIT

# Cleanup cluster resources created by this test
(
  set +e
  oc delete all,templates --all
  exit 0
) &>/dev/null


os::test::junit::declare_suite_start "cmd/annotate"
# This test validates empty values in key-value pairs set by the annotate command
os::cmd::expect_success_and_text 'oc create -f ${TEST_DATA}/hello-openshift/hello-pod.json' 'pod/hello-openshift created'
os::cmd::expect_success_and_text 'oc annotate pod hello-openshift node-selector=""' 'pod/hello-openshift annotated'
os::cmd::expect_success_and_not_text 'oc get pod hello-openshift --template="{{index .metadata.annotations \"node-selector\"}}"' '.'

echo "annotate: ok"
os::test::junit::declare_suite_end

os::test::junit::declare_suite_start "cmd/label"
# This test validates empty values in key-value pairs set by the label command
os::cmd::expect_success_and_text 'oc label pod hello-openshift label2=""' 'pod/hello-openshift labeled'
os::cmd::expect_success_and_not_text 'oc get pod hello-openshift --template="{{.metadata.labels.label2}}"' '.'

echo "label: ok"
os::test::junit::declare_suite_end
`)

func testExtendedTestdataCmdTestCmdAnnotationsShBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdAnnotationsSh, nil
}

func testExtendedTestdataCmdTestCmdAnnotationsSh() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdAnnotationsShBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/annotations.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdApiresourcesSh = []byte(`#!/bin/bash
source "$(dirname "${BASH_SOURCE}")/../../hack/lib/init.sh"
trap os::test::junit::reconcile_output EXIT

os::test::junit::declare_suite_start "cmd/apiresources"

os::cmd::expect_success_and_text 'oc api-resources' 'imagestreamtags'
os::cmd::expect_success_and_text 'oc api-resources --api-group=build.openshift.io' 'BuildConfig'
os::cmd::expect_success_and_text 'oc api-resources --namespaced=false' 'Image'
os::cmd::expect_success_and_text 'oc api-resources --verbs=get' 'project.openshift.io'

os::cmd::expect_success_and_text 'oc api-versions' 'route.openshift.io/v1'

echo "apiresources: ok"
os::test::junit::declare_suite_end
`)

func testExtendedTestdataCmdTestCmdApiresourcesShBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdApiresourcesSh, nil
}

func testExtendedTestdataCmdTestCmdApiresourcesSh() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdApiresourcesShBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/apiresources.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdAuthenticationSh = []byte(`#!/bin/bash
source "$(dirname "${BASH_SOURCE}")/../../hack/lib/init.sh"
trap os::test::junit::reconcile_output EXIT

project="$( oc project -q )"
if [[ "${project}" == "default" ]]; then
  echo "Test must be run from a non-default namespace"
  exit 1
fi

# Cleanup cluster resources created by this test
(
  set +e
  oc delete oauthaccesstokens --all
  oc adm policy remove-cluster-role-from-user cluster-debugger user3
  exit 0
) &>/dev/null

os::test::junit::declare_suite_start "cmd/authentication"

## Logging in prints useful messages
#os::test::junit::declare_suite_start "cmd/authentication/existing-credentials"
#os::cmd::expect_success_and_text 'oc login -u user1 -p pw' 'Login successful'
#os::cmd::expect_success_and_text 'oc login -u user2 -p pw' 'Login successful'
## Switching to another user using existing credentials informs you
#os::cmd::expect_success_and_text 'oc login -u user1'       'Logged into ".*" as "user1" using existing credentials'
## Completing a login as the same user using existing credentials informs you
#os::cmd::expect_success_and_text 'oc login -u user1'       'Logged into ".*" as "user1" using existing credentials'
## Return to the system:admin user
#os::cmd::expect_success "oc login -u system:admin -n '${project}'"
#os::test::junit::declare_suite_end
#
#os::test::junit::declare_suite_start "cmd/authentication/scopedtokens"
#os::cmd::expect_success 'oc adm policy add-role-to-user admin scoped-user'
#
## initialize the user object
#os::cmd::expect_success 'oc login -u scoped-user -p asdf'
#os::cmd::expect_success 'oc login -u system:admin'
#username="$(oc get user/scoped-user -o jsonpath='{.metadata.name}')"
#useruid="$(oc get user/scoped-user -o jsonpath='{.metadata.uid}')"
#os::cmd::expect_success_and_text "oc policy can-i --list -n '${project}' --as=scoped-user" 'get.*pods'
#os::cmd::expect_success "oc policy can-i --list --output=yaml"
#os::cmd::expect_success "oc policy can-i --list --output=json"
#os::cmd::expect_success "oc policy can-i --list"
#
#whoamitoken="$(oc process -f "${OS_ROOT}/test/testdata/authentication/scoped-token-template.yaml" TOKEN_PREFIX=whoami SCOPE=user:info USER_NAME="${username}" USER_UID="${useruid}" | oc create -f - -o name | awk -F/ '{print $2}')"
#os::cmd::expect_success_and_text "oc get user/~ --token='${whoamitoken}'" "${username}"
#os::cmd::expect_success_and_text "oc whoami --token='${whoamitoken}'" "${username}"
#os::cmd::expect_failure_and_text "oc get pods --token='${whoamitoken}' -n '${project}'" "pods is forbidden: User \"scoped-user\" cannot list resource \"pods\" in API group \"\" in the namespace \"${project}\""
#
#listprojecttoken="$(oc process -f "${OS_ROOT}/test/testdata/authentication/scoped-token-template.yaml" TOKEN_PREFIX=listproject SCOPE=user:list-scoped-projects USER_NAME="${username}" USER_UID="${useruid}" | oc create -f - -o name | awk -F/ '{print $2}')"
## this token doesn't have rights to see any projects even though it can hit the list endpoint, so an empty list is correct
## we'll add another scope that allows listing all known projects even if this token has no other powers in them.
#os::cmd::expect_success_and_not_text "oc get projects --token='${listprojecttoken}'" "${project}"
#os::cmd::expect_failure_and_text "oc get user/~ --token='${listprojecttoken}'" 'User "scoped-user" cannot get resource "users" in API group "user.openshift.io" at the cluster scope'
#os::cmd::expect_failure_and_text "oc get pods --token='${listprojecttoken}' -n '${project}'" "User \"scoped-user\" cannot list resource \"pods\" in API group \"\" in the namespace \"${project}\""
#
#listprojecttoken="$(oc process -f "${OS_ROOT}/test/testdata/authentication/scoped-token-template.yaml" TOKEN_PREFIX=listallprojects SCOPE=user:list-projects USER_NAME="${username}" USER_UID="${useruid}" | oc create -f - -o name | awk -F/ '{print $2}')"
#os::cmd::expect_success_and_text "oc get projects --token='${listprojecttoken}'" "${project}"
#
#adminnonescalatingpowerstoken="$(oc process -f "${OS_ROOT}/test/testdata/authentication/scoped-token-template.yaml" TOKEN_PREFIX=admin SCOPE=role:admin:* USER_NAME="${username}" USER_UID="${useruid}" | oc create -f - -o name | awk -F/ '{print $2}')"
#os::cmd::expect_failure_and_text "oc get user/~ --token='${adminnonescalatingpowerstoken}'" 'User "scoped-user" cannot get resource "users" in API group "user.openshift.io" at the cluster scope'
#os::cmd::expect_failure_and_text "oc get secrets --token='${adminnonescalatingpowerstoken}' -n '${project}'" "User \"scoped-user\" cannot list resource \"secrets\" in API group \"\" in the namespace \"${project}\""
#os::cmd::expect_success_and_text "oc get 'projects/${project}' --token='${adminnonescalatingpowerstoken}' -n '${project}'" "${project}"
#
#allescalatingpowerstoken="$(oc process -f "${OS_ROOT}/test/testdata/authentication/scoped-token-template.yaml" TOKEN_PREFIX=clusteradmin SCOPE='role:cluster-admin:*:!' USER_NAME="${username}" USER_UID="${useruid}" | oc create -f - -o name | awk -F/ '{print $2}')"
#os::cmd::expect_success_and_text "oc get user/~ --token='${allescalatingpowerstoken}'" "${username}"
#os::cmd::expect_success "oc get secrets --token='${allescalatingpowerstoken}' -n '${project}'"
## scopes allow it, but authorization doesn't
#os::cmd::try_until_failure "oc get secrets --token='${allescalatingpowerstoken}' -n default"
#os::cmd::expect_failure_and_text "oc get secrets --token='${allescalatingpowerstoken}' -n default" 'cannot list resource "secrets" in API group "" in the namespace'
#os::cmd::expect_success_and_text "oc get projects --token='${allescalatingpowerstoken}'" "${project}"
#os::cmd::expect_success_and_text "oc policy can-i --list --token='${allescalatingpowerstoken}' -n '${project}'" 'get.*pods'
#
#accesstoken="$(oc process -f "${OS_ROOT}/test/testdata/authentication/scoped-token-template.yaml" TOKEN_PREFIX=access SCOPE=user:check-access USER_NAME="${username}" USER_UID="${useruid}" | oc create -f - -o name | awk -F/ '{print $2}')"
#os::cmd::expect_success_and_text "curl -k -XPOST -H 'Content-Type: application/json' -H 'Authorization: Bearer ${accesstoken}' '${API_SCHEME}://${API_HOST}:${API_PORT}/apis/authorization.openshift.io/v1/namespaces/${project}/localsubjectaccessreviews' -d '{\"kind\":\"LocalSubjectAccessReview\",\"apiVersion\":\"authorization.openshift.io/v1\",\"namespace\":\"${project}\",\"verb\":\"create\",\"resource\":\"pods\"}'" '"kind": "SubjectAccessReviewResponse"'
## verify group and kind defaulting works correctly
#os::cmd::expect_success_and_text "curl -k -XPOST -H 'Content-Type: application/json' -H 'Authorization: Bearer ${accesstoken}' '${API_SCHEME}://${API_HOST}:${API_PORT}/apis/authorization.openshift.io/v1/subjectaccessreviews' -d '{\"namespace\":\"${project}\",\"verb\":\"create\",\"resource\":\"pods\"}'" '"kind": "SubjectAccessReviewResponse"'
#os::cmd::expect_success_and_text "oc policy can-i create pods --token='${accesstoken}' -n '${project}' --ignore-scopes" 'yes'
#os::cmd::expect_success_and_text "oc policy can-i create pods --token='${accesstoken}' -n '${project}'" 'no'
#os::cmd::expect_success_and_text "oc policy can-i create subjectaccessreviews.authorization.openshift.io --token='${accesstoken}' -n '${project}'" 'no'
#os::cmd::expect_success_and_text "oc policy can-i create subjectaccessreviews.authorization.openshift.io --token='${accesstoken}' -n '${project}' --ignore-scopes" 'yes'
#os::cmd::expect_success_and_text "oc policy can-i create pods --token='${accesstoken}' -n '${project}' --scopes='role:admin:*'" 'yes'
#os::cmd::expect_success_and_text "oc policy can-i --list --token='${accesstoken}' -n '${project}' --scopes='role:admin:*'" 'get.*pods'
#os::cmd::expect_success_and_not_text "oc policy can-i --list --token='${accesstoken}' -n '${project}'" 'get.*pods'
#
#os::test::junit::declare_suite_end
#
#os::test::junit::declare_suite_start "cmd/authentication/debugging"
#os::cmd::expect_success_and_text 'oc login -u user3 -p pw' 'Login successful'
#os::cmd::expect_success 'oc login -u system:admin'
#os::cmd::expect_failure_and_text 'oc get --raw /debug/pprof/ --as=user3' 'Forbidden'
#os::cmd::expect_failure_and_text 'oc get --raw /metrics --as=user3' 'Forbidden'
#os::cmd::expect_success_and_text 'oc get --raw /healthz --as=user3' 'ok'
#os::cmd::expect_success 'oc adm policy add-cluster-role-to-user cluster-debugger user3'
#os::cmd::try_until_text 'oc get --raw /debug/pprof/ --as=user3' 'full goroutine stack dump'
#os::cmd::expect_success_and_text 'oc get --raw /debug/pprof/ --as=user3' 'full goroutine stack dump'
#os::cmd::expect_success_and_text 'oc get --raw /metrics --as=user3' 'apiserver_request_latencies'
#os::cmd::expect_success_and_text 'oc get --raw /healthz --as=user3' 'ok'
## TODO validate controller
#os::test::junit::declare_suite_end

os::test::junit::declare_suite_start "cmd/authentication/scopedtokens"


os::test::junit::declare_suite_end
`)

func testExtendedTestdataCmdTestCmdAuthenticationShBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdAuthenticationSh, nil
}

func testExtendedTestdataCmdTestCmdAuthenticationSh() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdAuthenticationShBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/authentication.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdBasicresourcesSh = []byte(`#!/bin/bash
source "$(dirname "${BASH_SOURCE}")/../../hack/lib/init.sh"
trap os::test::junit::reconcile_output EXIT

# Cleanup cluster resources created by this test
(
  set +e
  oc delete all,templates,secrets,pods,jobs --all
  oc delete image v1-image
  oc delete group patch-group
  oc delete project test-project-admin
  oc delete oauthaccesstokens.oauth.openshift.io/DYGZDLucARCPIfUeKPhsgPfn0WBLR_9KdeREH0c9iod
  oc delete -f ${TEST_DATA}/multiport-service.yaml
  exit 0
) &>/dev/null

function escape_regex() {
  sed 's/[]\.|$(){}?+*^]/\\&/g' <<< "$*"
}

project="$( oc project -q )"

os::test::junit::declare_suite_start "cmd/basicresources"
# This test validates basic resource retrieval and command interaction

os::test::junit::declare_suite_start "cmd/basicresources/versionreporting"
# Test to make sure that we're reporting the correct version information from endpoints and the correct
# User-Agent information from our clients regardless of which resources they're trying to access
#os::build::version::get_vars
#os_git_regex="$( escape_regex "${OS_GIT_VERSION%%-*}" )"
#kube_git_regex="$( escape_regex "${KUBE_GIT_VERSION%%-*}" )"
#etcd_version="$(echo "${ETCD_GIT_VERSION}" | sed -E "s/\-.*//g" | sed -E "s/v//")"
#etcd_git_regex="$( escape_regex "${etcd_version%%-*}" )"
#os::cmd::expect_success_and_text 'oc version' "Client Version: .*GitVersion:\"${os_git_regex}"
#os::cmd::expect_success_and_text 'oc version' "Server Version: .*GitVersion:\"${kube_git_regex}"
#os::cmd::expect_success_and_text "curl -k '${API_SCHEME}://${API_HOST}:${API_PORT}/version'" "${kube_git_regex}"
#os::cmd::expect_success_and_text "curl -k '${API_SCHEME}://${API_HOST}:${API_PORT}/version'" "${OS_GIT_COMMIT}"

# variants I know I have to worry about
# 1. oc (kube and openshift resources)
# 2. oc adm (kube and openshift resources)

# example User-Agent: oc/v1.2.0 (linux/amd64) kubernetes/bc4550d
#os::cmd::expect_success_and_text 'oc get pods --loglevel=7  2>&1 | grep -A4 "pods" | grep User-Agent' "oc/${kube_git_regex} .* kubernetes/"
## example User-Agent: oc/v1.2.0 (linux/amd64) kubernetes/bc4550d
#os::cmd::expect_success_and_text 'oc get dc --loglevel=7  2>&1 | grep -A4 "deploymentconfig" | grep User-Agent' "oc/${kube_git_regex} .* kubernetes/"
## example User-Agent: oc/v1.1.3 (linux/amd64) openshift/b348c2f
#os::cmd::expect_success_and_text 'oc adm policy who-can get pods --loglevel=7  2>&1 | grep -A4 "localresourceaccessreviews" | grep User-Agent' "oc/${kube_git_regex} .* kubernetes/"
#echo "version reporting: ok"
os::test::junit::declare_suite_end

os::test::junit::declare_suite_start "cmd/basicresources/status"
os::cmd::expect_success_and_text 'oc status -h' 'oc describe buildConfig'
os::cmd::expect_success_and_text 'oc status' 'oc new-app'
echo "status help output: ok"
os::test::junit::declare_suite_end

os::test::junit::declare_suite_start "cmd/basicresources/explain"
os::cmd::expect_failure_and_text 'oc get' 'oc api-resources'
os::cmd::expect_success_and_text 'oc get all --loglevel=6' 'buildconfigs'
os::cmd::expect_success_and_text 'oc explain pods' 'Pod is a collection of containers that can run on a host'
os::cmd::expect_success_and_text 'oc explain pods.spec' 'SecurityContext holds pod-level security attributes'
# TODO unbreak explain
#os::cmd::expect_success_and_text 'oc explain deploymentconfig' 'a desired deployment state'
#os::cmd::expect_success_and_text 'oc explain deploymentconfig.spec' 'ensures that this deployment config will have zero replicas'
echo "explain: ok"
os::test::junit::declare_suite_end

os::test::junit::declare_suite_start "cmd/basicresources/resource-builder"
# Test resource builder filtering of files with expected extensions inside directories, and individual files without expected extensions
os::cmd::expect_success 'oc create -f ${TEST_DATA}/resource-builder/directory -f ${TEST_DATA}/resource-builder/json-no-extension -f ${TEST_DATA}/resource-builder/yml-no-extension'
# Explicitly specified extensionless files
os::cmd::expect_success 'oc get secret json-no-extension yml-no-extension'
# Scanned files with extensions inside directories
os::cmd::expect_success 'oc get secret json-with-extension yml-with-extension'
# Ensure extensionless files inside directories are not processed by resource-builder
os::cmd::expect_failure_and_text 'oc get secret json-no-extension-in-directory' 'not found'
echo "resource-builder: ok"
os::test::junit::declare_suite_end

os::test::junit::declare_suite_start "cmd/basicresources/pods"
os::cmd::expect_success 'oc get pods'
os::cmd::expect_success_and_text 'oc create -f ${TEST_DATA}/hello-openshift/hello-pod.json' 'pod/hello-openshift created'
os::cmd::expect_success 'oc describe pod hello-openshift'
os::cmd::expect_success 'oc delete pods hello-openshift --grace-period=0 --force'
echo "pods: ok"
os::test::junit::declare_suite_end

os::test::junit::declare_suite_start "cmd/basicresources/label"
os::cmd::expect_success_and_text 'oc create -f ${TEST_DATA}/hello-openshift/hello-pod.json -o name' 'pod/hello-openshift'
os::cmd::try_until_success 'oc label pod/hello-openshift acustom=label' # can race against scheduling and status updates
os::cmd::expect_success_and_text 'oc describe pod/hello-openshift' 'acustom=label'
os::cmd::try_until_success 'oc annotate pod/hello-openshift foo=bar' # can race against scheduling and status updates
os::cmd::expect_success_and_text 'oc get -o yaml pod/hello-openshift' 'foo: bar'
os::cmd::expect_failure_and_not_text 'oc annotate pod hello-openshift description="test" --resource-version=123' 'may only be used with a single resource'
os::cmd::expect_failure_and_text 'oc annotate pod hello-openshift hello-openshift description="test" --resource-version=123' 'may only be used with a single resource'
os::cmd::expect_success 'oc delete pods -l acustom=label --grace-period=0 --force'
os::cmd::expect_failure 'oc get pod/hello-openshift'

# show-labels should work for projects
os::cmd::expect_success "oc label namespace '${project}' foo=bar"
os::cmd::expect_success_and_text "oc get project '${project}' --show-labels" "foo=bar"

echo "label: ok"
os::test::junit::declare_suite_end

os::test::junit::declare_suite_start "cmd/basicresources/services"
os::cmd::expect_success 'oc get services'
os::cmd::expect_success 'oc create -f ${TEST_DATA}/test-service.json'
os::cmd::expect_success 'oc delete services frontend'
# TODO: reenable with a permission check
# os::cmd::expect_failure_and_text 'oc create -f test/integration/testdata/test-service-with-finalizer.json' "finalizers are disabled"
echo "services: ok"
os::test::junit::declare_suite_end

# TODO rewrite the yaml for this test to actually work
os::test::junit::declare_suite_start "cmd/basicresources/list-version-conversion"
os::cmd::expect_success 'oc create   -f ${TEST_DATA}/mixed-api-versions.yaml'
os::cmd::expect_success 'oc get      -f ${TEST_DATA}/mixed-api-versions.yaml -o yaml'
os::cmd::expect_success 'oc label    -f ${TEST_DATA}/mixed-api-versions.yaml mylabel=a'
os::cmd::expect_success 'oc annotate -f ${TEST_DATA}/mixed-api-versions.yaml myannotation=b'
# Make sure all six resources, with different API versions, got labeled and annotated
os::cmd::expect_success_and_text 'oc get -f ${TEST_DATA}/mixed-api-versions.yaml --output=jsonpath="{..metadata.labels.mylabel}"'           '^a a a a$'
os::cmd::expect_success_and_text 'oc get -f ${TEST_DATA}/mixed-api-versions.yaml --output=jsonpath="{..metadata.annotations.myannotation}"' '^b b b b$'
os::cmd::expect_success 'oc delete   -f ${TEST_DATA}/mixed-api-versions.yaml'
echo "list version conversion: ok"
os::test::junit::declare_suite_end

os::test::junit::declare_suite_start "cmd/basicresources/nodes"
os::cmd::expect_success 'oc get nodes'
(
  # subshell so we can unset kubeconfig
  cfg="${KUBECONFIG}"
  unset KUBECONFIG
  os::cmd::expect_success "kubectl get nodes --kubeconfig='${cfg}'"
)
echo "nodes: ok"
os::test::junit::declare_suite_end


os::test::junit::declare_suite_start "cmd/basicresources/create"
os::cmd::expect_success 'oc create dc my-nginx --image=nginx'
os::cmd::expect_success 'oc delete dc my-nginx'
os::cmd::expect_success 'oc create clusterquota limit-bob --project-label-selector=openshift.io/requester=user-bob --hard=pods=10'
os::cmd::expect_success 'oc delete clusterquota/limit-bob'
echo "create subcommands: ok"
os::test::junit::declare_suite_end

os::test::junit::declare_suite_start "cmd/basicresources/statefulsets"
os::cmd::expect_success 'oc create -f ${TEST_DATA}/statefulset.yaml'
os::cmd::try_until_success 'oc get pods testapp-0'
os::cmd::expect_success_and_text 'oc describe statefulset testapp' 'app=testapp'
os::cmd::expect_success 'oc delete -f ${TEST_DATA}/statefulset.yaml'
echo "statefulsets: ok"
os::test::junit::declare_suite_end


os::test::junit::declare_suite_start "cmd/basicresources/setprobe"
# Validate the probe command
arg="-f ${TEST_DATA}/hello-openshift/hello-pod.json"
os::cmd::expect_failure_and_text "oc set probe" "error: one or more resources"
os::cmd::expect_failure_and_text "oc set probe ${arg}" "error: you must specify one of --readiness, --liveness or both"
os::cmd::expect_failure_and_text "oc set probe ${arg} --local -o yaml --liveness --get-url=https://127.0.0.1/path" "port must be specified as part of a url"
os::cmd::expect_success_and_text "oc set probe ${arg} --local -o yaml --liveness" 'livenessProbe: \{\}'
os::cmd::expect_success_and_text "oc set probe ${arg} --local -o yaml --liveness --initial-delay-seconds=10" "livenessProbe:"
os::cmd::expect_success_and_text "oc set probe ${arg} --local -o yaml --liveness --initial-delay-seconds=10" "initialDelaySeconds: 10"
os::cmd::expect_success_and_text "oc set probe ${arg} --local -o yaml --liveness -- echo test" "livenessProbe:"
os::cmd::expect_success_and_text "oc set probe ${arg} --local -o yaml --readiness -- echo test" "readinessProbe:"
os::cmd::expect_success_and_text "oc set probe ${arg} --local -o yaml --liveness -- echo test" "exec:"
os::cmd::expect_success_and_text "oc set probe ${arg} --local -o yaml --liveness -- echo test" "\- echo"
os::cmd::expect_success_and_text "oc set probe ${arg} --local -o yaml --liveness -- echo test" "\- test"
os::cmd::expect_success_and_text "oc set probe ${arg} --local -o yaml --liveness --open-tcp=3306" "tcpSocket:"
os::cmd::expect_success_and_text "oc set probe ${arg} --local -o yaml --liveness --open-tcp=3306" "port: 3306"
os::cmd::expect_success_and_text "oc set probe ${arg} --local -o yaml --liveness --open-tcp=port" "port: port"
os::cmd::expect_success_and_text "oc set probe ${arg} --local -o yaml --liveness --get-url=https://127.0.0.1:8080/path" "port: 8080"
os::cmd::expect_success_and_text "oc set probe ${arg} --local -o yaml --liveness --get-url=https://127.0.0.1:8080/path" "path: /path"
os::cmd::expect_success_and_text "oc set probe ${arg} --local -o yaml --liveness --get-url=https://127.0.0.1:8080/path" "scheme: HTTPS"
os::cmd::expect_success_and_text "oc set probe ${arg} --local -o yaml --liveness --get-url=http://127.0.0.1:8080/path" "scheme: HTTP"
os::cmd::expect_success_and_text "oc set probe ${arg} --local -o yaml --liveness --get-url=https://127.0.0.1:8080/path" "host: 127.0.0.1"
os::cmd::expect_success "oc create -f ${TEST_DATA}/test-deployment-config.yaml"
os::cmd::expect_failure_and_text "oc set probe dc/test-deployment-config --liveness" "Required value: must specify a handler type"
os::cmd::expect_success_and_text "oc set probe dc test-deployment-config --liveness --open-tcp=8080" "updated"
os::cmd::expect_success_and_text "oc set probe dc/test-deployment-config --liveness --open-tcp=8080 --v=1" "was not changed"
os::cmd::expect_success_and_text "oc get dc/test-deployment-config -o yaml" "livenessProbe:"
os::cmd::expect_success_and_text "oc set probe dc/test-deployment-config --liveness --initial-delay-seconds=10" "updated"
os::cmd::expect_success_and_text "oc get dc/test-deployment-config -o yaml" "initialDelaySeconds: 10"
os::cmd::expect_success_and_text "oc set probe dc/test-deployment-config --liveness --initial-delay-seconds=20" "updated"
os::cmd::expect_success_and_text "oc get dc/test-deployment-config -o yaml" "initialDelaySeconds: 20"
os::cmd::expect_success_and_text "oc set probe dc/test-deployment-config --liveness --failure-threshold=2" "updated"
os::cmd::expect_success_and_text "oc get dc/test-deployment-config -o yaml" "initialDelaySeconds: 20"
os::cmd::expect_success_and_text "oc get dc/test-deployment-config -o yaml" "failureThreshold: 2"
os::cmd::expect_success_and_text "oc set probe dc/test-deployment-config --readiness --success-threshold=4 -- echo test" "updated"
os::cmd::expect_success_and_text "oc get dc/test-deployment-config -o yaml" "initialDelaySeconds: 20"
os::cmd::expect_success_and_text "oc get dc/test-deployment-config -o yaml" "successThreshold: 4"
os::cmd::expect_success_and_text "oc set probe dc test-deployment-config --liveness --period-seconds=5" "updated"
os::cmd::expect_success_and_text "oc get dc/test-deployment-config -o yaml" "periodSeconds: 5"
os::cmd::expect_success_and_text "oc set probe dc/test-deployment-config --liveness --timeout-seconds=6" "updated"
os::cmd::expect_success_and_text "oc get dc/test-deployment-config -o yaml" "timeoutSeconds: 6"
os::cmd::expect_success_and_text "oc set probe dc --all --liveness --timeout-seconds=7" "updated"
os::cmd::expect_success_and_text "oc get dc -o yaml" "timeoutSeconds: 7"
os::cmd::expect_success_and_text "oc set probe dc/test-deployment-config --liveness --remove" "updated"
os::cmd::expect_success_and_not_text "oc get dc/test-deployment-config -o yaml" "livenessProbe"
os::cmd::expect_success "oc delete dc/test-deployment-config"
echo "set probe: ok"
os::test::junit::declare_suite_end

os::test::junit::declare_suite_start "cmd/basicresources/setenv"
os::cmd::expect_success "oc create -f ${TEST_DATA}/test-deployment-config.yaml"
os::cmd::expect_success "oc create -f ${TEST_DATA}/test-buildcli.json"
os::cmd::expect_success_and_text "oc set env dc/test-deployment-config FOO=1st" "updated"
os::cmd::expect_success_and_text "oc set env dc/test-deployment-config FOO=2nd" "updated"
os::cmd::expect_success_and_text "oc set env dc/test-deployment-config FOO=bar --overwrite" "updated"
os::cmd::expect_failure_and_text "oc set env dc/test-deployment-config FOO=zee --overwrite=false" "already has a value"
os::cmd::expect_success_and_text "oc set env dc/test-deployment-config --list" "FOO=bar"
os::cmd::expect_success_and_text "oc set env dc/test-deployment-config FOO-" "updated"
os::cmd::expect_success_and_text "oc set env bc --all FOO=bar" "updated"
os::cmd::expect_success_and_text "oc set env bc --all --list" "FOO=bar"
os::cmd::expect_success_and_text "oc set env bc --all FOO-" "updated"
os::cmd::expect_success "oc create secret generic mysecret --from-literal='foo.bar=secret'"
os::cmd::expect_success_and_text "oc set env --from=secret/mysecret --prefix=PREFIX_ dc/test-deployment-config" "updated"
os::cmd::expect_success_and_text "oc set env dc/test-deployment-config --list" "PREFIX_FOO_BAR from secret mysecret, key foo.bar"
os::cmd::expect_success_and_text "oc set env dc/test-deployment-config --list --resolve" "PREFIX_FOO_BAR=secret"
os::cmd::expect_success "oc delete secret mysecret"
os::cmd::expect_failure_and_text "oc set env dc/test-deployment-config --list --resolve" "error retrieving reference for PREFIX_FOO_BAR"
# switch to view user to ensure view-only users can't get secrets through env var resolution
new="$(mktemp -d)/tempconfig"
os::cmd::expect_success "oc config view --raw > $new"
export KUBECONFIG=$new
project=$(oc project -q)
#os::cmd::expect_success 'oc policy add-role-to-user view view-user'
#os::cmd::expect_success 'oc login -u view-user -p anything'
#os::cmd::try_until_success 'oc project ${project}'
#os::cmd::expect_failure_and_text "oc set env dc/test-deployment-config --list --resolve" 'cannot get resource "secrets" in API group "" in the namespace'
#oc login -u system:admin
# clean up
os::cmd::expect_success "oc delete dc/test-deployment-config"
os::cmd::expect_success "oc delete bc/ruby-sample-build-validtag"
echo "set env: ok"
os::test::junit::declare_suite_end

os::test::junit::declare_suite_start "cmd/basicresources/expose"
# Expose service as a route
os::cmd::expect_success 'oc create -f ${TEST_DATA}/test-service.json'
os::cmd::expect_failure 'oc expose service frontend --create-external-load-balancer'
os::cmd::expect_failure 'oc expose service frontend --port=40 --type=NodePort'
os::cmd::expect_success 'oc expose service frontend --path=/test'
os::cmd::expect_success_and_text "oc get route.v1.route.openshift.io frontend --template='{{.spec.path}}'" "/test"
os::cmd::expect_success_and_text "oc get route.v1.route.openshift.io frontend --template='{{.spec.to.name}}'" "frontend"           # routes to correct service
os::cmd::expect_success_and_text "oc get route.v1.route.openshift.io frontend --template='{{.spec.port.targetPort}}'" ""
os::cmd::expect_success 'oc delete svc,route -l name=frontend'
# Test that external services are exposable
os::cmd::expect_success 'oc create -f ${TEST_DATA}/external-service.yaml'
os::cmd::expect_success 'oc expose svc/external'
os::cmd::expect_success_and_text 'oc get route external' 'external'
os::cmd::expect_success 'oc delete route external'
os::cmd::expect_success 'oc delete svc external'
# Expose multiport service and verify we set a port in the route
os::cmd::expect_success 'oc create -f ${TEST_DATA}/multiport-service.yaml'
os::cmd::expect_success 'oc expose svc/frontend --name route-with-set-port'
os::cmd::expect_success_and_text "oc get route route-with-set-port --template='{{.spec.port.targetPort}}'" "web"
echo "expose: ok"
os::test::junit::declare_suite_end

# Test OAuth access token describer
os::cmd::expect_success 'oc create -f ${TEST_DATA}/oauthaccesstoken.yaml'
os::cmd::expect_success_and_text "oc describe oauthaccesstoken DYGZDLucARCPIfUeKPhsgPfn0WBLR_9KdeREH0c9iod" "DYGZDLucARCPIfUeKPhsgPfn0WBLR_9KdeREH0c9iod"
echo "OAuth descriptor: ok"

os::cmd::expect_success 'oc delete all --all'

os::test::junit::declare_suite_start "cmd/basicresources/projectadmin"
# switch to test user to be sure that default project admin policy works properly
temp_config="$(mktemp -d)/tempconfig"
os::cmd::expect_success "oc config view --raw > '${temp_config}'"
export KUBECONFIG="${temp_config}"
#os::cmd::expect_success 'oc policy add-role-to-user admin project-admin'
#os::cmd::expect_success 'oc login -u project-admin -p anything'
#os::cmd::expect_success 'oc new-project test-project-admin'
#os::cmd::try_until_success "oc project test-project-admin"

os::cmd::expect_success 'oc run --image=openshift/hello-openshift test'
os::cmd::expect_success 'oc run --image=openshift/hello-openshift --generator=run-controller/v1 test2'
os::cmd::expect_success 'oc run --image=openshift/hello-openshift --restart=Never test3'
os::cmd::expect_success 'oc run --image=openshift/hello-openshift --generator=job/v1 --restart=Never test4'
os::cmd::expect_success 'oc delete dc/test rc/test2 pod/test3 job/test4'

os::cmd::expect_success_and_text 'oc run --dry-run foo --image=bar -o name'                                'deploymentconfig.apps.openshift.io/foo'
os::cmd::expect_success_and_text 'oc run --dry-run foo --image=bar -o name --restart=Always'               'deploymentconfig.apps.openshift.io/foo'
os::cmd::expect_success_and_text 'oc run --dry-run foo --image=bar -o name --restart=Never'                'pod/foo'
os::cmd::expect_success_and_text 'oc run --dry-run foo --image=bar -o name --generator=job/v1'              'job.batch/foo'
os::cmd::expect_success_and_text 'oc run --dry-run foo --image=bar -o name --generator=deploymentconfig/v1' 'deploymentconfig.apps.openshift.io/foo'
os::cmd::expect_success_and_text 'oc run --dry-run foo --image=bar -o name --generator=run-controller/v1'   'replicationcontroller/foo'
os::cmd::expect_success_and_text 'oc run --dry-run foo --image=bar -o name --generator=run/v1'              'replicationcontroller/foo'
os::cmd::expect_success_and_text 'oc run --dry-run foo --image=bar -o name --generator=run-pod/v1'          'pod/foo'

os::cmd::expect_success 'oc process -f ${TEST_DATA}/application-template-stibuild.json -l name=mytemplate | oc create -f -'
os::cmd::expect_success 'oc delete all -l name=mytemplate'
#os::cmd::expect_success 'oc new-app https://github.com/openshift/ruby-hello-world'
#os::cmd::expect_success 'oc get dc/ruby-hello-world'

#os::cmd::expect_success_and_text "oc get dc/ruby-hello-world --template='{{ .spec.replicas }}'" '1'
#patch='{"spec": {"replicas": 2}}'
#os::cmd::expect_success "oc patch dc/ruby-hello-world -p '${patch}'"
#os::cmd::expect_success_and_text "oc get dc/ruby-hello-world --template='{{ .spec.replicas }}'" '2'
#
#os::cmd::expect_success 'oc delete all -l app=ruby-hello-world'
#os::cmd::expect_failure 'oc get dc/ruby-hello-world'
echo "delete all: ok"
os::test::junit::declare_suite_end

# service accounts should not be allowed to request new projects
# TODO re-enable once we can use tokens instead of certs
#os::cmd::expect_failure_and_text "oc new-project --token='$( oc sa get-token builder )' will-fail" 'Error from server \(Forbidden\): You may not request a new project via this API.'

os::test::junit::declare_suite_start "cmd/basicresources/patch"
# Validate patching works correctly
#os::cmd::expect_success 'oc login -u system:admin'
group_json='{"kind":"Group","apiVersion":"v1","metadata":{"name":"patch-group"}}'
os::cmd::expect_success          "echo '${group_json}' | oc create -f -"
os::cmd::expect_success          "oc patch group patch-group -p 'users: [\"myuser\"]' --loglevel=8"
os::cmd::expect_success_and_text 'oc get group patch-group -o yaml' 'myuser'
os::cmd::expect_success          "oc patch group patch-group -p 'users: []' --loglevel=8"
# applying the same patch twice results in exit code 0, and "not patched" text
os::cmd::expect_success_and_text "oc patch group patch-group -p 'users: []'" "patched \(no change\)"
# applying an invalid patch results in exit code 1 and an error
os::cmd::expect_failure_and_text "oc patch group patch-group -p 'users: \"\"'" "cannot restore slice from string"
os::cmd::expect_success_and_text 'oc get group patch-group -o yaml' 'users: \[\]'
echo "patch: ok"
os::test::junit::declare_suite_end

os::test::junit::declare_suite_end
`)

func testExtendedTestdataCmdTestCmdBasicresourcesShBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdBasicresourcesSh, nil
}

func testExtendedTestdataCmdTestCmdBasicresourcesSh() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdBasicresourcesShBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/basicresources.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdBuildsSh = []byte(`#!/bin/bash
source "$(dirname "${BASH_SOURCE}")/../../hack/lib/init.sh"
trap os::test::junit::reconcile_output EXIT

# Cleanup cluster resources created by this test
(
  set +e
  oc delete all,templates --all
  exit 0
) &>/dev/null


url=":${API_PORT:-6443}"
project="$(oc project -q)"

os::test::junit::declare_suite_start "cmd/builds"
# This test validates builds and build related commands
# Disabled because git is required in the container running the test
#os::cmd::expect_success 'oc new-build centos/ruby-25-centos7 https://github.com/openshift/ruby-hello-world.git'
#os::cmd::expect_success 'oc get bc/ruby-hello-world'

#os::cmd::expect_success "cat '${OS_ROOT}/examples/hello-openshift/Dockerfile' | oc new-build -D - --name=test"
#os::cmd::expect_success 'oc get bc/test'

template='{{with .spec.output.to}}{{.kind}} {{.name}}{{end}}'

# Build from Dockerfile with output to ImageStreamTag
os::cmd::expect_success "oc new-build --dockerfile=\$'FROM centos:7\nRUN yum install -y httpd'"
os::cmd::expect_success_and_text "oc get bc/centos --template '${template}'" '^ImageStreamTag centos:latest$'

# Build from a binary with no inputs requires name
os::cmd::expect_failure_and_text "oc new-build --binary" "you must provide a --name"

# Build from a binary with inputs creates a binary build
os::cmd::expect_success "oc new-build --binary --name=binary-test"
os::cmd::expect_success_and_text "oc get bc/binary-test" 'Binary'

os::cmd::expect_success 'oc delete is/binary-test bc/binary-test bc/centos'

# Build from Dockerfile with output to DockerImage
os::cmd::expect_success "oc new-build -D \$'FROM centos:7' --to-docker"
os::cmd::expect_success_and_text "oc get bc/centos --template '${template}'" '^DockerImage centos:latest$'

os::cmd::expect_success 'oc delete is/centos bc/centos'

# Build from Dockerfile with given output ImageStreamTag spec
os::cmd::expect_success "oc new-build -D \$'FROM centos:7\nENV ok=1' --to origin-test:v1.1"
os::cmd::expect_success_and_text "oc get bc/origin-test --template '${template}'" '^ImageStreamTag origin-test:v1.1$'

os::cmd::expect_success 'oc delete is/centos bc/origin-test'

# Build from Dockerfile with given output DockerImage spec
os::cmd::expect_success "oc new-build -D \$'FROM centos:7\nENV ok=1' --to-docker --to openshift/origin:v1.1-test"
os::cmd::expect_success_and_text "oc get bc/origin --template '${template}'" '^DockerImage openshift/origin:v1.1-test$'

os::cmd::expect_success 'oc delete is/centos'

# Build from Dockerfile with custom name and given output ImageStreamTag spec
os::cmd::expect_success "oc new-build -D \$'FROM centos:7\nENV ok=1' --to origin-name-test --name origin-test2"
os::cmd::expect_success_and_text "oc get bc/origin-test2 --template '${template}'" '^ImageStreamTag origin-name-test:latest$'

#os::cmd::try_until_text 'oc get is ruby-25-centos7' 'latest'
#os::cmd::expect_failure_and_text 'oc new-build ruby-25-centos7~https://github.com/sclorg/ruby-ex ruby-25-centos7~https://github.com/sclorg/ruby-ex --to invalid/argument' 'error: only one component with source can be used when specifying an output image reference'

os::cmd::expect_success 'oc delete all --all'

os::cmd::expect_success "oc new-build -D \$'FROM centos:7' --no-output"
os::cmd::expect_success_and_not_text 'oc get bc/centos -o=jsonpath="{.spec.output.to}"' '.'

# Ensure output is valid JSON
#os::cmd::expect_success 'oc new-build -D "FROM centos:7" -o json | python -m json.tool'

os::cmd::expect_success 'oc delete all --all'
os::cmd::expect_success 'oc process -f ${TEST_DATA}/application-template-dockerbuild.json -l build=docker | oc create -f -'
os::cmd::expect_success 'oc get buildConfigs'
os::cmd::expect_success 'oc get bc'
os::cmd::expect_success 'oc get builds'

# make sure the imagestream has the latest tag before trying to test it or start a build with it
os::cmd::try_until_success 'oc get istag ruby-25-centos7:latest'

os::test::junit::declare_suite_start "cmd/builds/patch-anon-fields"
REAL_OUTPUT_TO=$(oc get bc/ruby-sample-build --template='{{ .spec.output.to.name }}')
os::cmd::expect_success "oc patch bc/ruby-sample-build -p '{\"spec\":{\"output\":{\"to\":{\"name\":\"different:tag1\"}}}}'"
os::cmd::expect_success_and_text "oc get bc/ruby-sample-build --template='{{ .spec.output.to.name }}'" 'different'
os::cmd::expect_success "oc patch bc/ruby-sample-build -p '{\"spec\":{\"output\":{\"to\":{\"name\":\"${REAL_OUTPUT_TO}\"}}}}'"
echo "patchAnonFields: ok"
os::test::junit::declare_suite_end

os::test::junit::declare_suite_start "cmd/builds/config"
os::cmd::expect_success_and_text 'oc describe buildConfigs ruby-sample-build' "${url}/apis/build.openshift.io/v1/namespaces/${project}/buildconfigs/ruby-sample-build/webhooks/<secret>/github"
os::cmd::expect_success_and_text 'oc describe buildConfigs ruby-sample-build' "Webhook GitHub"
os::cmd::expect_success_and_text 'oc describe buildConfigs ruby-sample-build' "${url}/apis/build.openshift.io/v1/namespaces/${project}/buildconfigs/ruby-sample-build/webhooks/<secret>/generic"
os::cmd::expect_success_and_text 'oc describe buildConfigs ruby-sample-build' "Webhook Generic"
os::cmd::expect_success_and_text 'oc set triggers bc/ruby-sample-build --from-gitlab' "triggers updated"
os::cmd::expect_success_and_text 'oc set triggers bc/ruby-sample-build --from-bitbucket' "triggers updated"
os::cmd::expect_success 'oc start-build --list-webhooks=all ruby-sample-build'
os::cmd::expect_success_and_text 'oc start-build --list-webhooks=all bc/ruby-sample-build' 'generic'
os::cmd::expect_success_and_text 'oc start-build --list-webhooks=all ruby-sample-build' 'github'
os::cmd::expect_success_and_text 'oc start-build --list-webhooks=all ruby-sample-build' 'gitlab'
os::cmd::expect_success_and_text 'oc start-build --list-webhooks=all ruby-sample-build' 'bitbucket'
os::cmd::expect_success_and_text 'oc start-build --list-webhooks=github ruby-sample-build' '<secret>'
os::cmd::expect_failure 'oc start-build --list-webhooks=blah'
hook=$(oc start-build --list-webhooks='generic' ruby-sample-build | head -n 1)
hook=${hook/<secret>/secret101}
os::cmd::expect_success_and_text "oc start-build --from-webhook=${hook}" "build.build.openshift.io/ruby-sample-build-[0-9] started"
os::cmd::expect_failure_and_text "oc start-build --from-webhook=${hook}/foo" "error: server rejected our request"
os::cmd::expect_success "oc patch bc/ruby-sample-build -p '{\"spec\":{\"strategy\":{\"dockerStrategy\":{\"from\":{\"name\":\"asdf:7\"}}}}}'"
os::cmd::expect_failure_and_text "oc start-build --from-webhook=${hook}" "Error resolving ImageStreamTag asdf:7"
os::cmd::expect_success 'oc get builds'
os::cmd::expect_success 'oc set triggers bc/ruby-sample-build --from-github --remove'
os::cmd::expect_success_and_not_text 'oc describe buildConfigs ruby-sample-build' "Webhook GitHub"
# make sure we describe webhooks using secretReferences properly
os::cmd::expect_success "oc patch bc/ruby-sample-build -p '{\"spec\":{\"triggers\":[{\"github\":{\"secretReference\":{\"name\":\"mysecret\"}},\"type\":\"GitHub\"}]}}'"
os::cmd::expect_success_and_text 'oc describe buildConfigs ruby-sample-build' "Webhook GitHub"
os::cmd::expect_success 'oc delete all -l build=docker'

echo "buildConfig: ok"
os::test::junit::declare_suite_end

os::test::junit::declare_suite_start "cmd/builds/start-build"
os::cmd::expect_success 'oc create -f ${TEST_DATA}/test-buildcli.json'
# a build for which there is not an upstream tag in the corresponding imagerepo, so
# the build should use the image field as defined in the buildconfig
# Use basename to transform "build/build-name" into "build-name"
started="$(basename $(oc start-build -o=name ruby-sample-build-invalidtag))"
os::cmd::expect_success_and_text "oc describe build ${started}" 'centos/ruby-25-centos7$'
frombuild="$(basename $(oc start-build -o=name --from-build="${started}"))"
os::cmd::expect_success_and_text "oc describe build ${frombuild}" 'centos/ruby-25-centos7$'
os::cmd::expect_failure_and_text "oc start-build ruby-sample-build-invalid-tag --from-dir=. --from-build=${started}" "cannot use '--from-build' flag with binary builds"
os::cmd::expect_failure_and_text "oc start-build ruby-sample-build-invalid-tag --from-file=. --from-build=${started}" "cannot use '--from-build' flag with binary builds"
os::cmd::expect_failure_and_text "oc start-build ruby-sample-build-invalid-tag --from-repo=. --from-build=${started}" "cannot use '--from-build' flag with binary builds"
# --incremental flag should override Spec.Strategy.SourceStrategy.Incremental
os::cmd::expect_success 'oc create -f ${TEST_DATA}/test-s2i-build.json'
build_name="$(oc start-build -o=name test)"
os::cmd::expect_success_and_not_text "oc describe ${build_name}" 'Incremental Build'
build_name="$(oc start-build -o=name --incremental test)"
os::cmd::expect_success_and_text "oc describe ${build_name}" 'Incremental Build'
os::cmd::expect_success "oc patch bc/test -p '{\"spec\":{\"strategy\":{\"sourceStrategy\":{\"incremental\": true}}}}'"
build_name="$(oc start-build -o=name test)"
os::cmd::expect_success_and_text "oc describe ${build_name}" 'Incremental Build'
build_name="$(oc start-build -o=name --incremental=false test)"
os::cmd::expect_success_and_not_text "oc describe ${build_name}" 'Incremental Build'
os::cmd::expect_success "oc patch bc/test -p '{\"spec\":{\"strategy\":{\"sourceStrategy\":{\"incremental\": false}}}}'"
build_name="$(oc start-build -o=name test)"
os::cmd::expect_success_and_not_text "oc describe ${build_name}" 'Incremental Build'
build_name="$(oc start-build -o=name --incremental test)"
os::cmd::expect_success_and_text "oc describe ${build_name}" 'Incremental Build'
os::cmd::expect_failure_and_text "oc start-build test --no-cache" 'Cannot specify Docker build specific options'
os::cmd::expect_failure_and_text "oc start-build test --build-arg=a=b" 'Cannot specify Docker build specific options'
os::cmd::expect_success 'oc delete all --selector="name=test"'
# --no-cache flag should override Spec.Strategy.SourceStrategy.NoCache
os::cmd::expect_success 'oc create -f ${TEST_DATA}/test-docker-build.json'
build_name="$(oc start-build -o=name test)"
os::cmd::expect_success_and_not_text "oc describe ${build_name}" 'No Cache'
build_name="$(oc start-build -o=name --no-cache test)"
os::cmd::expect_success_and_text "oc describe ${build_name}" 'No Cache'
os::cmd::expect_success "oc patch bc/test -p '{\"spec\":{\"strategy\":{\"dockerStrategy\":{\"noCache\": true}}}}'"
build_name="$(oc start-build -o=name test)"
os::cmd::expect_success_and_text "oc describe ${build_name}" 'No Cache'
build_name="$(oc start-build -o=name --no-cache=false test)"
os::cmd::expect_success_and_not_text "oc describe ${build_name}" 'No Cache'
os::cmd::expect_success "oc patch bc/test -p '{\"spec\":{\"strategy\":{\"dockerStrategy\":{\"noCache\": false}}}}'"
build_name="$(oc start-build -o=name test)"
os::cmd::expect_success_and_not_text "oc describe ${build_name}" 'No Cache'
build_name="$(oc start-build -o=name --no-cache test)"
os::cmd::expect_success_and_text "oc describe ${build_name}" 'No Cache'
os::cmd::expect_failure_and_text "oc start-build test --incremental" 'Cannot specify Source build specific options'
# ensure a specific version can be specified for buildconfigs
os::cmd::expect_failure_and_not_text "oc logs bc/test --version=1" "cannot specify a version and a build"
os::cmd::expect_success 'oc delete all --selector="name=test"'
echo "start-build: ok"
os::test::junit::declare_suite_end

os::test::junit::declare_suite_start "cmd/builds/cancel-build"
os::cmd::expect_success_and_text "oc cancel-build ${started} --dump-logs --restart" "build.build.openshift.io/${started} restarted"
os::cmd::expect_success 'oc delete all --all'
os::cmd::expect_success 'oc delete secret dbsecret'
os::cmd::expect_success 'oc process -f ${TEST_DATA}/application-template-dockerbuild.json -l build=docker | oc create -f -'
os::cmd::try_until_success 'oc get build/ruby-sample-build-1'
# Uses type/name resource syntax to cancel the build and check for proper message
os::cmd::expect_success_and_text 'oc cancel-build build/ruby-sample-build-1' 'build.build.openshift.io/ruby-sample-build-1 cancelled'
# Make sure canceling already cancelled build returns proper message
os::cmd::expect_success 'oc cancel-build build/ruby-sample-build-1'
# Cancel all builds from a build configuration
os::cmd::expect_success "oc start-build bc/ruby-sample-build"
os::cmd::expect_success "oc start-build bc/ruby-sample-build"
lastbuild="$(basename $(oc start-build -o=name bc/ruby-sample-build))"
os::cmd::expect_success_and_text 'oc cancel-build bc/ruby-sample-build', "build.build.openshift.io/${lastbuild} cancelled"
os::cmd::expect_success_and_text "oc get build ${lastbuild} -o template --template '{{.status.phase}}'", 'Cancelled'
builds=$(oc get builds -o template --template '{{range .items}}{{ .status.phase }} {{end}}')
for state in $builds; do
  os::cmd::expect_success "[ \"${state}\" == \"Cancelled\" ]"
done
# Running this command again when all builds are cancelled should be no-op.
os::cmd::expect_success 'oc cancel-build bc/ruby-sample-build'
os::cmd::expect_success 'oc delete all --all'
os::cmd::expect_success 'oc delete secret dbsecret'
echo "cancel-build: ok"
os::test::junit::declare_suite_end

os::test::junit::declare_suite_end
`)

func testExtendedTestdataCmdTestCmdBuildsShBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdBuildsSh, nil
}

func testExtendedTestdataCmdTestCmdBuildsSh() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdBuildsShBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/builds.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdCompletionsSh = []byte(`#!/bin/bash
source "$(dirname "${BASH_SOURCE}")/../../hack/lib/init.sh"
trap os::test::junit::reconcile_output EXIT

os::test::junit::declare_suite_start "cmd/completions"
# This test validates basic resource retrieval and command interaction

# test completion command help
os::cmd::expect_success_and_text "oc completion -h" "interactive completion of oc commands"
# test completion command output
os::cmd::expect_failure_and_text "oc completion" "Shell not specified."
os::cmd::expect_success "oc completion bash"
os::cmd::expect_success "oc completion zsh"
os::cmd::expect_failure_and_text "oc completion test_shell" 'Unsupported shell type "test_shell"'
echo "oc completion: ok"

os::test::junit::declare_suite_end
`)

func testExtendedTestdataCmdTestCmdCompletionsShBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdCompletionsSh, nil
}

func testExtendedTestdataCmdTestCmdCompletionsSh() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdCompletionsShBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/completions.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdConfigSh = []byte(`#!/bin/bash

set -o errexit
set -o nounset
set -o pipefail

OS_ROOT=$(dirname "${BASH_SOURCE}")/../..
source "${OS_ROOT}/hack/lib/init.sh"
os::log::stacktrace::install
trap os::test::junit::reconcile_output EXIT

# Cleanup cluster resources created by this test
(
  set +e
  oc delete all,templates,secrets --all
  exit 0
) &>/dev/null

# check to make sure that "get"ting a resource with no config file present
# still returns error indicating that no config-file is set
os::test::junit::declare_suite_start "cmd/configuration"
os::cmd::expect_success_and_not_text 'oc get bc' 'does not exist'
(
  export HOME=/tmp
  unset KUBECONFIG
  unset KUBERNETES_MASTER

  os::cmd::expect_failure_and_text 'env -u KUBERNETES_SERVICE_HOST oc get buildconfigs --user=""' 'Missing or incomplete configuration info'
  os::cmd::expect_failure_and_text 'env -u KUBERNETES_SERVICE_HOST oc get buildconfigs --context=""' 'Missing or incomplete configuration info'
  os::cmd::expect_failure_and_text 'env -u KUBERNETES_SERVICE_HOST oc get buildconfigs --cluster=""' 'Missing or incomplete configuration info'

  os::cmd::expect_failure_and_text 'env -u KUBERNETES_SERVICE_HOST oc get buildconfigs --context="test"' 'context was not found for specified context: test'
  os::cmd::expect_failure_and_text 'env -u KUBERNETES_SERVICE_HOST oc get buildconfigs --cluster="test"' 'no server found for cluster "test"'
  # need some level of default (both upstream and here) to get the pretty auth message because you fail on namespace first.
  os::cmd::expect_failure_and_text 'KUBERNETES_MASTER=anything env -u KUBERNETES_SERVICE_HOST oc get buildconfigs --user="test"' 'auth info "test" does not exist'

  os::cmd::expect_failure_and_text 'oc get bc --config=missing' 'missing: no such file or directory'

  # define temp location for new config
  NEW_CONFIG_LOC="${BASETMPDIR}/new-config.yaml"

  # make sure non-existing --cluster and --user can still be set
  os::cmd::expect_success_and_text "oc config set-context new-context-name --cluster=missing-cluster --user=missing-user --namespace=default --config='${NEW_CONFIG_LOC}'" 'Context "new-context-name" '
  os::cmd::expect_failure_and_text "env -u KUBERNETES_SERVICE_HOST -u KUBECONFIG -u KUBERNETES_MASTER oc get buildconfigs --config='${NEW_CONFIG_LOC}'" 'Missing or incomplete configuration info'
  os::cmd::expect_failure_and_text "env -u KUBERNETES_SERVICE_HOST oc get buildconfigs --config='${NEW_CONFIG_LOC}'" 'Missing or incomplete configuration info'
)
echo "config error handling: ok"
os::test::junit::declare_suite_end
`)

func testExtendedTestdataCmdTestCmdConfigShBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdConfigSh, nil
}

func testExtendedTestdataCmdTestCmdConfigSh() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdConfigShBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/config.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdConvertSh = []byte(`#!/bin/bash

set -o errexit
set -o nounset
set -o pipefail

OS_ROOT=$(dirname "${BASH_SOURCE}")/../..
source "${OS_ROOT}/hack/lib/init.sh"
os::log::stacktrace::install
trap os::test::junit::reconcile_output EXIT

# Cleanup cluster resources created by this test
(
  set +e
  oc delete all --all
  exit 0
) &>/dev/null

os::test::junit::declare_suite_start "cmd/convert"
# This test validates the convert command

os::cmd::expect_success "oc convert -f ${TEST_DATA}/convert/job-v1.yaml | grep 'apiVersion: batch/v1'"
os::cmd::expect_success "oc convert -f ${TEST_DATA}/convert/job-v2.json | grep 'apiVersion: batch/v1beta1'"

os::cmd::expect_success_and_text "oc convert -f ${TEST_DATA}/convert | oc create --dry-run -f -" 'job.batch/pi created'
os::cmd::expect_success_and_text "oc convert -f ${TEST_DATA}/convert | oc create --dry-run -f -" 'cronjob.batch/hello created'

echo "convert: ok"
os::test::junit::declare_suite_end
`)

func testExtendedTestdataCmdTestCmdConvertShBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdConvertSh, nil
}

func testExtendedTestdataCmdTestCmdConvertSh() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdConvertShBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/convert.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdCreateSh = []byte(`#!/bin/bash
source "$(dirname "${BASH_SOURCE}")/../../hack/lib/init.sh"
trap os::test::junit::reconcile_output EXIT

# Cleanup cluster resources created by this test
(
  set +e
  oc delete all,templates --all
  exit 0
) &>/dev/null


os::test::junit::declare_suite_start "cmd/create"
# validate --dry-run outputs correct success message
os::cmd::expect_success_and_text 'oc create quota quota --dry-run' 'resourcequota/quota created \(dry run\)'
# validate -- works in create
os::cmd::expect_success_and_text 'oc create deploymentconfig sleep --image=busybox -- /bin/sleep infinity' 'deploymentconfig.apps.openshift.io/sleep created'

echo "oc create: ok"
os::test::junit::declare_suite_end
`)

func testExtendedTestdataCmdTestCmdCreateShBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdCreateSh, nil
}

func testExtendedTestdataCmdTestCmdCreateSh() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdCreateShBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/create.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdDebugSh = []byte(`#!/bin/bash
source "$(dirname "${BASH_SOURCE}")/../../hack/lib/init.sh"
trap os::test::junit::reconcile_output EXIT

# Cleanup cluster resources created by this test
(
  set +e
  oc delete all,templates --all
  exit 0
) &>/dev/null

os::test::junit::declare_suite_start "cmd/debug"
# This test validates the debug command
os::cmd::expect_success 'oc create -f ${TEST_DATA}/test-deployment-config.yaml'
os::cmd::expect_success_and_text "oc debug dc/test-deployment-config -o yaml" '\- /bin/sh'
os::cmd::expect_success_and_text "oc debug dc/test-deployment-config --keep-annotations -o yaml" 'annotations:'
os::cmd::expect_success_and_text "oc debug dc/test-deployment-config --as-root -o yaml" 'runAsUser: 0'
os::cmd::expect_success_and_text "oc debug dc/test-deployment-config --as-root=false -o yaml" 'runAsNonRoot: true'
os::cmd::expect_success_and_text "oc debug dc/test-deployment-config --as-user=1 -o yaml" 'runAsUser: 1'
os::cmd::expect_success_and_text "oc debug dc/test-deployment-config --keep-liveness --keep-readiness -o yaml" ''
os::cmd::expect_success_and_text "oc debug dc/test-deployment-config -o yaml -- /bin/env" '\- /bin/env'
os::cmd::expect_success_and_text "oc debug -t dc/test-deployment-config -o yaml" 'stdinOnce'
os::cmd::expect_success_and_text "oc debug -t dc/test-deployment-config -o yaml" 'tty'
os::cmd::expect_success_and_text "oc debug --v=8 -t dc/test-deployment-config -o yaml" "Response Headers"
os::cmd::expect_success_and_not_text "oc debug --tty=false dc/test-deployment-config -o yaml" 'tty'
os::cmd::expect_success_and_not_text "oc debug dc/test-deployment-config -o yaml -- /bin/env" 'stdin'
os::cmd::expect_success_and_not_text "oc debug dc/test-deployment-config -o yaml -- /bin/env" 'tty'
os::cmd::expect_failure_and_text "oc debug dc/test-deployment-config --node-name=invalid -- /bin/env" 'on node "invalid"'
# Does not require a real resource on the server
os::cmd::expect_success_and_not_text "oc debug -T -f ${TEST_DATA}/hello-openshift/hello-pod.json -o yaml" 'tty'
os::cmd::expect_success_and_text "oc debug -f ${TEST_DATA}/hello-openshift/hello-pod.json --keep-liveness --keep-readiness -o yaml" ''
os::cmd::expect_success_and_text "oc debug -f ${TEST_DATA}/hello-openshift/hello-pod.json -o yaml -- /bin/env" '\- /bin/env'
os::cmd::expect_success_and_not_text "oc debug -f ${TEST_DATA}/hello-openshift/hello-pod.json -o yaml -- /bin/env" 'stdin'
os::cmd::expect_success_and_not_text "oc debug -f ${TEST_DATA}/hello-openshift/hello-pod.json -o yaml -- /bin/env" 'tty'
# TODO: write a test that emulates a TTY to verify the correct defaulting of what the pod is created

# Ensure debug does not depend on a container actually existing for the selected resource.
# The command should not hang waiting for an attachable pod. Timeout each cmd after 10s.
os::cmd::expect_success 'oc create -f ${TEST_DATA}/test-replication-controller.yaml'
os::cmd::expect_success 'oc scale --replicas=0 rc/test-replication-controller'
os::cmd::expect_success_and_text "oc debug --request-timeout=10s -c ruby-helloworld --one-container rc/test-replication-controller -o jsonpath='{.metadata.name}'" 'test-replication-controller-debug'

os::cmd::expect_success 'oc scale --replicas=0 dc/test-deployment-config'
os::cmd::expect_success_and_text "oc debug --request-timeout=10s -c ruby-helloworld --one-container dc/test-deployment-config -o jsonpath='{.metadata.name}'" 'test-deployment-config'

tmp_deploy="$(mktemp)"
os::cmd::expect_success 'oc create -f - >> $tmp_deploy << __EOF__
apiVersion: apps/v1
kind: Deployment
metadata:
  name: test-deployment
  labels:
    deployment: test-deployment
spec:
  replicas: 0
  selector:
    matchLabels:
      deployment: test-deployment
  template:
    metadata:
      labels:
        deployment: test-deployment
      name: test-deployment
    spec:
      containers:
      - name: ruby-helloworld
        image: openshift/origin-pod
        imagePullPolicy: IfNotPresent
        resources: {}
status: {}
__EOF__'
os::cmd::expect_success_and_text "oc debug --request-timeout=10s -c ruby-helloworld --one-container deploy/test-deployment -o jsonpath='{.metadata.name}'" 'test-deployment-debug'

# re-scale existing resources
os::cmd::expect_success 'oc scale --replicas=1 dc/test-deployment-config'

os::cmd::expect_success 'oc create -f ${TEST_DATA}/image-streams/image-streams-centos7.json'
os::cmd::try_until_success 'oc get imagestreamtags wildfly:latest'
os::cmd::expect_success_and_text "oc debug istag/wildfly:latest -o yaml" 'image:.*cmd-debug/wildfly.*@'
sha="$( oc get istag/wildfly:latest --template '{{ .image.metadata.name }}' )"
os::cmd::expect_success_and_text "oc debug isimage/wildfly@${sha} -o yaml" 'image: docker.io/openshift/wildfly-150-centos7'

echo "debug: ok"
os::test::junit::declare_suite_end
`)

func testExtendedTestdataCmdTestCmdDebugShBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdDebugSh, nil
}

func testExtendedTestdataCmdTestCmdDebugSh() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdDebugShBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/debug.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdDeploymentsSh = []byte(`#!/bin/bash
source "$(dirname "${BASH_SOURCE}")/../../hack/lib/init.sh"
trap os::test::junit::reconcile_output EXIT

# Cleanup cluster resources created by this test
(
  set +e
  oc delete all,templates --all
  exit 0
) &>/dev/null


os::test::junit::declare_suite_start "cmd/deployments"
# This test validates deployments and the env command

os::cmd::expect_success 'oc get deploymentConfigs'
os::cmd::expect_success 'oc get dc'
os::cmd::expect_success 'oc create -f ${TEST_DATA}/test-deployment-config.yaml'
os::cmd::expect_success 'oc describe deploymentConfigs test-deployment-config'
os::cmd::expect_success_and_text 'oc get dc -o name' 'deploymentconfig.apps.openshift.io/test-deployment-config'
os::cmd::try_until_success 'oc get rc/test-deployment-config-1'
os::cmd::expect_success_and_text 'oc describe dc test-deployment-config' 'deploymentconfig=test-deployment-config'
os::cmd::expect_success_and_text 'oc status' 'dc/test-deployment-config deploys docker.io/openshift/origin-pod:latest'
os::cmd::expect_success 'oc create -f ${TEST_DATA}/hello-openshift/hello-pod.json'
os::cmd::try_until_text 'oc status' 'pod/hello-openshift runs openshift/hello-openshift'

os::test::junit::declare_suite_start "cmd/deployments/env"
# Patch a nil list
os::cmd::expect_success 'oc set env dc/test-deployment-config TEST=value'
os::cmd::expect_success_and_text 'oc set env dc/test-deployment-config --list' 'TEST=value'
# Remove only env in the list
os::cmd::expect_success 'oc set env dc/test-deployment-config TEST-'
os::cmd::expect_success_and_not_text 'oc set env dc/test-deployment-config --list' 'TEST=value'
# Add back to empty list
os::cmd::expect_success 'oc set env dc/test-deployment-config TEST=value'
os::cmd::expect_success_and_not_text 'oc set env dc/test-deployment-config TEST=foo --list' 'TEST=value'
os::cmd::expect_success_and_text 'oc set env dc/test-deployment-config TEST=foo --list' 'TEST=foo'
os::cmd::expect_success_and_text 'oc set env dc/test-deployment-config OTHER=foo --list' 'TEST=value'
os::cmd::expect_success_and_not_text 'oc set env dc/test-deployment-config OTHER=foo -c ruby --list' 'OTHER=foo'
os::cmd::expect_success_and_text 'oc set env dc/test-deployment-config OTHER=foo -c ruby*   --list' 'OTHER=foo'
os::cmd::expect_success_and_text 'oc set env dc/test-deployment-config OTHER=foo -c *hello* --list' 'OTHER=foo'
os::cmd::expect_success_and_text 'oc set env dc/test-deployment-config OTHER=foo -c *world  --list' 'OTHER=foo'
os::cmd::expect_success_and_text 'oc set env dc/test-deployment-config OTHER=foo --list' 'OTHER=foo'
os::cmd::expect_success_and_text 'oc set env dc/test-deployment-config OTHER=foo -o yaml' 'name: OTHER'
os::cmd::expect_success_and_text 'echo OTHER=foo | oc set env dc/test-deployment-config -e - --list' 'OTHER=foo'
os::cmd::expect_success_and_not_text 'echo #OTHER=foo | oc set env dc/test-deployment-config -e - --list' 'OTHER=foo'
os::cmd::expect_success 'oc set env dc/test-deployment-config TEST=bar OTHER=baz BAR-'
os::cmd::expect_success_and_text 'oc set env -f ${TEST_DATA}/test-deployment-config.yaml TEST=VERSION -o yaml' 'v1'
os::cmd::expect_success 'oc set env dc/test-deployment-config A=a B=b C=c D=d E=e F=f G=g'
os::cmd::expect_success_and_text 'oc set env dc/test-deployment-config --list' 'A=a'
os::cmd::expect_success_and_text 'oc set env dc/test-deployment-config --list' 'B=b'
os::cmd::expect_success_and_text 'oc set env dc/test-deployment-config --list' 'C=c'
os::cmd::expect_success_and_text 'oc set env dc/test-deployment-config --list' 'D=d'
os::cmd::expect_success_and_text 'oc set env dc/test-deployment-config --list' 'E=e'
os::cmd::expect_success_and_text 'oc set env dc/test-deployment-config --list' 'F=f'
os::cmd::expect_success_and_text 'oc set env dc/test-deployment-config --list' 'G=g'
os::cmd::expect_success 'oc set env dc/test-deployment-config H=h G- E=updated C- A-'
os::cmd::expect_success_and_text 'oc set env dc/test-deployment-config --list' 'B=b'
os::cmd::expect_success_and_text 'oc set env dc/test-deployment-config --list' 'D=d'
os::cmd::expect_success_and_text 'oc set env dc/test-deployment-config --list' 'E=updated'
os::cmd::expect_success_and_text 'oc set env dc/test-deployment-config --list' 'F=f'
os::cmd::expect_success_and_text 'oc set env dc/test-deployment-config --list' 'H=h'
os::cmd::expect_success_and_not_text 'oc set env dc/test-deployment-config --list' 'A=a'
os::cmd::expect_success_and_not_text 'oc set env dc/test-deployment-config --list' 'C=c'
os::cmd::expect_success_and_not_text 'oc set env dc/test-deployment-config --list' 'G=g'
echo "env: ok"
os::test::junit::declare_suite_end

os::test::junit::declare_suite_start "cmd/deployments/config"
#os::cmd::expect_failure_and_text 'oc rollout latest test-deployment-config' 'already in progress'
#os::cmd::expect_failure_and_text 'oc rollout latest dc/test-deployment-config' 'already in progress'
## ensure that a cancelled deployment can be retried successfully
#os::cmd::expect_success 'oc rollout cancel dc/test-deployment-config'
#os::cmd::expect_success_and_text 'oc rollout retry dc/test-deployment-config' 'deploymentconfig.apps.openshift.io/test-deployment-config retried rollout'
#os::cmd::expect_success 'oc delete deploymentConfigs test-deployment-config'
echo "deploymentConfigs: ok"
os::test::junit::declare_suite_end

os::cmd::expect_success 'oc delete all --all'
# TODO: remove, flake caused by deployment controller updating the following dc
sleep 1
os::cmd::expect_success 'oc delete all --all'

os::cmd::expect_success 'oc process -f ${TEST_DATA}/application-template-dockerbuild.json -l app=dockerbuild | oc create -f -'
os::cmd::try_until_success 'oc get rc/database-1'

os::test::junit::declare_suite_start "cmd/deployments/get"
os::cmd::expect_success_and_text "oc get dc --show-labels" "app=dockerbuild,template=application-template-dockerbuild"
os::cmd::expect_success_and_text "oc get dc frontend --show-labels" "app=dockerbuild,template=application-template-dockerbuild"
os::cmd::expect_success_and_not_text "oc get dc" "app=dockerbuild,template=application-template-dockerbuild"
os::cmd::expect_success_and_not_text "oc get dc frontend" "app=dockerbuild,template=application-template-dockerbuild"
os::cmd::expect_success "oc process -f ${TEST_DATA}/old-template.json | oc create -f -"
os::cmd::expect_success_and_text "oc get dc/eap-app -o yaml" ":latest"
echo "get: ok"
os::test::junit::declare_suite_end

os::test::junit::declare_suite_start "cmd/deployments/rollout"
os::cmd::try_until_success 'oc rollout pause dc/database'
os::cmd::try_until_text "oc get dc/database --template='{{.spec.paused}}'" "true"
os::cmd::try_until_success 'oc rollout resume dc/database'
os::cmd::try_until_text "oc get dc/database --template='{{.spec.paused}}'" "<no value>"
# create a replication controller and attempt to perform `+"`"+`oc rollout cancel`+"`"+` on it.
# expect an error about the resource type, rather than a panic or a success.
os::cmd::expect_success 'oc create -f ${TEST_DATA}/test-replication-controller.yaml'
os::cmd::expect_failure_and_text 'oc rollout cancel rc/test-replication-controller' 'expected deployment configuration, got replicationcontrollers'

echo "rollout: ok"
os::test::junit::declare_suite_end

os::test::junit::declare_suite_start "cmd/deployments/rollback"
# should fail because there's no previous deployment
os::cmd::expect_failure 'oc rollback database --to-version=1 -o=yaml'
os::cmd::expect_failure 'oc rollback dc/database --to-version=1 -o=yaml'
os::cmd::expect_failure 'oc rollback dc/database --to-version=1 --dry-run'
os::cmd::expect_failure 'oc rollback database-1 -o=yaml'
os::cmd::expect_failure 'oc rollback rc/database-1 -o=yaml'
os::cmd::expect_failure 'oc rollback database -o yaml'
# trigger a new deployment with 'foo' image
os::cmd::expect_success 'oc set image dc/database ruby-helloworld-database=foo --source=docker'
# wait for the new deployment
os::cmd::try_until_success 'oc rollout history dc/database --revision=2'
# rolling back to the same revision should fail
os::cmd::expect_failure 'oc rollback dc/database --to-version=2'
# undo --dry-run should report the original image
os::cmd::expect_success_and_text 'oc rollout undo dc/database --dry-run' 'mysql-57-centos7'
echo "rollback: ok"
os::test::junit::declare_suite_end

os::test::junit::declare_suite_start "cmd/deployments/stop"
os::cmd::expect_success 'oc get dc/database'
os::cmd::expect_success 'oc expose dc/database --name=fromdc'
# should be a service
os::cmd::expect_success 'oc get svc/fromdc'
os::cmd::expect_success 'oc delete svc/fromdc'
os::cmd::expect_success 'oc delete dc/database'
os::cmd::expect_failure 'oc get dc/database'
os::cmd::try_until_failure 'oc get rc/database-1'
echo "stop: ok"
os::test::junit::declare_suite_end

os::test::junit::declare_suite_start "cmd/deployments/autoscale"
os::cmd::expect_success 'oc create -f ${TEST_DATA}/test-deployment-config.yaml'
os::cmd::expect_success 'oc autoscale dc/test-deployment-config --max 5'
os::cmd::expect_success_and_text "oc get hpa/test-deployment-config --template='{{.spec.maxReplicas}}'" "5"
os::cmd::expect_success_and_text "oc get hpa/test-deployment-config -o jsonpath='{.spec.scaleTargetRef.apiVersion}'" "apps.openshift.io/v1"
os::cmd::expect_success 'oc delete dc/test-deployment-config'
os::cmd::expect_success 'oc delete hpa/test-deployment-config'
echo "autoscale: ok"
os::test::junit::declare_suite_end

os::test::junit::declare_suite_start "cmd/deployments/setimage"
os::cmd::expect_success 'oc create -f ${TEST_DATA}/test-deployment-config.yaml'
os::cmd::expect_success 'oc set image dc/test-deployment-config ruby-helloworld=myshinynewimage --source=docker'
os::cmd::expect_success_and_text "oc get dc/test-deployment-config -o jsonpath='{.spec.template.spec.containers[0].image}'" "myshinynewimage"
os::cmd::expect_success 'oc delete dc/test-deployment-config'
echo "set image: ok"
os::test::junit::declare_suite_end

os::test::junit::declare_suite_start "cmd/deployments/setdeploymenthook"
# Validate the set deployment-hook command
arg="-f ${TEST_DATA}/test-deployment-config.yaml"
os::cmd::expect_failure_and_text "oc set deployment-hook" "error: one or more deployment configs"
os::cmd::expect_failure_and_text "oc set deployment-hook ${arg}" "error: you must specify one of --pre, --mid, or --post"
os::cmd::expect_failure_and_text "oc set deployment-hook ${arg} -o yaml --pre -- mycmd" 'deploymentconfigs.apps.openshift.io "test-deployment-config" not found'
os::cmd::expect_success_and_text "oc set deployment-hook ${arg} --local -o yaml --post -- mycmd" 'mycmd'
os::cmd::expect_success_and_not_text "oc set deployment-hook ${arg} --local -o yaml --post -- mycmd | oc set deployment-hook -f - --local -o yaml --post --remove" 'mycmd'
os::cmd::expect_success_and_text "oc set deployment-hook ${arg} --local --pre  -o yaml -- echo 'hello world'" 'pre:'
os::cmd::expect_success_and_text "oc set deployment-hook ${arg} --local --pre  -o yaml -- echo 'hello world'" 'execNewPod:'
os::cmd::expect_success_and_text "oc set deployment-hook ${arg} --local --pre  -o yaml -- echo 'hello world'" '\- echo'
os::cmd::expect_success_and_text "oc set deployment-hook ${arg} --local --pre  -o yaml -- echo 'hello world'" '\- hello world'
os::cmd::expect_success_and_text "oc set deployment-hook ${arg} --local --post -o yaml -- echo 'hello world'" 'post:'
os::cmd::expect_success_and_text "oc set deployment-hook ${arg} --local --mid  -o yaml -- echo 'hello world'" 'mid:'
os::cmd::expect_success_and_text "oc set deployment-hook ${arg} --local --pre --failure-policy=ignore -o yaml -- echo 'hello world'" 'failurePolicy: Ignore'
os::cmd::expect_success_and_text "oc set deployment-hook ${arg} --local --pre --failure-policy=retry  -o yaml -- echo 'hello world'" 'failurePolicy: Retry'
os::cmd::expect_success_and_text "oc set deployment-hook ${arg} --local --pre --failure-policy=abort  -o yaml -- echo 'hello world'" 'failurePolicy: Abort'
# Non-existent container
os::cmd::expect_success_and_text "oc set deployment-hook ${arg} --local --pre --container=blah -o yaml -- echo 'hello world'" 'does not have a container named'
# Non-existent volume
os::cmd::expect_success_and_text "oc set deployment-hook ${arg} --local --pre --volumes=blah -o yaml -- echo 'hello world'" 'does not have a volume named'
# verify the deprecated flag shorthand is working
os::cmd::expect_success_and_text "oc set deployment-hook ${arg} --local --pre -v blah -o yaml -- echo 'hello world'" 'shorthand -v has been deprecated'
# Existing container
os::cmd::expect_success_and_not_text "oc set deployment-hook ${arg} --local --pre --container=ruby-helloworld -o yaml -- echo 'hello world'" 'does not have a container named'
os::cmd::expect_success_and_text "oc set deployment-hook ${arg} --local --pre --container=ruby-helloworld -o yaml -- echo 'hello world'" 'containerName: ruby-helloworld'
# Existing volume
os::cmd::expect_success_and_not_text "oc set deployment-hook ${arg} --local --pre --volumes=vol1 -o yaml -- echo 'hello world'" 'does not have a volume named'
os::cmd::expect_success_and_text "oc set deployment-hook ${arg} --local --pre --volumes=vol1 -o yaml -- echo 'hello world'" '\- vol1'
# Server object tests
os::cmd::expect_success "oc create -f ${TEST_DATA}/test-deployment-config.yaml"
os::cmd::expect_failure_and_text "oc set deployment-hook dc/test-deployment-config --pre" "you must specify a command"
os::cmd::expect_success_and_text "oc set deployment-hook test-deployment-config --pre -- echo 'hello world'" "updated"
os::cmd::expect_success_and_text "oc set deployment-hook dc/test-deployment-config --loglevel=1 --pre -- echo 'hello world'" "was not changed"
os::cmd::expect_success_and_text "oc get dc/test-deployment-config -o yaml" "pre:"
os::cmd::expect_success_and_text "oc set deployment-hook dc/test-deployment-config --pre --failure-policy=abort -- echo 'test'" "updated"
os::cmd::expect_success_and_text "oc get dc/test-deployment-config -o yaml" "failurePolicy: Abort"
os::cmd::expect_success_and_text "oc set deployment-hook --all --pre -- echo 'all dc'" "updated"
os::cmd::expect_success_and_text "oc get dc -o yaml" "all dc"
os::cmd::expect_success_and_text "oc set deployment-hook dc/test-deployment-config --pre --remove" "updated"
os::cmd::expect_success_and_not_text "oc get dc/test-deployment-config -o yaml" "pre:"
# Environment handling
os::cmd::expect_success_and_text "oc set deployment-hook dc/test-deployment-config --pre -o yaml --environment X=Y,Z=W -- echo 'test'" "value: Y,Z=W"
os::cmd::expect_success_and_text "oc set deployment-hook dc/test-deployment-config --pre -o yaml --environment X=Y,Z=W -- echo 'test'" "no longer accepts comma-separated list"
os::cmd::expect_success_and_not_text "oc set deployment-hook dc/test-deployment-config --pre -o yaml --environment X=Y -- echo 'test'" "no longer accepts comma-separated list"

os::cmd::expect_success "oc delete dc/test-deployment-config"
echo "set deployment-hook: ok"
os::test::junit::declare_suite_end

os::test::junit::declare_suite_end
`)

func testExtendedTestdataCmdTestCmdDeploymentsShBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdDeploymentsSh, nil
}

func testExtendedTestdataCmdTestCmdDeploymentsSh() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdDeploymentsShBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/deployments.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdDescriberSh = []byte(`#!/bin/bash
source "$(dirname "${BASH_SOURCE}")/../../hack/lib/init.sh"
trap os::test::junit::reconcile_output EXIT

# Cleanup cluster resources created by this test
(
  set +e
  oc delete all,templates --all
  exit 0
) &>/dev/null


os::test::junit::declare_suite_start "cmd/describe"
# This test validates non-duplicate errors when describing an existing resource without a defined describer
os::cmd::expect_success 'oc create -f - << __EOF__
{
  "apiVersion": "v1",
  "involvedObject": {
    "apiVersion": "v1",
    "kind": "Pod",
    "name": "test-pod",
    "namespace": "cmd-describer"
  },
  "kind": "Event",
  "message": "test message",
  "metadata": {
    "name": "test-event"
  }
}
__EOF__
'
os::cmd::try_until_success 'eventnum=$(oc get events | wc -l) && [[ $eventnum -gt 0 ]]'
# resources without describers get a default
os::cmd::expect_success_and_text 'oc describe events' 'Namespace:\s+cmd-describer'

# TemplateInstance
os::cmd::expect_success 'oc create -f ${TEST_DATA}/templateinstance_objectkinds.yaml'
os::cmd::expect_success_and_text 'oc describe templateinstances templateinstance' 'Name:\s+templateinstance'
os::cmd::expect_success_and_text 'oc describe templateinstances templateinstance' 'Namespace:\s+cmd-describer'
os::cmd::expect_success_and_text 'oc describe templateinstances templateinstance' 'Type:\s+Ready'
os::cmd::expect_success_and_text 'oc describe templateinstances templateinstance' 'Status:\s+True'
os::cmd::expect_success_and_text 'oc describe templateinstances templateinstance' 'Secret:\s+cmd-describer/secret'
os::cmd::expect_success_and_text 'oc describe templateinstances templateinstance' 'Deployment:\s+cmd-describer/deployment'
os::cmd::expect_success_and_text 'oc describe templateinstances templateinstance' 'Route:\s+cmd-describer/route'
os::cmd::expect_success_and_text 'oc describe templateinstances templateinstance' 'Route:\s+cmd-describer/newroute'
os::cmd::expect_success_and_text 'oc describe templateinstances templateinstance' 'NAME:\s+8 bytes'

echo "describer: ok"
os::test::junit::declare_suite_end
`)

func testExtendedTestdataCmdTestCmdDescriberShBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdDescriberSh, nil
}

func testExtendedTestdataCmdTestCmdDescriberSh() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdDescriberShBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/describer.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdEditSh = []byte(`#!/bin/bash
source "$(dirname "${BASH_SOURCE}")/../../hack/lib/init.sh"
trap os::test::junit::reconcile_output EXIT

# Cleanup cluster resources created by this test
(
  set +e
  oc delete all,templates --all
  exit 0
) &>/dev/null


os::test::junit::declare_suite_start "cmd/edit"
# This test validates the edit command

os::cmd::expect_success 'oc create -f ${TEST_DATA}/hello-openshift/hello-pod.json'

os::cmd::expect_success_and_text 'OC_EDITOR=cat oc edit pod/hello-openshift' 'Edit cancelled'
os::cmd::expect_success_and_text 'OC_EDITOR=cat oc edit pod/hello-openshift' 'name: hello-openshift'
#os::cmd::expect_success_and_text 'OC_EDITOR=cat oc edit --windows-line-endings pod/hello-openshift | file -' 'CRLF'
#os::cmd::expect_success_and_not_text 'OC_EDITOR=cat oc edit --windows-line-endings=false pod/hello-openshift | file -' 'CRFL'

os::cmd::expect_success 'oc create -f ${TEST_DATA}/services.yaml'
os::cmd::expect_success_and_text 'OC_EDITOR=cat oc edit svc' 'kind: List'

os::cmd::expect_success 'oc create imagestream test'
os::cmd::expect_success 'oc tag --source=docker docker.io/busybox:latest test:new'
os::cmd::try_until_success 'oc get istag/test:new'
os::cmd::expect_success_and_not_text 'oc get istag/test:new -o jsonpath={.metadata.annotations}' "tags:hidden"
editorfile="$(mktemp -d)/tmp-editor.sh"
echo '#!/bin/bash' > ${editorfile}
echo 'sed -i "s/^tag: null/tag:\n  referencePolicy:\n    type: Source/g" $1' >> ${editorfile}
echo 'sed -i "s/^metadata:$/metadata:\n  annotations:\n    tags: hidden/g" $1' >> ${editorfile}
chmod +x ${editorfile}
os::cmd::expect_success "EDITOR=${editorfile} oc edit istag/test:new"
os::cmd::expect_success_and_text 'oc get istag/test:new -o jsonpath={.metadata.annotations}' "tags:hidden"

echo "edit: ok"
os::test::junit::declare_suite_end
`)

func testExtendedTestdataCmdTestCmdEditShBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdEditSh, nil
}

func testExtendedTestdataCmdTestCmdEditSh() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdEditShBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/edit.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdEnvSh = []byte(`#!/bin/bash
source "$(dirname "${BASH_SOURCE}")/../../hack/lib/init.sh"
trap os::test::junit::reconcile_output EXIT

os::test::junit::declare_suite_start "cmd/set-env"
# This test validates the value of --image for oc run
os::cmd::expect_success 'oc new-app node'
os::cmd::expect_failure_and_text 'oc set env dc/node' 'error: at least one environment variable must be provided'
os::cmd::expect_success_and_text 'oc set env dc/node key=value' 'deploymentconfig.apps.openshift.io/node updated'
os::cmd::expect_success_and_text 'oc set env dc/node --list' 'deploymentconfigs/node, container node'
os::cmd::expect_success_and_text 'oc set env dc --all --containers="node" key-' 'deploymentconfig.apps.openshift.io/node updated'
os::cmd::expect_failure_and_text 'oc set env dc --all --containers="node"' 'error: at least one environment variable must be provided'
os::cmd::expect_failure_and_not_text 'oc set env --from=secret/mysecret dc/node' 'error: at least one environment variable must be provided'
os::cmd::expect_failure_and_text 'oc set env dc/node test#abc=1234' 'environment variable test#abc=1234 is invalid, a valid environment variable name must consist of alphabetic characters'

# ensure deleting a var through --env does not result in an error message
os::cmd::expect_success_and_text 'oc set env dc/node key=value' 'deploymentconfig.apps.openshift.io/node updated'
os::cmd::expect_success_and_text 'oc set env dc/node dots.in.a.key=dots.in.a.value' 'deploymentconfig.apps.openshift.io/node updated'
os::cmd::expect_success_and_text 'oc set env dc --all --containers="node" --env=key-' 'deploymentconfig.apps.openshift.io/node updated'
# ensure deleting a var through --env actually deletes the env var
os::cmd::expect_success_and_not_text "oc get dc/node -o jsonpath='{ .spec.template.spec.containers[?(@.name==\"node\")].env }'" 'name\:key'
os::cmd::expect_success_and_text "oc get dc/node -o jsonpath='{ .spec.template.spec.containers[?(@.name==\"node\")].env }'" 'name\:dots.in.a.key'
os::cmd::expect_success_and_text 'oc set env dc --all --containers="node" --env=dots.in.a.key-' 'deploymentconfig.apps.openshift.io/node updated'
os::cmd::expect_success_and_not_text "oc get dc/node -o jsonpath='{ .spec.template.spec.containers[?(@.name==\"node\")].env }'" 'name\:dots.in.a.key'

# check that env vars are not split at commas
os::cmd::expect_success_and_text 'oc set env -o yaml dc/node PASS=x,y=z' 'value: x,y=z'
os::cmd::expect_success_and_text 'oc set env -o yaml dc/node --env PASS=x,y=z' 'value: x,y=z'
# warning is printed when --env has comma in it
os::cmd::expect_success_and_text 'oc set env dc/node --env PASS=x,y=z' 'no longer accepts comma-separated list'
# warning is not printed for variables passed as positional arguments
os::cmd::expect_success_and_not_text 'oc set env dc/node PASS=x,y=z' 'no longer accepts comma-separated list'

# create a build-config object with the JenkinsPipeline strategy
os::cmd::expect_success 'oc process -p NAMESPACE=openshift -f ${TEST_DATA}/jenkins/jenkins-ephemeral-template.json | oc create -f -'
os::cmd::expect_success "echo 'apiVersion: v1
kind: BuildConfig
metadata:
  name: fake-pipeline
spec:
  source:
    git:
      uri: git://github.com/openshift/ruby-hello-world.git
  strategy:
    jenkinsPipelineStrategy: {}
' | oc create -f -"

# ensure build-config has been created and that its type is "JenkinsPipeline"
os::cmd::expect_success_and_text "oc get bc fake-pipeline -o jsonpath='{ .spec.strategy.type }'" 'JenkinsPipeline'
# attempt to set an environment variable
os::cmd::expect_success_and_text 'oc set env bc/fake-pipeline FOO=BAR' 'buildconfig.build.openshift.io/fake\-pipeline updated'
# ensure environment variable was set
os::cmd::expect_success_and_text "oc get bc fake-pipeline -o jsonpath='{ .spec.strategy.jenkinsPipelineStrategy.env }'" 'name\:FOO'
os::cmd::expect_success 'oc delete bc fake-pipeline'

echo "oc set env: ok"
os::test::junit::declare_suite_end
`)

func testExtendedTestdataCmdTestCmdEnvShBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdEnvSh, nil
}

func testExtendedTestdataCmdTestCmdEnvSh() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdEnvShBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/env.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdFrameworkTestSh = []byte(`#!/usr/bin/env bash
#
# This script tests os::test::junit functionality.

function exit_trap() {
    local return_code=$?

    end_time=$(date +%s)

    if [[ "${return_code}" -eq "0" ]]; then
        verb="succeeded"
    else
        verb="failed"
    fi

    echo "$0 ${verb} after $((${end_time} - ${start_time})) seconds"
    exit "${return_code}"
}

trap exit_trap EXIT

start_time=$(date +%s)
source "$(dirname "${BASH_SOURCE}")/../../hack/lib/init.sh"

# envars used to track these interactions are not propagated out of the subshells used to run these commands
# therefore each os::cmd call is its own sandbox and complicated scenarios need to play out inside one call
# however, envars from this scope *are* propagated into each subshell, so they need to be cleared in each call

os::test::junit::declare_suite_start 'lib/test/junit'

# shouldn't be able to end a suite straight away
os::cmd::expect_failure_and_text 'unset NUM_OS_JUNIT_SUITES_IN_FLIGHT NUM_OS_JUNIT_TESTS_IN_FLIGHT JUNIT_REPORT_OUTPUT
os::test::junit::declare_suite_end' '\[ERROR\] jUnit suite marker could not be placed, expected suites in flight, got 0'
# should be able to start one straight away
os::cmd::expect_success 'unset NUM_OS_JUNIT_SUITES_IN_FLIGHT NUM_OS_JUNIT_TESTS_IN_FLIGHT JUNIT_REPORT_OUTPUT
os::test::junit::declare_suite_start whatever'
# should be able to start and end a suite
os::cmd::expect_success 'unset NUM_OS_JUNIT_SUITES_IN_FLIGHT NUM_OS_JUNIT_TESTS_IN_FLIGHT JUNIT_REPORT_OUTPUT
os::test::junit::declare_suite_start whatever
os::test::junit::declare_suite_end'
# should not be able to end more suites than are in flight
os::cmd::expect_failure_and_text 'unset NUM_OS_JUNIT_SUITES_IN_FLIGHT NUM_OS_JUNIT_TESTS_IN_FLIGHT JUNIT_REPORT_OUTPUT
os::test::junit::declare_suite_start whatever
os::test::junit::declare_suite_end
os::test::junit::declare_suite_end' '\[ERROR\] jUnit suite marker could not be placed, expected suites in flight, got 0'
# should not be able to end more suites than are in flight
os::cmd::expect_failure_and_text 'unset NUM_OS_JUNIT_SUITES_IN_FLIGHT NUM_OS_JUNIT_TESTS_IN_FLIGHT JUNIT_REPORT_OUTPUT
os::test::junit::declare_suite_start whatever
os::test::junit::declare_suite_start whateverelse
os::test::junit::declare_suite_end
os::test::junit::declare_suite_end
os::test::junit::declare_suite_end' '\[ERROR\] jUnit suite marker could not be placed, expected suites in flight, got 0'
# should be able to staart a test
os::cmd::expect_success 'unset NUM_OS_JUNIT_SUITES_IN_FLIGHT NUM_OS_JUNIT_TESTS_IN_FLIGHT JUNIT_REPORT_OUTPUT
os::test::junit::declare_suite_start whatever
os::test::junit::declare_test_start'
# shouldn't be able to end a test that hasn't been started
os::cmd::expect_failure_and_text 'unset NUM_OS_JUNIT_SUITES_IN_FLIGHT NUM_OS_JUNIT_TESTS_IN_FLIGHT JUNIT_REPORT_OUTPUT
os::test::junit::declare_test_end' '\[ERROR\] jUnit test marker could not be placed, expected one test in flight, got 0'
# should be able to start and end a test case
os::cmd::expect_success 'unset NUM_OS_JUNIT_SUITES_IN_FLIGHT NUM_OS_JUNIT_TESTS_IN_FLIGHT JUNIT_REPORT_OUTPUT
os::test::junit::declare_suite_start whatever
os::test::junit::declare_test_start
os::test::junit::declare_test_end'
# shouldn't be able to end too many test cases
os::cmd::expect_failure_and_text 'unset NUM_OS_JUNIT_SUITES_IN_FLIGHT NUM_OS_JUNIT_TESTS_IN_FLIGHT JUNIT_REPORT_OUTPUT
os::test::junit::declare_suite_start whatever
os::test::junit::declare_test_start
os::test::junit::declare_test_end
os::test::junit::declare_test_end' '\[ERROR\] jUnit test marker could not be placed, expected one test in flight, got 0'
# shouldn't be able to start a test without a suite
os::cmd::expect_failure_and_text 'unset NUM_OS_JUNIT_SUITES_IN_FLIGHT NUM_OS_JUNIT_TESTS_IN_FLIGHT JUNIT_REPORT_OUTPUT
os::test::junit::declare_test_start' '\[ERROR\] jUnit test marker could not be placed, expected suites in flight, got 0'

os::test::junit::declare_suite_end
`)

func testExtendedTestdataCmdTestCmdFrameworkTestShBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdFrameworkTestSh, nil
}

func testExtendedTestdataCmdTestCmdFrameworkTestSh() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdFrameworkTestShBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/framework-test.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdGetSh = []byte(`#!/bin/bash
source "$(dirname "${BASH_SOURCE}")/../../hack/lib/init.sh"
trap os::test::junit::reconcile_output EXIT

# Cleanup cluster resources created by this test
(
  set +e
  oc delete all,templates --all
  oc delete users.user.openshift.io test-user-1
  exit 0
) &>/dev/null


os::test::junit::declare_suite_start "cmd/get"
os::cmd::expect_success_and_text 'oc create service loadbalancer testsvc1  --tcp=8080' "service/testsvc1 created"
# mixed resource output should print resource kind
# prefix even when only one type of resource is present
os::cmd::expect_success_and_text 'oc get all' "service/testsvc1"
# ensure that getting mixed resource types still returns prefixed resources, if there are at most resources of one type
os::cmd::expect_success_and_text 'oc get svc,pod' "service/testsvc1"
os::cmd::expect_failure_and_text 'oc get svc,pod testsvc1' "testsvc1"
# create second resource type and ensure that prefixed resource names are returned for both
os::cmd::expect_success_and_text 'oc create imagestream testimg1' "imagestream.image.openshift.io/testimg1 created"
os::cmd::expect_success_and_text 'oc get svc,is' "service/testsvc1"
# create second service and expect `+"`"+`get all`+"`"+` to still append resource kind to multiple of one type of resource
os::cmd::expect_success_and_text 'oc create service loadbalancer testsvc2  --tcp=8081' "service/testsvc2 created"
os::cmd::expect_success_and_text 'oc get all' "service/testsvc2"
# test tuples of same and different resource kinds (tuples of same resource kind should not return prefixed items).
os::cmd::expect_success_and_not_text 'oc get svc/testsvc1 svc/testsvc2' "service/testsvc1"
os::cmd::expect_success_and_text 'oc get svc/testsvc1 is/testimg1' "service/testsvc1"
os::cmd::expect_success_and_text 'oc get --v=8 svc/testsvc1 is/testimg1' "round_trippers.go"
# specific resources should not have their kind prefixed
os::cmd::expect_success_and_text 'oc get svc' "testsvc1"
# test --show-labels displays labels for users
os::cmd::expect_success 'oc create user test-user-1'
os::cmd::expect_success 'oc label user/test-user-1 customlabel=true'
os::cmd::expect_success_and_text 'oc get users test-user-1 --show-labels' "customlabel=true"
os::cmd::expect_success_and_not_text 'oc get users test-user-1' "customlabel=true"
# test structured and unstructured resources print generically without panic
os::cmd::expect_success_and_text 'oc get projectrequests -o yaml' 'status: Success'
os::cmd::expect_success_and_text 'oc get projectrequests,svc,pod -o yaml' 'kind: List'
# test --wacth does not result in an error when a resource list is served in multiple chunks
os::cmd::expect_success 'oc create cm cmone'
os::cmd::expect_success 'oc create cm cmtwo'
os::cmd::expect_success 'oc create cm cmthree'
os::cmd::expect_success_and_not_text 'oc get configmap --chunk-size=1 --watch --request-timeout=1s' 'watch is only supported on individual resources'
os::cmd::expect_success_and_not_text 'oc get configmap --chunk-size=1 --watch-only --request-timeout=1s' 'watch is only supported on individual resources'
echo "oc get: ok"
os::test::junit::declare_suite_end
`)

func testExtendedTestdataCmdTestCmdGetShBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdGetSh, nil
}

func testExtendedTestdataCmdTestCmdGetSh() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdGetShBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/get.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdHelpSh = []byte(`#!/bin/bash
source "$(dirname "${BASH_SOURCE}")/../../hack/lib/init.sh"
trap os::test::junit::reconcile_output EXIT

os::test::junit::declare_suite_start "cmd/help"
# This test validates the help commands and output text

# verify some default commands
os::cmd::expect_success 'kubectl'
os::cmd::expect_success 'oc'
os::cmd::expect_success 'oc ex'
os::cmd::expect_failure 'origin'

# help for root commands must be consistent
os::cmd::expect_success_and_text 'oc' 'OpenShift Client'
os::cmd::expect_success_and_text 'oc -h' 'Build and Deploy Commands:'
os::cmd::expect_success_and_text 'oc -h' 'Other Commands:'
os::cmd::expect_success_and_text 'oc policy --help' 'add-role-to-user'
os::cmd::expect_success_and_not_text 'oc policy --help' 'Other Commands'
os::cmd::expect_success_and_not_text 'oc -h' 'Options'
os::cmd::expect_success_and_not_text 'oc -h' 'Global Options'
os::cmd::expect_failure_and_text 'oc adm ca' 'Manage certificates'
os::cmd::expect_success_and_text 'oc exec --help' '\-\- COMMAND \[args\.\.\.\]$'
os::cmd::expect_success_and_text 'oc rsh --help' 'COMMAND'

# help for root commands with --help flag must be consistent
os::cmd::expect_success_and_text 'oc --help' 'OpenShift Client'
os::cmd::expect_success_and_text 'oc login --help' 'Options'
os::cmd::expect_success_and_not_text 'oc login --help' 'Global Options'
os::cmd::expect_success_and_text 'oc login --help' 'insecure-skip-tls-verify'

# help for given command with --help flag must be consistent
os::cmd::expect_success_and_text 'oc get --help' 'Display one or many resources'
os::cmd::expect_success_and_text 'oc project --help' 'Switch to another project'
os::cmd::expect_success_and_text 'oc projects --help' 'existing projects'
os::cmd::expect_success_and_text 'oc get --help' 'oc'

# help for given command through help command must be consistent
os::cmd::expect_success_and_text 'oc help get' 'Display one or many resources'
os::cmd::expect_success_and_text 'oc help project' 'Switch to another project'
os::cmd::expect_success_and_text 'oc help projects' 'current active project and existing projects on the server'

# help tips must be consistent
os::cmd::expect_success_and_text 'oc --help' 'Use "oc <command> --help" for more information'
os::cmd::expect_success_and_text 'oc --help' 'Use "oc options" for a list of global'
os::cmd::expect_success_and_text 'oc help' 'Use "oc <command> --help" for more information'
os::cmd::expect_success_and_text 'oc help' 'Use "oc options" for a list of global'
os::cmd::expect_success_and_text 'oc set --help' 'Use "oc set <command> --help" for more information'
os::cmd::expect_success_and_text 'oc set --help' 'Use "oc options" for a list of global'
os::cmd::expect_success_and_text 'oc set env --help' 'Use "oc options" for a list of global'

# runnable commands with required flags must error consistently
os::cmd::expect_failure_and_text 'oc get' 'Required resource not specified'

# commands that expect file paths must validate and error out correctly
os::cmd::expect_failure_and_text 'oc login --certificate-authority=/path/to/invalid' 'no such file or directory'

# make sure that typoed commands come back with non-zero return codes
os::cmd::expect_failure 'oc policy TYPO'
os::cmd::expect_failure 'oc secrets TYPO'

# make sure that LDAP group sync and prune exist under both experimental and `+"`"+`oc adm`+"`"+`
os::cmd::expect_success_and_text 'oc ex sync-groups --help' 'external provider'
os::cmd::expect_success_and_text 'oc ex prune-groups --help' 'external provider'
os::cmd::expect_success_and_text 'oc adm groups sync --help' 'external provider'
os::cmd::expect_success_and_text 'oc adm groups prune --help' 'external provider'
os::cmd::expect_success_and_text 'oc adm prune groups --help' 'external provider'

os::test::junit::declare_suite_end
`)

func testExtendedTestdataCmdTestCmdHelpShBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdHelpSh, nil
}

func testExtendedTestdataCmdTestCmdHelpSh() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdHelpShBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/help.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdIdleSh = []byte(`#!/bin/bash
source "$(dirname "${BASH_SOURCE}")/../../hack/lib/init.sh"
trap os::test::junit::reconcile_output EXIT

# Cleanup cluster resources created by this test
(
  set +e
  oc delete all,templates --all
  exit 0
) &>/dev/null

project="$(oc project -q)"
idled_at_annotation='idling.alpha.openshift.io/idled-at'
unidle_target_annotation='idling.alpha.openshift.io/unidle-targets'
prev_scale_annotation='idling.alpha.openshift.io/previous-scale'
idled_at_template="{{index .metadata.annotations \"${idled_at_annotation}\"}}"
unidle_target_template="{{index .metadata.annotations \"${unidle_target_annotation}\"}}"
prev_scale_template="{{index .metadata.annotations \"${prev_scale_annotation}\"}}"
dc_name=""

setup_idling_resources() {
    os::cmd::expect_success 'oc delete all --all'

    # set up resources for the idle command
    os::cmd::expect_success 'oc create -f ${TEST_DATA}/idling-svc-route.yaml'
    dc_name=$(basename $(oc create -f ${TEST_DATA}/idling-dc.yaml -o name))  # `+"`"+`basename type/name`+"`"+` --> name
    os::cmd::expect_success "oc describe deploymentconfigs '${dc_name}'"
    os::cmd::try_until_success 'oc describe endpoints idling-echo'
    local endpoints_json
    endpoints_json="$(oc get endpoints idling-echo -o json)"
    os::cmd::expect_success 'oc delete service idling-echo'
    os::cmd::expect_success "echo '${endpoints_json}' | oc create -f -"
    os::cmd::expect_success 'oc describe endpoints idling-echo'
    # deployer pod won't work, so just scale up the rc ourselves
    os::cmd::try_until_success "oc get replicationcontroller ${dc_name}-1"
    os::cmd::expect_success "oc scale replicationcontroller ${dc_name}-1 --replicas=2"
    os::cmd::try_until_text "oc get pod -l app=idling-echo -o go-template='{{ len .items }}'" "2"
    local pod_name
    pod_name="$(oc get pod -l app=idling-echo -o go-template='{{ (index .items 0).metadata.name }}')"
    fake_endpoints_patch=$(cat <<EOF
{
    "subsets": [{
        "addresses": [{
            "ip": "1.2.3.4",
            "targetRef": {
                "kind": "Pod",
                "name": "${pod_name}",
                "namespace": "${project}"
            }
        }],
        "ports": [{"name": "foo", "port": 80}]
    }]
}
EOF
)

    os::cmd::expect_success "oc patch endpoints idling-echo -p '${fake_endpoints_patch}'"
    os::cmd::try_until_text 'oc get endpoints idling-echo -o go-template="{{ len .subsets }}"' '1'
}

os::test::junit::declare_suite_start "cmd/idle/by-name"
setup_idling_resources
os::cmd::expect_failure "oc idle dc/${dc_name}" # make sure manually passing non-endpoints resources fails
os::cmd::expect_success_and_text 'oc idle idling-echo' "The service will unidle DeploymentConfig \"${project}/${dc_name}\" to 2 replicas once it receives traffic"
os::cmd::expect_success_and_text "oc get endpoints idling-echo -o go-template='${idled_at_template}'" '.'
#os::cmd::expect_success_and_text "oc get endpoints idling-echo -o go-template='${unidle_target_template}' | jq '.[] | select(.name == \"${dc_name}\") | (.replicas == 2 and .kind == \"DeploymentConfig\")'" 'true'
os::test::junit::declare_suite_end

os::test::junit::declare_suite_start "cmd/idle/by-label"
setup_idling_resources
os::cmd::expect_success_and_text 'oc idle -l app=idling-echo' "The service will unidle DeploymentConfig \"${project}/${dc_name}\" to 2 replicas once it receives traffic"
os::cmd::expect_success_and_text "oc get endpoints idling-echo -o go-template='${idled_at_template}'" '.'
#os::cmd::expect_success_and_text "oc get endpoints idling-echo -o go-template='${unidle_target_template}' | jq '.[] | select(.name == \"${dc_name}\") | (.replicas == 2 and .kind == \"DeploymentConfig\")'" 'true'
os::test::junit::declare_suite_end

os::test::junit::declare_suite_start "cmd/idle/all"
setup_idling_resources
os::cmd::expect_success_and_text 'oc idle --all' "The service will unidle DeploymentConfig \"${project}/${dc_name}\" to 2 replicas once it receives traffic"
os::cmd::expect_success_and_text "oc get endpoints idling-echo -o go-template='${idled_at_template}'" '.'
#os::cmd::expect_success_and_text "oc get endpoints idling-echo -o go-template='${unidle_target_template}' | jq '.[] | select(.name == \"${dc_name}\") | (.replicas == 2 and .kind == \"DeploymentConfig\")'" 'true'
os::test::junit::declare_suite_end

os::test::junit::declare_suite_start "cmd/idle/check-previous-scale"
setup_idling_resources  # scales up to 2 replicas
os::cmd::expect_success_and_text 'oc idle idling-echo' "The service will unidle DeploymentConfig \"${project}/${dc_name}\" to 2 replicas once it receives traffic"
os::cmd::expect_success_and_text "oc get dc ${dc_name}  -o go-template='${prev_scale_template}'" '2'  # we see the result of the initial scale as the previous scale
os::test::junit::declare_suite_end
`)

func testExtendedTestdataCmdTestCmdIdleShBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdIdleSh, nil
}

func testExtendedTestdataCmdTestCmdIdleSh() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdIdleShBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/idle.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdImageLookupSh = []byte(`#!/bin/bash
source "$(dirname "${BASH_SOURCE}")/../../hack/lib/init.sh"
trap os::test::junit::reconcile_output EXIT

# Cleanup cluster resources created by this test
(
  set +e
  oc delete all,is,pods --all

  exit 0
) &> /dev/null

project="$( oc project -q )"

os::test::junit::declare_suite_start "cmd/image-lookup"
## This test validates image lookup resolution
#
## TODO: fix and re-enable these tests before 4.0 release
#
## Verify image resolution on default resource types
os::cmd::expect_success_and_text "oc import-image --confirm --from=nginx:latest nginx:latest" "sha256:"
os::cmd::expect_success_and_text "oc set image-lookup is/nginx" "updated"
## Image lookup works for pods
os::cmd::expect_success          "oc run --generator=run-pod/v1 --restart=Never --image=nginx:latest nginx"
os::cmd::expect_success_and_text "oc get pod/nginx -o jsonpath='{.spec.containers[0].image}'" "nginx@sha256:"
## Image lookup works for jobs
os::cmd::expect_success          "oc run --generator=job/v1 --restart=Never --image=nginx:latest nginx"
os::cmd::expect_success_and_text "oc get job/nginx -o jsonpath='{.spec.template.spec.containers[0].image}'" "nginx@sha256:"
## Image lookup works for replica sets
os::cmd::expect_success          "oc create deployment --image=nginx:latest nginx"
os::cmd::expect_success_and_text "oc get rs -o jsonpath='{..spec.template.spec.containers[0].image}'" "nginx@sha256:"
## Image lookup works for replication controllers
rc='{"kind":"ReplicationController","apiVersion":"v1","metadata":{"name":"nginx"},"spec":{"template":{"metadata":{"labels":{"app":"test"}},"spec":{"containers":[{"name":"main","image":"nginx:latest"}]}}}}'
os::cmd::expect_success          "echo '${rc}' | oc create -f -"
os::cmd::expect_success_and_text "oc get rc/nginx -o jsonpath='{.spec.template.spec.containers[0].image}'" "nginx@sha256:"
#
## Verify swapping settings on image stream
os::cmd::expect_success_and_text "oc set image-lookup is/nginx --v=1" "was not changed"
os::cmd::expect_success_and_text "oc set image-lookup nginx --v=1" "was not changed"
os::cmd::expect_success_and_text "oc set image-lookup is --list" "nginx.*true"
os::cmd::expect_success_and_text "oc set image-lookup nginx --enabled=false" "updated"
os::cmd::expect_success_and_text "oc set image-lookup is --list" "nginx.*false"
os::cmd::expect_failure_and_text "oc set image-lookup unknown --list" "the server doesn't have a resource type"
os::cmd::expect_success_and_text "oc set image-lookup secrets --list" "false"
#
## Clear resources
os::cmd::expect_success "oc delete deploy,dc,rs,rc,pods --all"
#
## Resource annotated with image lookup will create pods that resolve
os::cmd::expect_success          "oc tag nginx:latest alternate:latest"
rc='{"kind":"Deployment","apiVersion":"apps/v1","metadata":{"name":"alternate"},"spec":{"selector":{"matchLabels":{"app":"test"}},"template":{"metadata":{"labels":{"app":"test"}},"spec":{"containers":[{"name":"main","image":"alternate:latest"}]}}}}'
os::cmd::expect_success          "echo '${rc}' | oc set image-lookup --local -f - -o json | oc create -f -"
os::cmd::expect_success          "oc run --generator=run-pod/v1 --restart=Never --image=alternate:latest alternate"
os::cmd::expect_success_and_text "oc get pod/alternate -o jsonpath='{.spec.containers[0].image}'" "alternate:latest"
os::cmd::expect_success_and_text "oc get rs -o jsonpath='{..spec.template.spec.containers[0].image}'" "nginx@sha256:"

os::test::junit::declare_suite_end
`)

func testExtendedTestdataCmdTestCmdImageLookupShBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdImageLookupSh, nil
}

func testExtendedTestdataCmdTestCmdImageLookupSh() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdImageLookupShBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/image-lookup.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdImagesSh = []byte(`#!/bin/bash
source "$(dirname "${BASH_SOURCE}")/../../hack/lib/init.sh"
trap os::test::junit::reconcile_output EXIT

# Cleanup cluster resources created by this test
(
  set +e
  original_context="$( oc config current-context )"
  os::cmd::expect_success 'oc login -u system:admin'
  cluster_admin_context="$( oc config current-context )"
  os::cmd::expect_success "oc config use-context '${original_context}'"
  oc delete project test-cmd-images-2 merge-tags --context=${cluster_admin_context}
  oc delete all,templates --all --context=${cluster_admin_context}

  exit 0
) &> /dev/null

project="$( oc project -q )"

os::test::junit::declare_suite_start "cmd/images${IMAGES_TESTS_POSTFIX:-}"
# This test validates images and image streams along with the tag and import-image commands

# some steps below require that we use system:admin privileges, but we don't
# want to stomp on whatever context we were given when we started
original_context="$( oc config current-context )"
os::cmd::expect_success 'oc login -u system:admin'
cluster_admin_context="$( oc config current-context )"
os::cmd::expect_success "oc config use-context '${original_context}'"

os::test::junit::declare_suite_start "cmd/images${IMAGES_TESTS_POSTFIX:-}/images"
os::cmd::expect_success "oc get images --context='${cluster_admin_context}'"
os::cmd::expect_success "oc create -f '${TEST_DATA}/test-image.json' --context='${cluster_admin_context}'"
os::cmd::expect_success "oc delete images test --context='${cluster_admin_context}'"
echo "images: ok"
os::test::junit::declare_suite_end

os::test::junit::declare_suite_start "cmd/images${IMAGES_TESTS_POSTFIX:-}/imagestreams"
os::cmd::expect_success 'oc get imageStreams'
os::cmd::expect_success 'oc create -f ${TEST_DATA}/test-image-stream.json'
# can't check status since there is no registry running so internalRegistryHostname isn't populated.
#os::cmd::expect_success_and_text "oc get imageStreams test --template='{{.status.dockerImageRepository}}'" 'test'
os::cmd::expect_success 'oc delete imageStreams test'
os::cmd::expect_failure 'oc get imageStreams test'

os::cmd::expect_success 'oc create -f ${TEST_DATA}/image-streams/image-streams-centos7.json'
# can't check status since there is no registry running so internalRegistryHostname isn't populated.
#os::cmd::expect_success_and_text "oc get imageStreams ruby --template='{{.status.dockerImageRepository}}'" 'ruby'
#os::cmd::expect_success_and_text "oc get imageStreams nodejs --template='{{.status.dockerImageRepository}}'" 'nodejs'
#os::cmd::expect_success_and_text "oc get imageStreams wildfly --template='{{.status.dockerImageRepository}}'" 'wildfly'
#os::cmd::expect_success_and_text "oc get imageStreams mysql --template='{{.status.dockerImageRepository}}'" 'mysql'
#os::cmd::expect_success_and_text "oc get imageStreams postgresql --template='{{.status.dockerImageRepository}}'" 'postgresql'
#os::cmd::expect_success_and_text "oc get imageStreams mongodb --template='{{.status.dockerImageRepository}}'" 'mongodb'
#os::cmd::expect_success_and_text "oc get imageStreams httpd --template='{{.status.dockerImageRepository}}'" 'httpd'

# verify the image repository had its tags populated
os::cmd::try_until_success 'oc get imagestreamtags wildfly:latest'
os::cmd::expect_success_and_text "oc get imageStreams wildfly --template='{{ index .metadata.annotations \"openshift.io/image.dockerRepositoryCheck\"}}'" '[0-9]{4}\-[0-9]{2}\-[0-9]{2}' # expect a date like YYYY-MM-DD
os::cmd::expect_success_and_text 'oc get istag' 'wildfly'

# create an image stream and post a mapping to it
#os::cmd::expect_success 'oc create imagestream test'
#os::cmd::expect_success 'oc create -f test/testdata/mysql-image-stream-mapping.yaml'
#os::cmd::expect_success_and_text 'oc get istag/test:new --template="{{ index .image.dockerImageMetadata.Config.Entrypoint 0 }}"' "docker-entrypoint.sh"
#os::cmd::expect_success_and_text 'oc get istag/test:new -o jsonpath={.image.metadata.name}' 'sha256:b2f400f4a5e003b0543decf61a0a010939f3fba07bafa226f11ed7b5f1e81237'
# reference should point to the current repository, and that repository should match the reported dockerImageRepository for pushes
#repository="$( oc get is/test -o jsonpath='{.status.dockerImageRepository}' )"
#os::cmd::expect_success_and_text 'oc get istag/test:new -o jsonpath={.image.dockerImageReference}' "^$repository@sha256:b2f400f4a5e003b0543decf61a0a010939f3fba07bafa226f11ed7b5f1e81237"
#os::cmd::expect_success_and_text 'oc get istag/test:new -o jsonpath={.image.dockerImageReference}' "/$project/test@sha256:b2f400f4a5e003b0543decf61a0a010939f3fba07bafa226f11ed7b5f1e81237"

#repository="$( oc get is/test -o jsonpath='{.status.dockerImageRepository}' )"
#os::cmd::expect_success "oc annotate --context='${cluster_admin_context}' --overwrite image/sha256:b2f400f4a5e003b0543decf61a0a010939f3fba07bafa226f11ed7b5f1e81237 images.openshift.io/deny-execution=true"
# TODO: re-enable before 4.0 release
#os::cmd::expect_failure_and_text "oc run vulnerable --image=${repository}:new --restart=Never" 'spec.containers\[0\].image: Forbidden: this image is prohibited by policy'

# test image stream tag operations
os::cmd::expect_success_and_text 'oc get istag/wildfly:latest -o jsonpath={.generation}' '2'
os::cmd::expect_success_and_text 'oc get istag/wildfly:latest -o jsonpath={.tag.from.kind}' 'ImageStreamTag'
os::cmd::expect_success_and_text 'oc get istag/wildfly:latest -o jsonpath={.tag.from.name}' '15.0'
os::cmd::expect_success 'oc annotate istag/wildfly:latest foo=bar'
os::cmd::expect_success_and_text 'oc get istag/wildfly:latest -o jsonpath={.metadata.annotations.foo}' 'bar'
os::cmd::expect_success_and_text 'oc get istag/wildfly:latest -o jsonpath={.tag.annotations.foo}' 'bar'
os::cmd::expect_success 'oc annotate istag/wildfly:latest foo-'
os::cmd::expect_success_and_not_text 'oc get istag/wildfly:latest -o jsonpath={.metadata.annotations}' 'bar'
os::cmd::expect_success_and_not_text 'oc get istag/wildfly:latest -o jsonpath={.tag.annotations}' 'bar'
os::cmd::expect_success "oc patch istag/wildfly:latest -p='{\"tag\":{\"from\":{\"kind\":\"DockerImage\",\"name\":\"mysql:latest\"}}}'"
os::cmd::expect_success_and_text 'oc get istag/wildfly:latest -o jsonpath={.tag.from.kind}' 'DockerImage'
os::cmd::expect_success_and_text 'oc get istag/wildfly:latest -o jsonpath={.tag.from.name}' 'mysql:latest'
os::cmd::expect_success_and_not_text 'oc get istag/wildfly:latest -o jsonpath={.tag.generation}' '2'

# create an image stream tag
os::cmd::expect_success 'oc create imagestreamtag tag:1 --from=wildfly:15.0'
os::cmd::expect_success 'oc create imagestreamtag tag:2 --from-image=mysql:latest'
os::cmd::try_until_success 'oc get imagestreamtags tag:2'
os::cmd::expect_success 'oc create imagestreamtag tag:3 -A foo=bar'
os::cmd::expect_success 'oc create imagestreamtag tag:4 --from=:2'
os::cmd::expect_success 'oc create imagestreamtag tag:5 --from=tag:2'
os::cmd::expect_success 'oc create imagestreamtag tag:6 --reference --from-image=mysql:latest'
os::cmd::expect_success 'oc create imagestreamtag tag:7 --reference-policy=Local --from=tag:2'
os::cmd::expect_success 'oc create istag tag:8 --insecure --from-image=mysql:latest'
os::cmd::try_until_success 'oc get imagestreamtags tag:8'
os::cmd::expect_success 'oc create imagestreamtag tag:9 --scheduled --reference-policy=Local --from-image=mysql:latest'
os::cmd::expect_success 'oc create imagestream tag-b'
os::cmd::expect_success 'oc create imagestreamtag tag-b:1 --from=wildfly:15.0'
os::cmd::expect_success 'oc create imagestreamtag tag-c:1 -A annotation.with.dots=are.ok'

os::cmd::expect_failure_and_text 'oc create imagestreamtag tag-c --from-image=mysql:latest' 'must be of the form <stream_name>:<tag>'
os::cmd::expect_failure_and_text 'oc create imagestreamtag tag-c:1 -A foo' 'annotations must be of the form key=value, but is "foo"'
os::cmd::expect_failure_and_text 'oc create imagestreamtag tag-c:2 --from=mysql --from-image=mysql:latest' '\--from and --from-image may not be used together'

os::cmd::expect_success_and_text 'oc get istag/tag:1 -o jsonpath={.image.dockerImageReference}' 'wildfly.*@sha256:'
tag1=$( oc get istag/wildfly:15.0 -o jsonpath={.image.metadata.name} )
os::cmd::expect_success_and_text 'oc get istag/tag-b:1 -o jsonpath={.image.metadata.name}' "${tag1}"
os::cmd::expect_success_and_text 'oc get istag/tag:2 -o jsonpath={.image.dockerImageReference}' 'mysql@sha256:'
tag2=$( oc get istag/tag:2 -o jsonpath={.image.metadata.name} )
os::cmd::expect_success_and_text "oc get is/tag -o 'jsonpath={.spec.tags[?(@.name==\"3\")].annotations.foo}'" 'bar'
os::cmd::expect_success_and_text 'oc get istag/tag:4 -o jsonpath={.image.metadata.name}' "${tag2}"
os::cmd::expect_success_and_text "oc get is/tag -o 'jsonpath={.spec.tags[?(@.name==\"4\")].from.name}'" '^2$'
os::cmd::expect_success_and_text 'oc get istag/tag:5 -o jsonpath={.image.metadata.name}' "${tag2}"
os::cmd::expect_success_and_text "oc get is/tag -o 'jsonpath={.spec.tags[?(@.name==\"6\")].reference}'" 'true'
os::cmd::expect_success_and_text "oc get is/tag -o 'jsonpath={.spec.tags[?(@.name==\"7\")].referencePolicy}'" 'Local'
os::cmd::expect_success_and_text "oc get is/tag -o 'jsonpath={.spec.tags[?(@.name==\"8\")].importPolicy.insecure}'" 'true'
os::cmd::expect_success_and_text "oc get is/tag -o 'jsonpath={.spec.tags[?(@.name==\"9\")].importPolicy.scheduled}'" 'true'

os::cmd::expect_success 'oc delete imageStreams ruby'
os::cmd::expect_success 'oc delete imageStreams nodejs'
os::cmd::expect_success 'oc delete imageStreams wildfly'
os::cmd::expect_success 'oc delete imageStreams postgresql'
os::cmd::expect_success 'oc delete imageStreams mongodb'
os::cmd::expect_failure 'oc get imageStreams ruby'
os::cmd::expect_failure 'oc get imageStreams nodejs'
os::cmd::expect_failure 'oc get imageStreams postgresql'
os::cmd::expect_failure 'oc get imageStreams mongodb'
os::cmd::expect_failure 'oc get imageStreams wildfly'
os::cmd::try_until_success 'oc get imagestreamTags mysql:5.5'
os::cmd::try_until_success 'oc get imagestreamTags mysql:5.6'
os::cmd::try_until_success 'oc get imagestreamTags mysql:5.7'
os::cmd::expect_success_and_text "oc get imagestreams mysql --template='{{ index .metadata.annotations \"openshift.io/image.dockerRepositoryCheck\"}}'" '[0-9]{4}\-[0-9]{2}\-[0-9]{2}' # expect a date like YYYY-MM-DD
os::cmd::expect_success 'oc describe istag/mysql:latest'
os::cmd::expect_success_and_text 'oc describe istag/mysql:latest' 'Environment:'
os::cmd::expect_success_and_text 'oc describe istag/mysql:latest' 'Image Created:'
os::cmd::expect_success_and_text 'oc describe istag/mysql:latest' 'Image Name:'
os::cmd::expect_success_and_text 'oc describe istag/mysql:latest' 'Layers:'
name=$(oc get istag/mysql:latest --template='{{ .image.metadata.name }}')
imagename="isimage/mysql@${name:0:15}"
os::cmd::expect_success "oc describe ${imagename}"
os::cmd::expect_success_and_text "oc describe ${imagename}" 'Environment:'
os::cmd::expect_success_and_text "oc describe ${imagename}" 'Image Created:'
os::cmd::expect_success_and_text "oc describe ${imagename}" 'Image Name:'

# test prefer-os and prefer-arch annotations
os::cmd::expect_success 'oc create -f ${TEST_DATA}/test-multiarch-stream.yaml'
os::cmd::try_until_success 'oc get istag test-multiarch-stream:linux-amd64'
os::cmd::try_until_success 'oc get istag test-multiarch-stream:linux-s390x'
os::cmd::expect_success_and_text 'oc get istag test-multiarch-stream:linux-amd64 --template={{.image.dockerImageMetadata.Architecture}}' 'amd64'
os::cmd::expect_success_and_text 'oc get istag test-multiarch-stream:linux-s390x --template={{.image.dockerImageMetadata.Architecture}}' 's390x'
os::cmd::expect_success 'oc delete is test-multiarch-stream'
echo "imageStreams: ok"
os::test::junit::declare_suite_end

os::test::junit::declare_suite_start "cmd/images${IMAGES_TESTS_POSTFIX:-}/import-image"
# should follow the latest reference to 5.6 and update that, and leave latest unchanged
os::cmd::expect_success_and_text "oc get is/mysql --template='{{(index .spec.tags 1).from.kind}}'" 'DockerImage'
os::cmd::expect_success_and_text "oc get is/mysql --template='{{(index .spec.tags 2).from.kind}}'" 'DockerImage'
os::cmd::expect_success_and_text "oc get is/mysql --template='{{(index .spec.tags 3).from.kind}}'" 'ImageStreamTag'
os::cmd::expect_success_and_text "oc get is/mysql --template='{{(index .spec.tags 3).from.name}}'" '5.7'
# import existing tag (implicit latest)
os::cmd::expect_success_and_text 'oc import-image mysql' 'sha256:'
os::cmd::expect_success_and_text "oc get is/mysql --template='{{(index .spec.tags 1).from.kind}}'" 'DockerImage'
os::cmd::expect_success_and_text "oc get is/mysql --template='{{(index .spec.tags 2).from.kind}}'" 'DockerImage'
os::cmd::expect_success_and_text "oc get is/mysql --template='{{(index .spec.tags 3).from.kind}}'" 'ImageStreamTag'
os::cmd::expect_success_and_text "oc get is/mysql --template='{{(index .spec.tags 3).from.name}}'" '5.7'
# should prevent changing source
os::cmd::expect_failure_and_text 'oc import-image mysql --from=docker.io/mysql' "use the 'tag' command if you want to change the source"
os::cmd::expect_success 'oc describe is/mysql'
# import existing tag (explicit)
os::cmd::expect_success_and_text 'oc import-image mysql:5.6' "sha256:"
os::cmd::expect_success_and_text 'oc import-image mysql:latest' "sha256:"
# import existing image stream creating new tag
os::cmd::expect_success_and_text 'oc import-image mysql:external --from=docker.io/mysql' "sha256:"
os::cmd::expect_success_and_text "oc get istag/mysql:external --template='{{.tag.from.kind}}'" 'DockerImage'
os::cmd::expect_success_and_text "oc get istag/mysql:external --template='{{.tag.from.name}}'" 'docker.io/mysql'
# import creates new image stream with single tag
os::cmd::expect_failure_and_text 'oc import-image mysql-new-single:latest --from=docker.io/mysql:latest' '\-\-confirm'
os::cmd::expect_success_and_text 'oc import-image mysql-new-single:latest --from=docker.io/mysql:latest --confirm' 'sha256:'
os::cmd::expect_success_and_text "oc get is/mysql-new-single --template='{{(len .spec.tags)}}'" '1'
os::cmd::expect_success 'oc delete is/mysql-new-single'
# import creates new image stream with all tags
os::cmd::expect_failure_and_text 'oc import-image mysql-new-all --from=mysql --all' '\-\-confirm'
os::cmd::expect_success_and_text 'oc import-image mysql-new-all --from=mysql --all --confirm --request-timeout=1m' 'sha256:'
name=$(oc get istag/mysql-new-all:latest --template='{{ .image.metadata.name }}')
echo "import-image: ok"
os::test::junit::declare_suite_end

os::test::junit::declare_suite_start "cmd/images${IMAGES_TESTS_POSTFIX:-}/tag"
# oc tag
os::cmd::expect_success 'oc tag mysql:latest mysql:tag1 --alias'
os::cmd::expect_success_and_text "oc get is/mysql --template='{{(index .spec.tags 5).from.kind}}'" 'ImageStreamTag'

os::cmd::expect_success "oc tag mysql@${name} mysql:tag2 --alias"
os::cmd::expect_success_and_text "oc get is/mysql --template='{{(index .spec.tags 6).from.kind}}'" 'ImageStreamImage'

os::cmd::expect_success 'oc tag mysql:notfound mysql:tag3 --alias'
os::cmd::expect_success_and_text "oc get is/mysql --template='{{(index .spec.tags 7).from.kind}}'" 'ImageStreamTag'

os::cmd::expect_success 'oc tag --source=imagestreamtag mysql:latest mysql:tag4 --alias'
os::cmd::expect_success_and_text "oc get is/mysql --template='{{(index .spec.tags 8).from.kind}}'" 'ImageStreamTag'

os::cmd::expect_success 'oc tag --source=istag mysql:latest mysql:tag5 --alias'
os::cmd::expect_success_and_text "oc get is/mysql --template='{{(index .spec.tags 9).from.kind}}'" 'ImageStreamTag'

os::cmd::expect_success "oc tag --source=imagestreamimage mysql@${name} mysql:tag6 --alias"
os::cmd::expect_success_and_text "oc get is/mysql --template='{{(index .spec.tags 10).from.kind}}'" 'ImageStreamImage'

os::cmd::expect_success "oc tag --source=isimage mysql@${name} mysql:tag7 --alias"
os::cmd::expect_success_and_text "oc get is/mysql --template='{{(index .spec.tags 11).from.kind}}'" 'ImageStreamImage'

os::cmd::expect_success 'oc tag --source=docker mysql:latest mysql:tag8 --alias'
os::cmd::expect_success_and_text "oc get is/mysql --template='{{(index .spec.tags 12).from.kind}}'" 'DockerImage'

os::cmd::expect_success 'oc tag mysql:latest mysql:zzz mysql:yyy --alias'
os::cmd::expect_success_and_text "oc get is/mysql --template='{{(index .spec.tags 13).from.kind}}'" 'ImageStreamTag'
os::cmd::expect_success_and_text "oc get is/mysql --template='{{(index .spec.tags 14).from.kind}}'" 'ImageStreamTag'

os::cmd::expect_failure_and_text 'oc tag mysql:latest tagtest:tag1 --alias' 'cannot set alias across'

# label image
imgsha256=$(oc get istag/mysql:latest --template='{{ .image.metadata.name }}')
os::cmd::expect_success "oc label image ${imgsha256} foo=bar || true"
os::cmd::expect_success_and_text "oc get image ${imgsha256} --show-labels" 'foo=bar'

# tag labeled image
os::cmd::expect_success 'oc label is/mysql labelA=value'
os::cmd::expect_success 'oc tag mysql:latest mysql:labeled'
os::cmd::expect_success_and_text "oc get istag/mysql:labeled -o jsonpath='{.metadata.labels.labelA}'" 'value'
# test copying tags
os::cmd::expect_success 'oc tag registry-1.docker.io/openshift/origin:v1.0.4 newrepo:latest'
os::cmd::expect_success_and_text "oc get is/newrepo --template='{{(index .spec.tags 0).from.kind}}'" 'DockerImage'
os::cmd::try_until_success 'oc get istag/mysql:5.5'
# default behavior is to copy the current image, but since this is an external image we preserve the dockerImageReference
os::cmd::expect_success 'oc tag mysql:5.5 newrepo:latest'
os::cmd::expect_success_and_text "oc get is/newrepo --template='{{(index .spec.tags 0).from.kind}}'" 'ImageStreamImage'
os::cmd::expect_success_and_text "oc get is/newrepo --template='{{(index .status.tags 0 \"items\" 0).dockerImageReference}}'" '^docker.io/openshift/mysql-55-centos7@sha256:'
# when copying a tag that points to the internal registry, update the container image reference
#os::cmd::expect_success "oc tag test:new newrepo:direct"
#os::cmd::expect_success_and_text 'oc get istag/newrepo:direct -o jsonpath={.image.dockerImageReference}' "/$project/newrepo@sha256:"
# test references
os::cmd::expect_success 'oc tag mysql:5.5 reference:latest --reference'
os::cmd::expect_success_and_text "oc get is/reference --template='{{(index .spec.tags 0).from.kind}}'" 'ImageStreamImage'
os::cmd::expect_success_and_text "oc get is/reference --template='{{(index .spec.tags 0).reference}}'" 'true'
# create a second project to test tagging across projects
os::cmd::expect_success 'oc new-project test-cmd-images-2'
os::cmd::expect_success "oc tag $project/mysql:5.5 newrepo:latest"
os::cmd::expect_success_and_text "oc get is/newrepo --template='{{(index .spec.tags 0).from.kind}}'" 'ImageStreamImage'
os::cmd::expect_success_and_text 'oc get istag/newrepo:latest -o jsonpath={.image.dockerImageReference}' 'docker.io/openshift/mysql-55-centos7@sha256:'
# tag across projects without specifying the source's project
os::cmd::expect_success_and_text "oc tag newrepo:latest '${project}/mysql:tag1'" "mysql:tag1 set to"
os::cmd::expect_success_and_text "oc get is/newrepo --template='{{(index .spec.tags 0).name}}'" "latest"
# tagging an image with a DockerImageReference that points to the internal registry across namespaces updates the reference
#os::cmd::expect_success "oc tag $project/test:new newrepo:direct"
# reference should point to the current repository, and that repository should match the reported dockerImageRepository for pushes
# can't check status since there is no registry running so internalRegistryHostname isn't populated.
#repository="$( oc get is/newrepo -o jsonpath='{.status.dockerImageRepository}' )"
#os::cmd::expect_success_and_text 'oc get istag/newrepo:direct -o jsonpath={.image.dockerImageReference}' "^$repository@sha256:"
#os::cmd::expect_success_and_text 'oc get istag/newrepo:direct -o jsonpath={.image.dockerImageReference}' '/test-cmd-images-2/newrepo@sha256:'
# tagging an image using --reference does not
#os::cmd::expect_success "oc tag $project/test:new newrepo:indirect --reference"
#os::cmd::expect_success_and_text 'oc get istag/newrepo:indirect -o jsonpath={.image.dockerImageReference}' "/$project/test@sha256:"
os::cmd::expect_success "oc project $project"
# test scheduled and insecure tagging
os::cmd::expect_success 'oc tag --source=docker mysql:5.7 newrepo:latest --scheduled'
os::cmd::expect_success_and_text "oc get is/newrepo --template='{{(index .spec.tags 0).importPolicy.scheduled}}'" 'true'
os::cmd::expect_success_and_text "oc describe is/newrepo" 'updates automatically from registry mysql:5.7'
os::cmd::expect_success 'oc tag --source=docker mysql:5.7 newrepo:latest --insecure'
os::cmd::expect_success_and_text "oc describe is/newrepo" 'will use insecure HTTPS or HTTP connections'
os::cmd::expect_success_and_not_text "oc describe is/newrepo" 'updates automatically from'
os::cmd::expect_success_and_text "oc get is/newrepo --template='{{(index .spec.tags 0).importPolicy.insecure}}'" 'true'

# test creating streams that don't exist
os::cmd::expect_failure_and_text 'oc get imageStreams tagtest1' 'not found'
os::cmd::expect_failure_and_text 'oc get imageStreams tagtest2' 'not found'
os::cmd::expect_success 'oc tag mysql:latest tagtest1:latest tagtest2:latest'
os::cmd::expect_success_and_text "oc get is/tagtest1 --template='{{(index .spec.tags 0).from.kind}}'" 'ImageStreamImage'
os::cmd::expect_success_and_text "oc get is/tagtest2 --template='{{(index .spec.tags 0).from.kind}}'" 'ImageStreamImage'
os::cmd::expect_success 'oc delete is/tagtest1 is/tagtest2'
os::cmd::expect_success_and_text 'oc tag mysql:latest tagtest:new1' 'Tag tagtest:new1 set to mysql@sha256:'

# test deleting a spec tag using oc tag
os::cmd::expect_success 'oc create -f ${TEST_DATA}/test-stream.yaml'
os::cmd::expect_success_and_text 'oc tag test-stream:latest -d' 'Deleted'
os::cmd::expect_success 'oc delete is/test-stream'
echo "tag: ok"
os::test::junit::declare_suite_end

os::test::junit::declare_suite_start "cmd/images${IMAGES_TESTS_POSTFIX:-}/delete-istag"
# test deleting a tag using oc delete
os::cmd::expect_success_and_text "oc get is perl --template '{{(index .spec.tags 0).name}}'" '5.16'
os::cmd::expect_success_and_text "oc get is perl --template '{{(index .status.tags 0).tag}}'" '5.16'
os::cmd::expect_success_and_text "oc describe is perl | sed -n -e '0,/^Tags:/d' -e '/^\s\+/d' -e '/./p' | head -n 1" 'latest'
os::cmd::expect_success "oc delete istag/perl:5.16 --context='${cluster_admin_context}'"
os::cmd::expect_success_and_not_text 'oc get is/perl --template={{.spec.tags}}' 'version:5.16'
os::cmd::expect_success_and_not_text 'oc get is/perl --template={{.status.tags}}' 'version:5.16'
os::cmd::expect_success 'oc delete all --all'

echo "delete istag: ok"
os::test::junit::declare_suite_end

os::test::junit::declare_suite_start "cmd/images${IMAGES_TESTS_POSTFIX:-}/merge-tags-on-apply"
os::cmd::expect_success 'oc new-project merge-tags'
os::cmd::expect_success 'oc create -f ${TEST_DATA}/image-streams/image-streams-centos7.json'
os::cmd::expect_success_and_text 'oc get is ruby -o jsonpath={.spec.tags[*].name}' '2.0 2.2 2.3 2.4 2.5 latest'
os::cmd::expect_success 'oc apply -f ${TEST_DATA}/modified-ruby-imagestream.json'
os::cmd::expect_success_and_text 'oc get is ruby -o jsonpath={.spec.tags[*].name}' '2.0 2.2 2.3 2.4 2.5 latest newtag'
os::cmd::expect_success_and_text 'oc get is ruby -o jsonpath={.spec.tags[3].annotations.version}' '2.4 patched'
os::cmd::expect_success 'oc delete project merge-tags'
echo "apply new imagestream tags: ok"
os::test::junit::declare_suite_end

# test importing images with wrong docker secrets
os::test::junit::declare_suite_start "cmd/images${IMAGES_TESTS_POSTFIX:-}/import-public-images-with-fake-secret"
os::cmd::expect_success 'oc new-project import-images'
os::cmd::expect_success 'oc create secret docker-registry dummy-secret1 --docker-server=docker.io --docker-username=dummy1 --docker-password=dummy1 --docker-email==dummy1@example.com'
os::cmd::expect_success 'oc create secret docker-registry dummy-secret2 --docker-server=docker.io --docker-username=dummy2 --docker-password=dummy2 --docker-email==dummy2@example.com'
os::cmd::expect_success_and_text 'oc import-image example --from=openshift/hello-openshift --confirm' 'imagestream.image.openshift.io/example imported'
os::cmd::expect_success 'oc delete project import-images'
echo "import public images with fake secret ok"
os::test::junit::declare_suite_end

os::test::junit::declare_suite_end
`)

func testExtendedTestdataCmdTestCmdImagesShBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdImagesSh, nil
}

func testExtendedTestdataCmdTestCmdImagesSh() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdImagesShBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/images.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdLoginSh = []byte(`#!/bin/bash

set -o errexit
set -o nounset
set -o pipefail

OS_ROOT=$(dirname "${BASH_SOURCE}")/../..
source "${OS_ROOT}/hack/lib/init.sh"
os::log::stacktrace::install
trap os::test::junit::reconcile_output EXIT

# Cleanup cluster resources created by this test
(
  set +e
  oc delete project project-foo
  exit 0
) &>/dev/null

os::test::junit::declare_suite_start "cmd/login"
# This test validates login functionality for the client
# we want this test to run without $KUBECONFIG or $KUBERNETES_MASTER as it tests that functionality
# `+"`"+`oc`+"`"+` will use in-cluster config if KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT
# are set, as well as /var/run/secrets/kubernetes.io/serviceaccount/token exists. we
# therefore can be sure that we are picking up no client configuration if we unset these variables
login_kubeconfig="${ARTIFACT_DIR}/login.kubeconfig"
CA_CERT=${MASTER_CONFIG_DIR}/server-ca.crt
cp "${KUBECONFIG}" "${login_kubeconfig}"
unset KUBECONFIG
unset KUBERNETES_MASTER
# test client not configured
os::cmd::expect_failure_and_text "env -u KUBERNETES_SERVICE_HOST oc get services" 'Missing or incomplete configuration info.  Please login'
unused_port="33333"
# setting env bypasses the not configured message
os::cmd::expect_failure_and_text "env -u KUBERNETES_SERVICE_HOST KUBERNETES_MASTER=http://${API_HOST}:${unused_port} oc get services" 'did you specify the right host or port'
# setting --server bypasses the not configured message
os::cmd::expect_failure_and_text "env -u KUBERNETES_SERVICE_HOST oc get services --server=http://${API_HOST}:${unused_port}" 'did you specify the right host or port'

# Set KUBERNETES_MASTER for oc from now on
export KUBERNETES_MASTER="${API_SCHEME}://${API_HOST}:${API_PORT}"

# Set certificates for oc from now on
if [[ "${API_SCHEME}" == "https" ]]; then
    # test bad certificate
    os::cmd::expect_failure_and_text "env -u KUBERNETES_SERVICE_HOST oc get services" 'certificate signed by unknown authority'
fi

# remove self-provisioner role from user and test login prompt before creating any projects
os::cmd::expect_success "oc adm policy remove-cluster-role-from-group self-provisioner system:authenticated:oauth --kubeconfig='${login_kubeconfig}'"
os::cmd::expect_success_and_text "oc login --server=${KUBERNETES_MASTER} --certificate-authority='${CA_CERT}' -u no-project-test-user -p anything" "You don't have any projects. Contact your system administrator to request a project"
# make sure standard login prompt is printed once self-provisioner status is restored
os::cmd::expect_success "oc adm policy add-cluster-role-to-group self-provisioner system:authenticated:oauth --kubeconfig='${login_kubeconfig}'"
os::cmd::try_until_text "oc login --server=${KUBERNETES_MASTER} --certificate-authority='${CA_CERT}' -u no-project-test-user -p anything" "You don't have any projects. You can try to create a new project, by running" $(( 30 * second )) 0.25
# make sure `+"`"+`oc login`+"`"+` fails with unauthorized error
os::cmd::expect_failure_and_text 'oc login <<< \n' 'Login failed \(401 Unauthorized\)'
os::cmd::expect_success 'oc logout'
echo "login and status messages: ok"

# login and logout tests
# bad token should error
os::cmd::expect_failure_and_text "oc login ${KUBERNETES_MASTER} --certificate-authority='${CA_CERT}' --token=badvalue" 'The token provided is invalid or expired'
# --token and --username are mutually exclusive
os::cmd::expect_failure_and_text "oc login ${KUBERNETES_MASTER} -u test-user --token=tmp --insecure-skip-tls-verify" 'mutually exclusive'
# must only accept one arg (server)
os::cmd::expect_failure_and_text "oc login https://server1 https://server2.com" 'Only the server URL may be specified'
# logs in with a valid certificate authority
os::cmd::expect_success "oc login ${KUBERNETES_MASTER} --certificate-authority='${CA_CERT}' -u test-user -p anything"
os::cmd::expect_success_and_text "cat ${HOME}/.kube/config" "v1"
os::cmd::expect_success 'oc logout'
# logs in skipping certificate check
os::cmd::expect_success "oc login ${KUBERNETES_MASTER} --insecure-skip-tls-verify -u test-user -p anything"
# logs in by an existing and valid token
temp_token="$(oc whoami -t)"
os::cmd::expect_success_and_text "oc login --token=${temp_token}" 'using the token provided'
os::cmd::expect_success 'oc logout'
# properly parse server port
os::cmd::expect_failure_and_text 'oc login https://server1:844333' 'Not a valid port'
# properly handle trailing slash
os::cmd::expect_success "oc login --server=${KUBERNETES_MASTER} --certificate-authority='${CA_CERT}' -u test-user -p anything"
# create a new project
os::cmd::expect_success "oc new-project project-foo --display-name='my project' --description='boring project description'"
os::cmd::expect_success_and_text "oc project" 'Using project "project-foo"'
# new user should get default context
os::cmd::expect_success "oc login --server=${KUBERNETES_MASTER} --certificate-authority='${CA_CERT}' -u new-and-unknown-user -p anything"
os::cmd::expect_success_and_text 'oc config view' "current-context.+/${API_HOST}:${API_PORT}/new-and-unknown-user"
# denies access after logging out
os::cmd::expect_success 'oc logout'
os::cmd::expect_failure_and_text 'oc get pods' '"system:anonymous" cannot list resource "pods" in API group ""'

# make sure we report an error if the config file we pass is not writable
# Does not work inside of a container, determine why and reenable
# os::cmd::expect_failure_and_text "oc login '${KUBERNETES_MASTER}' -u test -p test '--kubeconfig=${templocation}/file' --insecure-skip-tls-verify" 'KUBECONFIG is set to a file that cannot be created or modified'
echo "login warnings: ok"

# login and create serviceaccount and test login and logout with a service account token
os::cmd::expect_success "oc login ${KUBERNETES_MASTER} --certificate-authority='${CA_CERT}' -u test-user -p anything"
os::cmd::expect_success_and_text "oc create sa testserviceaccount" "serviceaccount/testserviceaccount created"
os::cmd::try_until_success "oc sa get-token testserviceaccount"
os::cmd::expect_success_and_text "oc login --token=$(oc sa get-token testserviceaccount)" "system:serviceaccount:project-foo:testserviceaccount"
# attempt to logout successfully
os::cmd::expect_success_and_text "oc logout" "Logged \"system:serviceaccount:project-foo:testserviceaccount\" out"
# verify that the token is no longer present in our local config
os::cmd::expect_failure_and_text "oc whoami" 'User "system:anonymous" cannot get resource "users" in API group "user.openshift.io"'

# log in and set project to use from now on
os::cmd::expect_success "oc login --server=${KUBERNETES_MASTER} --certificate-authority='${CA_CERT}' -u test-user -p anything"
os::cmd::expect_success 'oc get projects'
os::cmd::expect_success 'oc project project-foo'
os::cmd::expect_success_and_text 'oc config view' "current-context.+project-foo/${API_HOST}:${API_PORT}/test-user"
os::cmd::expect_success_and_text 'oc whoami' 'test-user'
os::cmd::expect_success_and_text "oc whoami --config='${login_kubeconfig}'" 'system:admin'
os::cmd::expect_success_and_text "oc whoami --kubeconfig='${login_kubeconfig}'" 'system:admin'
os::cmd::expect_success_and_text 'oc whoami -t' '.'
os::cmd::expect_success_and_text 'oc whoami -c' '.'

# test config files from the --kubeconfig flag
os::cmd::expect_success "oc get services --kubeconfig='${login_kubeconfig}'"
# test config files from env vars
os::cmd::expect_success "KUBECONFIG='${login_kubeconfig}' oc get services"
os::test::junit::declare_suite_end
`)

func testExtendedTestdataCmdTestCmdLoginShBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdLoginSh, nil
}

func testExtendedTestdataCmdTestCmdLoginSh() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdLoginShBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/login.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdMigrateSh = []byte(`#!/bin/bash
source "$(dirname "${BASH_SOURCE}")/../../hack/lib/init.sh"
trap os::test::junit::reconcile_output EXIT

# Cleanup cluster resources created by this test
(
  set +e
  oc delete all --all
  exit 0
) &>/dev/null

os::test::junit::declare_suite_start "cmd/migrate"
# This test validates storage migration

os::cmd::expect_success 'oc login -u system:admin'
# ensure all namespaces have been deleted before attempting to perform global action
os::cmd::try_until_not_text 'oc get ns --template "{{ range .items }}{{ if not (eq .status.phase \"Active\") }}1{{ end }}{{ end }}"' '1'

project="$( oc project -q )"

os::test::junit::declare_suite_start "cmd/migrate/storage"
os::cmd::expect_success_and_text     'oc adm migrate storage' 'summary'
os::cmd::expect_success_and_text     'oc adm migrate storage --loglevel=2' ": -n ${project} serviceaccounts/deployer"
os::cmd::expect_success_and_not_text 'oc adm migrate storage --loglevel=2 --include=pods' ": -n ${project} serviceaccounts/deployer"
os::cmd::expect_success_and_text     'oc adm migrate storage --loglevel=2 --include=sa --from-key=default/ --to-key=default/\xFF' ": -n default serviceaccounts/deployer"
os::cmd::expect_success_and_not_text 'oc adm migrate storage --loglevel=2 --include=sa --from-key=default/ --to-key=default/deployer' ": -n default serviceaccounts/deployer"
os::cmd::expect_success_and_text     'oc adm migrate storage --loglevel=2' 'unchanged:'
os::cmd::expect_success_and_text     'oc adm migrate storage --bandwidth=20' 'summary:'
os::cmd::expect_success_and_text     'oc adm migrate storage --confirm' 'storage migration does not support dry run, this flag is ignored'
os::cmd::expect_success_and_text     'oc adm migrate storage -o=yaml' 'storage migration does not support dry run, this flag is ignored'
os::test::junit::declare_suite_end

os::test::junit::declare_suite_start "cmd/migrate/storage_oauthclientauthorizations"
# Create valid OAuth client
os::cmd::expect_success_and_text     'oc create -f test/testdata/oauth/client.yaml' 'oauthclient.oauth.openshift.io/test-oauth-client created'
# Create OAuth client authorization for client
os::cmd::expect_success_and_text     'oc create -f test/testdata/oauth/clientauthorization.yaml' 'oauthclientauthorization.oauth.openshift.io/user1:test-oauth-client created'
# Delete client
os::cmd::expect_success_and_text     'oc delete oauthclient test-oauth-client' 'oauthclient.oauth.openshift.io "test-oauth-client" deleted'
# Assert that migration/update still works even though the client authorization is no longer valid
os::cmd::expect_success_and_text 'oc adm migrate storage --loglevel=6 --include=oauthclientauthorizations' 'PUT.*oauthclientauthorizations/user1:test-oauth-client'
os::test::junit::declare_suite_end

os::test::junit::declare_suite_start "cmd/migrate/imagereferences"
# create alternating items in history
os::cmd::expect_success 'oc import-image --from=mysql:latest test:1 --confirm'
os::cmd::expect_success 'oc import-image --from=php:latest test:2 --confirm'
os::cmd::expect_success 'oc tag --source=docker php:latest test:1'
os::cmd::expect_success 'oc tag --source=docker mysql:latest test:1'
os::cmd::expect_success 'oc tag --source=docker mysql:latest test:2'
os::cmd::expect_success 'oc tag --source=docker php:latest test:2'
os::cmd::expect_success 'oc tag --source=docker myregistry.com/php:latest test:3'
# verify error cases
os::cmd::expect_failure_and_text     'oc adm migrate image-references' 'at least one mapping argument must be specified: REGISTRY/NAME=REGISTRY/NAME'
os::cmd::expect_failure_and_text     'oc adm migrate image-references my.docker.io=docker.io/* --loglevel=1' 'all arguments'
os::cmd::expect_failure_and_text     'oc adm migrate image-references my.docker.io/=docker.io/* --loglevel=1' 'not a valid source'
os::cmd::expect_failure_and_text     'oc adm migrate image-references /*=docker.io/* --loglevel=1' 'not a valid source'
os::cmd::expect_failure_and_text     'oc adm migrate image-references my.docker.io/*=docker.io --loglevel=1' 'all arguments'
os::cmd::expect_failure_and_text     'oc adm migrate image-references my.docker.io/*=docker.io/ --loglevel=1' 'not a valid target'
os::cmd::expect_failure_and_text     'oc adm migrate image-references my.docker.io/*=/x --loglevel=1' 'not a valid target'
os::cmd::expect_failure_and_text     'oc adm migrate image-references my.docker.io/*=*/* --loglevel=1' 'at least one change'
os::cmd::expect_failure_and_text     'oc adm migrate image-references a/b=a/b --loglevel=1' 'at least one field'
os::cmd::expect_failure_and_text     'oc adm migrate image-references */*=*/* --loglevel=1' 'at least one change'
# verify dry run
os::cmd::expect_success_and_text     'oc adm migrate image-references my.docker.io/*=docker.io/* --loglevel=1' 'migrated=0'
os::cmd::expect_success_and_text     'oc adm migrate image-references --include=imagestreams docker.io/*=my.docker.io/* --loglevel=1' "migrated \(dry run\): -n ${project} imagestreams.image.openshift.io/test"
os::cmd::expect_success_and_text     'oc adm migrate image-references --include=imagestreams docker.io/mysql=my.docker.io/* --all-namespaces=false --loglevel=1' 'migrated=1'
os::cmd::expect_success_and_text     'oc adm migrate image-references --include=imagestreams docker.io/mysql=my.docker.io/* --all-namespaces=false --loglevel=1 -o yaml' 'dockerImageReference: my.docker.io/mysql@sha256:'
os::cmd::expect_success_and_text     'oc adm migrate image-references --include=imagestreams docker.io/other=my.docker.io/* --all-namespaces=false --loglevel=1' 'migrated=0'
# only mysql references are changed
os::cmd::expect_success_and_text     'oc adm migrate image-references --include=imagestreams docker.io/mysql=my.docker.io/mysql2 --all-namespaces=false --loglevel=1 --confirm' 'migrated=1'
os::cmd::expect_success_and_text     'oc get istag test:1 --template "{{ .image.dockerImageReference }}"' '^my.docker.io/mysql2@sha256:'
os::cmd::expect_success_and_text     'oc get istag test:2 --template "{{ .image.dockerImageReference }}"' '^php@sha256:'
# all items in history are changed
os::cmd::expect_success_and_text     'oc adm migrate image-references --include=imagestreams docker.io/*=my.docker.io/* --all-namespaces=false --loglevel=1 --confirm' 'migrated=1'
os::cmd::expect_success_and_not_text 'oc get is test --template "{{ range .status.tags }}{{ range .items }}{{ .dockerImageReference }}{{ \"\n\" }}{{ end }}{{ end }}"' '^php'
os::cmd::expect_success_and_not_text 'oc get is test --template "{{ range .status.tags }}{{ range .items }}{{ .dockerImageReference }}{{ \"\n\" }}{{ end }}{{ end }}"' '^mysql'
os::test::junit::declare_suite_end

os::test::junit::declare_suite_start "cmd/migrate/legacyhpa"
# create a legacy and a normal HPA
os::cmd::expect_success 'oc create -f test/testdata/hpa/legacy-and-normal-hpa.yaml'
# verify dry run
os::cmd::expect_success_and_text 'oc adm migrate legacy-hpa' 'migrated=1'
# confirm...
os::cmd::expect_success_and_text 'oc adm migrate legacy-hpa --confirm' 'migrated=1'
# verify that all HPAs are as they should be
os::cmd::expect_success_and_text 'oc get hpa legacy-hpa -o jsonpath="{.spec.scaleTargetRef.apiVersion}.{.spec.scaleTargetRef.kind} {.spec.scaleTargetRef.name}"' 'apps.openshift.io/v1.DeploymentConfig legacy-target'
os::cmd::expect_success_and_text 'oc get hpa other-hpa -o jsonpath="{.spec.scaleTargetRef.apiVersion}.{.spec.scaleTargetRef.kind} {.spec.scaleTargetRef.name}"' 'apps/v1.Deployment other-target'
os::test::junit::declare_suite_end

os::test::junit::declare_suite_end
`)

func testExtendedTestdataCmdTestCmdMigrateShBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdMigrateSh, nil
}

func testExtendedTestdataCmdTestCmdMigrateSh() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdMigrateShBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/migrate.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdNewappSh = []byte(`#!/bin/bash
source "$(dirname "${BASH_SOURCE}")/../../hack/lib/init.sh"
trap os::test::junit::reconcile_output EXIT

# Cleanup cluster resources created by this test
(
  set +e
  oc login -u system:admin
  oc delete all,templates --all
  oc delete all,templates --all -n openshift
  oc delete project template-substitute
  oc delete project prefix-template-substitute
  oc delete project test-imagestreams
  oc delete project new-app-syntax
  rm -rf ./test/testdata/testapp
  exit 0
) &>/dev/null

os::util::environment::setup_time_vars

os::test::junit::declare_suite_start "cmd/newapp"

default_project=$(oc project -q)
#os::cmd::expect_success 'git clone https://github.com/openshift/ruby-hello-world.git ./test/testdata/testapp'

# imagestream/tag creation and reuse
os::cmd::expect_success 'oc create -f ${TEST_DATA}/image-streams/image-streams-centos7.json -n openshift'
os::cmd::expect_success 'oc delete istag php:latest -n openshift'
os::cmd::expect_success 'oc new-project test-imagestreams'
os::cmd::try_until_failure 'oc get istag php:latest -n openshift'

# should fail due to missing php:latest tag
os::cmd::expect_failure 'oc new-app --image-stream=openshift/php https://github.com/sclorg/cakephp-ex'

# should succeed and create the php:latest tag in the current namespace
os::cmd::expect_success 'oc new-app --docker-image=library/php https://github.com/sclorg/cakephp-ex --strategy=source'
os::cmd::try_until_success 'oc get istag php:latest -n test-imagestreams'
os::cmd::expect_success 'oc create istag php:latest --from=openshift/php:7.1 -n openshift'

# create a new tag for an existing imagestream in the current namespace
os::cmd::expect_success 'oc create istag perl:5.20 --from=openshift/perl:5.20'
os::cmd::expect_success 'oc new-app --docker-image=library/perl https://github.com/sclorg/dancer-ex --strategy=source'
os::cmd::try_until_success 'oc get istag perl:latest -n test-imagestreams'

# remove redundant imagestream tag before creating objects
os::cmd::expect_success_and_text 'oc new-app  openshift/ruby-25-centos7 https://github.com/openshift/ruby-hello-world  --strategy=docker --loglevel=5' 'Removing duplicate tag from object list'

# create imagestream in the correct namespace
os::cmd::expect_success 'oc new-app --name=mytest --image-stream=mysql --env=MYSQL_USER=test --env=MYSQL_PASSWORD=redhat --env=MYSQL_DATABASE=testdb -l app=mytest'
os::cmd::try_until_success 'oc get is mytest -n test-imagestreams'

# don't create an unnecessary imagestream
os::cmd::expect_success 'oc new-app https://github.com/sclorg/nodejs-ex'
os::cmd::expect_failure_and_text 'oc get is nodejs -n test-imagestreams' 'not found'

# check reuse imagestreams
os::cmd::expect_success "oc new-build -D $'FROM node:8\nRUN echo \"Test\"' --name=node8"
os::cmd::try_until_success 'oc get istag node:8'
os::cmd::expect_success "oc new-build -D $'FROM node:10\nRUN echo \"Test\"' --name=node10"
os::cmd::try_until_success 'oc get istag node:10'

# cleanup and reset to default namespace
os::cmd::expect_success 'oc delete is --all -n openshift'
os::cmd::expect_success 'oc delete project test-imagestreams'

# This test validates the new-app command
os::cmd::expect_success 'oc project ${default_project}'
os::cmd::expect_success_and_text 'oc new-app library/php mysql -o yaml' '3306'
os::cmd::expect_success_and_text 'oc new-app library/php mysql --dry-run' "Image \"library/php\" runs as the 'root' user which may not be permitted by your cluster administrator"
os::cmd::expect_failure 'oc new-app unknownhubimage -o yaml'
os::cmd::expect_failure_and_text 'oc new-app docker.io/node~https://github.com/sclorg/nodejs-ex' 'the image match \"docker.io/node\" for source repository \"https://github.com/sclorg/nodejs-ex\" does not appear to be a source-to-image builder.'
os::cmd::expect_failure_and_text 'oc new-app https://github.com/sclorg/rails-ex' 'the image match \"ruby\" for source repository \"https://github.com/sclorg/rails-ex\" does not appear to be a source-to-image builder.'
os::cmd::expect_success 'oc new-app https://github.com/sclorg/rails-ex --strategy=source --dry-run'
# verify we can generate a container image based component "mongodb" directly
os::cmd::expect_success_and_text 'oc new-app mongo -o yaml' 'image:\s*mongo'
# the local image repository takes precedence over the Docker Hub "mysql" image
os::cmd::expect_success 'oc create -f examples/image-streams/image-streams-centos7.json'
os::cmd::try_until_success 'oc get imagestreamtags mysql:latest' $((2*TIME_MIN))
os::cmd::try_until_success 'oc get imagestreamtags mysql:5.5'    $((2*TIME_MIN))
os::cmd::try_until_success 'oc get imagestreamtags mysql:5.6'    $((2*TIME_MIN))
os::cmd::try_until_success 'oc get imagestreamtags mysql:5.7'    $((2*TIME_MIN))
os::cmd::expect_success_and_not_text 'oc new-app mysql -o yaml' 'image:\s*mysql'
os::cmd::expect_success_and_not_text 'oc new-app mysql --dry-run' "runs as the 'root' user which may not be permitted by your cluster administrator"
# trigger and output should say 5.6
os::cmd::expect_success_and_text 'oc new-app mysql -o yaml' 'mysql:5.7'
os::cmd::expect_success_and_text 'oc new-app mysql --dry-run' 'tag "5.7" for "mysql"'
# test deployments are created with the boolean flag and printed in the UI
os::cmd::expect_success_and_text 'oc new-app mysql --dry-run --as-test' 'This image will be test deployed'
os::cmd::expect_success_and_text 'oc new-app mysql -o yaml --as-test' 'test: true'
os::cmd::expect_success_and_text 'oc new-app ${TEST_DATA}/new-app/template-minimal-expose.json --as-test' 'Access your application via route'
os::cmd::expect_success 'oc delete all -l app=expose-output'
os::cmd::expect_success_and_text 'oc new-app mysql --as-test' 'Application is not exposed'
os::cmd::expect_success 'oc delete all -l app=mysql'

# ensure that oc new-app does not emit a BuildConfigInstantiateFailed event when creating a new application
os::cmd::expect_success 'oc new-app https://github.com/sclorg/ruby-ex'
os::cmd::expect_success_and_not_text 'oc describe bc/ruby-ex' 'BuildConfigInstantiateFailed'
os::cmd::expect_success 'oc delete all -l app=ruby-ex'

# Ensure that an invalid build strategy in a template does not throw a segmentation fault
os::cmd::expect_success_and_not_text 'oc new-app --file ${TEST_DATA}/new-app/invalid-build-strategy.yaml --dry-run' 'invalid memory address or nil pointer dereference'

# test that imagestream references across imagestreams do not cause an error
os::cmd::try_until_success 'oc get imagestreamtags ruby:2.3'
os::cmd::expect_success 'oc create -f ${TEST_DATA}/new-app/imagestream-ref.yaml'
os::cmd::try_until_success 'oc get imagestreamtags myruby:latest'
os::cmd::expect_success 'oc new-app myruby~https://github.com/openshift/ruby-hello-world.git --dry-run'
os::cmd::expect_success 'oc delete is myruby'

# Ensure clear error message wrt templates container CRDs and new-app appears
os::cmd::expect_failure_and_text 'oc new-app -f ${TEST_DATA}/new-app/template-with-crd.yaml' 'error: The template contained an object type unknown to '

# docker strategy with repo that has no dockerfile
os::cmd::expect_failure_and_text 'oc new-app https://github.com/sclorg/nodejs-ex --strategy=docker' 'No Dockerfile was found'

# repo related error message validation
os::cmd::expect_success 'oc create -f examples/db-templates/mysql-persistent-template.json'
os::cmd::expect_failure_and_text 'oc new-app mysql-persisten mysql' 'only a partial match was found for'
os::cmd::expect_success 'oc delete template/mysql-persistent'
os::cmd::expect_failure_and_text 'oc new-app --strategy=docker https://192.30.253.113/openshift/ruby-hello-world.git' 'none of the arguments provided could be classified as a source code location'
os::cmd::expect_failure_and_text 'oc new-app https://www.google.com/openshift/nodejs-e' 'unable to load template file'
os::cmd::expect_failure_and_text 'oc new-app https://www.google.com/openshift/nodejs-e' 'unable to locate any'
os::cmd::expect_failure_and_text 'oc new-app https://www.google.com/openshift/nodejs-e' 'was classified as an image, image~source, or loaded template reference.'
os::cmd::expect_failure_and_text 'oc new-app https://examplegit.com/openshift/nodejs-e' 'unable to load template file'
os::cmd::expect_failure_and_text 'oc new-app https://examplegit.com/openshift/nodejs-e' 'unable to locate any'
os::cmd::expect_failure_and_text 'oc new-app https://examplegit.com/openshift/nodejs-e' 'was classified as an image, image~source, or loaded template reference.'
os::cmd::expect_failure_and_text 'oc new-build --strategy=docker https://192.30.253.113/openshift/ruby-hello-world.git' 'none of the arguments provided could be classified as a source code location'
os::cmd::expect_failure_and_text 'oc new-build https://www.google.com/openshift/nodejs-e' 'unable to load template file'
os::cmd::expect_failure_and_text 'oc new-build https://www.google.com/openshift/nodejs-e' 'unable to locate any'
os::cmd::expect_failure_and_text 'oc new-build https://www.google.com/openshift/nodejs-e' 'was classified as an image, image~source, or loaded template reference.'
os::cmd::expect_failure_and_text 'oc new-build https://examplegit.com/openshift/nodejs-e' 'unable to load template file'
os::cmd::expect_failure_and_text 'oc new-build https://examplegit.com/openshift/nodejs-e' 'unable to locate any'
os::cmd::expect_failure_and_text 'oc new-build https://examplegit.com/openshift/nodejs-e' 'was classified as an image, image~source, or loaded template reference.'
os::cmd::expect_failure_and_text 'oc new-build --name imagesourcetest python~https://github.com/openshift-katacoda/blog-django-py --source-image xxx --source-image-path=yyy --dry-run' 'unable to locate any '
os::cmd::expect_failure_and_text 'oc new-app ~java' 'you must specify a image name'

# setting source secret via the --source-secret flag
os::cmd::expect_success_and_text 'oc new-app https://github.com/sclorg/cakephp-ex --source-secret=mysecret -o yaml' 'name: mysecret'
os::cmd::expect_success_and_text 'oc new-build https://github.com/sclorg/cakephp-ex --source-secret=mynewsecret -o yaml' 'name: mynewsecret'
os::cmd::expect_failure_and_text 'oc new-app https://github.com/sclorg/cakephp-ex --source-secret=InvalidSecretName -o yaml' 'error: source secret name "InvalidSecretName" is invalid'
os::cmd::expect_success_and_text 'oc new-app -f examples/quickstarts/cakephp-mysql.json --source-secret=mysecret -o yaml' 'name: mysecret'
os::cmd::expect_success 'oc new-app https://github.com/sclorg/cakephp-ex --source-secret=mysecret'
os::cmd::expect_success 'oc delete all --selector="label=cakephp-ex"'
# setting push secret via the --push-secret flag
os::cmd::expect_success_and_text 'oc new-build https://github.com/sclorg/cakephp-ex --push-secret=mynewsecret -o yaml' 'name: mynewsecret'
os::cmd::expect_failure_and_text 'oc new-build https://github.com/sclorg/cakephp-ex --push-secret=InvalidSecretName -o yaml' 'error: push secret name "InvalidSecretName" is invalid'


# check label creation
os::cmd::try_until_success 'oc get imagestreamtags php:latest'
os::cmd::try_until_success 'oc get imagestreamtags php:5.5'
os::cmd::try_until_success 'oc get imagestreamtags php:5.6'
os::cmd::expect_success 'oc new-app php mysql -l no-source=php-mysql'
os::cmd::expect_success 'oc delete all -l no-source=php-mysql'
os::cmd::expect_success 'oc new-app php mysql'
os::cmd::expect_success 'oc delete all -l app=php'
os::cmd::expect_failure 'oc get dc/mysql'
os::cmd::expect_failure 'oc get dc/php'
os::cmd::expect_success_and_text 'oc new-app -f ${TEST_DATA}/new-app/template-without-app-label.json -o yaml' 'app: ruby-helloworld-sample'

# check object namespace handling
# hardcoded values should be stripped
os::cmd::expect_success_and_not_text 'oc new-app -f ${TEST_DATA}/new-app/template-with-namespaces.json -o jsonpath="{.items[?(@.metadata.name==\"stripped\")].metadata.namespace}"' 'STRIPPED'
# normal parameterized values should be substituted and retained
os::cmd::expect_success_and_text 'oc new-app -f ${TEST_DATA}/new-app/template-with-namespaces.json -o jsonpath="{.items[?(@.metadata.name==\"route-edge-substituted\")].metadata.namespace}"' 'substituted'
os::cmd::expect_success_and_text 'oc new-app -f ${TEST_DATA}/new-app/template-with-namespaces.json -o jsonpath="{.items[?(@.metadata.name==\"route-edge-prefix-substituted\")].metadata.namespace}"' 'prefix-substituted'
# non-string parameterized values should be stripped
os::cmd::expect_failure_and_text 'oc new-app -f ${TEST_DATA}/new-app/template-with-namespaces.json -o jsonpath="{.items[?(@.metadata.name==\"route-edge-refstripped\")].metadata.namespace}"' 'namespace is not found'
os::cmd::expect_failure_and_text 'oc new-app -f ${TEST_DATA}/new-app/template-with-namespaces.json -o jsonpath="{.items[?(@.metadata.name==\"route-edge-prefix-refstripped\")].metadata.namespace}"' 'namespace is not found'
# ensure --build-env environment variables get added to the buildconfig
os::cmd::expect_success_and_text 'oc new-app -f ${TEST_DATA}/new-app/template-with-app-label.json --build-env FOO=bar -o yaml' 'FOO'
# ensure the objects can actually get created with a namespace specified
os::cmd::expect_success 'oc new-project template-substitute'
os::cmd::expect_success 'oc new-project prefix-template-substitute'
os::cmd::expect_success 'oc project ${default_project}'
os::cmd::expect_success 'oc new-app -f ${TEST_DATA}/new-app/template-with-namespaces.json -p SUBSTITUTED=template-substitute'
os::cmd::expect_success 'oc delete all -l app=ruby-helloworld-sample'

# ensure non-duplicate invalid label errors show up
os::cmd::expect_failure_and_text 'oc new-app docker.io/library/wordpress -l qwer1345%$$#=self' 'error: ImageStream.image.openshift.io "wordpress" is invalid'
os::cmd::expect_failure_and_text 'oc new-app docker.io/library/wordpress -l qwer1345%$$#=self' 'DeploymentConfig.apps.openshift.io "wordpress" is invalid'
os::cmd::expect_failure_and_text 'oc new-app docker.io/library/wordpress -l qwer1345%$$#=self' 'Service "wordpress" is invalid'

# check if we can create from a stored template
os::cmd::expect_success 'oc create -f examples/sample-app/application-template-stibuild.json'
os::cmd::expect_success 'oc get template ruby-helloworld-sample'
os::cmd::expect_success_and_text 'oc new-app ruby-helloworld-sample -o yaml' 'MYSQL_USER'
os::cmd::expect_success_and_text 'oc new-app ruby-helloworld-sample -o yaml' 'MYSQL_PASSWORD'
os::cmd::expect_success_and_text 'oc new-app ruby-helloworld-sample --param MYSQL_PASSWORD=hello -o yaml' 'hello'
os::cmd::expect_success_and_text  'oc new-app -e FOO=BAR -f examples/jenkins/jenkins-ephemeral-template.json -o jsonpath="{.items[?(@.kind==\"DeploymentConfig\")].spec.template.spec.containers[0].env[?(@.name==\"FOO\")].value}" ' '^BAR$'
os::cmd::expect_success_and_text  'oc new-app -e OPENSHIFT_ENABLE_OAUTH=false -f examples/jenkins/jenkins-ephemeral-template.json -o jsonpath="{.items[?(@.kind==\"DeploymentConfig\")].spec.template.spec.containers[0].env[?(@.name==\"OPENSHIFT_ENABLE_OAUTH\")].value}" ' 'false'

# check that multiple resource groups are printed with their respective external version
os::cmd::expect_success_and_text 'oc new-app -f ${TEST_DATA}/new-app/template_multiple_resource_gvs.yaml -o yaml' 'apiVersion: apps/v1'

# check that an error is produced when using --context-dir with a template
os::cmd::expect_failure_and_text 'oc new-app -f examples/sample-app/application-template-stibuild.json --context-dir=example' '\-\-context-dir is not supported when using a template'

# check that values are not split on commas
os::cmd::expect_success_and_text 'oc new-app ruby-helloworld-sample --param MYSQL_DATABASE=hello,MYSQL_USER=fail -o yaml' 'value: hello,MYSQL_USER=fail'
# check that warning is printed when --param PARAM1=VAL1,PARAM2=VAL2 is used
os::cmd::expect_success_and_text 'oc new-app ruby-helloworld-sample --param MYSQL_DATABASE=hello,MYSQL_USER=fail -o yaml' 'no longer accepts comma-separated list'
# check that env vars are not split on commas
os::cmd::expect_success_and_text 'oc new-app php --env PASS=one,two=three -o yaml' 'value: one,two=three'
# check that warning is printed when --env PARAM1=VAL1,PARAM2=VAL2 is used
os::cmd::expect_success_and_text 'oc new-app php --env PASS=one,two=three -o yaml' 'no longer accepts comma-separated list'
# check that warning is not printed when --param/env doesn't contain two k-v pairs
os::cmd::expect_success_and_not_text 'oc new-app php --env DEBUG=disabled -o yaml' 'no longer accepts comma-separated list'
os::cmd::expect_success_and_not_text 'oc new-app php --env LEVELS=INFO,WARNING -o yaml' 'no longer accepts comma-separated list'
os::cmd::expect_success_and_not_text 'oc new-app ruby-helloworld-sample --param MYSQL_USER=mysql -o yaml' 'no longer accepts comma-separated list'
os::cmd::expect_success_and_not_text 'oc new-app ruby-helloworld-sample --param MYSQL_PASSWORD=com,ma -o yaml' 'no longer accepts comma-separated list'
# check that warning is not printed when env vars are passed positionally
os::cmd::expect_success_and_text 'oc new-app php PASS=one,two=three -o yaml' 'value: one,two=three'
os::cmd::expect_success_and_not_text 'oc new-app php PASS=one,two=three -o yaml' 'no longer accepts comma-separated list'

# check that we can populate template parameters from file
param_file="${TEST_DATA}/new-app/test-cmd-newapp-params.env"
os::cmd::expect_success_and_text "oc new-app ruby-helloworld-sample --param-file ${param_file} -o jsonpath='{.items[?(@.kind==\"DeploymentConfig\")].spec.template.spec.containers[0].env[?(@.name==\"MYSQL_DATABASE\")].value}'" 'thisisadatabase'
os::cmd::expect_success_and_text "oc new-app ruby-helloworld-sample --param-file ${param_file} --param MYSQL_DATABASE=otherdatabase -o jsonpath='{.items[?(@.kind==\"DeploymentConfig\")].spec.template.spec.containers[0].env[?(@.name==\"MYSQL_DATABASE\")].value}'" 'otherdatabase'
os::cmd::expect_success_and_text "oc new-app ruby-helloworld-sample --param-file ${param_file} --param MYSQL_DATABASE=otherdatabase -o yaml" 'ignoring value from file'
os::cmd::expect_success_and_text "cat ${param_file} | oc new-app ruby-helloworld-sample --param-file - -o jsonpath='{.items[?(@.kind==\"DeploymentConfig\")].spec.template.spec.containers[0].env[?(@.name==\"MYSQL_DATABASE\")].value}'" 'thisisadatabase'

os::cmd::expect_failure_and_text "oc new-app ruby-helloworld-sample --param-file does/not/exist" 'no such file or directory'
os::cmd::expect_failure_and_text "oc new-app ruby-helloworld-sample --param-file ${TEST_DATA}"  'is a directory'
os::cmd::expect_success "oc new-app ruby-helloworld-sample --param-file /dev/null -o yaml"
os::cmd::expect_success "oc new-app ruby-helloworld-sample --param-file /dev/null --param-file ${param_file} -o yaml"
os::cmd::expect_failure_and_text "echo 'fo%(o=bar' | oc new-app ruby-helloworld-sample --param-file -" 'invalid parameter assignment'
os::cmd::expect_failure_and_text "echo 'S P A C E S=test' | oc new-app ruby-helloworld-sample --param-file -" 'invalid parameter assignment'

os::cmd::expect_failure_and_text 'oc new-app ruby-helloworld-sample --param ABSENT_PARAMETER=absent -o yaml' 'unexpected parameter name'
os::cmd::expect_success 'oc new-app ruby-helloworld-sample --param ABSENT_PARAMETER=absent -o yaml --ignore-unknown-parameters'

# check that we can set environment variables from env file
env_file="${TEST_DATA}/new-app/test-cmd-newapp-env.env"
os::cmd::expect_success_and_text "oc new-app php --env-file ${env_file} -o jsonpath='{.items[?(@.kind==\"DeploymentConfig\")].spec.template.spec.containers[0].env[?(@.name==\"SOME_VAR\")].value}'" 'envvarfromfile'
os::cmd::expect_success_and_text "oc new-app php --env-file ${env_file} --env SOME_VAR=fromcmdline -o jsonpath='{.items[?(@.kind==\"DeploymentConfig\")].spec.template.spec.containers[0].env[?(@.name==\"SOME_VAR\")].value}'" 'fromcmdline'
os::cmd::expect_success_and_text "oc new-app php --env-file ${env_file} --env SOME_VAR=fromcmdline -o yaml" 'ignoring value from file'
os::cmd::expect_success_and_text "cat ${env_file} | oc new-app php --env-file - -o jsonpath='{.items[?(@.kind==\"DeploymentConfig\")].spec.template.spec.containers[0].env[?(@.name==\"SOME_VAR\")].value}'" 'envvarfromfile'

os::cmd::expect_failure_and_text "oc new-app php --env-file does/not/exist" 'no such file or directory'
os::cmd::expect_failure_and_text "oc new-app php --env-file ${TEST_DATA}/new-app"  'is a directory'
os::cmd::expect_success "oc new-app php --env-file /dev/null -o yaml"
os::cmd::expect_success "oc new-app php --env-file /dev/null --env-file ${env_file} -o yaml"
os::cmd::expect_failure_and_text "echo 'fo%(o=bar' | oc new-app php --env-file -" 'invalid parameter assignment'
os::cmd::expect_failure_and_text "echo 'S P A C E S=test' | oc new-app php --env-file -" 'invalid parameter assignment'

# new-build
# check that env vars are not split on commas and warning is printed where they previously have
os::cmd::expect_success_and_text 'oc new-build --binary php --env X=Y,Z=W -o yaml' 'value: Y,Z=W'
os::cmd::expect_success_and_text 'oc new-build --binary php --env X=Y,Z=W -o yaml' 'no longer accepts comma-separated list'
os::cmd::expect_success_and_text 'oc new-build --binary php --env X=Y,Z,W -o yaml' 'value: Y,Z,W'
os::cmd::expect_success_and_not_text 'oc new-build --binary php --env X=Y,Z,W -o yaml' 'no longer accepts comma-separated list'
os::cmd::expect_success_and_not_text 'oc new-build --binary php --env X=Y -o yaml' 'no longer accepts comma-separated list'

# new-build - load envvars from file
os::cmd::expect_success_and_text "oc new-build --binary php --env-file ${env_file} -o jsonpath='{.items[?(@.kind==\"BuildConfig\")].spec.strategy.sourceStrategy.env[?(@.name==\"SOME_VAR\")].value}'" 'envvarfromfile'
os::cmd::expect_success_and_text "oc new-build --binary php --env-file ${env_file} --env SOME_VAR=fromcmdline -o jsonpath='{.items[?(@.kind==\"BuildConfig\")].spec.strategy.sourceStrategy.env[?(@.name==\"SOME_VAR\")].value}'" 'fromcmdline'
os::cmd::expect_success_and_text "oc new-build --binary php --env-file ${env_file} --env SOME_VAR=fromcmdline -o yaml" 'ignoring value from file'
os::cmd::expect_success_and_text "cat ${env_file} | oc new-build --binary php --env-file ${env_file} -o jsonpath='{.items[?(@.kind==\"BuildConfig\")].spec.strategy.sourceStrategy.env[?(@.name==\"SOME_VAR\")].value}'" 'envvarfromfile'

os::cmd::expect_failure_and_text "oc new-build --binary php --env-file does/not/exist" 'no such file or directory'
os::cmd::expect_failure_and_text "oc new-build --binary php --env-file ${TEST_DATA}/new-app"  'is a directory'
os::cmd::expect_success "oc new-build --binary php --env-file /dev/null -o yaml"
os::cmd::expect_success "oc new-build --binary php --env-file /dev/null --env-file ${env_file} -o yaml"
os::cmd::expect_failure_and_text "echo 'fo%(o=bar' | oc new-build --binary php --env-file -" 'invalid parameter assignment'
os::cmd::expect_failure_and_text "echo 'S P A C E S=test' | oc new-build --binary php --env-file -" 'invalid parameter assignment'

# check that we can set environment variables from build-env file
build_env_file="${TEST_DATA}/new-app/test-cmd-newapp-build-env.env"

os::cmd::expect_failure_and_text "oc new-app php --build-env-file does/not/exist" 'no such file or directory'
os::cmd::expect_failure_and_text "oc new-app php --build-env-file ${TEST_DATA}/new-app"  'is a directory'
os::cmd::expect_success "oc new-app php --build-env-file /dev/null -o yaml"
os::cmd::expect_success "oc new-app php --build-env-file /dev/null --build-env-file ${build_env_file} -o yaml"
os::cmd::expect_failure_and_text "echo 'fo%(o=bar' | oc new-app php --build-env-file -" 'invalid parameter assignment'
os::cmd::expect_failure_and_text "echo 'S P A C E S=test' | oc new-app php --build-env-file -" 'invalid parameter assignment'

# new-build
# check that build env vars are not split on commas and warning is printed where they previously have
os::cmd::expect_success_and_text 'oc new-build --binary php --build-env X=Y,Z=W -o yaml' 'value: Y,Z=W'
os::cmd::expect_success_and_text 'oc new-build --binary php --build-env X=Y,Z=W -o yaml' 'no longer accepts comma-separated list'
os::cmd::expect_success_and_text 'oc new-build --binary php --build-env X=Y,Z,W -o yaml' 'value: Y,Z,W'
os::cmd::expect_success_and_not_text 'oc new-build --binary php --build-env X=Y,Z,W -o yaml' 'no longer accepts comma-separated list'
os::cmd::expect_success_and_not_text 'oc new-build --binary php --build-env X=Y -o yaml' 'no longer accepts comma-separated list'

# new-build - load build env vars from file
os::cmd::expect_success_and_text "oc new-build --binary php --build-env-file ${build_env_file} -o jsonpath='{.items[?(@.kind==\"BuildConfig\")].spec.strategy.sourceStrategy.env[?(@.name==\"SOME_VAR\")].value}'" 'buildenvvarfromfile'
os::cmd::expect_success_and_text "oc new-build --binary php --build-env-file ${build_env_file} --env SOME_VAR=fromcmdline -o jsonpath='{.items[?(@.kind==\"BuildConfig\")].spec.strategy.sourceStrategy.env[?(@.name==\"SOME_VAR\")].value}'" 'fromcmdline'
os::cmd::expect_success_and_text "oc new-build --binary php --build-env-file ${build_env_file} --env SOME_VAR=fromcmdline -o yaml" 'ignoring value from file'
os::cmd::expect_success_and_text "cat ${build_env_file} | oc new-build --binary php --build-env-file - -o jsonpath='{.items[?(@.kind==\"BuildConfig\")].spec.strategy.sourceStrategy.env[?(@.name==\"SOME_VAR\")].value}'" 'buildenvvarfromfile'

os::cmd::expect_failure_and_text "oc new-build --binary php --build-env-file does/not/exist" 'no such file or directory'
os::cmd::expect_failure_and_text "oc new-build --binary php --build-env-file ${TEST_DATA}/new-app"  'is a directory'
os::cmd::expect_success "oc new-build --binary php --build-env-file /dev/null -o yaml"
os::cmd::expect_success "oc new-build --binary php --build-env-file /dev/null --env-file ${build_env_file} -o yaml"
os::cmd::expect_failure_and_text "echo 'fo%(o=bar' | oc new-build --binary php --build-env-file -" 'invalid parameter assignment'
os::cmd::expect_failure_and_text "echo 'S P A C E S=test' | oc new-build --binary php --build-env-file -" 'invalid parameter assignment'

# new-build - check that we can set build args in DockerStrategy
os::cmd::expect_success_and_text "oc new-build ${TEST_DATA}/new-app/build-arg-dockerfile --build-arg 'foo=bar' --to 'test' -o jsonpath='{.items[?(@.kind==\"BuildConfig\")].spec.strategy.dockerStrategy.buildArgs[?(@.name==\"foo\")].value}'" 'bar'

# check that we cannot set build args in a non-DockerStrategy build
os::cmd::expect_failure_and_text "oc new-build https://github.com/openshift/ruby-hello-world --strategy=source --build-arg 'foo=bar'" "error: Cannot use '--build-arg' without a Docker build"
os::cmd::expect_failure_and_text "oc new-build https://github.com/sclorg/ruby-ex --build-arg 'foo=bar'" "error: Cannot use '--build-arg' without a Docker build"

#
# verify we can create from a template when some objects in the template declare an app label
# the app label will not be applied to any objects in the template.
os::cmd::expect_success_and_not_text 'oc new-app -f ${TEST_DATA}/new-app/template-with-app-label.json -o yaml' 'app: ruby-helloworld-sample'
# verify the existing app label on an object is not overridden by new-app
os::cmd::expect_success_and_text 'oc new-app -f ${TEST_DATA}/new-app/template-with-app-label.json -o yaml' 'app: myapp'

# verify that a template can be passed in stdin
os::cmd::expect_success 'cat ${TEST_DATA}/application-template-stibuild.json | oc new-app -o yaml -f -'

# check search
os::cmd::expect_success_and_text 'oc new-app --search mysql' "Tags:\s+5.7, latest"
os::cmd::expect_success_and_text 'oc new-app --search ruby-helloworld-sample' 'ruby-helloworld-sample'
# check search - partial matches
os::cmd::expect_success_and_text 'oc new-app --search ruby-hellow' 'ruby-helloworld-sample'
os::cmd::expect_success_and_text 'oc new-app --search --template=ruby-hel' 'ruby-helloworld-sample'
os::cmd::expect_success_and_text 'oc new-app --search --template=ruby-helloworld-sam -o yaml' 'ruby-helloworld-sample'
os::cmd::expect_success_and_text 'oc new-app --search rub' "Tags:\s+2.3, 2.4, 2.5, latest"
os::cmd::expect_success_and_text 'oc new-app --search --image-stream=rub' "Tags:\s+2.3, 2.4, 2.5, latest"
# check search - check correct usage of filters
os::cmd::expect_failure_and_not_text 'oc new-app --search --image-stream=ruby-heloworld-sample' 'application-template-stibuild'
os::cmd::expect_failure 'oc new-app --search --template=php'
os::cmd::expect_failure 'oc new-app -S --template=nodejs'
os::cmd::expect_failure 'oc new-app -S --template=perl'
# check search - filtered, exact matches
# make sure the imagestreams are imported first.
os::cmd::try_until_success 'oc get imagestreamtags mariadb:latest'
os::cmd::try_until_success 'oc get imagestreamtags mariadb:10.1'
os::cmd::try_until_success 'oc get imagestreamtags mariadb:10.2'
os::cmd::try_until_success 'oc get imagestreamtags mongodb:latest'
os::cmd::try_until_success 'oc get imagestreamtags mongodb:2.4'
os::cmd::try_until_success 'oc get imagestreamtags mongodb:2.6'
os::cmd::try_until_success 'oc get imagestreamtags mongodb:3.2'
os::cmd::try_until_success 'oc get imagestreamtags mongodb:3.4'
os::cmd::try_until_success 'oc get imagestreamtags mysql:latest'
os::cmd::try_until_success 'oc get imagestreamtags mysql:5.5'
os::cmd::try_until_success 'oc get imagestreamtags mysql:5.6'
os::cmd::try_until_success 'oc get imagestreamtags mysql:5.7'
os::cmd::try_until_success 'oc get imagestreamtags nginx:latest'
os::cmd::try_until_success 'oc get imagestreamtags nginx:1.8'
os::cmd::try_until_success 'oc get imagestreamtags nginx:1.10'
os::cmd::try_until_success 'oc get imagestreamtags nginx:1.12'
os::cmd::try_until_success 'oc get imagestreamtags nodejs:latest'
os::cmd::try_until_success 'oc get imagestreamtags nodejs:0.10'
os::cmd::try_until_success 'oc get imagestreamtags nodejs:4'
os::cmd::try_until_success 'oc get imagestreamtags nodejs:6'
os::cmd::try_until_success 'oc get imagestreamtags nodejs:8'
os::cmd::try_until_success 'oc get imagestreamtags perl:latest'
os::cmd::try_until_success 'oc get imagestreamtags perl:5.16'
os::cmd::try_until_success 'oc get imagestreamtags perl:5.20'
os::cmd::try_until_success 'oc get imagestreamtags perl:5.24'
os::cmd::try_until_success 'oc get imagestreamtags php:latest'
os::cmd::try_until_success 'oc get imagestreamtags php:5.5'
os::cmd::try_until_success 'oc get imagestreamtags php:5.6'
os::cmd::try_until_success 'oc get imagestreamtags php:7.0'
os::cmd::try_until_success 'oc get imagestreamtags php:7.1'
os::cmd::try_until_success 'oc get imagestreamtags postgresql:latest'
os::cmd::try_until_success 'oc get imagestreamtags postgresql:9.2'
os::cmd::try_until_success 'oc get imagestreamtags postgresql:9.4'
os::cmd::try_until_success 'oc get imagestreamtags postgresql:9.5'
os::cmd::try_until_success 'oc get imagestreamtags postgresql:9.6'
os::cmd::try_until_success 'oc get imagestreamtags python:latest'
os::cmd::try_until_success 'oc get imagestreamtags python:2.7'
os::cmd::try_until_success 'oc get imagestreamtags python:3.3'
os::cmd::try_until_success 'oc get imagestreamtags python:3.4'
os::cmd::try_until_success 'oc get imagestreamtags python:3.5'
os::cmd::try_until_success 'oc get imagestreamtags python:3.6'
os::cmd::try_until_success 'oc get imagestreamtags ruby:latest'
os::cmd::try_until_success 'oc get imagestreamtags ruby:2.0'
os::cmd::try_until_success 'oc get imagestreamtags ruby:2.2'
os::cmd::try_until_success 'oc get imagestreamtags ruby:2.3'
os::cmd::try_until_success 'oc get imagestreamtags ruby:2.4'
os::cmd::try_until_success 'oc get imagestreamtags ruby:2.5'
os::cmd::try_until_success 'oc get imagestreamtags wildfly:latest'
os::cmd::try_until_success 'oc get imagestreamtags wildfly:12.0'
os::cmd::try_until_success 'oc get imagestreamtags wildfly:11.0'
os::cmd::try_until_success 'oc get imagestreamtags wildfly:10.1'
os::cmd::try_until_success 'oc get imagestreamtags wildfly:10.0'
os::cmd::try_until_success 'oc get imagestreamtags wildfly:9.0'
os::cmd::try_until_success 'oc get imagestreamtags wildfly:8.1'

os::cmd::expect_success_and_text 'oc new-app --search --image-stream=mariadb' "Tags:\s+10.1, 10.2, latest"
os::cmd::expect_success_and_text 'oc new-app --search --image-stream=mongodb' "Tags:\s+3.2, 3.4, 3.6, latest"
os::cmd::expect_success_and_text 'oc new-app --search --image-stream=mysql' "Tags:\s+5.7, latest"
os::cmd::expect_success_and_text 'oc new-app --search --image-stream=nginx' "Tags:\s+1.10, 1.12, 1.8, latest"
os::cmd::expect_success_and_text 'oc new-app --search --image-stream=nodejs' "Tags:\s+10, 11, 6, 8, 8-RHOAR, latest"
os::cmd::expect_success_and_text 'oc new-app --search --image-stream=perl' "Tags:\s+5.24, 5.26, latest"
os::cmd::expect_success_and_text 'oc new-app --search --image-stream=php' "Tags:\s+7.0, 7.1, latest"
os::cmd::expect_success_and_text 'oc new-app --search --image-stream=postgresql' "Tags:\s+10, 9.5, 9.6, latest"
os::cmd::expect_success_and_text 'oc new-app -S --image-stream=python' "Tags:\s+2.7, 3.5, 3.6, latest"
os::cmd::expect_success_and_text 'oc new-app -S --image-stream=ruby' "Tags:\s+2.3, 2.4, 2.5, latest"
os::cmd::expect_success_and_text 'oc new-app -S --image-stream=wildfly' "Tags:\s+10.0, 10.1, 11.0, 12.0, 13.0, 14.0, 15.0, 8.1, 9.0, latest"
os::cmd::expect_success_and_text 'oc new-app --search --template=ruby-helloworld-sample' 'ruby-helloworld-sample'
# check search - no matches
os::cmd::expect_failure_and_text 'oc new-app -S foo-the-bar' 'no matches found'
os::cmd::expect_failure_and_text 'oc new-app --search winter-is-coming' 'no matches found'
# check search - mutually exclusive flags
os::cmd::expect_failure_and_text 'oc new-app -S mysql --env=FOO=BAR' "can't be used"
os::cmd::expect_failure_and_text 'oc new-app --search mysql --code=https://github.com/openshift/ruby-hello-world' "can't be used"
os::cmd::expect_failure_and_text 'oc new-app --search mysql --param=FOO=BAR' "can't be used"
# check specifying a non-existent template does not cause an index out of range error
os::cmd::expect_failure_and_not_text 'oc new-app --template foo' 'index out of range'

# set context-dir
os::cmd::expect_success_and_text 'oc new-app https://github.com/sclorg/s2i-ruby-container.git --context-dir="2.4/test/puma-test-app" -o yaml' 'contextDir: 2.4/test/puma-test-app'
os::cmd::expect_success_and_text 'oc new-app ruby~https://github.com/sclorg/s2i-ruby-container.git --context-dir="2.4/test/puma-test-app" -o yaml' 'contextDir: 2.4/test/puma-test-app'

# set strategy
os::cmd::expect_success_and_text 'oc new-app ruby~https://github.com/openshift/ruby-hello-world.git --strategy=docker -o yaml' 'dockerStrategy'
os::cmd::expect_success_and_text 'oc new-app https://github.com/openshift/ruby-hello-world.git --strategy=source -o yaml' 'sourceStrategy'

# prints root user info
os::cmd::expect_success_and_not_text 'oc new-app --dry-run mysql' "runs as the 'root' user"
os::cmd::expect_success_and_text 'oc new-app --dry-run --docker-image=mysql' "WARNING: Image \"mysql\" runs as the 'root' user"

# verify multiple errors are displayed together, a nested error is returned, and that the usage message is displayed
os::cmd::expect_failure_and_text 'oc new-app --dry-run __template_fail __templatefile_fail' 'error: unable to locate any'
os::cmd::expect_failure_and_text 'oc new-app --dry-run __template_fail __templatefile_fail' 'with name "__templatefile_fail"'
os::cmd::expect_failure_and_text 'oc new-app --dry-run __template_fail __templatefile_fail' 'error: unable to find the specified template file'
os::cmd::expect_failure_and_text 'oc new-app --dry-run __template_fail __templatefile_fail' "The 'oc new-app' command will match arguments"

# verify partial match error
os::cmd::expect_failure_and_text 'oc new-app --dry-run mysq' 'error: only a partial match was found for "mysq"'
os::cmd::expect_failure_and_text 'oc new-app --dry-run mysq' 'The argument "mysq" only partially matched'
os::cmd::expect_failure_and_text 'oc new-app --dry-run mysq' "Image stream \"mysql\" \\(tag \"5.7\"\\) in project"

# ensure new-app with pr ref does not fail
os::cmd::expect_success 'oc new-app https://github.com/openshift/ruby-hello-world#refs/pull/58/head --dry-run'

# verify image streams with no tags are reported correctly and that --allow-missing-imagestream-tags works
# new-app
os::cmd::expect_success 'printf "apiVersion: v1\nkind: ImageStream\nmetadata:\n  name: emptystream\n" | oc create -f -'
os::cmd::expect_failure_and_text 'oc new-app --dry-run emptystream' 'error: no tags found on matching image stream'
os::cmd::expect_success 'oc new-app --dry-run emptystream --allow-missing-imagestream-tags'
# new-build
os::cmd::expect_failure_and_text 'oc new-build --dry-run emptystream~https://github.com/sclorg/ruby-ex' 'error: no tags found on matching image stream'
os::cmd::expect_success 'oc new-build --dry-run emptystream~https://github.com/sclorg/ruby-ex --allow-missing-imagestream-tags --strategy=source'

# Allow setting --name when specifying grouping
os::cmd::expect_success "oc new-app mysql+ruby~https://github.com/sclorg/ruby-ex --name foo -o yaml"
# but not with multiple components
os::cmd::expect_failure_and_text "oc new-app mysql ruby~https://github.com/sclorg/ruby-ex --name foo -o yaml" "error: only one component or source repository can be used when specifying a name"
# do not allow specifying output image when specifying multiple input repos
os::cmd::expect_failure_and_text 'oc new-build https://github.com/sclorg/nodejs-ex https://github.com/sclorg/ruby-ex --to foo' 'error: only one component with source can be used when specifying an output image reference'
# but succeed with multiple input repos and no output image specified
os::cmd::expect_success 'oc new-build https://github.com/sclorg/nodejs-ex https://github.com/sclorg/ruby-ex -o yaml'
# check that binary build with a builder image results in a source type build
os::cmd::expect_success_and_text 'oc new-build --binary --image-stream=ruby -o yaml' 'type: Source'
# check that binary build with a specific strategy uses that strategy regardless of the image type
os::cmd::expect_success_and_text 'oc new-build --binary --image=ruby --strategy=docker -o yaml' 'type: Docker'

# When only a single imagestreamtag exists, and it does not match the implicit default
# latest tag, new-app should fail.
# when latest exists, we default to it and match it.
os::cmd::expect_success 'oc new-app --image-stream ruby https://github.com/sclorg/rails-ex --dry-run'
# when latest does not exist, there are multiple partial matches (2.2, 2.3, 2.4, 2.5)
os::cmd::expect_success 'oc delete imagestreamtag ruby:latest'
os::cmd::expect_failure_and_text 'oc new-app --image-stream ruby https://github.com/sclorg/rails-ex --dry-run' 'error: multiple images or templates matched \"ruby\"'
# when only 2.5 exists, there is a single partial match (2.5)
os::cmd::expect_success 'oc delete imagestreamtag ruby:2.2'
os::cmd::expect_success 'oc delete imagestreamtag ruby:2.3'
os::cmd::expect_success 'oc delete imagestreamtag ruby:2.4'
os::cmd::expect_failure_and_text 'oc new-app --image-stream ruby https://github.com/sclorg/rails-ex --dry-run' 'error: only a partial match was found for \"ruby\":'
# when the tag is specified explicitly, the operation is successful
os::cmd::expect_success 'oc new-app --image-stream ruby:2.5 https://github.com/sclorg/rails-ex --dry-run'
os::cmd::expect_success 'oc delete imagestreams --all'

# newapp does not attempt to create an imagestream that already exists for a container image
os::cmd::expect_success_and_text 'oc new-app docker.io/ruby:latest~https://github.com/sclorg/ruby-ex.git --name=testapp1 --strategy=docker' 'imagestream.image.openshift.io "ruby" created'
# make sure the ruby:latest tag is imported before we run new-app again
os::cmd::try_until_success 'oc get imagestreamtags ruby:latest'
os::cmd::expect_success_and_not_text 'oc new-app docker.io/ruby:latest~https://github.com/sclorg/ruby-ex.git --name=testapp2 --strategy=docker' '"ruby:latest" already exists'
os::cmd::expect_success 'oc delete all -l app=testapp2'
os::cmd::expect_success 'oc delete all -l app=testapp1'
os::cmd::expect_success 'oc delete all -l app=ruby --ignore-not-found'
os::cmd::expect_success 'oc delete imagestreams --all --ignore-not-found'
# newapp does not attempt to create an imagestream that already exists for a container image
os::cmd::expect_success 'oc new-app docker.io/ruby:2.2'
# the next one technically fails cause the DC is already created, but we should still see the ist created
os::cmd::expect_failure_and_text 'oc new-app docker.io/ruby:2.4' 'imagestreamtag.image.openshift.io "ruby:2.4" created'
os::cmd::expect_success 'oc delete imagestreams --all --ignore-not-found'

# check that we can create from the template without errors
os::cmd::expect_success_and_text 'oc new-app ruby-helloworld-sample -l app=helloworld' 'service "frontend" created'
os::cmd::expect_success 'oc delete all -l app=helloworld'
os::cmd::expect_success 'oc delete secret dbsecret'
os::cmd::expect_success_and_text 'oc new-app ruby-helloworld-sample -l app=helloworld -o name' 'service/frontend'
os::cmd::expect_success 'oc delete all -l app=helloworld'
os::cmd::expect_success 'oc delete secret dbsecret'
os::cmd::expect_success 'oc delete template ruby-helloworld-sample'
# override component names
os::cmd::expect_success_and_text 'oc new-app mysql --name=db' 'db'
os::cmd::expect_success 'oc new-app https://github.com/openshift/ruby-hello-world -l app=ruby'
os::cmd::expect_success 'oc delete all -l app=ruby'
# check for error when template JSON file has errors
jsonfile="${TEST_DATA}/new-app/invalid.json"
os::cmd::expect_failure_and_text "oc new-app '${jsonfile}'" "error: unable to load template file \"${jsonfile}\": error parsing ${jsonfile}: json: line 0: invalid character '}' after object key"

# check new-build
os::cmd::expect_failure_and_text 'oc new-build mysql -o yaml' 'you must specify at least one source repository URL'
os::cmd::expect_success_and_text 'oc new-build mysql --binary -o yaml --to mysql:bin' 'type: Binary'
os::cmd::expect_success_and_text 'oc new-build mysql https://github.com/openshift/ruby-hello-world --strategy=docker -o yaml' 'type: Docker'
os::cmd::expect_failure_and_text 'oc new-build mysql https://github.com/openshift/ruby-hello-world --binary' 'specifying binary builds and source repositories at the same time is not allowed'
# binary builds cannot be created unless a builder image is specified.
os::cmd::expect_failure_and_text 'oc new-build --name mybuild --binary --strategy=source -o yaml' 'you must provide a builder image when using the source strategy with a binary build'
os::cmd::expect_success_and_text 'oc new-build --name mybuild centos/ruby-25-centos7 --binary --strategy=source -o yaml' 'name: ruby-25-centos7:latest'
# binary builds can be created with no builder image if no strategy or docker strategy is specified
os::cmd::expect_success_and_text 'oc new-build --name mybuild --binary -o yaml' 'type: Binary'
os::cmd::expect_success_and_text 'oc new-build --name mybuild --binary --strategy=docker -o yaml' 'type: Binary'

# new-build image source tests
os::cmd::expect_failure_and_text 'oc new-build mysql --source-image centos' 'error: --source-image-path must be specified when --source-image is specified.'
os::cmd::expect_failure_and_text 'oc new-build mysql --source-image-path foo' 'error: --source-image must be specified when --source-image-path is specified.'

# ensure circular ref flagged but allowed for template
os::cmd::expect_success 'oc create -f ${TEST_DATA}/new-app/circular-is.yaml'
os::cmd::expect_success_and_text 'oc new-app -f ${TEST_DATA}/new-app/circular.yaml' 'should be different than input'
# ensure circular does not choke on image stream image
os::cmd::expect_success_and_not_text 'oc new-app -f ${TEST_DATA}/new-app/bc-from-imagestreamimage.json --dry-run' 'Unable to follow reference type'

# do not allow use of non-existent image (should fail)
os::cmd::expect_failure_and_text 'oc new-app  openshift/bogusimage https://github.com/openshift/ruby-hello-world.git -o yaml' "unable to locate any"
# allow use of non-existent image (should succeed)
os::cmd::expect_success 'oc new-app openshift/bogusimage https://github.com/openshift/ruby-hello-world.git -o yaml --allow-missing-images'

os::cmd::expect_success 'oc create -f ${TEST_DATA}/new-app/installable-stream.yaml'

os::cmd::expect_success 'oc policy add-role-to-user edit test-user'
os::cmd::expect_success 'oc login -u test-user -p anything'
os::cmd::try_until_success 'oc project ${default_project}'

os::cmd::try_until_success 'oc get imagestreamtags installable:file'
os::cmd::try_until_success 'oc get imagestreamtags installable:token'
os::cmd::try_until_success 'oc get imagestreamtags installable:serviceaccount'
os::cmd::expect_failure 'oc new-app installable:file'
os::cmd::expect_failure_and_text 'oc new-app installable:file' 'requires that you grant the image access'
os::cmd::expect_failure_and_text 'oc new-app installable:serviceaccount' "requires an 'installer' service account with project editor access"
os::cmd::expect_success_and_text 'oc new-app installable:file --grant-install-rights -o yaml' '/var/run/openshift.secret.token'
os::cmd::expect_success_and_text 'oc new-app installable:file --grant-install-rights -o yaml' 'activeDeadlineSeconds: 14400'
os::cmd::expect_success_and_text 'oc new-app installable:file --grant-install-rights -o yaml' 'openshift.io/generated-job: "true"'
os::cmd::expect_success_and_text 'oc new-app installable:file --grant-install-rights -o yaml' 'openshift.io/generated-job.for: installable:file'
os::cmd::expect_success_and_text 'oc new-app installable:token --grant-install-rights -o yaml' 'name: TOKEN_ENV'
os::cmd::expect_success_and_text 'oc new-app installable:token --grant-install-rights -o yaml' 'openshift/origin@sha256:'
os::cmd::expect_success_and_text 'oc new-app installable:serviceaccount --grant-install-rights -o yaml' 'serviceAccountName: installer'
os::cmd::expect_success_and_text 'oc new-app installable:serviceaccount --grant-install-rights -o yaml' 'fieldPath: metadata.namespace'
os::cmd::expect_success_and_text 'oc new-app installable:serviceaccount --grant-install-rights -o yaml A=B' 'name: A'

# Ensure output is valid JSON
os::cmd::expect_success 'oc new-app mongo -o json | python -m json.tool'

# Ensure custom branch/ref works
os::cmd::expect_success 'oc new-app https://github.com/openshift/ruby-hello-world#beta4'

# Ensure the resulting BuildConfig doesn't have unexpected sources
os::cmd::expect_success_and_not_text 'oc new-app https://github.com/openshift/ruby-hello-world --output-version=v1 -o=jsonpath="{.items[?(@.kind==\"BuildConfig\")].spec.source}"' 'dockerfile|binary'

# We permit running new-app against a remote URL which returns a template
os::cmd::expect_success 'oc new-app https://raw.githubusercontent.com/openshift/origin/master/examples/quickstarts/rails-postgresql.json --dry-run'

# ensure that --strategy sets the build strategy
os::cmd::expect_success_and_text 'oc new-build --name sourcetest python~https://github.com/sclorg/django-ex --source-image centos:latest --source-image-path /tmp --strategy source --dry-run -o yaml' 'sourceStrategy'
os::cmd::expect_success_and_text 'oc new-build --name sourcetest python~https://github.com/sclorg/django-ex --source-image centos:latest --source-image-path /tmp --strategy pipeline --dry-run -o yaml' 'jenkinsPipelineStrategy'
os::cmd::expect_success_and_text 'oc new-build --name sourcetest python~https://github.com/sclorg/django-ex --source-image centos:latest --source-image-path /tmp --strategy docker --dry-run -o yaml' 'dockerStrategy'

os::cmd::expect_success 'oc create -f examples/image-streams/image-streams-centos7.json'
os::cmd::try_until_success 'oc get imagestreamtags nodejs:latest'
# ensure that a build can be created with just image inputs without the --binary flag
os::cmd::expect_success_and_text 'oc new-build --name sourcetest --source-image centos:latest --source-image-path /tmp --image-stream nodejs --dry-run -o yaml' 'sourceStrategy'
# ensure that using only image inputs and the --binary flag results in an error
os::cmd::expect_failure_and_text 'oc new-build --name sourcetest --source-image centos:latest --source-image-path /tmp --image-stream nodejs --binary --dry-run -o yaml' 'specifying binary builds and source repositories at the same time is not allowed'
os::cmd::expect_success 'oc delete imagestreams --all --ignore-not-found'

# new-app different syntax for new-app functionality
os::cmd::expect_success 'oc new-project new-app-syntax'
os::cmd::expect_success 'oc import-image openshift/ruby-20-centos7:latest --confirm'
os::cmd::expect_success 'oc import-image openshift/php-55-centos7:latest --confirm'
os::cmd::expect_success 'oc new-app ruby-20-centos7:latest~https://github.com/openshift/ruby-hello-world.git --dry-run'
os::cmd::expect_success 'oc new-app ruby-20-centos7:latest~./test/testdata/testapp --dry-run'
os::cmd::expect_success 'oc new-app -i ruby-20-centos7:latest https://github.com/openshift/ruby-hello-world.git --dry-run'
os::cmd::expect_success 'oc new-app -i ruby-20-centos7:latest ./test/testdata/testapp --dry-run'
os::cmd::expect_success 'oc new-app ruby-20-centos7:latest --code https://github.com/openshift/ruby-hello-world.git --dry-run'
os::cmd::expect_success 'oc new-app ruby-20-centos7:latest --code ./test/testdata/testapp --dry-run'
os::cmd::expect_success 'oc new-app -i ruby-20-centos7:latest --code https://github.com/openshift/ruby-hello-world.git --dry-run'
os::cmd::expect_success 'oc new-app -i ruby-20-centos7:latest --code ./test/testdata/testapp --dry-run'

os::cmd::expect_success 'oc new-app --code ./test/testdata/testapp --name test'
os::cmd::expect_success_and_text 'oc get bc test --template={{.spec.strategy.dockerStrategy.from.name}}' 'ruby-25-centos7:latest'

os::cmd::expect_success 'oc new-app -i php-55-centos7:latest --code ./test/testdata/testapp --name test2'
os::cmd::expect_success_and_text 'oc get bc test2 --template={{.spec.strategy.sourceStrategy.from.name}}' 'php-55-centos7:latest'

os::cmd::expect_success 'oc new-app -i php-55-centos7:latest~https://github.com/openshift/ruby-hello-world.git --name test3'
os::cmd::expect_success_and_text 'oc get bc test3 --template={{.spec.strategy.sourceStrategy.from.name}}' 'php-55-centos7:latest'

os::cmd::expect_success 'oc new-app php-55-centos7:latest~https://github.com/openshift/ruby-hello-world.git --name test4'
os::cmd::expect_success_and_text 'oc get bc test4 --template={{.spec.strategy.sourceStrategy.from.name}}' 'php-55-centos7:latest'

os::cmd::expect_success 'oc new-app -i php-55-centos7:latest https://github.com/openshift/ruby-hello-world.git --name test5'
os::cmd::expect_success_and_text 'oc get bc test5 --template={{.spec.strategy.sourceStrategy.from.name}}' 'php-55-centos7:latest'

os::cmd::expect_success 'oc new-app php-55-centos7:latest --code https://github.com/openshift/ruby-hello-world.git --name test6'
os::cmd::expect_success_and_text 'oc get bc test6 --template={{.spec.strategy.sourceStrategy.from.name}}' 'php-55-centos7:latest'

os::cmd::expect_success 'oc new-app https://github.com/openshift/ruby-hello-world.git --name test7'
os::cmd::expect_success_and_text 'oc get bc test7 --template={{.spec.strategy.dockerStrategy.from.name}}' 'ruby-25-centos7:latest'

os::cmd::expect_success 'oc new-app php-55-centos7:latest https://github.com/openshift/ruby-hello-world.git --name test8'
os::cmd::expect_success_and_text 'oc get bc test8 --template={{.spec.strategy.sourceStrategy.from.name}}' 'php-55-centos7:latest'
os::cmd::expect_success 'oc delete project new-app-syntax'

# new-app docker build strategy with binary input
os::cmd::expect_success 'oc project ${default_project}'
os::cmd::expect_success 'oc delete all,templates --all'
os::cmd::expect_success 'oc create -f examples/image-streams/image-streams-centos7.json'
os::cmd::try_until_success 'oc get imagestreamtags ruby:latest' # need to wait until tags are available!?
os::cmd::expect_failure_and_text 'oc new-app --strategy=docker --name my-docker-app' 'none of the arguments provided could be classified as a source code location'
os::cmd::expect_success_and_text 'oc new-app --strategy=docker --binary --name my-docker-app' 'A binary build was created'
os::cmd::expect_success_and_text 'oc get bc my-docker-app -o yaml' 'type: Binary'
os::cmd::expect_success 'oc delete all -l app=my-docker-app'

# new-app source build strategy with binary input
os::cmd::expect_success_and_text 'oc new-app  ruby --binary --name my-imagestream-app' 'A binary build was created'
os::cmd::expect_success_and_text 'oc get bc my-imagestream-app -o yaml' 'type: Binary'
os::cmd::expect_success 'oc delete all -l app=my-imagestream-app'

# new-app with source repository and binary input
os::cmd::expect_failure_and_text 'oc new-app ./test/testdata/testapp --binary' 'error: specifying binary builds and source repositories at the same time is not allowed'

echo "new-app: ok"
os::test::junit::declare_suite_end
`)

func testExtendedTestdataCmdTestCmdNewappShBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdNewappSh, nil
}

func testExtendedTestdataCmdTestCmdNewappSh() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdNewappShBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/newapp.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdObserveSh = []byte(`#!/bin/bash
source "$(dirname "${BASH_SOURCE}")/../../hack/lib/init.sh"
trap os::test::junit::reconcile_output EXIT

# Cleanup cluster resources created by this test
(
  set +e
  exit 0
) &>/dev/null

os::test::junit::declare_suite_start "cmd/observe"

# basic scenarios
os::cmd::expect_failure_and_text 'oc observe' 'you must specify at least one argument containing the resource to observe'
os::cmd::expect_success_and_text 'oc observe serviceaccounts --once' 'Sync ended'
os::cmd::expect_success_and_text 'oc observe daemonsets --once' 'Nothing to sync, exiting immediately'
os::cmd::expect_success_and_text 'oc observe services --once --all-namespaces' 'default kubernetes'
os::cmd::expect_success_and_text 'oc observe services --once --all-namespaces --print-metrics-on-exit' 'observe_counts{type="Sync"}'
os::cmd::expect_failure_and_text 'oc observe services --once --names echo' '\-\-delete and \-\-names must both be specified'
os::cmd::expect_success_and_text 'oc observe services --exit-after=1s' 'Shutting down after 1s ...'
os::cmd::expect_success_and_text 'oc observe services --exit-after=1s --all-namespaces --print-metrics-on-exit' 'observe_counts{type="Sync"}'
os::cmd::expect_success_and_text 'oc observe services --once --all-namespaces' 'default kubernetes'
# TODO: fix #31755 and make this a --once test
os::cmd::expect_success_and_text 'oc observe services --exit-after=3s --all-namespaces --names echo --names default/notfound --delete echo --delete remove' 'remove default notfound'

# error counting
os::cmd::expect_failure_and_text 'oc observe services --exit-after=1m --all-namespaces --maximum-errors=1 -- /bin/sh -c "exit 1"' 'reached maximum error limit of 1, exiting'
os::cmd::expect_failure_and_text 'oc observe services --exit-after=1m --all-namespaces --retry-on-exit-code=2 --maximum-errors=1 --loglevel=4 -- /bin/sh -c "exit 2"' 'retrying command: exit status 2'

# argument templates
os::cmd::expect_success_and_text 'oc observe services --once --all-namespaces -a "{ .spec.clusterIP }"' '172.30.0.1'
os::cmd::expect_success_and_text 'oc observe services --once --all-namespaces -a "{{ .spec.clusterIP }}" --output=gotemplate' '172.30.0.1'
os::cmd::expect_success_and_text 'oc observe services --once --all-namespaces -a "bad{ .missingkey }key"' 'badkey'
os::cmd::expect_failure_and_text 'oc observe services --once --all-namespaces -a "bad{ .missingkey }key" --strict-templates' 'missingkey is not found'
os::cmd::expect_success_and_text 'oc observe services --once --all-namespaces -a "{{ .unknown }}" --output=gotemplate' '""'
os::cmd::expect_success_and_text 'oc observe services --once --all-namespaces -a "bad{{ or (.unknown) \"\" }}key" --output=gotemplate' 'badkey'
os::cmd::expect_success_and_text 'oc observe services --once --all-namespaces -a "bad{{ .unknown }}key" --output=gotemplate --strict-templates' '\<no value\>'

# --type-env-var
os::cmd::expect_success_and_text 'MYENV=should_be_passed oc observe services --once --all-namespaces --type-env-var=EVENT -- /bin/sh -c "echo \$EVENT \$MYENV"' 'Sync should_be_passed'

echo "observe: ok"
os::test::junit::declare_suite_end`)

func testExtendedTestdataCmdTestCmdObserveShBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdObserveSh, nil
}

func testExtendedTestdataCmdTestCmdObserveSh() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdObserveShBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/observe.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdPolicyStorageAdminSh = []byte(`#!/bin/bash
source "$(dirname "${BASH_SOURCE}")/../../hack/lib/init.sh"
trap os::test::junit::reconcile_output EXIT

project="$( oc project -q )"

os::test::junit::declare_suite_start "cmd/policy-storage-admin"

# Test storage-admin role and impersonation
os::cmd::expect_success 'oc adm policy add-cluster-role-to-user storage-admin storage-adm'
os::cmd::expect_success 'oc adm policy add-cluster-role-to-user storage-admin storage-adm2'
os::cmd::expect_success 'oc adm policy add-role-to-user admin storage-adm2'
os::cmd::expect_success_and_text 'oc policy who-can impersonate storage-admin' 'cluster-admin'

# Test storage-admin role as user level
#os::cmd::expect_success 'oc login -u storage-adm -p pw'
#os::cmd::expect_success_and_text 'oc whoami' "storage-adm"
#os::cmd::expect_failure 'oc whoami --as=basic-user'
#os::cmd::expect_failure 'oc whoami --as=cluster-admin'

# Test storage-admin can not do normal project scoped tasks
os::cmd::expect_success_and_text 'oc policy can-i --as=storage-adm create pods --all-namespaces' 'no'
os::cmd::expect_success_and_text 'oc policy can-i --as=storage-adm create projects' 'no'
os::cmd::expect_success_and_text 'oc policy can-i --as=storage-adm create pvc' 'no'

# Test storage-admin can read pvc and pods, and create pv and storageclass
os::cmd::expect_success_and_text 'oc policy can-i --as=storage-adm get pvc --all-namespaces' 'yes'
os::cmd::expect_success_and_text 'oc policy can-i --as=storage-adm get storageclass' 'yes'
os::cmd::expect_success_and_text 'oc policy can-i --as=storage-adm create pv' 'yes'
os::cmd::expect_success_and_text 'oc policy can-i --as=storage-adm create storageclass' 'yes'
os::cmd::expect_success_and_text 'oc policy can-i --as=storage-adm get pods --all-namespaces' 'yes'

# Test failure to change policy on users for storage-admin
os::cmd::expect_failure_and_text 'oc policy --as=storage-adm add-role-to-user admin storage-adm' ' cannot list resource "rolebindings" in API group "rbac.authorization.k8s.io"'
os::cmd::expect_failure_and_text 'oc policy --as=storage-adm remove-user screeley' ' cannot list resource "rolebindings" in API group "rbac.authorization.k8s.io"'
#os::cmd::expect_success 'oc logout'

# Test that scoped storage-admin now an admin in project foo
#os::cmd::expect_success 'oc login -u storage-adm2 -p pw'
#os::cmd::expect_success_and_text 'oc whoami' "storage-adm2"
os::cmd::expect_success 'oc new-project --as=storage-adm2 --as-group=system:authenticated:oauth --as-group=system:authenticated policy-can-i'
os::cmd::expect_success_and_text 'oc policy --as=storage-adm2 can-i create pod --all-namespaces' 'no'
os::cmd::expect_success_and_text 'oc policy --as=storage-adm2 can-i create pod' 'yes'
os::cmd::expect_success_and_text 'oc policy --as=storage-adm2 can-i create pvc' 'yes'
os::cmd::expect_success_and_text 'oc policy --as=storage-adm2 can-i create endpoints' 'yes'
os::cmd::expect_success 'oc delete project policy-can-i'
`)

func testExtendedTestdataCmdTestCmdPolicyStorageAdminShBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdPolicyStorageAdminSh, nil
}

func testExtendedTestdataCmdTestCmdPolicyStorageAdminSh() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdPolicyStorageAdminShBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/policy-storage-admin.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdPolicySh = []byte(`#!/bin/bash
source "$(dirname "${BASH_SOURCE}")/../../hack/lib/init.sh"
trap os::test::junit::reconcile_output EXIT

project="$( oc project -q )"
testpod="apiVersion: v1
kind: Pod
metadata:
  name: testpod
spec:
  containers:
  - image: node
    imagePullPolicy: IfNotPresent
    name: testpod
  volumes:
  - emptyDir: {}
    name: tmp"

os::test::junit::declare_suite_start "cmd/policy"
# This test validates user level policy
os::cmd::expect_success_and_text 'oc whoami --as deads' "deads"

os::cmd::expect_success 'oc adm policy add-cluster-role-to-user sudoer wheel'
os::cmd::try_until_text 'oc policy who-can impersonate users system:admin' "wheel"
os::cmd::try_until_text 'oc policy who-can impersonate groups system:masters' "wheel"
os::cmd::try_until_text 'oc policy who-can impersonate systemusers system:admin' "wheel"
os::cmd::try_until_text 'oc policy who-can impersonate systemgroups system:masters' "wheel"
os::cmd::expect_success 'oc login -u wheel -p pw'
os::cmd::expect_success_and_text 'oc whoami' "wheel"
os::cmd::expect_failure 'oc whoami --as deads'
os::cmd::expect_success_and_text 'oc whoami --as=system:admin' "system:admin"
os::cmd::expect_success_and_text 'oc policy can-i --list --as=system:admin' '.*'

os::cmd::expect_success 'oc login -u local-admin -p pw'
os::cmd::expect_success 'oc new-project policy-login'
os::cmd::expect_failure 'oc whoami --as=system:admin'
os::cmd::expect_success_and_text 'oc whoami --as=system:serviceaccount:policy-login:default' "system:serviceaccount:policy-login:default"
os::cmd::expect_failure 'oc whoami --as=system:serviceaccount:another:default'
os::cmd::expect_success "oc login -u system:admin -n '${project}'"
os::cmd::expect_success 'oc delete project policy-login'

# validate --serviceaccount values
os::cmd::expect_success_and_text 'oc policy add-role-to-user admin -z default' 'clusterrole.rbac.authorization.k8s.io/admin added: "default"'
os::cmd::expect_failure_and_text 'oc policy add-role-to-user admin -z system:serviceaccount:test:default' 'should only be used with short\-form serviceaccount names'
os::cmd::expect_failure_and_text 'oc policy add-role-to-user admin -z :invalid' '"\:invalid" is not a valid serviceaccount name'

# This test validates user level policy
os::cmd::expect_failure_and_text 'oc policy add-role-to-user' 'you must specify a role'
os::cmd::expect_failure_and_text 'oc policy add-role-to-user -z NamespaceWithoutRole' 'you must specify a role'
os::cmd::expect_failure_and_text 'oc policy add-role-to-user view' 'you must specify at least one user or service account'

os::cmd::expect_success_and_text 'oc policy add-role-to-group cluster-admin --rolebinding-name cluster-admin system:unauthenticated' 'clusterrole.rbac.authorization.k8s.io/cluster-admin added: "system:unauthenticated"'
os::cmd::expect_success_and_text 'oc policy add-role-to-user --rolebinding-name cluster-admin cluster-admin system:no-user' 'clusterrole.rbac.authorization.k8s.io/cluster-admin added: "system:no-user"'
os::cmd::expect_success 'oc get rolebinding/cluster-admin --no-headers'
os::cmd::expect_success_and_text 'oc get rolebinding/cluster-admin --no-headers' 'system:no-user'

os::cmd::expect_success_and_text 'oc policy add-role-to-user --rolebinding-name cluster-admin cluster-admin -z=one,two --serviceaccount=three,four' 'clusterrole.rbac.authorization.k8s.io/cluster-admin added: \["one" "two" "three" "four"\]'
os::cmd::expect_success 'oc get rolebinding/cluster-admin --no-headers'
os::cmd::expect_success_and_text 'oc get rolebinding/cluster-admin --no-headers' 'one'
os::cmd::expect_success_and_text 'oc get rolebinding/cluster-admin --no-headers' 'four'

os::cmd::expect_success_and_text 'oc policy remove-role-from-group --rolebinding-name cluster-admin cluster-admin system:unauthenticated' 'clusterrole.rbac.authorization.k8s.io/cluster-admin removed: "system:unauthenticated"'

os::cmd::expect_success_and_text 'oc policy remove-role-from-user --rolebinding-name cluster-admin cluster-admin system:no-user' 'clusterrole.rbac.authorization.k8s.io/cluster-admin removed: "system:no-user"'
os::cmd::expect_success_and_text 'oc policy remove-role-from-user --rolebinding-name cluster-admin cluster-admin -z=one,two --serviceaccount=three,four' 'clusterrole.rbac.authorization.k8s.io/cluster-admin removed: \["one" "two" "three" "four"\]'
os::cmd::expect_failure_and_text 'oc get rolebinding/cluster-admin --no-headers' 'NotFound'

os::cmd::expect_success 'oc policy remove-group system:unauthenticated'
os::cmd::expect_success 'oc policy remove-user system:no-user'

# Test failure to mix and mismatch role/rolebiding removal
os::cmd::expect_success 'oc login -u local-admin -p pw'
os::cmd::expect_success 'oc new-project mismatch-prj'
os::cmd::expect_success 'oc create rolebinding match --clusterrole=admin --user=user'
os::cmd::expect_success 'oc create rolebinding mismatch --clusterrole=edit --user=user'
os::cmd::expect_failure_and_text 'oc policy remove-role-from-user admin user --rolebinding-name mismatch' 'rolebinding mismatch'
os::cmd::expect_success_and_text 'oc policy remove-user user' 'user'
os::cmd::expect_failure_and_text 'oc get rolebinding mismatch --no-headers' 'NotFound'
os::cmd::expect_failure_and_text 'oc get rolebinding match --no-headers' 'NotFound'
os::cmd::expect_success "oc login -u system:admin -n '${project}'"
os::cmd::expect_success 'oc delete project mismatch-prj'

# check to make sure that our SCC policies don't prevent GC from deleting pods
os::cmd::expect_success 'oc create -f ${OS_ROOT}/test/testdata/privileged-pod.yaml'
os::cmd::expect_success 'oc delete pod/test-build-pod-issue --cascade=false'
os::cmd::try_until_failure 'oc get pods pod/test-build-pod-issue'


os::cmd::expect_success_and_text 'oc policy add-role-to-user admin namespaced-user' 'clusterrole.rbac.authorization.k8s.io/admin added: "namespaced-user"'
# Ensure the user has create permissions on builds, but that build strategy permissions are granted through the authenticated users group
os::cmd::try_until_text              'oc adm policy who-can create builds' 'namespaced-user'
os::cmd::expect_success_and_not_text 'oc adm policy who-can create builds/docker' 'namespaced-user'
os::cmd::expect_success_and_not_text 'oc adm policy who-can create builds/custom' 'namespaced-user'
os::cmd::expect_success_and_not_text 'oc adm policy who-can create builds/source' 'namespaced-user'
os::cmd::expect_success_and_not_text 'oc adm policy who-can create builds/jenkinspipeline' 'namespaced-user'
os::cmd::expect_success_and_text     'oc adm policy who-can create builds/docker' 'system:authenticated'
os::cmd::expect_success_and_text     'oc adm policy who-can create builds/source' 'system:authenticated'
os::cmd::expect_success_and_text     'oc adm policy who-can create builds/jenkinspipeline' 'system:authenticated'
# if this method for removing access to docker/custom/source/jenkinspipeline builds changes, docs need to be updated as well
os::cmd::expect_success_and_text 'oc adm policy remove-cluster-role-from-group system:build-strategy-docker system:authenticated' 'clusterrole.rbac.authorization.k8s.io/system:build-strategy-docker removed: "system:authenticated"'
os::cmd::expect_success_and_text 'oc adm policy remove-cluster-role-from-group system:build-strategy-source system:authenticated' 'clusterrole.rbac.authorization.k8s.io/system:build-strategy-source removed: "system:authenticated"'
os::cmd::expect_success_and_text 'oc adm policy remove-cluster-role-from-group system:build-strategy-jenkinspipeline system:authenticated' 'clusterrole.rbac.authorization.k8s.io/system:build-strategy-jenkinspipeline removed: "system:authenticated"'

# ensure build strategy permissions no longer exist
os::cmd::try_until_failure           'oc adm policy who-can create builds/source | grep system:authenticated'
os::cmd::expect_success_and_not_text 'oc adm policy who-can create builds/docker' 'system:authenticated'
os::cmd::expect_success_and_not_text 'oc adm policy who-can create builds/source' 'system:authenticated'
os::cmd::expect_success_and_not_text 'oc adm policy who-can create builds/jenkinspipeline' 'system:authenticated'

# validate --output and --dry-run flags for oc-adm-policy sub-commands
os::cmd::expect_success_and_text 'oc adm policy remove-role-from-user admin namespaced-user -o yaml' 'name: admin'
os::cmd::expect_success_and_text 'oc adm policy add-role-to-user admin namespaced-user -o yaml' 'name: namespaced-user'

os::cmd::expect_success_and_text 'oc adm policy remove-role-from-user admin namespaced-user --dry-run' 'clusterrole.rbac.authorization.k8s.io/admin removed: "namespaced-user" \(dry run\)'
os::cmd::expect_success_and_text 'oc adm policy add-role-to-user admin namespaced-user --dry-run' 'clusterrole.rbac.authorization.k8s.io/admin added: "namespaced-user" \(dry run\)'

# ensure that running an `+"`"+`oc adm policy`+"`"+` sub-command with --output does not actually perform any changes
os::cmd::expect_success_and_text 'oc adm policy who-can create pods -o yaml' '\- namespaced\-user'

os::cmd::expect_success_and_text 'oc adm policy scc-subject-review -u namespaced-user --output yaml -f - << __EOF__
$testpod
__EOF__' 'name: testpod'
os::cmd::expect_success_and_text 'oc adm policy scc-subject-review -u namespaced-user --output wide -f - << __EOF__
$testpod
__EOF__' 'Pod/testpod'

os::cmd::expect_success_and_text 'oc adm policy scc-review --output yaml -f - << __EOF__
$testpod
__EOF__' 'allowedServiceAccounts: null'

os::cmd::expect_success_and_text 'oc adm policy add-role-to-group view testgroup -o yaml' 'name: view'
os::cmd::expect_success_and_text 'oc adm policy add-cluster-role-to-group cluster-reader testgroup -o yaml' 'name: testgroup'
os::cmd::expect_success_and_text 'oc adm policy add-cluster-role-to-user cluster-reader namespaced-user -o yaml' 'name: namespaced\-user'

os::cmd::expect_success_and_text 'oc adm policy add-role-to-group view testgroup --dry-run' 'rolebinding.rbac.authorization.k8s.io/view added: "testgroup" \(dry run\)'
os::cmd::expect_success_and_text 'oc adm policy add-cluster-role-to-group cluster-reader testgroup --dry-run' 'clusterrolebinding.rbac.authorization.k8s.io/cluster-reader added: "testgroup" \(dry run\)'
os::cmd::expect_success_and_text 'oc adm policy add-cluster-role-to-user cluster-reader namespaced-user --dry-run' 'clusterrolebinding.rbac.authorization.k8s.io/cluster-reader added: "namespaced-user" \(dry run\)'

os::cmd::expect_success 'oc adm policy add-role-to-group view testgroup'
os::cmd::expect_success 'oc adm policy add-cluster-role-to-group cluster-reader testgroup'
os::cmd::expect_success 'oc adm policy add-cluster-role-to-user cluster-reader namespaced-user'

# ensure that removing missing target causes error.
os::cmd::expect_failure_and_text 'oc adm policy remove-cluster-role-from-user admin ghost' 'error: unable to find target \[ghost\]'
os::cmd::expect_failure_and_text 'oc adm policy remove-cluster-role-from-user admin -z ghost' 'error: unable to find target \[ghost\]'

os::cmd::expect_success_and_not_text 'oc adm policy remove-role-from-group view testgroup -o yaml' 'subjects: '
os::cmd::expect_success_and_text 'oc adm policy remove-cluster-role-from-group cluster-reader testgroup -o yaml' 'name: cluster\-readers'
os::cmd::expect_success_and_text 'oc adm policy remove-cluster-role-from-user cluster-reader namespaced-user -o yaml' 'name: cluster\-reader'

os::cmd::expect_success_and_text 'oc adm policy remove-role-from-group view testgroup --dry-run' 'clusterrole.rbac.authorization.k8s.io/view removed: "testgroup" \(dry run\)'
os::cmd::expect_success_and_text 'oc adm policy remove-cluster-role-from-group cluster-reader testgroup --dry-run' 'clusterrole.rbac.authorization.k8s.io/cluster-reader removed: "testgroup" \(dry run\)'
os::cmd::expect_success_and_text 'oc adm policy remove-cluster-role-from-user cluster-reader namespaced-user --dry-run' 'clusterrole.rbac.authorization.k8s.io/cluster-reader removed: "namespaced-user" \(dry run\)'

os::cmd::expect_success_and_text 'oc adm policy remove-user namespaced-user -o yaml' "namespace: ${project}"
os::cmd::expect_success_and_text 'oc adm policy remove-user namespaced-user --dry-run' "Removing admin from users \[namespaced\-user\] in project ${project}"

os::cmd::expect_success_and_text 'oc adm policy add-scc-to-user anyuid namespaced-user -o yaml' '\- namespaced\-user'
os::cmd::expect_success_and_text 'oc adm policy add-scc-to-user anyuid namespaced-user --dry-run' 'securitycontextconstraints.security.openshift.io/anyuid added to: \["namespaced\-user"\] \(dry run\)'

os::cmd::expect_success_and_text 'oc adm policy add-scc-to-group anyuid testgroup -o yaml' '\- testgroup'
os::cmd::expect_success_and_text 'oc adm policy add-scc-to-group anyuid testgroup --dry-run' 'securitycontextconstraints.security.openshift.io/anyuid added to groups: \["testgroup"\] \(dry run\)'

os::cmd::expect_success_and_not_text 'oc adm policy remove-scc-from-user anyuid namespaced-user -o yaml' '\- namespaced\-user'
os::cmd::expect_success_and_text 'oc adm policy remove-scc-from-user anyuid namespaced-user --dry-run' 'securitycontextconstraints.security.openshift.io/anyuid removed from: \["namespaced\-user"\] \(dry run\)'

os::cmd::expect_success_and_not_text 'oc adm policy remove-scc-from-group anyuid testgroup -o yaml' '\- testgroup'
os::cmd::expect_success_and_text 'oc adm policy remove-scc-from-group anyuid testgroup --dry-run' 'securitycontextconstraints.security.openshift.io/anyuid removed from groups: \["testgroup"\] \(dry run\)'

# ensure system:authenticated users can not create custom builds by default, but can if explicitly granted access
os::cmd::expect_success_and_not_text 'oc adm policy who-can create builds/custom' 'system:authenticated'
os::cmd::expect_success_and_text 'oc adm policy add-cluster-role-to-group system:build-strategy-custom system:authenticated' 'clusterrole.rbac.authorization.k8s.io/system:build-strategy-custom added: "system:authenticated"'
os::cmd::expect_success_and_text 'oc adm policy who-can create builds/custom' 'system:authenticated'

os::cmd::expect_success 'oc auth reconcile --remove-extra-permissions --remove-extra-subjects -f "${BASE_RBAC_DATA}"'

os::cmd::try_until_text 'oc policy can-i --list' 'get update.*imagestreams/layers'
os::cmd::try_until_text 'oc policy can-i create pods --all-namespaces' 'yes'
os::cmd::try_until_text 'oc policy can-i create pods' 'yes'
os::cmd::try_until_text 'oc policy can-i create pods --as harold' 'no'
os::cmd::expect_failure 'oc policy can-i create pods --as harold --user harold'
os::cmd::expect_failure 'oc policy can-i --list --as harold --user harold'
os::cmd::expect_failure 'oc policy can-i create pods --as harold -q'

os::cmd::expect_success_and_text 'oc policy can-i create pods --user system:admin' 'yes'
os::cmd::expect_success_and_text 'oc policy can-i create pods --groups system:unauthenticated --groups system:masters' 'yes'
os::cmd::expect_success_and_text 'oc policy can-i create pods --groups system:unauthenticated' 'no'
os::cmd::expect_success_and_text 'oc policy can-i create pods --user harold' 'no'

os::cmd::expect_success_and_text 'oc policy can-i --list --user system:admin' 'get update.*imagestreams/layers'
os::cmd::expect_success_and_text 'oc policy can-i --list --groups system:unauthenticated --groups system:cluster-readers' 'get.*imagestreams/layers'
os::cmd::expect_success_and_not_text 'oc policy can-i --list --groups system:unauthenticated' 'get update.*imagestreams/layers'
os::cmd::expect_success_and_not_text 'oc policy can-i --list --user harold --groups system:authenticated' 'get update.*imagestreams/layers'
os::cmd::expect_success_and_text 'oc policy can-i --list --user harold --groups system:authenticated' 'create get.*buildconfigs/webhooks'


os::cmd::expect_failure 'oc policy scc-subject-review'
os::cmd::expect_failure 'oc policy scc-review'
os::cmd::expect_failure 'oc policy scc-subject-review -u invalid --namespace=noexist'
os::cmd::expect_failure_and_text 'oc policy scc-subject-review -f ${OS_ROOT}/test/testdata/pspreview_unsupported_statefulset.yaml' 'error: StatefulSet "rd" with spec.volumeClaimTemplates currently not supported.'
os::cmd::expect_failure_and_text 'oc policy scc-subject-review -z foo,bar -f ${OS_ROOT}/test/testdata/job.yaml'  'error: only one Service Account is supported'
os::cmd::expect_failure_and_text 'oc policy scc-subject-review -z system:serviceaccount:test:default,system:serviceaccount:test:builder -f ${OS_ROOT}/test/testdata/job.yaml'  'error: only one Service Account is supported'
os::cmd::expect_failure_and_text 'oc policy scc-review -f ${OS_ROOT}/test/testdata/pspreview_unsupported_statefulset.yaml' 'error: StatefulSet "rd" with spec.volumeClaimTemplates currently not supported.'
os::cmd::expect_success_and_text 'oc policy scc-subject-review -f ${OS_ROOT}/test/testdata/job.yaml -o=jsonpath={.status.allowedBy.name}' 'anyuid'
os::cmd::expect_success_and_text 'oc policy scc-subject-review -f ${OS_ROOT}/test/testdata/redis-slave.yaml -o=jsonpath={.status.allowedBy.name}' 'anyuid'
# In the past system:admin only had access to a few SCCs, so the following command resulted in the privileged SCC being used
# Since SCCs are now authorized via RBAC, and system:admin can perform all RBAC actions == system:admin can access all SCCs now
# Thus the following command now results in the use of the hostnetwork SCC which is the most restrictive SCC that still allows the pod to run
os::cmd::expect_success_and_text 'oc policy scc-subject-review -f ${OS_ROOT}/test/testdata/nginx_pod.yaml -o=jsonpath={.status.allowedBy.name}' 'hostnetwork'
# Make sure that the legacy ungroupified objects continue to work by directly doing a create
os::cmd::expect_success_and_text 'oc create -f ${OS_ROOT}/test/testdata/legacy_ungroupified_psp_review.yaml -o=jsonpath={.status.allowedBy.name}' 'restricted'
os::cmd::expect_success "oc login -u bob -p bobpassword"
os::cmd::expect_success_and_text 'oc whoami' 'bob'
os::cmd::expect_success 'oc new-project policy-second'
os::cmd::expect_success_and_text 'oc policy scc-subject-review -f ${OS_ROOT}/test/testdata/job.yaml -o=jsonpath={.status.allowedBy.name}' 'restricted'
os::cmd::expect_success_and_text 'oc policy scc-subject-review -f ${OS_ROOT}/test/testdata/job.yaml --no-headers=true' 'Job/hello   restricted'
os::cmd::expect_success_and_text 'oc policy scc-subject-review -f ${OS_ROOT}/test/testdata/two_jobs.yaml -o=jsonpath={.status.allowedBy.name}' 'restrictedrestricted'
os::cmd::expect_success_and_text 'oc policy scc-review -f ${OS_ROOT}/test/testdata/job.yaml -ojsonpath={.status.allowedServiceAccounts}' '<nil>'
os::cmd::expect_success_and_text 'oc policy scc-review -f ${OS_ROOT}/test/extended/testdata/deployments/deployment-simple.yaml -ojsonpath={.status.allowedServiceAccounts}' '<nil>'
os::cmd::expect_failure 'oc policy scc-subject-review -f ${OS_ROOT}/test/testdata/external-service.yaml'
os::cmd::expect_success "oc login -u system:admin -n '${project}'"
os::cmd::expect_success_and_text 'oc policy scc-subject-review -u bob -g system:authenticated -f ${OS_ROOT}/test/testdata/job.yaml -n policy-second -o=jsonpath={.status.allowedBy.name}' 'restricted'
os::cmd::expect_success_and_text 'oc policy scc-subject-review -u bob -f ${OS_ROOT}/test/testdata/job.yaml -n policy-second --no-headers=true' 'Job/hello   <none>'
os::cmd::expect_success_and_text 'oc policy scc-subject-review -z default -f ${OS_ROOT}/test/testdata/job.yaml' ''
os::cmd::expect_success_and_text 'oc policy scc-subject-review -z default -g system:authenticated -f ${OS_ROOT}/test/testdata/job.yaml' 'restricted'
os::cmd::expect_failure_and_text 'oc policy scc-subject-review -u alice -z default -g system:authenticated -f ${OS_ROOT}/test/testdata/job.yaml' 'error: --user and --serviceaccount are mutually exclusive'
os::cmd::expect_success_and_text 'oc policy scc-subject-review -z system:serviceaccount:alice:default -g system:authenticated -f ${OS_ROOT}/test/testdata/job.yaml' 'restricted'
os::cmd::expect_success_and_text 'oc policy scc-subject-review -u alice -g system:authenticated -f ${OS_ROOT}/test/testdata/job.yaml' 'restricted'
os::cmd::expect_failure_and_text 'oc policy scc-subject-review -u alice -g system:authenticated -n noexist -f ${OS_ROOT}/test/testdata/job.yaml' 'error: unable to compute Pod Security Policy Subject Review for "hello": namespaces "noexist" not found'
os::cmd::expect_success 'oc create -f ${OS_ROOT}/test/testdata/scc_lax.yaml'
os::cmd::expect_success "oc login -u bob -p bobpassword"
os::cmd::expect_success_and_text 'oc policy scc-review -f ${OS_ROOT}/test/testdata/job.yaml --no-headers=true' 'Job/hello   default   lax'
os::cmd::expect_success_and_text 'oc policy scc-review -z default  -f ${OS_ROOT}/test/testdata/job.yaml --no-headers=true' 'Job/hello   default   lax'
os::cmd::expect_success_and_text 'oc policy scc-review -z system:serviceaccount:policy-second:default  -f ${OS_ROOT}/test/testdata/job.yaml --no-headers=true' 'Job/hello   default   lax'
os::cmd::expect_success_and_text 'oc policy scc-review -f ${OS_ROOT}/test/extended/testdata/deployments/deployment-simple.yaml --no-headers=true' 'DeploymentConfig/deployment-simple   default   lax'
os::cmd::expect_success_and_text 'oc policy scc-review -f ${OS_ROOT}/test/testdata/nginx_pod.yaml --no-headers=true' ''
os::cmd::expect_failure_and_text 'oc policy scc-review -z default -f ${OS_ROOT}/test/testdata/job.yaml --namespace=no-exist' 'error: unable to compute Pod Security Policy Review for "hello": podsecuritypolicyreviews.security.openshift.io is forbidden: User "bob" cannot create resource "podsecuritypolicyreviews" in API group "security.openshift.io" in the namespace "no-exist"'
os::cmd::expect_failure_and_text 'oc policy scc-review -z default -f ${OS_ROOT}/test/testdata/pspreview_unsupported_statefulset.yaml' 'error: StatefulSet "rd" with spec.volumeClaimTemplates currently not supported.'
os::cmd::expect_failure_and_text 'oc policy scc-review -z no-exist -f ${OS_ROOT}/test/testdata/job.yaml' 'error: unable to compute Pod Security Policy Review for "hello": unable to retrieve ServiceAccount no-exist: serviceaccount "no-exist" not found'
os::cmd::expect_success "oc login -u system:admin -n '${project}'"
os::cmd::expect_success 'oc delete project policy-second'

# adjust the cluster-admin role to check defaulting and coverage checks
# this is done here instead of an integration test because we need to make sure the actual yaml serializations work
workingdir=$(mktemp -d)
cp ${OS_ROOT}/hack/local-up-master/test-manifests/cluster_admin_1.0.yaml ${workingdir}
os::util::sed "s/RESOURCE_VERSION//g" ${workingdir}/cluster_admin_1.0.yaml
os::cmd::expect_success "oc create -f ${workingdir}/cluster_admin_1.0.yaml"
os::cmd::expect_success 'oc adm policy add-cluster-role-to-user alternate-cluster-admin alternate-cluster-admin-user'

# switch to test user to be sure that default project admin policy works properly
new_kubeconfig="${workingdir}/tempconfig"
os::cmd::expect_success "oc config view --raw > $new_kubeconfig"
os::cmd::expect_success "oc login -u alternate-cluster-admin-user -p anything --kubeconfig=${new_kubeconfig}"

# alternate-cluster-admin can restrict himself to less groups (no star)
os::cmd::try_until_text "oc policy who-can update clusterrroles" "alternate-cluster-admin-user"
resourceversion=$(oc get clusterrole/alternate-cluster-admin -o=jsonpath="{.metadata.resourceVersion}")
cp ${OS_ROOT}/hack/local-up-master/test-manifests/cluster_admin_without_apigroups.yaml ${workingdir}
os::util::sed "s/RESOURCE_VERSION/${resourceversion}/g" ${workingdir}/cluster_admin_without_apigroups.yaml
os::cmd::expect_success "oc replace --kubeconfig=${new_kubeconfig} clusterrole/alternate-cluster-admin -f ${workingdir}/cluster_admin_without_apigroups.yaml"

# alternate-cluster-admin should NOT have the power add back star now (anything other than star is considered less so this mimics testing against no groups)
os::cmd::try_until_failure "oc policy who-can update hpa.autoscaling | grep -q alternate-cluster-admin-user"
resourceversion=$(oc get clusterrole/alternate-cluster-admin -o=jsonpath="{.metadata.resourceVersion}")
cp ${OS_ROOT}/vendor/github.com/openshift/openshift-apiserver/test/testdata/bootstrappolicy/alternate_cluster_admin.yaml ${workingdir}
os::util::sed "s/RESOURCE_VERSION/${resourceversion}/g" ${workingdir}/alternate_cluster_admin.yaml
os::cmd::expect_failure_and_text "oc replace --kubeconfig=${new_kubeconfig} clusterrole/alternate-cluster-admin -f ${workingdir}/alternate_cluster_admin.yaml" "attempting to grant RBAC permissions not currently held"

# This test validates cluster level policy for serviceaccounts
# ensure service account cannot list pods at the namespace level
os::cmd::expect_success_and_text "oc policy can-i list pods --as=system:serviceaccount:cmd-policy:testserviceaccount" "no"
os::cmd::expect_success_and_text "oc adm policy add-role-to-user view -z=testserviceaccount" 'clusterrole.rbac.authorization.k8s.io/view added: "testserviceaccount"'
# ensure service account can list pods at the namespace level after "view" role is added, but not at the cluster level
os::cmd::try_until_text "oc policy can-i list pods --as=system:serviceaccount:${project}:testserviceaccount" "yes"
os::cmd::try_until_text "oc policy can-i list pods --all-namespaces --as=system:serviceaccount:${project}:testserviceaccount" "no"
# ensure service account can list pods at the cluster level after "cluster-reader" cluster role is added
os::cmd::expect_success_and_text "oc adm policy add-cluster-role-to-user cluster-reader -z=testserviceaccount" 'clusterrole.rbac.authorization.k8s.io/cluster-reader added: "testserviceaccount"'
os::cmd::try_until_text "oc policy can-i list pods --all-namespaces --as=system:serviceaccount:${project}:testserviceaccount" "yes"

# make sure users can easily create roles for RBAC based SCC access
os::cmd::expect_success_and_text 'oc create role scc-privileged --verb=use --resource=scc --resource-name=privileged' 'role.rbac.authorization.k8s.io/scc-privileged created'
os::cmd::expect_success_and_text 'oc delete role.rbac scc-privileged' 'role.rbac.authorization.k8s.io "scc-privileged" deleted'

echo "policy: ok"
os::test::junit::declare_suite_end
`)

func testExtendedTestdataCmdTestCmdPolicyShBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdPolicySh, nil
}

func testExtendedTestdataCmdTestCmdPolicySh() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdPolicyShBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/policy.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdPrinterSh = []byte(`#!/bin/bash
source "$(dirname "${BASH_SOURCE}")/../../hack/lib/init.sh"
trap os::test::junit::reconcile_output EXIT

# Test that resource printer includes resource kind on multiple resources
os::test::junit::declare_suite_start "cmd/basicresources/printer"
os::cmd::expect_success 'oc create imagestream test1'
os::cmd::expect_success 'oc new-app node'
os::cmd::expect_success_and_text 'oc get all' 'imagestream.image.openshift.io/test1'
os::cmd::expect_success_and_not_text 'oc get is' 'imagestream.image.openshift.io/test1'

# Test that resource printer includes namespaces for buildconfigs with custom strategies
os::cmd::expect_success 'oc create -f ${TEST_DATA}/application-template-custombuild.json'
os::cmd::expect_success_and_text 'oc new-app ruby-helloworld-sample' 'deploymentconfig.apps.openshift.io "frontend" created'
os::cmd::expect_success_and_text 'oc get all --all-namespaces' 'cmd-printer[\ ]+buildconfig.build.openshift.io\/ruby\-sample\-build'

# Test that infos printer supports all outputFormat options
os::cmd::expect_success_and_text 'oc new-app node -o yaml | oc set env -f - MYVAR=value' 'deploymentconfig.apps.openshift.io/node updated'
# FIXME: what to do with this?
# os::cmd::expect_success 'oc new-app node -o yaml | oc set env -f - MYVAR=value -o custom-colums="NAME:.metadata.name"'
os::cmd::expect_success_and_text 'oc new-app node -o yaml | oc set env -f - MYVAR=value -o yaml' 'apiVersion: apps.openshift.io/v1'
os::cmd::expect_success_and_text 'oc new-app node -o yaml | oc set env -f - MYVAR=value -o json' '"apiVersion": "apps.openshift.io/v1"'
echo "resource printer: ok"
os::test::junit::declare_suite_end
`)

func testExtendedTestdataCmdTestCmdPrinterShBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdPrinterSh, nil
}

func testExtendedTestdataCmdTestCmdPrinterSh() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdPrinterShBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/printer.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdProjectsSh = []byte(`#!/bin/bash
source "$(dirname "${BASH_SOURCE}")/../../hack/lib/init.sh"
trap os::test::junit::reconcile_output EXIT

# Cleanup cluster resources created by this test
(
  set +e
  oc delete namespace test4
  oc delete namespace test5
  oc delete namespace test6
  oc wait --for=delete namespace test4 --timeout=60s || true
  oc wait --for=delete namespace test5 --timeout=60s || true
  oc wait --for=delete namespace test6 --timeout=60s || true
  exit 0
) &>/dev/null


os::test::junit::declare_suite_start "cmd/projects"

os::test::junit::declare_suite_start "cmd/projects/lifecycle"
# resourceaccessreview
os::cmd::expect_success 'oc policy who-can get pods -n missing-ns'
# selfsubjectaccessreview
os::cmd::expect_success 'oc policy can-i get pods -n missing-ns'
# selfsubjectrulesreivew
os::cmd::expect_success 'oc policy can-i --list -n missing-ns'
# subjectaccessreview
os::cmd::expect_success 'oc policy can-i get pods --user=bob -n missing-ns'
# subjectrulesreview
os::cmd::expect_success 'oc policy can-i --list  --user=bob -n missing-ns'
echo 'project lifecycle ok'
os::test::junit::declare_suite_end

os::cmd::expect_failure_and_text 'oc projects test_arg' 'no arguments'
# log in as a test user and expect no projects
#os::cmd::expect_success 'oc login -u test -p test'
#os::cmd::expect_success_and_text 'oc projects' 'You are not a member of any projects'
# add a project and expect text for a single project
os::cmd::expect_success_and_text 'oc new-project test4' 'Now using project "test4" on server '
os::cmd::try_until_text 'oc projects' 'Using project "test4" on server'
os::cmd::expect_success_and_text 'oc new-project test5' 'Now using project "test5" on server '
os::cmd::try_until_text 'oc projects' 'You have access to the following projects and can switch between them with '
# HA masters means that you may have to wait for the lists to settle, so you allow for that by waiting
os::cmd::try_until_text 'oc projects' 'test4'
os::cmd::try_until_text 'oc projects' 'test5'
# test --skip-config-write
os::cmd::expect_success_and_text 'oc new-project test6 --skip-config-write' 'To switch to this project and start adding applications, use'
os::cmd::expect_success_and_not_text 'oc config view -o jsonpath="{.contexts[*].context.namespace}"' '\btest6\b'
os::cmd::try_until_text 'oc projects' 'test6'
os::cmd::expect_success_and_text 'oc project test6' 'Now using project "test6"'
os::cmd::expect_success_and_text 'oc config view -o jsonpath="{.contexts[*].context.namespace}"' '\btest6\b'
echo 'projects command ok'


os::test::junit::declare_suite_end
`)

func testExtendedTestdataCmdTestCmdProjectsShBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdProjectsSh, nil
}

func testExtendedTestdataCmdTestCmdProjectsSh() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdProjectsShBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/projects.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdQuotaSh = []byte(`#!/bin/bash
source "$(dirname "${BASH_SOURCE}")/../../hack/lib/init.sh"
trap os::test::junit::reconcile_output EXIT

os::test::junit::declare_suite_start "cmd/quota"

# Cleanup cluster resources created by this test suite
(
  set +e
  oc delete namespace quota-{foo,bar,asmail,images}
  oc wait --for=delete namespace quota-{foo,bar,asmail,images} --timeout=60s || true
  oc delete clusterresourcequotas.quota.openshift.io "for-deads"
  oc delete clusterresourcequotas.quota.openshift.io "for-deads-by-annotation"
  oc delete clusterresourcequotas.quota.openshift.io "for-deads-email-by-annotation"
  oc delete clusterresourcequotas.quota.openshift.io "annotation-value-with-commas"
  exit 0
) &>/dev/null

os::test::junit::declare_suite_start "cmd/quota/clusterquota"

# This tests creating a clusterresourcequota against an existing namespace with a known number of resources
os::cmd::expect_success 'oc new-project quota-foo --as=deads --as-group=system:authenticated --as-group=system:authenticated:oauth'
os::cmd::expect_success 'oc label namespace/quota-foo owner=deads'
os::cmd::try_until_text 'oc get secrets -o name -n quota-foo | wc -l' '9'
os::cmd::expect_success 'oc create clusterquota for-deads --project-label-selector=owner=deads --hard=secrets=10'
os::cmd::try_until_text 'oc get appliedclusterresourcequota -n quota-foo --as deads -o name' "for-deads"
os::cmd::try_until_text 'oc get secrets --all-namespaces; oc get appliedclusterresourcequota/for-deads -n quota-foo --as deads -o jsonpath=used={.status.total.used.secrets}' "used=9"

os::cmd::expect_failure_and_text 'oc create clusterquota for-deads-malformed --project-annotation-selector="openshift.#$%/requester=deads"' "prefix part a DNS-1123 subdomain must consist of lower case alphanumeric characters"
os::cmd::expect_failure_and_text 'oc create clusterquota for-deads-malformed --project-annotation-selector=openshift.io/requester=deads,openshift.io/novalue' "Malformed annotation selector"
os::cmd::expect_success 'oc create clusterquota for-deads-by-annotation --project-annotation-selector=openshift.io/requester=deads --hard=secrets=50'
os::cmd::expect_success 'oc create clusterquota for-deads-email-by-annotation --project-annotation-selector=openshift.io/requester=deads@deads.io --hard=secrets=50'
os::cmd::expect_success 'oc create clusterresourcequota annotation-value-with-commas --project-annotation-selector="openshift.io/requester=deads,\"openshift.io/withcomma=yes,true,1\"" --hard=pods=10'
os::cmd::expect_success 'oc new-project quota-bar --as=deads  --as-group=system:authenticated --as-group=system:authenticated:oauth'
os::cmd::expect_success 'oc new-project quota-asmail --as=deads@deads.io  --as-group=system:authenticated --as-group=system:authenticated:oauth'
os::cmd::try_until_text 'oc get appliedclusterresourcequota -n quota-bar --as deads -o name' "for-deads-by-annotation"
os::cmd::try_until_text 'oc get appliedclusterresourcequota -n quota-foo --as deads -o name' "for-deads-by-annotation"
os::cmd::try_until_text 'oc get appliedclusterresourcequota -n quota-asmail --as deads@deads.io -o name' "for-deads-email-by-annotation"
# the point of the test is to make sure that clusterquota is counting correct and secrets are auto-created and countable
# the create_dockercfg controller can issue multiple creates if the token controller doesn't fill them in, but the creates are duplicates
# since an annotation tracks the intended secrets to be created.  That results in multi-counting quota until reconciliation runs
# do not go past 26.  If you get to 27, you might be selecting an extra namespace.
os::cmd::try_until_text 'oc get secrets --all-namespaces; oc get appliedclusterresourcequota/for-deads-by-annotation -n quota-bar --as deads -o jsonpath=used={.status.total.used.secrets}' "used=(1[0-9]|20|21|22|23|24|25|26)"
os::cmd::expect_success 'oc delete project quota-foo'
os::cmd::try_until_not_text 'oc get clusterresourcequota/for-deads-by-annotation -o jsonpath="{.status.namespaces[*].namespace}"' 'quota-foo'
os::cmd::expect_success 'oc delete project quota-bar'
os::cmd::expect_success 'oc delete project quota-asmail'

echo "clusterquota: ok"
os::test::junit::declare_suite_end

os::test::junit::declare_suite_start "cmd/quota/imagestreams"

os::cmd::expect_success 'oc new-project quota-images --as=deads  --as-group=system:authenticated --as-group=system:authenticated:oauth'
os::cmd::expect_success 'oc create quota -n quota-images is-quota --hard openshift.io/imagestreams=1'
os::cmd::try_until_success 'oc tag -n quota-images openshift/hello-openshift myis2:v2'
os::cmd::expect_failure_and_text 'oc tag -n quota-images busybox mybox:v1' "exceeded quota"
os::cmd::expect_failure_and_text 'oc import-image centos -n quota-images --from=docker.io/centos:latest --confirm=true' "exceeded quota"
os::cmd::expect_success 'oc delete project quota-images'

echo "imagestreams: ok"
os::test::junit::declare_suite_end

os::test::junit::declare_suite_end
`)

func testExtendedTestdataCmdTestCmdQuotaShBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdQuotaSh, nil
}

func testExtendedTestdataCmdTestCmdQuotaSh() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdQuotaShBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/quota.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdRegistrySh = []byte(`#!/bin/bash
source "$(dirname "${BASH_SOURCE}")/../../hack/lib/init.sh"
trap os::test::junit::reconcile_output EXIT

# Cleanup cluster resources created by this test
(
  set +e
  oc delete all --all
  exit 0
) &>/dev/null


os::test::junit::declare_suite_start "cmd/registry/login"
# TODO - re-enable these tests on a real cluster
#os::cmd::expect_success_and_text "oc registry login -z 'default' --registry=localhost:5000 --to=- --skip-check" "auth"
#os::cmd::expect_failure_and_text "oc registry login -z 'default' --registry=localhost2 --to=- 2>&1" "unable to check your credentials"
#os::cmd::expect_success_and_text "oc registry login -z 'default' --registry=localhost2 --to=/tmp/test --skip-check && cat /tmp/test" "localhost2"
os::test::junit::declare_suite_end

os::test::junit::declare_suite_start "cmd/registry/info"
# TODO - re-enable these tests on a real cluster
#os::cmd::expect_success 'oc tag --source=docker openshift/origin-control-plane:latest newrepo:latest'
#os::cmd::expect_success "oc registry info"
#os::cmd::expect_failure_and_text "oc registry info --internal --public" "only one of --internal or --public"
os::test::junit::declare_suite_end
`)

func testExtendedTestdataCmdTestCmdRegistryShBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdRegistrySh, nil
}

func testExtendedTestdataCmdTestCmdRegistrySh() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdRegistryShBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/registry.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdRoutesSh = []byte(`#!/bin/bash
source "$(dirname "${BASH_SOURCE}")/../../hack/lib/init.sh"
trap os::test::junit::reconcile_output EXIT

# Cleanup cluster resources created by this test
(
  set +e
  oc delete route foo bar testroute test-route new-route
  exit 0
) &>/dev/null


os::test::junit::declare_suite_start "cmd/routes"

os::cmd::expect_success 'oc get routes'
os::cmd::expect_success 'oc create -f ${TEST_DATA}/test-route.json'
os::cmd::expect_success_and_text 'oc get routes testroute --show-labels' 'rtlabel1'
os::cmd::expect_success 'oc delete routes testroute'
os::cmd::expect_success 'oc create -f ${TEST_DATA}/test-service.json'
os::cmd::expect_success 'oc create route passthrough --service=svc/frontend'
os::cmd::expect_success 'oc delete routes frontend'
os::cmd::expect_success 'oc create route edge --path /test --service=services/non-existent --port=80'
os::cmd::expect_success 'oc delete routes non-existent'
os::cmd::expect_success 'oc create route edge test-route --service=frontend'
os::cmd::expect_success 'oc delete routes test-route'
os::cmd::expect_failure 'oc create route edge new-route'
os::cmd::expect_success 'oc delete services frontend'
os::cmd::expect_success 'oc create route edge --insecure-policy=Allow --service=foo --port=80'
os::cmd::expect_success_and_text 'oc get route foo -o jsonpath="{.spec.tls.insecureEdgeTerminationPolicy}"' 'Allow'
os::cmd::expect_success 'oc delete routes foo'

os::cmd::expect_success_and_text 'oc create route edge --service foo --port=8080' 'created'
os::cmd::expect_success_and_text 'oc create route edge --service bar --port=9090' 'created'

# verify that reencrypt routes with no destination CA return the stub PEM block on the old API
project="$(oc project -q)"
os::cmd::expect_success_and_text     'oc create route reencrypt --service baz --port=9090' 'created'
os::cmd::expect_success_and_not_text 'oc get --raw /apis/route.openshift.io/v1/namespaces/${project}/routes/baz' 'This is an empty PEM file'

os::cmd::expect_success_and_text 'oc set route-backends foo' 'routes/foo'
os::cmd::expect_success_and_text 'oc set route-backends foo' 'Service'
os::cmd::expect_success_and_text 'oc set route-backends foo' '100'
os::cmd::expect_failure_and_text 'oc set route-backends foo --zero --equal' 'error: --zero and --equal may not be specified together'
os::cmd::expect_failure_and_text 'oc set route-backends foo --zero --adjust' 'error: --adjust and --zero may not be specified together'
os::cmd::expect_failure_and_text 'oc set route-backends foo a=' 'expected NAME=WEIGHT'
os::cmd::expect_failure_and_text 'oc set route-backends foo =10' 'expected NAME=WEIGHT'
os::cmd::expect_failure_and_text 'oc set route-backends foo a=a' 'WEIGHT must be a number'
os::cmd::expect_success_and_text 'oc set route-backends foo a=10' 'updated'
os::cmd::expect_success_and_text 'oc set route-backends foo a=100' 'updated'
os::cmd::expect_success_and_text 'oc set route-backends foo a=0' 'updated'
os::cmd::expect_success_and_text 'oc set route-backends foo' '0'
os::cmd::expect_success_and_text 'oc get routes foo' 'a'
os::cmd::expect_success_and_text 'oc set route-backends foo a1=0 b2=0' 'updated'
os::cmd::expect_success_and_text 'oc set route-backends foo' 'a1'
os::cmd::expect_success_and_text 'oc set route-backends foo' 'b2'
os::cmd::expect_success_and_text 'oc set route-backends foo a1=100 b2=50 c3=0' 'updated'
os::cmd::expect_success_and_text 'oc get routes foo' 'a1\(66%\),b2\(33%\),c3\(0%\)'
os::cmd::expect_success_and_text 'oc set route-backends foo a1=100 b2=0 c3=0' 'updated'
os::cmd::expect_success_and_text 'oc set route-backends foo --adjust b2=+10%' 'updated'
os::cmd::expect_success_and_text 'oc get routes foo' 'a1\(90%\),b2\(10%\),c3\(0%\)'
os::cmd::expect_success_and_text 'oc set route-backends foo --adjust b2=+25%' 'updated'
os::cmd::expect_success_and_text 'oc get routes foo' 'a1\(65%\),b2\(35%\),c3\(0%\)'
os::cmd::expect_success_and_text 'oc set route-backends foo --adjust b2=+99%' 'updated'
os::cmd::expect_success_and_text 'oc get routes foo' 'a1\(0%\),b2\(100%\),c3\(0%\)'
os::cmd::expect_success_and_text 'oc set route-backends foo --adjust b2=-51%' 'updated'
os::cmd::expect_success_and_text 'oc get routes foo' 'a1\(51%\),b2\(49%\),c3\(0%\)'
os::cmd::expect_success_and_text 'oc set route-backends foo --adjust a1=20%' 'updated'
os::cmd::expect_success_and_text 'oc get routes foo' 'a1\(20%\),b2\(80%\),c3\(0%\)'
os::cmd::expect_success_and_text 'oc set route-backends foo --adjust c3=50%' 'updated'
os::cmd::expect_success_and_text 'oc get routes foo' 'a1\(10%\),b2\(80%\),c3\(10%\)'
os::cmd::expect_success_and_text 'oc describe routes foo' '25 \(10%\)'
os::cmd::expect_success_and_text 'oc describe routes foo' '200 \(80%\)'
os::cmd::expect_success_and_text 'oc describe routes foo' '25 \(10%\)'
os::cmd::expect_success_and_text 'oc describe routes foo' '<error: endpoints "c3" not found>'
os::cmd::expect_success_and_text 'oc set route-backends foo --adjust c3=1' 'updated'
os::cmd::expect_success_and_text 'oc describe routes foo' '1 \(0%\)'
os::cmd::expect_success_and_text 'oc set route-backends foo --equal' 'updated'
os::cmd::expect_success_and_text 'oc get routes foo' 'a1\(33%\),b2\(33%\),c3\(33%\)'
os::cmd::expect_success_and_text 'oc describe routes foo' '100 \(33%\)'
os::cmd::expect_success_and_text 'oc set route-backends foo --zero' 'updated'
os::cmd::expect_success_and_text 'oc get routes foo' 'a1\(0%\),b2\(0%\),c3\(0%\)'
os::cmd::expect_success_and_text 'oc describe routes foo' '0'

os::test::junit::declare_suite_end
`)

func testExtendedTestdataCmdTestCmdRoutesShBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdRoutesSh, nil
}

func testExtendedTestdataCmdTestCmdRoutesSh() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdRoutesShBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/routes.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdRsyncSh = []byte(`#!/bin/bash
source "$(dirname "${BASH_SOURCE}")/../../hack/lib/init.sh"
trap os::test::junit::reconcile_output EXIT

# Cleanup cluster resources created by this test
(
  set +e
  oc delete all --all
  exit 0
) &>/dev/null

os::test::junit::declare_suite_start "cmd/rsync"
# This test validates the rsync command
os::cmd::expect_success 'oc create -f - << __EOF__
apiVersion: v1
kind: Pod
metadata:
  name: valid-pod
  labels:
    name: valid-pod
spec:
  containers:
  - name: kubernetes-serve-hostname
    image: k8s.gcr.io/serve_hostname
    resources:
      limits:
        cpu: "1"
        memory: 512Mi
__EOF__'

temp_dir=$(mktemp -d)
include_file=$(mktemp -p $temp_dir)
exclude_file=$(mktemp -p $temp_dir)

# we don't actually have a kubelet running, so no "tar" binary will be available in container because there will be no container.
# instead, ensure that the tar command to be executed is formatted correctly based on our --include and --exclude values
os::cmd::expect_failure_and_text "oc rsync --strategy=tar --include=$include_file --exclude=$exclude_file $temp_dir valid-pod:/tmp --loglevel 4" "running command: tar.*\*\*\/$include_file.*--exclude=$exclude_file"

echo "rsync: ok"
os::test::junit::declare_suite_end
`)

func testExtendedTestdataCmdTestCmdRsyncShBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdRsyncSh, nil
}

func testExtendedTestdataCmdTestCmdRsyncSh() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdRsyncShBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/rsync.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdRunSh = []byte(`#!/bin/bash
source "$(dirname "${BASH_SOURCE}")/../../hack/lib/init.sh"
trap os::test::junit::reconcile_output EXIT

os::test::junit::declare_suite_start "cmd/run"
# This test validates the value of --image for oc run
os::cmd::expect_success_and_text 'oc run newdcforimage --image=validimagevalue' 'deploymentconfig.apps.openshift.io/newdcforimage created'
os::cmd::expect_failure_and_text 'oc run newdcforimage2 --image="InvalidImageValue0192"' 'error: Invalid image name "InvalidImageValue0192": invalid reference format'
os::cmd::expect_failure_and_text 'oc run test1 --image=busybox --attach --dry-run' "dry-run can't be used with attached containers options"
os::cmd::expect_failure_and_text 'oc run test1 --image=busybox --stdin --dry-run' "dry-run can't be used with attached containers options"
echo "oc run: ok"
os::test::junit::declare_suite_end
`)

func testExtendedTestdataCmdTestCmdRunShBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdRunSh, nil
}

func testExtendedTestdataCmdTestCmdRunSh() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdRunShBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/run.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdSecretsSh = []byte(`#!/bin/bash
source "$(dirname "${BASH_SOURCE}")/../../hack/lib/init.sh"
trap os::test::junit::reconcile_output EXIT

# Cleanup cluster resources created by this test
(
  set +e
  oc delete all,templates,secrets --all
  exit 0
) &>/dev/null


os::test::junit::declare_suite_start "cmd/secrets"
# This test validates secret interaction
touch Makefile
os::cmd::expect_success 'oc create secret generic foo --type=blah --from-file=makefile=Makefile'
os::cmd::expect_success_and_text 'oc get secrets/foo -o jsonpath={.type}' 'blah'

os::cmd::expect_success 'oc create secret docker-registry dockerconfigjson --docker-username=sample-user --docker-password=sample-password --docker-email=fake@example.org'
# can't use a go template here because the output needs to be base64 decoded.  base64 isn't installed by default in all distros
os::cmd::expect_success "oc get secrets/dockerconfigjson -o jsonpath='{ .data.\.dockerconfigjson }' | base64 -d > ${HOME}/dockerconfigjson"
os::cmd::expect_success 'oc create secret generic from-file --from-file=.dockerconfigjson=${HOME}/dockerconfigjson --type=kubernetes.io/dockerconfigjson'
# check to make sure the type was correctly auto-detected
os::cmd::expect_success_and_text 'oc get secret/from-file --template="{{ .type }}"' 'kubernetes.io/dockerconfigjson'
# make sure the -o works correctly
os::cmd::expect_success_and_text 'oc create secret docker-registry dockerconfigjson --docker-username=sample-user --docker-password=sample-password --docker-email=fake@example.org --dry-run -o yaml' 'kubernetes.io/dockerconfigjson'
os::cmd::expect_success_and_text 'oc create secret generic from-file-again --from-file=.dockerconfigjson=${HOME}/dockerconfigjson --type=kubernetes.io/dockerconfigjson -o yaml' 'kubernetes.io/dockerconfigjson'
# check to make sure malformed names fail as expected
os::cmd::expect_failure_and_text 'oc create secret generic bad-name --from-file=.docker=cfg=${HOME}/dockerconfigjson' "error: Key names or file paths cannot contain '='"

workingdir="$( mktemp -d )"
os::cmd::try_until_success "oc get secret/dockerconfigjson"
os::cmd::expect_success_and_text "oc extract secret/dockerconfigjson --to '${workingdir}'" '.dockerconfigjson'
os::cmd::expect_success_and_text "oc extract secret/dockerconfigjson --to=-" 'sample-user'
os::cmd::expect_success_and_text "oc extract secret/dockerconfigjson --to=-" 'sample-password'
os::cmd::expect_success_and_text "cat '${workingdir}/.dockerconfigjson'" 'sample-user'
os::cmd::expect_failure_and_text "oc extract secret/dockerconfigjson --to '${workingdir}'" 'error: .dockerconfigjson: file exists, pass --confirm to overwrite'
os::cmd::expect_failure_and_text "oc extract secret/dockerconfigjson secret/dockerconfigjson --to '${workingdir}'" 'error: .dockerconfigjson: file exists, pass --confirm to overwrite'
os::cmd::expect_success_and_text "oc extract secret/dockerconfigjson secret/dockerconfigjson --to '${workingdir}' --confirm" '.dockerconfigjson'
os::cmd::expect_success_and_text "oc extract secret/dockerconfigjson --to '${workingdir}' --confirm" '.dockerconfigjson'
os::cmd::expect_success "oc extract secret/dockerconfigjson --to '${workingdir}' --confirm | xargs rm"
os::cmd::expect_failure_and_text "oc extract secret/dockerconfigjson --to missing-dir" "stat missing-dir: no such file or directory"

# attach secrets to service account
# single secret with prefix
os::cmd::expect_success 'oc secrets link deployer dockerconfigjson'
# don't add the same secret twice
os::cmd::expect_success 'oc secrets link serviceaccounts/deployer dockerconfigjson secrets/from-file'
# make sure we can add as as pull secret
os::cmd::expect_success 'oc secrets link deployer dockerconfigjson from-file --for=pull'
# make sure we can add as as pull secret and mount secret at once
os::cmd::expect_success 'oc secrets link serviceaccounts/deployer secrets/dockerconfigjson secrets/from-file --for=pull,mount'

GIT_CONFIG_PATH="${ARTIFACT_DIR}/.gitconfig"
touch "${GIT_CONFIG_PATH}"
#git config --file "${GIT_CONFIG_PATH}" user.name sample-user
#git config --file "${GIT_CONFIG_PATH}" user.token password

function create_valid_file() {
	echo test_data > "${ARTIFACT_DIR}/${1}"
	echo "${ARTIFACT_DIR}/${1}"
}

CA_CERT_PATH=$(create_valid_file ca.pem)
PRIVATE_KEY_PATH=$(create_valid_file id_rsa)

os::cmd::expect_success "oc create secret generic basicauth --type=kubernetes.io/basic-auth --from-literal=username=sample-user --from-literal=password=sample-password --from-file=gitconfig='${GIT_CONFIG_PATH}' --from-file=ca-cert='${CA_CERT_PATH}'"
# check to make sure incorrect .gitconfig path fail as expected
os::cmd::expect_failure_and_text 'oc create secret generic bad-file --type=kubernetes.io/basic-auth --from-literal=username=user --from-file=gitconfig=/bad/path' 'error reading /bad/path: no such file or directory'

os::cmd::expect_success "oc create secret generic sshauth --from-file=ssh-privatekey='${PRIVATE_KEY_PATH}' --from-file=ca-cert='${CA_CERT_PATH}'"
# check to make sure incorrect SSH private-key path fail as expected
os::cmd::expect_failure_and_text 'oc create secret generic bad-file --from-file=ssh-privatekey=/bad/path' 'error reading /bad/path: no such file or directory'

# attach secrets to service account (deprecated)
# single secret with prefix
os::cmd::expect_success 'oc secrets link deployer basicauth'
# don't add the same secret twice
os::cmd::expect_success 'oc secrets link deployer basicauth sshauth'
# make sure we can add as as pull secret
os::cmd::expect_success 'oc secrets link deployer basicauth sshauth --for=pull'
# make sure we can add as as pull secret and mount secret at once
os::cmd::expect_success 'oc secrets link deployer basicauth sshauth --for=pull,mount'

# attach secrets to service account
# test that those secrets can be unlinked
# after they have been deleted.
os::cmd::expect_success 'oc create secret generic deleted-secret'
os::cmd::expect_success 'oc secrets link deployer deleted-secret'
# confirm our soon-to-be-deleted secret has been linked
os::cmd::expect_success_and_text "oc get serviceaccount deployer -o jsonpath='{.secrets[?(@.name==\"deleted-secret\")]}'" 'deleted\-secret'
# delete "deleted-secret" and attempt to unlink from service account
os::cmd::expect_success 'oc delete secret deleted-secret'
os::cmd::expect_failure_and_text 'oc secrets unlink deployer secrets/deleted-secret' 'Unlinked deleted secrets'
# ensure already-deleted secret has been unlinked
os::cmd::expect_success_and_not_text "oc get serviceaccount deployer -o jsonpath='{.secrets[?(@.name==\"deleted-secret\")]}'" 'deleted\-secret'

# attach secrets to service account
# single secret with prefix
os::cmd::expect_success 'oc secrets link deployer basicauth'
# don't add the same secret twice
os::cmd::expect_success 'oc secrets link deployer basicauth sshauth'
# make sure we can add as as pull secret
os::cmd::expect_success 'oc secrets link deployer basicauth sshauth --for=pull'
# make sure we can add as as pull secret and mount secret at once
os::cmd::expect_success 'oc secrets link deployer basicauth sshauth --for=pull,mount'

# Confirm that all the linked secrets are present
os::cmd::expect_success 'oc get serviceaccounts/deployer -o yaml |grep -q basicauth'
os::cmd::expect_success 'oc get serviceaccounts/deployer -o yaml |grep -q sshauth'

# Remove secrets from service account
os::cmd::expect_success 'oc secrets unlink deployer basicauth'
# Confirm that the secret was removed
os::cmd::expect_failure 'oc get serviceaccounts/deployer -o yaml |grep -q basicauth'

# Re-link that secret
os::cmd::expect_success 'oc secrets link deployer basicauth'

# Removing a non-existent secret should warn but succeed and change nothing
os::cmd::expect_failure_and_text 'oc secrets unlink deployer foobar' 'secret "foobar" not found'

# Make sure that removing an existent and non-existent secret succeeds but warns about the non-existent one
os::cmd::expect_failure_and_text 'oc secrets unlink deployer foobar basicauth' 'secret "foobar" not found'
# Make sure that the existing secret is removed
os::cmd::expect_failure 'oc get serviceaccounts/deployer -o yaml |grep -q basicauth'

# Make sure that removing a real but unlinked secret succeeds
# https://github.com/openshift/origin/pull/9234#discussion_r70832486
os::cmd::expect_failure_and_text 'oc secrets unlink deployer basicauth', 'No valid secrets found or secrets not linked to service account'

# Make sure that it succeeds if *any* of the secrets are linked
# https://github.com/openshift/origin/pull/9234#discussion_r70832486
os::cmd::expect_success 'oc secrets unlink deployer basicauth sshauth'

# Confirm that the linked one was removed
os::cmd::expect_failure 'oc get serviceaccounts/deployer -o yaml |grep -q sshauth'

# command alias
os::cmd::expect_success 'oc secret --help'
os::cmd::expect_success 'oc secret new --help'
os::cmd::expect_success 'oc secret new-dockercfg --help'
os::cmd::expect_success 'oc secret new-basicauth --help'
os::cmd::expect_success 'oc secret new-sshauth --help'
os::cmd::expect_success 'oc secret add --help'
os::cmd::expect_success 'oc secret link --help'
os::cmd::expect_success 'oc secret unlink --help'

echo "secrets: ok"
os::test::junit::declare_suite_end

os::test::junit::declare_suite_start "cmd/serviceaccounts-create-kubeconfig"
os::cmd::expect_success "oc serviceaccounts create-kubeconfig default > '${BASETMPDIR}/generated_default.kubeconfig'"
os::cmd::expect_success_and_text "KUBECONFIG='${BASETMPDIR}/generated_default.kubeconfig' oc whoami" "system:serviceaccount:$(oc project -q):default"
echo "serviceaccounts: ok"
os::test::junit::declare_suite_end
`)

func testExtendedTestdataCmdTestCmdSecretsShBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdSecretsSh, nil
}

func testExtendedTestdataCmdTestCmdSecretsSh() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdSecretsShBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/secrets.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdServicesSh = []byte(`#!/bin/bash
source "$(dirname "${BASH_SOURCE}")/../../hack/lib/init.sh"
trap os::test::junit::reconcile_output EXIT

# Cleanup cluster resources created by this test
(
  set +e
  oc delete all,templates --all
  exit 0
) &>/dev/null


os::test::junit::declare_suite_start "cmd/create-service-nodeport"
# This test validates the 'create service nodeport' command and its "--node-port" and "--tcp" options
os::cmd::expect_success_and_text 'oc create service nodeport mynodeport --tcp=8080:7777 --node-port=30000' 'service/mynodeport created'
os::cmd::expect_failure_and_text 'oc create service nodeport mynodeport --tcp=8080:7777 --node-port=30000' 'provided port is already allocated'
os::cmd::expect_failure_and_text 'oc create service nodeport mynodeport --tcp=8080:7777 --node-port=300' 'provided port is not in the valid range. The range of valid ports is 30000-32767'
os::cmd::expect_success_and_text 'oc describe service mynodeport' 'NodePort\:.*30000'
os::cmd::expect_success_and_text 'oc describe service mynodeport' 'NodePort\:.*8080-7777'
os::cmd::expect_success_and_text 'oc describe --v=8 service mynodeport' 'Response Body'

echo "create-services-nodeport: ok"
os::test::junit::declare_suite_end
`)

func testExtendedTestdataCmdTestCmdServicesShBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdServicesSh, nil
}

func testExtendedTestdataCmdTestCmdServicesSh() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdServicesShBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/services.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdSetDataSh = []byte(`#!/bin/bash
source "$(dirname "${BASH_SOURCE}")/../../hack/lib/init.sh"
trap os::test::junit::reconcile_output EXIT

# Cleanup cluster resources created by this test
(
  set +e
  oc delete cm --all
  oc delete secret test
  exit 0
) &>/dev/null


os::test::junit::declare_suite_start "cmd/oc/set/data"

os::cmd::expect_success 'oc create configmap test'
tmpfile="$(mktemp)"
echo "c" > "${tmpfile}"

# test --local flag
os::cmd::expect_failure_and_text 'oc set data cm/test a=b --local' 'provide one or more resources by argument or filename'
# test --dry-run flag with -o formats
os::cmd::expect_success_and_text 'oc set data cm/test a=b --dry-run' 'test'
os::cmd::expect_success_and_text 'oc set data cm/test a=b --dry-run -o name' 'configmap/test'
os::cmd::expect_success_and_text 'oc set data cm/test a=b --dry-run' 'configmap/test data updated \(dry run\)'

os::cmd::expect_failure_and_text 'oc set data cm/test a=c a-' 'you may not remove and set the key'
os::cmd::expect_failure_and_text 'oc set data cm/test a=c --from-literal=a=b' 'cannot set key "a" in both argument and flag'

os::cmd::expect_success 'oc set data cm/test a=b'
os::cmd::expect_success_and_text "oc get cm/test -o jsonpath='{.data.a}'" 'b'
os::cmd::expect_success_and_text 'oc set data cm/test a=b' 'info: test was not changed'

os::cmd::expect_success 'oc set data cm/test a-'
os::cmd::expect_success_and_text "oc get cm/test -o jsonpath='{.data.a}'" ''
os::cmd::expect_success_and_text 'oc set data cm/test a-' 'info: test was not changed'

os::cmd::expect_success "oc set data cm/test --from-file=b=${tmpfile}"
os::cmd::expect_success_and_text "oc get cm/test -o jsonpath='{.data.b}'" 'c'
os::cmd::expect_success_and_text "oc set data cm/test --from-file=b=${tmpfile}" 'info: test was not changed'

rm -rf ${tmpfile}
mkdir -p ${tmpfile}
echo '1' > "${tmpfile}/a"
echo '2' > "${tmpfile}/b"
os::cmd::expect_success 'oc set data cm/test b-'
os::cmd::expect_success "oc set data cm/test --from-file=${tmpfile}"
os::cmd::expect_success_and_text "oc get cm/test -o jsonpath='{.data.a}'" '1'
os::cmd::expect_success_and_text "oc get cm/test -o jsonpath='{.data.b}'" '2'
os::cmd::expect_success_and_text "oc set data cm/test --from-file=${tmpfile}" "info: test was not changed"

os::cmd::expect_success 'oc create secret generic test'
os::cmd::expect_success 'oc set data secret/test a=b'
os::cmd::expect_success_and_text "oc get secret/test -o jsonpath='{.data.a}'" 'Yg=='
os::cmd::expect_success_and_text 'oc set data secret/test a=b' 'info: test was not changed'


echo "set-data: ok"
os::test::junit::declare_suite_end
`)

func testExtendedTestdataCmdTestCmdSetDataShBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdSetDataSh, nil
}

func testExtendedTestdataCmdTestCmdSetDataSh() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdSetDataShBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/set-data.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdSetImageSh = []byte(`#!/bin/bash
source "$(dirname "${BASH_SOURCE}")/../../hack/lib/init.sh"
trap os::test::junit::reconcile_output EXIT

# Cleanup cluster resources created by this test
(
  set +e
  oc delete all,templates --all
  exit 0
) &>/dev/null


os::test::junit::declare_suite_start "cmd/oc/set/image"
os::cmd::expect_success 'oc create -f ${TEST_DATA}/test-deployment-config.yaml'
os::cmd::expect_success 'oc create -f ${TEST_DATA}/hello-openshift/hello-pod.json'
os::cmd::expect_success 'oc create -f ${TEST_DATA}/image-streams/image-streams-centos7.json'
os::cmd::try_until_success 'oc get imagestreamtags ruby:2.3'
os::cmd::try_until_success 'oc get imagestreamtags ruby:2.0'

# test --local flag
os::cmd::expect_failure_and_text 'oc set image dc/test-deployment-config ruby-helloworld=ruby:2.0 --local' 'you must specify resources by --filename when --local is set.'
# test --dry-run flag with -o formats
os::cmd::expect_success_and_text 'oc set image dc/test-deployment-config ruby-helloworld=ruby:2.0 --source=istag --dry-run' 'test-deployment-config'
os::cmd::expect_success_and_text 'oc set image dc/test-deployment-config ruby-helloworld=ruby:2.0 --source=istag --dry-run -o name' 'deploymentconfig.apps.openshift.io/test-deployment-config'
os::cmd::expect_success_and_text 'oc set image dc/test-deployment-config ruby-helloworld=ruby:2.0 --source=istag --dry-run' 'deploymentconfig.apps.openshift.io/test-deployment-config image updated \(dry run\)'

os::cmd::expect_success 'oc set image dc/test-deployment-config ruby-helloworld=ruby:2.3 --source=istag'
os::cmd::expect_success_and_text "oc get dc/test-deployment-config -o jsonpath='{.spec.template.spec.containers[0].image}'" 'image-registry.openshift-image-registry.svc:5000/cmd-set-image/ruby'

os::cmd::expect_success 'oc set image dc/test-deployment-config ruby-helloworld=ruby:2.0 --source=istag'
os::cmd::expect_success_and_text "oc get dc/test-deployment-config -o jsonpath='{.spec.template.spec.containers[0].image}'" 'image-registry.openshift-image-registry.svc:5000/cmd-set-image/ruby'

os::cmd::expect_failure 'oc set image dc/test-deployment-config ruby-helloworld=ruby:XYZ --source=istag'
os::cmd::expect_failure 'oc set image dc/test-deployment-config ruby-helloworld=ruby:XYZ --source=isimage'

os::cmd::expect_success 'oc set image dc/test-deployment-config ruby-helloworld=nginx'
os::cmd::expect_success_and_text "oc get dc/test-deployment-config -o jsonpath='{.spec.template.spec.containers[0].image}'" 'nginx'

os::cmd::expect_success 'oc set image pod/hello-openshift hello-openshift=nginx'
os::cmd::expect_success_and_text "oc get pod/hello-openshift -o jsonpath='{.spec.containers[0].image}'" 'nginx'

os::cmd::expect_success 'oc set image pod/hello-openshift hello-openshift=nginx:1.9.1'
os::cmd::expect_success_and_text "oc get pod/hello-openshift -o jsonpath='{.spec.containers[0].image}'" 'nginx:1.9.1'

os::cmd::expect_success 'oc set image pods,dc *=ruby:2.3 --all --source=imagestreamtag'
os::cmd::expect_success_and_text "oc get pod/hello-openshift -o jsonpath='{.spec.containers[0].image}'" 'image-registry.openshift-image-registry.svc:5000/cmd-set-image/ruby'
os::cmd::expect_success_and_text "oc get dc/test-deployment-config -o jsonpath='{.spec.template.spec.containers[0].image}'" 'image-registry.openshift-image-registry.svc:5000/cmd-set-image/ruby'

echo "set-image: ok"
os::test::junit::declare_suite_end
`)

func testExtendedTestdataCmdTestCmdSetImageShBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdSetImageSh, nil
}

func testExtendedTestdataCmdTestCmdSetImageSh() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdSetImageShBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/set-image.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdSetLivenessProbeSh = []byte(`#!/bin/bash
source "$(dirname "${BASH_SOURCE}")/../../hack/lib/init.sh"
trap os::test::junit::reconcile_output EXIT

# Cleanup cluster resources created by this test
(
  set +e
  oc delete all,templates --all
  exit 0
) &>/dev/null


os::test::junit::declare_suite_start "cmd/set-probe-liveness"
# This test setting a liveness probe, without warning about replication controllers whose deployment depends on deployment configs
os::cmd::expect_success_and_text 'oc create -f ${TEST_DATA}/simple-deployment.yaml' 'deploymentconfig.apps.openshift.io/simple-deployment created'
os::cmd::expect_success_and_text 'oc status --suggest' 'dc/simple-deployment has no liveness probe'

# test --local flag
os::cmd::expect_failure_and_text 'oc set probe dc/simple-deployment --liveness --get-url=http://google.com:80 --local' 'You must provide one or more resources by argument or filename'
# test --dry-run flag with -o formats
os::cmd::expect_success_and_text 'oc set probe dc/simple-deployment --liveness --get-url=http://google.com:80 --dry-run' 'simple-deployment'
os::cmd::expect_success_and_text 'oc set probe dc/simple-deployment --liveness --get-url=http://google.com:80 --dry-run -o name' 'deploymentconfig.apps.openshift.io/simple-deployment'

os::cmd::expect_success_and_not_text 'oc status --suggest' 'rc/simple-deployment-1 has no liveness probe'
os::cmd::expect_success_and_text 'oc set probe dc/simple-deployment --liveness --get-url=http://google.com:80' 'deploymentconfig.apps.openshift.io/simple-deployment probes updated'
os::cmd::expect_success_and_not_text 'oc status --suggest' 'dc/simple-deployment has no liveness probe'
echo "set-probe-liveness: ok"
os::test::junit::declare_suite_end
`)

func testExtendedTestdataCmdTestCmdSetLivenessProbeShBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdSetLivenessProbeSh, nil
}

func testExtendedTestdataCmdTestCmdSetLivenessProbeSh() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdSetLivenessProbeShBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/set-liveness-probe.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdSetbuildhookSh = []byte(`#!/bin/bash
source "$(dirname "${BASH_SOURCE}")/../../hack/lib/init.sh"
trap os::test::junit::reconcile_output EXIT

# Cleanup cluster resources created by this test
(
  set +e
  oc delete all,templates --all
  exit 0
) &>/dev/null


os::test::junit::declare_suite_start "cmd/builds/setbuildhook"
# Validate the set build-hook command
arg="-f ${TEST_DATA}/test-bc.yaml"
os::cmd::expect_failure_and_text "oc set build-hook" "error: one or more build configs"
os::cmd::expect_failure_and_text "oc set build-hook ${arg}" "error: you must specify a type of hook"
os::cmd::expect_failure_and_text "oc set build-hook ${arg} --local --post-commit -o yaml -- echo 'hello world'" 'you must specify either a script or command for the build hook'
os::cmd::expect_success_and_text "oc set build-hook ${arg} --local --post-commit --command -o yaml -- echo 'hello world'" 'command:'
os::cmd::expect_success_and_text "oc set build-hook ${arg} --local --post-commit -o yaml --script='echo \"hello world\"'" 'script: echo \"hello world\"'
# Server object tests
os::cmd::expect_success "oc create -f ${TEST_DATA}/test-bc.yaml"
# Must specify --command or --script
os::cmd::expect_failure_and_text "oc set build-hook bc/test-buildconfig --post-commit" "you must specify either a script or command"
# Setting args for the default entrypoint is not supported
os::cmd::expect_failure_and_text "oc set build-hook test-buildconfig --post-commit -- foo bar" "you must specify either a script or command for the build hook"
# Set a command + args on a specific build config
os::cmd::expect_success_and_text "oc set build-hook bc/test-buildconfig --post-commit --command -- /bin/bash -c \"echo 'test'\"" "updated"
os::cmd::expect_success_and_text "oc get bc/test-buildconfig -o yaml" "command:"
os::cmd::expect_success_and_text "oc get bc/test-buildconfig -o yaml" "args:"
os::cmd::expect_success_and_not_text "oc get bc/test-buildconfig -o yaml" "script:"
# Set a script on a specific build config
os::cmd::expect_success_and_text "oc set build-hook bc/test-buildconfig --post-commit --script /bin/script.sh -- arg1 arg2" "updated"
os::cmd::expect_success_and_text "oc get bc/test-buildconfig -o yaml" "script:"
os::cmd::expect_success_and_text "oc get bc/test-buildconfig -o yaml" "args:"
os::cmd::expect_success_and_not_text "oc get bc/test-buildconfig -o yaml" "command:"
# Remove the postcommit hook
os::cmd::expect_success_and_text "oc set build-hook bc/test-buildconfig --post-commit --remove" "updated"
os::cmd::expect_success_and_not_text "oc get bc/test-buildconfig -o yaml" "args:"
os::cmd::expect_success_and_not_text "oc get bc/test-buildconfig -o yaml" "command:"
os::cmd::expect_success_and_not_text "oc get bc/test-buildconfig -o yaml" "script:"
# Set a command + args on all build configs
os::cmd::expect_success_and_text "oc set build-hook --all --post-commit --command -- /bin/bash -c \"echo 'test'\"" "updated"
os::cmd::expect_success_and_text "oc get bc/test-buildconfig -o yaml" "command:"
os::cmd::expect_success_and_text "oc get bc/test-buildconfig -o yaml" "args:"
os::cmd::expect_success_and_not_text "oc get bc/test-buildconfig -o yaml" "script:"
# Set a script on all build configs
os::cmd::expect_success_and_text "oc set build-hook --all --post-commit --script /bin/script.sh" "updated"
os::cmd::expect_success_and_text "oc get bc/test-buildconfig -o yaml" "script:"
os::cmd::expect_success_and_not_text "oc get bc/test-buildconfig -o yaml" "args:"
os::cmd::expect_success_and_not_text "oc get bc/test-buildconfig -o yaml" "command:"

os::cmd::expect_success "oc delete bc/test-buildconfig"
# ensure command behaves as expected when an empty file is given
workingdir=$(mktemp -d)
touch "${workingdir}/emptyfile.json"
os::cmd::expect_failure_and_text "oc set build-hook -f ${workingdir}/emptyfile.json --post-commit=true --script=foo" "no resources found"
echo "set build-hook: ok"
os::test::junit::declare_suite_end
`)

func testExtendedTestdataCmdTestCmdSetbuildhookShBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdSetbuildhookSh, nil
}

func testExtendedTestdataCmdTestCmdSetbuildhookSh() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdSetbuildhookShBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/setbuildhook.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdSetbuildsecretSh = []byte(`#!/bin/bash
source "$(dirname "${BASH_SOURCE}")/../../hack/lib/init.sh"
trap os::test::junit::reconcile_output EXIT

# Cleanup cluster resources created by this test
(
  set +e
  oc delete all,templates --all
  exit 0
) &>/dev/null

os::test::junit::declare_suite_start "cmd/builds/setbuildsecret"
# Validate the set build-secret command
arg="-f ${TEST_DATA}/test-bc.yaml"
os::cmd::expect_failure_and_text "oc set build-secret" "error: a secret name must be specified"
os::cmd::expect_failure_and_text "oc set build-secret ${arg}" "error: a secret name must be specified"
os::cmd::expect_failure_and_text "oc set build-secret ${arg} mysecret" "error: specify the type of secret"
os::cmd::expect_success_and_text "oc set build-secret ${arg} mysecret --push --local -o yaml" 'pushSecret:'
os::cmd::expect_success_and_text "oc set build-secret ${arg} mysecret --push --local -o yaml" 'name: mysecret'
os::cmd::expect_success_and_text "oc set build-secret ${arg} mysecret --pull --local -o yaml" 'pullSecret:'
os::cmd::expect_success_and_text "oc set build-secret ${arg} mysecret --pull --local -o yaml" 'name: mysecret'
os::cmd::expect_success_and_text "oc set build-secret ${arg} mysecret --source --local -o yaml" 'sourceSecret:'
os::cmd::expect_success_and_text "oc set build-secret ${arg} mysecret --source --local -o yaml" 'name: mysecret'
os::cmd::expect_success_and_not_text "oc set build-secret ${arg} mysecret --push --local -o yaml | oc set build-secret --local -f - --remove --push -o yaml" 'pushSecret:'
os::cmd::expect_success_and_not_text "oc set build-secret ${arg} mysecret --pull --local -o yaml | oc set build-secret --local -f - --remove --pull -o yaml" 'pullSecret:'
os::cmd::expect_success_and_not_text "oc set build-secret ${arg} mysecret --push --local -o yaml | oc set build-secret --local -f - --remove --source -o yaml" 'sourceSecret:'
# Server object tests
os::cmd::expect_success "oc create -f ${TEST_DATA}/test-bc.yaml"
os::cmd::expect_success_and_text "oc set build-secret test-buildconfig mysecret --push" "updated"
os::cmd::expect_success_and_text "oc set build-secret bc/test-buildconfig mysecret --push --v=1" "was not changed"
os::cmd::expect_success_and_text "oc get bc/test-buildconfig -o yaml" "pushSecret:"
os::cmd::expect_success_and_text "oc set build-secret bc/test-buildconfig --push --remove" "updated"
os::cmd::expect_success_and_not_text "oc get bc/test-buildconfig -o yaml" "pushSecret:"
os::cmd::expect_success "oc delete bc/test-buildconfig"
echo "set build-secret: ok"
os::test::junit::declare_suite_end
`)

func testExtendedTestdataCmdTestCmdSetbuildsecretShBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdSetbuildsecretSh, nil
}

func testExtendedTestdataCmdTestCmdSetbuildsecretSh() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdSetbuildsecretShBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/setbuildsecret.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdStatusSh = []byte(`#!/bin/bash

set -o errexit
set -o nounset
set -o pipefail

OS_ROOT=$(dirname "${BASH_SOURCE}")/../..
source "${OS_ROOT}/hack/lib/init.sh"
os::log::stacktrace::install
trap os::test::junit::reconcile_output EXIT

# Cleanup cluster resources created by this test
(
  set +e
  oc delete project project-bar
  oc delete project project-status
  exit 0
) &>/dev/null

login_kubeconfig="${ARTIFACT_DIR}/login.kubeconfig"
cp "${KUBECONFIG}" "${login_kubeconfig}"

os::test::junit::declare_suite_start "cmd/status"
# login and ensure no current projects exist
#os::cmd::expect_success "oc login --server=${KUBERNETES_MASTER} --certificate-authority='${MASTER_CONFIG_DIR}/server-ca.crt' -u test-user2 -p anything"
#os::cmd::expect_success 'oc delete project --all'
#os::cmd::try_until_text "oc get projects -o jsonpath='{.items}'" "^\[\]$"
#os::cmd::expect_success 'oc logout'

# remove self-provisioner role from user and test login prompt before creating any projects
#os::cmd::expect_success "oc adm policy remove-cluster-role-from-group self-provisioner system:authenticated:oauth --kubeconfig='${login_kubeconfig}'"

# login as 'test-user2'
#os::cmd::expect_success "oc login --server=${KUBERNETES_MASTER} --certificate-authority='${MASTER_CONFIG_DIR}/server-ca.crt' -u test-user2 -p anything"

# make sure `+"`"+`oc status`+"`"+` re-uses the correct "no projects" message from `+"`"+`oc login`+"`"+` with no self-provisioner role
#os::cmd::expect_success_and_text 'oc status' "You don't have any projects. Contact your system administrator to request a project"
os::cmd::expect_success_and_text 'oc status --all-namespaces' "Showing all projects on server"
# make sure standard login prompt is printed once self-provisioner status is restored
#os::cmd::expect_success "oc logout"
#os::cmd::expect_success "oc adm policy add-cluster-role-to-group self-provisioner system:authenticated:oauth --kubeconfig='${login_kubeconfig}'"
#os::cmd::try_until_text "oc login --server=${KUBERNETES_MASTER} --certificate-authority='${MASTER_CONFIG_DIR}/server-ca.crt' -u test-user2 -p anything" "You don't have any projects. You can try to create a new project, by running" $(( 30 * second )) 0.25

# make sure `+"`"+`oc status`+"`"+` re-uses the correct "no projects" message from `+"`"+`oc login`+"`"+`
#os::cmd::expect_success_and_text 'oc status' "You don't have any projects. You can try to create a new project, by running"
os::cmd::expect_success_and_text 'oc status -A' "Showing all projects on server"
# make sure `+"`"+`oc status`+"`"+` does not re-use the "no projects" message from `+"`"+`oc login`+"`"+` if -n is specified
#os::cmd::expect_failure_and_text 'oc status -n forbidden' 'Error from server \(Forbidden\): projects.project.openshift.io "forbidden" is forbidden: User "test-user2" cannot get resource "projects" in API group "project.openshift.io" in the namespace "forbidden"'

# create a new project
os::cmd::expect_success "oc new-project project-bar --display-name='my project' --description='test project'"
os::cmd::expect_success_and_text "oc project" 'Using project "project-bar"'

# make sure `+"`"+`oc status`+"`"+` does not use "no projects" message if there is a project created
os::cmd::expect_success_and_text 'oc status' "In project my project \(project-bar\) on server"
#os::cmd::expect_failure_and_text 'oc status -n forbidden' 'Error from server \(Forbidden\): projects.project.openshift.io "forbidden" is forbidden: User "test-user2" cannot get resource "projects" in API group "project.openshift.io" in the namespace "forbidden"'

# create a second project
os::cmd::expect_success "oc new-project project-bar-2 --display-name='my project 2' --description='test project 2'"
os::cmd::expect_success_and_text "oc project" 'Using project "project-bar-2"'

# delete the current project `+"`"+`project-bar-2`+"`"+` and make sure `+"`"+`oc status`+"`"+` does not return the "no projects"
# message since `+"`"+`project-bar`+"`"+` still exists
os::cmd::expect_success_and_text "oc delete project project-bar-2" 'project.project.openshift.io "project-bar-2" deleted'
# the deletion is asynchronous and can take a while, so wait until we see the error
#os::cmd::try_until_text "oc status" 'Error from server \(Forbidden\): projects.project.openshift.io "project-bar-2" is forbidden: User "test-user2" cannot get resource "projects" in API group "project.openshift.io" in the namespace "project-bar-2"'

# delete "project-bar" and test that `+"`"+`oc status`+"`"+` still does not return the "no projects" message.
# Although we are deleting the last remaining project, the current context's namespace is still set
# to it, therefore `+"`"+`oc status`+"`"+` should simply return a forbidden error and not the "no projects" message
# until the next time the user logs in.
os::cmd::expect_success "oc project project-bar"
os::cmd::expect_success "oc delete project project-bar"
# the deletion is asynchronous and can take a while, so wait until we see the error
#os::cmd::try_until_text "oc status" 'Error from server \(Forbidden\): projects.project.openshift.io "project-bar" is forbidden: User "test-user2" cannot get resource "projects" in API group "project.openshift.io" in the namespace "project-bar"'
os::cmd::try_until_not_text "oc get projects" "project-bar"
os::cmd::try_until_not_text "oc get projects" "project-bar-2"
#os::cmd::expect_success "oc logout"
#os::cmd::expect_success_and_text "oc login --server=${KUBERNETES_MASTER} --certificate-authority='${MASTER_CONFIG_DIR}/server-ca.crt' -u test-user2 -p anything" "You don't have any projects. You can try to create a new project, by running"
#os::cmd::expect_success_and_text 'oc status' "You don't have any projects. You can try to create a new project, by running"
os::cmd::expect_success "oc new-project project-status --display-name='my project' --description='test project'"

# Verify the deprecated flags are working
os::cmd::expect_success_and_text 'oc status -v' 'shorthand -v has been deprecated'
os::cmd::expect_success_and_text 'oc status --verbose' '\-\-verbose has been deprecated'

# Verify jobs are showing in status
os::cmd::expect_success "oc run pi --image=perl --restart=OnFailure -- perl -Mbignum=bpi -wle 'print bpi(2000)'"
os::cmd::expect_success_and_text "oc status" "job/pi manages perl"

# logout
#os::cmd::expect_success "oc logout"

echo "status: ok"
os::test::junit::declare_suite_end
`)

func testExtendedTestdataCmdTestCmdStatusShBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdStatusSh, nil
}

func testExtendedTestdataCmdTestCmdStatusSh() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdStatusShBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/status.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTemplatesSh = []byte(`#!/bin/bash
source "$(dirname "${BASH_SOURCE}")/../../hack/lib/init.sh"
trap os::test::junit::reconcile_output EXIT

# Cleanup cluster resources created by this test
(
  set +e
  oc delete all,templates --all
  oc delete template/ruby-helloworld-sample -n openshift
  oc delete project test-template-project
  oc delete user someval someval=moreval someval=moreval2 someval=moreval3
  exit 0
) &>/dev/null


os::test::junit::declare_suite_start "cmd/templates"
# This test validates template commands

os::test::junit::declare_suite_start "cmd/templates/basic"
os::cmd::expect_success 'oc get templates'
os::cmd::expect_success 'oc create -f ${TEST_DATA}/application-template-dockerbuild.json'
os::cmd::expect_success 'oc get templates'
os::cmd::expect_success 'oc get templates ruby-helloworld-sample'
os::cmd::expect_success 'oc get template ruby-helloworld-sample -o json | oc process -f -'
os::cmd::expect_success 'oc process ruby-helloworld-sample'
os::cmd::expect_success_and_text 'oc process ruby-helloworld-sample -o template --template "{{.kind}}"'    "List"
os::cmd::expect_success_and_text 'oc process ruby-helloworld-sample -o go-template --template "{{.kind}}"' "List"
os::cmd::expect_success_and_text 'oc process ruby-helloworld-sample -o go-template={{.kind}}'              "List"
os::cmd::expect_success 'oc process ruby-helloworld-sample -o go-template-file=/dev/null'
os::cmd::expect_success_and_text 'oc process ruby-helloworld-sample -o jsonpath --template "{.kind}"' "List"
os::cmd::expect_success_and_text 'oc process ruby-helloworld-sample -o jsonpath={.kind}'              "List"
os::cmd::expect_success 'oc process ruby-helloworld-sample -o jsonpath-file=/dev/null'
os::cmd::expect_success_and_text 'oc process ruby-helloworld-sample -o describe' "ruby-25-centos7"
os::cmd::expect_success_and_text 'oc process ruby-helloworld-sample -o json'     "ruby-25-centos7"
os::cmd::expect_success_and_text 'oc process ruby-helloworld-sample -o yaml'     "ruby-25-centos7"
os::cmd::expect_success_and_text 'oc process ruby-helloworld-sample -o name'     "ruby-25-centos7"
os::cmd::expect_success_and_text 'oc describe templates ruby-helloworld-sample' "BuildConfig.*ruby-sample-build"
os::cmd::expect_success 'oc delete templates ruby-helloworld-sample'
os::cmd::expect_success 'oc get templates'
# TODO: create directly from template
echo "templates: ok"
os::test::junit::declare_suite_end

os::test::junit::declare_suite_start "cmd/templates/config"
guestbook_template="${TEST_DATA}/templates/guestbook.json"
os::cmd::expect_success "oc process -f '${guestbook_template}' -l app=guestbook | oc create -f -"
os::cmd::expect_success_and_text 'oc status' 'frontend-service'
echo "template+config: ok"

os::test::junit::declare_suite_start "cmd/templates/local-config"
# Processes the template locally
os::cmd::expect_success_and_text "oc process -f '${guestbook_template}' --local -l app=guestbook -o yaml" "app: guestbook"
# Processes the template locally and get the same output in YAML
new="$(mktemp -d)"
os::cmd::expect_success 'oc process -f "${guestbook_template}" --local -l app=guestbook -o yaml ADMIN_USERNAME=au ADMIN_PASSWORD=ap REDIS_PASSWORD=rp > "${new}/localtemplate"'
os::cmd::expect_success 'oc process -f "${guestbook_template}" -l app=guestbook -o yaml ADMIN_USERNAME=au ADMIN_PASSWORD=ap REDIS_PASSWORD=rp > "${new}/remotetemplate"'
os::cmd::expect_success 'diff "${new}/localtemplate" "${new}/remotetemplate"'
# Does not even try to hit the server
os::cmd::expect_success_and_text "oc process -f '${guestbook_template}' --local -l app=guestbook -o yaml --server 0.0.0.0:1" "app: guestbook"
echo "template+config+local: ok"
os::test::junit::declare_suite_end

os::test::junit::declare_suite_start "cmd/templates/parameters"
guestbook_params="${TEST_DATA}/templates/guestbook.env"
# Individually specified parameter values are honored
os::cmd::expect_success_and_text "oc process -f '${guestbook_template}' -p ADMIN_USERNAME=myuser -p ADMIN_PASSWORD=mypassword" '"myuser"'
os::cmd::expect_success_and_text "oc process -f '${guestbook_template}' -p ADMIN_USERNAME=myuser -p ADMIN_PASSWORD=mypassword" '"mypassword"'
# Argument values are honored
os::cmd::expect_success_and_text "oc process ADMIN_USERNAME=myuser ADMIN_PASSWORD=mypassword -f '${guestbook_template}'"       '"myuser"'
os::cmd::expect_success_and_text "oc process -f '${guestbook_template}' ADMIN_USERNAME=myuser ADMIN_PASSWORD=mypassword"       '"mypassword"'
# Argument values with commas are honored
os::cmd::expect_success 'oc create -f ${TEST_DATA}/application-template-stibuild.json'
os::cmd::expect_success_and_text 'oc process ruby-helloworld-sample MYSQL_USER=myself MYSQL_PASSWORD=my,1%pa=s'        '"myself"'
os::cmd::expect_success_and_text 'oc process MYSQL_USER=myself MYSQL_PASSWORD=my,1%pa=s ruby-helloworld-sample'        '"my,1%pa=s"'
os::cmd::expect_success_and_text 'oc process ruby-helloworld-sample -p MYSQL_USER=myself -p MYSQL_PASSWORD=my,1%pa=s'  '"myself"'
os::cmd::expect_success_and_text 'oc process -p MYSQL_USER=myself -p MYSQL_PASSWORD=my,1%pa=s ruby-helloworld-sample'  '"my,1%pa=s"'
# Argument values can be read from file
os::cmd::expect_success_and_text "oc process -f '${guestbook_template}' --param-file='${guestbook_params}'" '"root"'
os::cmd::expect_success_and_text "oc process -f '${guestbook_template}' --param-file='${guestbook_params}'" '"adminpass"'
os::cmd::expect_success_and_text "oc process -f '${guestbook_template}' --param-file='${guestbook_params}'" '"redispass"'
# Argument values can be read from stdin
os::cmd::expect_success_and_text "cat '${guestbook_params}' | oc process -f '${guestbook_template}' --param-file=-" '"root"'
os::cmd::expect_success_and_text "cat '${guestbook_params}' | oc process -f '${guestbook_template}' --param-file=-" '"adminpass"'
os::cmd::expect_success_and_text "cat '${guestbook_params}' | oc process -f '${guestbook_template}' --param-file=-" '"redispass"'
# Argument values from command line have precedence over those from file
os::cmd::expect_success_and_text "oc process -f '${guestbook_template}' --param-file='${guestbook_params}' -p ADMIN_USERNAME=myuser"     'ignoring value from file'
os::cmd::expect_success_and_text "oc process -f '${guestbook_template}' --param-file='${guestbook_params}' -p ADMIN_USERNAME=myuser"     '"myuser"'
os::cmd::expect_success_and_text "oc process -f '${guestbook_template}' --param-file='${guestbook_params}' -p ADMIN_PASSWORD=mypassword" '"mypassword"'
os::cmd::expect_success_and_text "oc process -f '${guestbook_template}' --param-file='${guestbook_params}' -p REDIS_PASSWORD=rrr"        '"rrr"'
# Set template parameters from parameter file with multiline values
os::cmd::expect_success_and_text "oc process -f ${TEST_DATA}/templates/template_required_params.yaml --param-file=${TEST_DATA}/templates/template_required_params.env -o yaml" 'first$'
os::cmd::expect_success 'oc delete template ruby-helloworld-sample'
# Parameter file failure cases
os::cmd::expect_failure_and_text "oc process -f ${TEST_DATA}/templates/template_required_params.yaml --param-file=does/not/exist"  'no such file or directory'
os::cmd::expect_failure_and_text "oc process -f ${TEST_DATA}/templates/template_required_params.yaml --param-file=${TEST_DATA}"   'is a directory'
os::cmd::expect_failure_and_text "oc process -f ${TEST_DATA}/templates/template_required_params.yaml --param-file=/dev/null"       'parameter required_param is required and must be specified'
os::cmd::expect_success "oc process -f '${guestbook_template}' --param-file=/dev/null --param-file='${guestbook_params}'"
os::cmd::expect_failure_and_text "echo 'fo%(o=bar' | oc process -f ${TEST_DATA}/templates/template_required_params.yaml --param-file=-"        'invalid parameter assignment'
os::cmd::expect_failure_and_text "echo 'S P A C E S=test' | oc process -f ${TEST_DATA}/templates/template_required_params.yaml --param-file=-" 'invalid parameter assignment'
# Handle absent parameter
os::cmd::expect_failure_and_text "oc process -f '${guestbook_template}' -p ABSENT_PARAMETER=absent" 'unknown parameter name'
os::cmd::expect_success "oc process -f '${guestbook_template}' -p ABSENT_PARAMETER=absent --ignore-unknown-parameters"
echo "template+parameters: ok"
os::test::junit::declare_suite_end

os::test::junit::declare_suite_start "cmd/templates/data-precision"
# Run as cluster-admin to allow choosing any supplemental groups we want
# Ensure large integers survive unstructured JSON creation
os::cmd::expect_success 'oc create -f ${TEST_DATA}/templates/template-type-precision.json'
# ... and processing
os::cmd::expect_success_and_text 'oc process template-type-precision' '1000030003'
os::cmd::expect_success_and_text 'oc process template-type-precision' '2147483647'
os::cmd::expect_success_and_text 'oc process template-type-precision' '9223372036854775807'
# ... and re-encoding as structured resources
os::cmd::expect_success 'oc process template-type-precision | oc create -f -'
# ... and persisting
os::cmd::expect_success_and_text 'oc get pod/template-type-precision -o json' '1000030003'
os::cmd::expect_success_and_text 'oc get pod/template-type-precision -o json' '2147483647'
os::cmd::expect_success_and_text 'oc get pod/template-type-precision -o json' '9223372036854775807'
# Ensure patch computation preserves data
patch='{"metadata":{"annotations":{"comment":"patch comment"}}}'
os::cmd::expect_success "oc patch pod template-type-precision -p '${patch}'"
os::cmd::expect_success_and_text 'oc get pod/template-type-precision -o json' '9223372036854775807'
os::cmd::expect_success_and_text 'oc get pod/template-type-precision -o json' 'patch comment'
os::cmd::expect_success 'oc delete template/template-type-precision'
os::cmd::expect_success 'oc delete pod/template-type-precision'
echo "template data precision: ok"
os::test::junit::declare_suite_end

os::test::junit::declare_suite_start "cmd/templates/different-namespaces"
#os::cmd::expect_success 'oc create -f ${TEST_DATA}/application-template-dockerbuild.json -n openshift'
#os::cmd::expect_success 'oc policy add-role-to-user admin test-user'
#new="$(mktemp -d)/tempconfig"
#os::cmd::expect_success "oc config view --raw > ${new}"
#old="${KUBECONFIG}"
#export KUBECONFIG=${new}
#os::cmd::expect_success 'oc login -u test-user -p password'
#os::cmd::expect_success 'oc new-project test-template-project'
## make sure the permissions on the new project are set up
#os::cmd::try_until_success 'oc get templates'
#os::cmd::expect_success 'oc create -f ${TEST_DATA}/application-template-dockerbuild.json'
#os::cmd::expect_success 'oc process template/ruby-helloworld-sample'
#os::cmd::expect_success 'oc process templates/ruby-helloworld-sample'
#os::cmd::expect_success 'oc process openshift//ruby-helloworld-sample'
#os::cmd::expect_success 'oc process openshift/template/ruby-helloworld-sample'
#os::cmd::expect_success 'oc get template ruby-helloworld-sample -n openshift -o yaml | oc process -f -'
#export KUBECONFIG=${old}
echo "processing templates in different namespace: ok"
os::test::junit::declare_suite_end

os::test::junit::declare_suite_start "cmd/templates/process"
# This test validates oc process
# fail to process two templates by name
os::cmd::expect_failure_and_text 'oc process name1 name2' 'template name must be specified only once'
# fail to pass a filename or template by name
os::cmd::expect_failure_and_text 'oc process' 'Must pass a filename or name of stored template'
# can't ask for parameters and try process the template (include tests for deprecated -v/--value)
os::cmd::expect_failure_and_text 'oc process template-name --parameters --param=someval' '\-\-parameters flag does not process the template, can.t be used with \-\-param'
os::cmd::expect_failure_and_text 'oc process template-name --parameters -p someval' '\-\-parameters flag does not process the template, can.t be used with \-\-param'
os::cmd::expect_failure_and_text 'oc process template-name --parameters --labels=someval' '\-\-parameters flag does not process the template, can.t be used with \-\-labels'
os::cmd::expect_failure_and_text 'oc process template-name --parameters -l someval' '\-\-parameters flag does not process the template, can.t be used with \-\-labels'
os::cmd::expect_failure_and_text 'oc process template-name --parameters --output=yaml' '\-\-parameters flag does not process the template, can.t be used with \-\-output'
os::cmd::expect_failure_and_text 'oc process template-name --parameters -o yaml' '\-\-parameters flag does not process the template, can.t be used with \-\-output'
os::cmd::expect_failure_and_text 'oc process template-name --parameters --output-version=someval' '\-\-parameters flag does not process the template, can.t be used with \-\-output-version'
os::cmd::expect_failure_and_text 'oc process template-name --parameters --raw' '\-\-parameters flag does not process the template, can.t be used with \-\-raw'
os::cmd::expect_failure_and_text 'oc process template-name --parameters --template=someval' '\-\-parameters flag does not process the template, can.t be used with \-\-template'
os::cmd::expect_failure_and_text 'oc process template-name --parameters -t someval' '\-\-parameters flag does not process the template, can.t be used with \-\-template'
# providing a value more than once should fail (include tests for deprecated -v/--value)
os::cmd::expect_failure_and_text 'oc process template-name key=value key=value' 'provided more than once: key'
os::cmd::expect_failure_and_text 'oc process template-name --param=key=value --param=key=value' 'provided more than once: key'
os::cmd::expect_failure_and_text 'oc process template-name key=value --param=key=value' 'provided more than once: key'
os::cmd::expect_failure_and_text 'oc process template-name key=value other=foo --param=key=value --param=other=baz' 'provided more than once: key, other'
required_params="${TEST_DATA}/templates/template_required_params.yaml"
# providing something other than a template is not OK
os::cmd::expect_failure_and_text "oc process -f '${TEST_DATA}/templates/basic-users-binding.json'" 'not a valid Template but'
# not providing required parameter should fail
os::cmd::expect_failure_and_text "oc process -f '${required_params}'" 'parameter required_param is required and must be specified'
# not providing an optional param is OK
os::cmd::expect_success "oc process -f '${required_params}' --param=required_param=someval"
os::cmd::expect_success "oc process -f '${required_params}' -p required_param=someval | oc create -f -"
# parameters with multiple equal signs are OK
os::cmd::expect_success "oc process -f '${required_params}' required_param=someval=moreval | oc create -f -"
os::cmd::expect_success "oc process -f '${required_params}' -p required_param=someval=moreval2 | oc create -f -"
os::cmd::expect_success "oc process -f '${required_params}' -p required_param=someval=moreval3 | oc create -f -"
# we should have overwritten the template param
os::cmd::expect_success_and_text 'oc get user someval -o jsonpath={.metadata.name}' 'someval'
os::cmd::expect_success_and_text 'oc get user someval=moreval -o jsonpath={.metadata.name}' 'someval=moreval'
os::cmd::expect_success_and_text 'oc get user someval=moreval2 -o jsonpath={.metadata.name}' 'someval=moreval2'
os::cmd::expect_success_and_text 'oc get user someval=moreval3 -o jsonpath={.metadata.name}' 'someval=moreval3'
# providing a value not in the template should fail
os::cmd::expect_failure_and_text "oc process -f '${required_params}' --param=required_param=someval --param=other_param=otherval" 'unknown parameter name "other_param"'
# failure on values fails the entire call
os::cmd::expect_failure_and_text "oc process -f '${required_params}' --param=required_param=someval --param=optional_param" 'invalid parameter assignment in'
# failure on labels fails the entire call
os::cmd::expect_failure_and_text "oc process -f '${required_params}' --param=required_param=someval --labels======" 'error parsing labels'
# values are not split on commas, required parameter is not recognized
os::cmd::expect_failure_and_text "oc process -f '${required_params}' --param=optional_param=a,required_param=b" 'parameter required_param is required and must be specified'
# warning is printed iff --value/--param looks like two k-v pairs separated by comma
os::cmd::expect_success_and_text "oc process -f '${required_params}' --param=required_param=a,b=c,d" 'no longer accepts comma-separated list'
os::cmd::expect_success_and_not_text "oc process -f '${required_params}' --param=required_param=a_b_c_d" 'no longer accepts comma-separated list'
os::cmd::expect_success_and_not_text "oc process -f '${required_params}' --param=required_param=a,b,c,d" 'no longer accepts comma-separated list'
# warning is not printed for template values passed as positional arguments
os::cmd::expect_success_and_not_text "oc process -f '${required_params}' required_param=a,b=c,d" 'no longer accepts comma-separated list'
# set template parameter to contents of file
os::cmd::expect_success_and_text "oc process -f '${required_params}' --param=required_param='`+"`"+`cat ${TEST_DATA}/templates/multiline.txt`+"`"+`'" 'also,with=commas'
echo "process: ok"
os::test::junit::declare_suite_end

os::test::junit::declare_suite_end
`)

func testExtendedTestdataCmdTestCmdTemplatesShBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTemplatesSh, nil
}

func testExtendedTestdataCmdTestCmdTemplatesSh() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTemplatesShBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/templates.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataAppScenariosDockerComposeComplexAppDockerfile = []byte(`FROM node:0.10.38

RUN mkdir /src

RUN npm install nodemon -g

WORKDIR /src
ADD package.json package.json
RUN npm install

ADD nodemon.json nodemon.json
`)

func testExtendedTestdataCmdTestCmdTestdataAppScenariosDockerComposeComplexAppDockerfileBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataAppScenariosDockerComposeComplexAppDockerfile, nil
}

func testExtendedTestdataCmdTestCmdTestdataAppScenariosDockerComposeComplexAppDockerfile() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataAppScenariosDockerComposeComplexAppDockerfileBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/app-scenarios/docker-compose/complex/app/Dockerfile", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataAppScenariosDockerComposeComplexDockerComposeGeneratedYaml = []byte(`apiVersion: v1
items:
- apiVersion: v1
  kind: ImageStream
  metadata:
    annotations:
      openshift.io/generated-by: OpenShiftNewApp
    creationTimestamp: null
    labels:
      app: nginx
    name: nginx
  spec:
    tags:
    - annotations:
        openshift.io/imported-from: tutum/nginx
      from:
        kind: DockerImage
        name: tutum/nginx
      generation: null
      importPolicy: {}
      name: from
  status:
    dockerImageRepository: ""
- apiVersion: v1
  kind: BuildConfig
  metadata:
    annotations:
      openshift.io/generated-by: OpenShiftNewApp
    creationTimestamp: null
    labels:
      app: nginx
    name: nginx
  spec:
    output:
      to:
        kind: ImageStreamTag
        name: nginx:latest
    postCommit: {}
    resources: {}
    source:
      contextDir: test/testdata/app-scenarios/docker-compose/complex/nginx
      git:
        ref: libcompose
        uri: git@github.com:openshift/origin.git
      secrets: null
      type: Git
    strategy:
      dockerStrategy:
        from:
          kind: ImageStreamTag
          name: nginx:from
      type: Docker
    triggers:
    - github:
        secret: IE96Fw4CdQs-g3giIjWZ
      type: GitHub
    - generic:
        secret: B8mx-lYjIBjNY6ymP6MT
      type: Generic
    - type: ConfigChange
    - imageChange: {}
      type: ImageChange
  status:
    lastVersion: 0
- apiVersion: v1
  kind: ImageStream
  metadata:
    annotations:
      openshift.io/generated-by: OpenShiftNewApp
    creationTimestamp: null
    labels:
      app: nginx
    name: web
  spec:
    tags:
    - annotations:
        openshift.io/imported-from: node:0.10.38
      from:
        kind: DockerImage
        name: node:0.10.38
      generation: null
      importPolicy: {}
      name: from
  status:
    dockerImageRepository: ""
- apiVersion: v1
  kind: BuildConfig
  metadata:
    annotations:
      openshift.io/generated-by: OpenShiftNewApp
    creationTimestamp: null
    labels:
      app: nginx
    name: web
  spec:
    output:
      to:
        kind: ImageStreamTag
        name: web:latest
    postCommit: {}
    resources: {}
    source:
      contextDir: test/testdata/app-scenarios/docker-compose/complex/app
      git:
        ref: libcompose
        uri: git@github.com:openshift/origin.git
      secrets: null
      type: Git
    strategy:
      dockerStrategy:
        from:
          kind: ImageStreamTag
          name: web:from
      type: Docker
    triggers:
    - github:
        secret: xMiKAo9EEZMKMxCRZSUk
      type: GitHub
    - generic:
        secret: doIIibCQIxRvv28uyP9J
      type: Generic
    - type: ConfigChange
    - imageChange: {}
      type: ImageChange
  status:
    lastVersion: 0
- apiVersion: v1
  kind: ImageStream
  metadata:
    annotations:
      openshift.io/generated-by: OpenShiftNewApp
    creationTimestamp: null
    labels:
      app: nginx
    name: db
  spec:
    tags:
    - annotations:
        openshift.io/imported-from: redis
      from:
        kind: DockerImage
        name: redis
      generation: null
      importPolicy: {}
      name: latest
  status:
    dockerImageRepository: ""
- apiVersion: v1
  kind: DeploymentConfig
  metadata:
    annotations:
      openshift.io/generated-by: OpenShiftNewApp
    creationTimestamp: null
    labels:
      app: nginx
    name: db
  spec:
    replicas: 1
    selector:
      deploymentconfig: db
    strategy:
      resources: {}
    template:
      metadata:
        annotations:
          openshift.io/generated-by: OpenShiftNewApp
        creationTimestamp: null
        labels:
          app: nginx
          deploymentconfig: db
      spec:
        containers:
        - image: redis
          name: db
          ports:
          - containerPort: 6379
          resources:
            limits:
              cpu: 100m
              memory: 1G
    test: false
    triggers:
    - type: ConfigChange
    - imageChangeParams:
        automatic: true
        containerNames:
        - db
        from:
          kind: ImageStreamTag
          name: db:latest
      type: ImageChange
  status: {}
- apiVersion: v1
  kind: DeploymentConfig
  metadata:
    annotations:
      openshift.io/generated-by: OpenShiftNewApp
    creationTimestamp: null
    labels:
      app: nginx
    name: nginx
  spec:
    replicas: 1
    selector:
      deploymentconfig: nginx
    strategy:
      resources: {}
    template:
      metadata:
        annotations:
          openshift.io/generated-by: OpenShiftNewApp
        creationTimestamp: null
        labels:
          app: nginx
          deploymentconfig: nginx
      spec:
        containers:
        - image: nginx
          name: nginx
          ports:
          - containerPort: 80
          resources: {}
          volumeMounts:
          - mountPath: /www/public
            name: dir-1
          - mountPath: /src/app
            name: dir-2
        - args:
          - nodemon
          - -L
          - app/bin/www
          image: web
          name: web
          ports:
          - containerPort: 3000
          resources:
            requests:
              cpu: 500m
          volumeMounts:
          - mountPath: /src/app
            name: dir-2
        volumes:
        - emptyDir: {}
          name: dir-1
        - emptyDir: {}
          name: dir-2
    test: false
    triggers:
    - type: ConfigChange
    - imageChangeParams:
        automatic: true
        containerNames:
        - nginx
        from:
          kind: ImageStreamTag
          name: nginx:latest
      type: ImageChange
    - imageChangeParams:
        automatic: true
        containerNames:
        - web
        from:
          kind: ImageStreamTag
          name: web:latest
      type: ImageChange
  status: {}
- apiVersion: v1
  kind: Service
  metadata:
    annotations:
      openshift.io/generated-by: OpenShiftNewApp
    creationTimestamp: null
    labels:
      app: nginx
    name: redis
  spec:
    ports:
    - name: 6379-tcp
      port: 6379
      targetPort: 6379
    selector:
      deploymentconfig: db
  status:
    loadBalancer: {}
- apiVersion: v1
  kind: Service
  metadata:
    annotations:
      openshift.io/generated-by: OpenShiftNewApp
    creationTimestamp: null
    labels:
      app: nginx
    name: nginx
  spec:
    ports:
    - name: 80-tcp
      port: 80
      targetPort: 80
    - name: 3000-tcp
      port: 3000
      targetPort: 3000
    selector:
      deploymentconfig: nginx
  status:
    loadBalancer: {}
kind: List
metadata: {}
`)

func testExtendedTestdataCmdTestCmdTestdataAppScenariosDockerComposeComplexDockerComposeGeneratedYamlBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataAppScenariosDockerComposeComplexDockerComposeGeneratedYaml, nil
}

func testExtendedTestdataCmdTestCmdTestdataAppScenariosDockerComposeComplexDockerComposeGeneratedYaml() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataAppScenariosDockerComposeComplexDockerComposeGeneratedYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/app-scenarios/docker-compose/complex/docker-compose.generated.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataAppScenariosDockerComposeComplexDockerComposeImportedYaml = []byte(`apiVersion: v1
items:
- apiVersion: v1
  kind: ImageStream
  metadata:
    creationTimestamp: null
    name: nginx
  spec:
    tags:
    - annotations:
        openshift.io/imported-from: tutum/nginx
      from:
        kind: DockerImage
        name: tutum/nginx
      generation: null
      importPolicy: {}
      name: from
      referencePolicy:
        type: ""
  status:
    dockerImageRepository: ""
- apiVersion: v1
  kind: BuildConfig
  metadata:
    creationTimestamp: null
    name: nginx
  spec:
    nodeSelector: null
    output:
      to:
        kind: ImageStreamTag
        name: nginx:latest
    postCommit: {}
    resources: {}
    source:
      contextDir: test/testdata/app-scenarios/docker-compose/complex/nginx
      git:
        ref: master
        uri: git@github.com:openshift/origin.git
      secrets: null
      type: Git
    strategy:
      dockerStrategy:
        from:
          kind: ImageStreamTag
          name: nginx:from
      type: Docker
    triggers:
    - github:
        secret: FdDzZzJCBkHQGxYMMBw0
      type: GitHub
    - generic:
        secret: wMAV07N8TWt9dz40LDjL
      type: Generic
    - type: ConfigChange
    - imageChange: {}
      type: ImageChange
  status:
    lastVersion: 0
- apiVersion: v1
  kind: ImageStream
  metadata:
    creationTimestamp: null
    name: web
  spec:
    tags:
    - annotations:
        openshift.io/imported-from: node:0.10.38
      from:
        kind: DockerImage
        name: node:0.10.38
      generation: null
      importPolicy: {}
      name: from
      referencePolicy:
        type: ""
  status:
    dockerImageRepository: ""
- apiVersion: v1
  kind: BuildConfig
  metadata:
    creationTimestamp: null
    name: web
  spec:
    nodeSelector: null
    output:
      to:
        kind: ImageStreamTag
        name: web:latest
    postCommit: {}
    resources: {}
    source:
      contextDir: test/testdata/app-scenarios/docker-compose/complex/app
      git:
        ref: master
        uri: git@github.com:openshift/origin.git
      secrets: null
      type: Git
    strategy:
      dockerStrategy:
        from:
          kind: ImageStreamTag
          name: web:from
      type: Docker
    triggers:
    - github:
        secret: 3QSLvrej6A2E-CMYSEvQ
      type: GitHub
    - generic:
        secret: uBl0LIK0anHOaRJ8-4dI
      type: Generic
    - type: ConfigChange
    - imageChange: {}
      type: ImageChange
  status:
    lastVersion: 0
- apiVersion: v1
  kind: ImageStream
  metadata:
    creationTimestamp: null
    name: db
  spec:
    tags:
    - annotations:
        openshift.io/imported-from: redis
      from:
        kind: DockerImage
        name: redis
      generation: null
      importPolicy: {}
      name: latest
      referencePolicy:
        type: ""
  status:
    dockerImageRepository: ""
- apiVersion: v1
  kind: DeploymentConfig
  metadata:
    creationTimestamp: null
    name: db
  spec:
    replicas: 1
    selector:
      deploymentconfig: db
    strategy:
      resources: {}
    template:
      metadata:
        creationTimestamp: null
        labels:
          deploymentconfig: db
      spec:
        containers:
        - image: redis
          name: db
          ports:
          - containerPort: 6379
          resources:
            limits:
              cpu: 100m
              memory: 1G
    test: false
    triggers:
    - type: ConfigChange
    - imageChangeParams:
        automatic: true
        containerNames:
        - db
        from:
          kind: ImageStreamTag
          name: db:latest
      type: ImageChange
  status:
    availableReplicas: 0
    latestVersion: 0
    observedGeneration: 0
    replicas: 0
    unavailableReplicas: 0
    updatedReplicas: 0
- apiVersion: v1
  kind: DeploymentConfig
  metadata:
    creationTimestamp: null
    name: nginx
  spec:
    replicas: 1
    selector:
      deploymentconfig: nginx
    strategy:
      resources: {}
    template:
      metadata:
        creationTimestamp: null
        labels:
          deploymentconfig: nginx
      spec:
        containers:
        - image: nginx
          name: nginx
          ports:
          - containerPort: 80
          resources: {}
          volumeMounts:
          - mountPath: /www/public
            name: dir-1
          - mountPath: /src/app
            name: dir-2
        - args:
          - nodemon
          - -L
          - app/bin/www
          image: web
          name: web
          ports:
          - containerPort: 3000
          resources:
            requests:
              cpu: 500m
          volumeMounts:
          - mountPath: /src/app
            name: dir-2
        volumes:
        - emptyDir: {}
          name: dir-1
        - emptyDir: {}
          name: dir-2
    test: false
    triggers:
    - type: ConfigChange
    - imageChangeParams:
        automatic: true
        containerNames:
        - nginx
        from:
          kind: ImageStreamTag
          name: nginx:latest
      type: ImageChange
    - imageChangeParams:
        automatic: true
        containerNames:
        - web
        from:
          kind: ImageStreamTag
          name: web:latest
      type: ImageChange
  status:
    availableReplicas: 0
    latestVersion: 0
    observedGeneration: 0
    replicas: 0
    unavailableReplicas: 0
    updatedReplicas: 0
- apiVersion: v1
  kind: ImageStream
  metadata:
    creationTimestamp: null
    name: no-ports
  spec:
    tags:
    - annotations:
        openshift.io/imported-from: redis
      from:
        kind: DockerImage
        name: redis
      generation: null
      importPolicy: {}
      name: latest
      referencePolicy:
        type: ""
  status:
    dockerImageRepository: ""
- apiVersion: v1
  kind: DeploymentConfig
  metadata:
    creationTimestamp: null
    name: no-ports
  spec:
    replicas: 1
    selector:
      deploymentconfig: no-ports
    strategy:
      resources: {}
    template:
      metadata:
        creationTimestamp: null
        labels:
          deploymentconfig: no-ports
      spec:
        containers:
        - image: redis
          name: no-ports
          resources: {}
    test: false
    triggers:
    - type: ConfigChange
    - imageChangeParams:
        automatic: true
        containerNames:
        - no-ports
        from:
          kind: ImageStreamTag
          name: no-ports:latest
      type: ImageChange
  status:
    availableReplicas: 0
    latestVersion: 0
    observedGeneration: 0
    replicas: 0
    unavailableReplicas: 0
    updatedReplicas: 0
- apiVersion: v1
  kind: Service
  metadata:
    creationTimestamp: null
    name: redis
  spec:
    ports:
    - name: 6379-tcp
      port: 6379
      targetPort: 6379
    selector:
      deploymentconfig: db
  status:
    loadBalancer: {}
- apiVersion: v1
  kind: Service
  metadata:
    creationTimestamp: null
    name: nginx
  spec:
    ports:
    - name: 80-tcp
      port: 80
      targetPort: 80
    - name: 3000-tcp
      port: 3000
      targetPort: 3000
    selector:
      deploymentconfig: nginx
  status:
    loadBalancer: {}
kind: List
metadata: {}
`)

func testExtendedTestdataCmdTestCmdTestdataAppScenariosDockerComposeComplexDockerComposeImportedYamlBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataAppScenariosDockerComposeComplexDockerComposeImportedYaml, nil
}

func testExtendedTestdataCmdTestCmdTestdataAppScenariosDockerComposeComplexDockerComposeImportedYaml() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataAppScenariosDockerComposeComplexDockerComposeImportedYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/app-scenarios/docker-compose/complex/docker-compose.imported.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataAppScenariosDockerComposeComplexDockerComposeYml = []byte(`web:
  build: ./app
  volumes:
    - "./app:/src/app"
  ports:
    - "3030:3000"
  links:
    - "db:redis"
  command: nodemon -L app/bin/www
  cpu_shares: 512

nginx:
  restart: always
  build: ./nginx/
  ports:
    - "80:80"
  volumes:
    - /www/public
  volumes_from:
    - web
  links:
    - web:web

db:
  image: redis
  ports:
    - "6379:6379"
  cpu_quota: 10000
  mem_limit: 1000000000
  cpuset: 1

no-ports:
  image: redis`)

func testExtendedTestdataCmdTestCmdTestdataAppScenariosDockerComposeComplexDockerComposeYmlBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataAppScenariosDockerComposeComplexDockerComposeYml, nil
}

func testExtendedTestdataCmdTestCmdTestdataAppScenariosDockerComposeComplexDockerComposeYml() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataAppScenariosDockerComposeComplexDockerComposeYmlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/app-scenarios/docker-compose/complex/docker-compose.yml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataAppScenariosDockerComposeComplexNginxDockerfile = []byte(`FROM tutum/nginx
RUN rm /etc/nginx/sites-enabled/default
ADD sites-enabled/ /etc/nginx/sites-enabled
`)

func testExtendedTestdataCmdTestCmdTestdataAppScenariosDockerComposeComplexNginxDockerfileBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataAppScenariosDockerComposeComplexNginxDockerfile, nil
}

func testExtendedTestdataCmdTestCmdTestdataAppScenariosDockerComposeComplexNginxDockerfile() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataAppScenariosDockerComposeComplexNginxDockerfileBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/app-scenarios/docker-compose/complex/nginx/Dockerfile", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataAppScenariosDockerComposeWordpressDockerComposeYml = []byte(`version: "2"
services:
  WP:
    image: "centurylink/wordpress:3.9.1"
    links:
      - "DB:DB_1"
    ports:
      - "8080:80"
    environment:
      - "DB_PASSWORD=pass@word01"
      - DB_NAME=wordpress
    dns:
      - 8.8.8.8
      - 9.9.9.9
    hostname: wordpress
    domainname: wordpress.mysite.com
  DB:
    image: "centurylink/mysql:5.5"
    ports:
      - "3306:3306"
    environment:
      - "MYSQL_ROOT_PASSWORD=pass@word01"
    mem_limit: "1000000000"
    cpu_shares: "40"
`)

func testExtendedTestdataCmdTestCmdTestdataAppScenariosDockerComposeWordpressDockerComposeYmlBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataAppScenariosDockerComposeWordpressDockerComposeYml, nil
}

func testExtendedTestdataCmdTestCmdTestdataAppScenariosDockerComposeWordpressDockerComposeYml() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataAppScenariosDockerComposeWordpressDockerComposeYmlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/app-scenarios/docker-compose/wordpress/docker-compose.yml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataAppScenariosK8sLonelyPodJson = []byte(`{
  "kind": "List",
  "apiVersion": "v1",
  "metadata": {},
  "items": [
    {
      "kind": "Pod",
      "apiVersion": "v1",
      "metadata": {
        "name": "lonely-pod",
        "creationTimestamp": null,
        "labels": {
          "name": "lonely-pod"
        }
      },
      "spec": {
        "containers": [
          {
            "name": "lonely-pod",
            "image": "openshift/hello-openshift",
            "ports": [
              {
                "containerPort": 8080,
                "protocol": "TCP"
              }
            ],
            "resources": {},
            "terminationMessagePath": "/dev/termination-log",
            "imagePullPolicy": "IfNotPresent",
            "capabilities": {},
            "securityContext": {
              "capabilities": {},
              "privileged": false
            }
          }
        ],
        "restartPolicy": "Always",
        "dnsPolicy": "ClusterFirst"
      },
      "status": {}
    }
  ]
}`)

func testExtendedTestdataCmdTestCmdTestdataAppScenariosK8sLonelyPodJsonBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataAppScenariosK8sLonelyPodJson, nil
}

func testExtendedTestdataCmdTestCmdTestdataAppScenariosK8sLonelyPodJson() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataAppScenariosK8sLonelyPodJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/app-scenarios/k8s-lonely-pod.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataAppScenariosK8sSampleAppJson = []byte(`{
  "kind": "List",
  "apiVersion": "v1",
  "metadata": {},
  "items": [
    {
      "kind": "ReplicationController",
      "apiVersion": "v1",
      "metadata": {
        "name": "database-app-1",
        "creationTimestamp": null,
        "labels": {
          "template": "ruby-helloworld-sample"
        }
      },
      "spec": {
        "replicas": 1,
        "selector": {
          "name": "database",
          "deconflict": "database.app"
        },
        "template": {
          "metadata": {
            "creationTimestamp": null,
            "labels": {
              "name": "database",
              "template": "ruby-helloworld-sample",
              "deconflict": "database.app"
            }
          },
          "spec": {
            "containers": [
              {
                "name": "ruby-helloworld-database",
                "image": "mysql",
                "ports": [
                  {
                    "containerPort": 3306,
                    "protocol": "TCP"
                  }
                ],
                "env": [
                  {
                    "name": "MYSQL_ROOT_PASSWORD",
                    "value": "rQHfVnTo"
                  },
                  {
                    "name": "MYSQL_DATABASE",
                    "value": "root"
                  }
                ],
                "resources": {},
                "terminationMessagePath": "/dev/termination-log",
                "imagePullPolicy": "IfNotPresent",
                "capabilities": {},
                "securityContext": {
                  "capabilities": {},
                  "privileged": false
                }
              }
            ],
            "restartPolicy": "Always",
            "dnsPolicy": "ClusterFirst"
          }
        }
      },
      "status": {
        "replicas": 0
      }
    },
    {
      "kind": "ReplicationController",
      "apiVersion": "v1",
      "metadata": {
        "name": "frontend-app-1",
        "creationTimestamp": null,
        "labels": {
          "template": "ruby-helloworld-sample"
        }
      },
      "spec": {
        "replicas": 3,
        "selector": {
          "name": "frontend",
          "deconflict": "frontend.app"
        },
        "template": {
          "metadata": {
            "creationTimestamp": null,
            "labels": {
              "name": "frontend",
              "template": "ruby-helloworld-sample",
              "deconflict": "frontend.app"
            }
          },
          "spec": {
            "containers": [
              {
                "name": "ruby-helloworld",
                "image": "openshift/ruby-hello-world",
                "ports": [
                  {
                    "containerPort": 8080,
                    "protocol": "TCP"
                  }
                ],
                "env": [
                  {
                    "name": "ADMIN_USERNAME",
                    "value": "admin6TM"
                  },
                  {
                    "name": "ADMIN_PASSWORD",
                    "value": "xImx1tHR"
                  },
                  {
                    "name": "MYSQL_ROOT_PASSWORD",
                    "value": "rQHfVnTo"
                  },
                  {
                    "name": "MYSQL_DATABASE",
                    "value": "root"
                  }
                ],
                "resources": {},
                "terminationMessagePath": "/dev/termination-log",
                "imagePullPolicy": "IfNotPresent",
                "capabilities": {},
                "securityContext": {
                  "capabilities": {},
                  "privileged": false
                }
              }
            ],
            "restartPolicy": "Always",
            "dnsPolicy": "ClusterFirst"
          }
        }
      },
      "status": {
        "replicas": 0
      }
    },
    {
      "kind": "Service",
      "apiVersion": "v1",
      "metadata": {
        "name": "database-app",
        "creationTimestamp": null,
        "labels": {
          "template": "ruby-helloworld-sample"
        }
      },
      "spec": {
        "ports": [
          {
            "protocol": "TCP",
            "port": 5434,
            "targetPort": 3306,
            "nodePort": 0
          }
        ],
        "selector": {
          "name": "database"
        },
        "type": "ClusterIP",
        "sessionAffinity": "None"
      },
      "status": {
        "loadBalancer": {}
      }
    },
    {
      "kind": "Service",
      "apiVersion": "v1",
      "metadata": {
        "name": "frontend-app",
        "creationTimestamp": null,
        "labels": {
          "template": "ruby-helloworld-sample"
        }
      },
      "spec": {
        "ports": [
          {
            "protocol": "TCP",
            "port": 5432,
            "targetPort": 8080,
            "nodePort": 0
          }
        ],
        "selector": {
          "name": "frontend"
        },
        "type": "ClusterIP",
        "sessionAffinity": "None"
      },
      "status": {
        "loadBalancer": {}
      }
    }
  ]
}`)

func testExtendedTestdataCmdTestCmdTestdataAppScenariosK8sSampleAppJsonBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataAppScenariosK8sSampleAppJson, nil
}

func testExtendedTestdataCmdTestCmdTestdataAppScenariosK8sSampleAppJson() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataAppScenariosK8sSampleAppJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/app-scenarios/k8s-sample-app.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataAppScenariosK8sServicePodNoRcJson = []byte(`{
  "kind": "List",
  "apiVersion": "v1",
  "metadata": {},
  "items": [
    {
      "kind": "Service",
      "apiVersion": "v1",
      "metadata": {
        "name": "hello-openshift",
        "creationTimestamp": null,
        "labels": {
          "template": "hello-openshift"
        }
      },
      "spec": {
        "ports": [
          {
            "protocol": "TCP",
            "port": 5432,
            "targetPort": 8080,
            "nodePort": 0
          }
        ],
        "selector": {
          "name": "hello-openshift"
        },
        "type": "ClusterIP",
        "sessionAffinity": "None"
      },
      "status": {
        "loadBalancer": {}
      }
    },
    {
      "kind": "Pod",
      "apiVersion": "v1",
      "metadata": {
        "name": "hello-openshift",
        "creationTimestamp": null,
        "labels": {
          "name": "hello-openshift"
        }
      },
      "spec": {
        "containers": [
          {
            "name": "hello-openshift",
            "image": "openshift/hello-openshift",
            "ports": [
              {
                "containerPort": 8080,
                "protocol": "TCP"
              }
            ],
            "resources": {},
            "terminationMessagePath": "/dev/termination-log",
            "imagePullPolicy": "IfNotPresent",
            "capabilities": {},
            "securityContext": {
              "capabilities": {},
              "privileged": false
            }
          }
        ],
        "restartPolicy": "Always",
        "dnsPolicy": "ClusterFirst"
      },
      "status": {}
    }
  ]
}`)

func testExtendedTestdataCmdTestCmdTestdataAppScenariosK8sServicePodNoRcJsonBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataAppScenariosK8sServicePodNoRcJson, nil
}

func testExtendedTestdataCmdTestCmdTestdataAppScenariosK8sServicePodNoRcJson() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataAppScenariosK8sServicePodNoRcJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/app-scenarios/k8s-service-pod-no-rc.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataAppScenariosK8sServiceWithNothingJson = []byte(`{
  "kind": "List",
  "apiVersion": "v1",
  "metadata": {},
  "items": [
    {
      "kind": "Service",
      "apiVersion": "v1",
      "metadata": {
        "name": "empty-service",
        "creationTimestamp": null,
        "labels": {
          "template": "empty-service"
        }
      },
      "spec": {
        "ports": [
          {
            "protocol": "TCP",
            "port": 5432,
            "targetPort": 8080,
            "nodePort": 0
          }
        ],
        "selector": {
          "name": "empty-service"
        },
        "type": "ClusterIP",
        "sessionAffinity": "None"
      },
      "status": {
        "loadBalancer": {}
      }
    }
  ]
}`)

func testExtendedTestdataCmdTestCmdTestdataAppScenariosK8sServiceWithNothingJsonBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataAppScenariosK8sServiceWithNothingJson, nil
}

func testExtendedTestdataCmdTestCmdTestdataAppScenariosK8sServiceWithNothingJson() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataAppScenariosK8sServiceWithNothingJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/app-scenarios/k8s-service-with-nothing.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataAppScenariosK8sUnservicedRcJson = []byte(`{
  "kind": "List",
  "apiVersion": "v1",
  "metadata": {},
  "items": [
    {
      "kind": "ReplicationController",
      "apiVersion": "v1",
      "metadata": {
        "name": "database-rc-1",
        "creationTimestamp": null,
        "labels": {
          "template": "ruby-helloworld-sample"
        }
      },
      "spec": {
        "replicas": 1,
        "selector": {
          "name": "database",
          "deconflict": "database.rc"
        },
        "template": {
          "metadata": {
            "creationTimestamp": null,
            "labels": {
              "name": "database",
              "template": "ruby-helloworld-sample",
              "deconflict": "database.rc"
            }
          },
          "spec": {
            "containers": [
              {
                "name": "ruby-helloworld-database",
                "image": "mysql",
                "ports": [
                  {
                    "containerPort": 3306,
                    "protocol": "TCP"
                  }
                ],
                "env": [
                  {
                    "name": "MYSQL_ROOT_PASSWORD",
                    "value": "rQHfVnTo"
                  },
                  {
                    "name": "MYSQL_DATABASE",
                    "value": "root"
                  }
                ],
                "resources": {},
                "terminationMessagePath": "/dev/termination-log",
                "imagePullPolicy": "IfNotPresent",
                "capabilities": {},
                "securityContext": {
                  "capabilities": {},
                  "privileged": false
                }
              }
            ],
            "restartPolicy": "Always",
            "dnsPolicy": "ClusterFirst"
          }
        }
      },
      "status": {
        "replicas": 0
      }
    },
    {
      "kind": "ReplicationController",
      "apiVersion": "v1",
      "metadata": {
        "name": "frontend-rc-1",
        "creationTimestamp": null,
        "labels": {
          "template": "ruby-helloworld-sample"
        }
      },
      "spec": {
        "replicas": 3,
        "selector": {
          "name": "frontend",
          "deconflict": "frontend.rc"
        },
        "template": {
          "metadata": {
            "creationTimestamp": null,
            "labels": {
              "name": "frontend",
              "template": "ruby-helloworld-sample",
              "deconflict": "frontend.rc"
            }
          },
          "spec": {
            "containers": [
              {
                "name": "ruby-helloworld",
                "image": "openshift/ruby-hello-world",
                "ports": [
                  {
                    "containerPort": 8080,
                    "protocol": "TCP"
                  }
                ],
                "env": [
                  {
                    "name": "ADMIN_USERNAME",
                    "value": "admin6TM"
                  },
                  {
                    "name": "ADMIN_PASSWORD",
                    "value": "xImx1tHR"
                  },
                  {
                    "name": "MYSQL_ROOT_PASSWORD",
                    "value": "rQHfVnTo"
                  },
                  {
                    "name": "MYSQL_DATABASE",
                    "value": "root"
                  }
                ],
                "resources": {},
                "terminationMessagePath": "/dev/termination-log",
                "imagePullPolicy": "IfNotPresent",
                "capabilities": {},
                "securityContext": {
                  "capabilities": {},
                  "privileged": false
                }
              }
            ],
            "restartPolicy": "Always",
            "dnsPolicy": "ClusterFirst"
          }
        }
      },
      "status": {
        "replicas": 0
      }
    },
    {
      "kind": "Service",
      "apiVersion": "v1",
      "metadata": {
        "name": "database-rc",
        "creationTimestamp": null,
        "labels": {
          "template": "ruby-helloworld-sample"
        }
      },
      "spec": {
        "ports": [
          {
            "protocol": "TCP",
            "port": 5434,
            "targetPort": 3306,
            "nodePort": 0
          }
        ],
        "selector": {
          "name": "database"
        },
        "type": "ClusterIP",
        "sessionAffinity": "None"
      },
      "status": {
        "loadBalancer": {}
      }
    }
  ]
}`)

func testExtendedTestdataCmdTestCmdTestdataAppScenariosK8sUnservicedRcJsonBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataAppScenariosK8sUnservicedRcJson, nil
}

func testExtendedTestdataCmdTestCmdTestdataAppScenariosK8sUnservicedRcJson() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataAppScenariosK8sUnservicedRcJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/app-scenarios/k8s-unserviced-rc.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataAppScenariosNewProjectDeployedAppYaml = []byte(`apiVersion: v1
items:
- apiVersion: v1
  kind: BuildConfig
  metadata:
    creationTimestamp: 2015-04-07T04:12:17Z
    labels:
      name: ruby-sample-build
      template: application-template-stibuild
    name: ruby-sample-build
    namespace: example
  spec:
    output:
      to:
        kind: ImageStreamTag
        name: origin-ruby-sample:latest
    resources: {}
    source:
      git:
        uri: git://github.com/openshift/ruby-hello-world.git
      type: Git
    strategy:
      sourceStrategy:
        from:
          kind: DockerImage
          name: centos/ruby-25-centos7
        incremental: true
      type: Source
    triggers:
    - github:
        secret: secret101
      type: github
    - generic:
        secret: secret101
      type: generic
    - imageChange:
        lastTriggeredImageID: centos/ruby-25-centos7:latest
      type: imageChange
  status:
    lastVersion: 1
- apiVersion: v1
  kind: Build
  metadata:
    creationTimestamp: 2015-04-07T04:12:18Z
    labels:
      buildconfig: ruby-sample-build
      name: ruby-sample-build
      template: application-template-stibuild
    name: ruby-sample-build-1
    namespace: example
  spec:
    output:
      to:
        kind: ImageStreamTag
        name: origin-ruby-sample:latest
    resources: {}
    source:
      git:
        uri: git://github.com/openshift/ruby-hello-world.git
      type: Git
    strategy:
      sourceStrategy:
        from:
          kind: DockerImage
          name: centos/ruby-25-centos7:latest
        incremental: true
      type: Source
  status:
    completionTimestamp: 2015-04-07T04:13:01Z
    config:
      kind: BuildConfig
      name: ruby-sample-build

    phase: Complete
    startTimestamp: 2015-04-07T04:12:21Z
- apiVersion: v1
  kind: ReplicationController
  metadata:
    annotations:
      openshift.io/deployment-config.name: database
      openshift.io/deployment.phase: Running
      openshift.io/deployment-config.latest-version: "2"
      openshift.io/encoded-deployment-config: '{"kind":"DeploymentConfig","apiVersion":"v1beta1","metadata":{"name":"database","namespace":"test","selfLink":"/osapi/v1beta1/watch/deploymentConfigs/database","uid":"4725b5d3-dcdc-11e4-968a-080027c5bfa9","resourceVersion":"271","creationTimestamp":"2015-04-07T04:12:17Z","labels":{"template":"application-template-stibuild"}},"triggers":[{"type":"ConfigChange"}],"template":{"strategy":{"type":"Recreate"},"controllerTemplate":{"replicas":1,"replicaSelector":{"name":"database"},"podTemplate":{"desiredState":{"manifest":{"version":"v1beta2","id":"","volumes":null,"containers":[{"name":"ruby-helloworld-database","image":"centos/mysql-56-centos7","ports":[{"containerPort":3306,"protocol":"TCP"}],"env":[{"name":"MYSQL_USER","key":"MYSQL_USER","value":"user1CY"},{"name":"MYSQL_PASSWORD","key":"MYSQL_PASSWORD","value":"FfyXmsGG"},{"name":"MYSQL_DATABASE","key":"MYSQL_DATABASE","value":"root"}],"resources":{},"terminationMessagePath":"/dev/termination-log","imagePullPolicy":"PullIfNotPresent","capabilities":{}}],"restartPolicy":{"always":{}},"dnsPolicy":"ClusterFirst"}},"labels":{"name":"database","template":"application-template-stibuild"}}}},"latestVersion":1,"details":{"causes":[{"type":"ConfigChange"}]}}'
      pod: deploy-database-19m1he
    creationTimestamp: 2015-04-07T04:12:18Z
    labels:
      template: application-template-stibuild
    name: database-2
    namespace: example
  spec:
    replicas: 1
    selector:
      deployment: database-2
      deploymentconfig: database
      name: database
    template:
      metadata:
        annotations:
          openshift.io/deployment.name: database-2
          openshift.io/deployment-config.name: database
          openshift.io/deployment-config.latest-version: "2"
        creationTimestamp: null
        labels:
          deployment: database-2
          deploymentconfig: database
          name: database
          template: application-template-stibuild
      spec:
        containers:
        - capabilities: {}
          env:
          - name: MYSQL_USER
            value: user1CY
          - name: MYSQL_PASSWORD
            value: FfyXmsGG
          - name: MYSQL_DATABASE
            value: root
          image: centos/mysql-56-centos7
          imagePullPolicy: IfNotPresent
          name: ruby-helloworld-database
          ports:
          - containerPort: 3306
            protocol: TCP
          resources: {}
          securityContext:
            capabilities: {}
            privileged: false
          terminationMessagePath: /dev/termination-log
        dnsPolicy: ClusterFirst
        restartPolicy: Always
  status:
    replicas: 2
- apiVersion: v1
  kind: ReplicationController
  metadata:
    annotations:
      openshift.io/deployment-config.name: database
      openshift.io/deployment.phase: Complete
      openshift.io/deployment-config.latest-version: "1"
      openshift.io/encoded-deployment-config: '{"kind":"DeploymentConfig","apiVersion":"v1beta1","metadata":{"name":"database","namespace":"test","selfLink":"/osapi/v1beta1/watch/deploymentConfigs/database","uid":"4725b5d3-dcdc-11e4-968a-080027c5bfa9","resourceVersion":"271","creationTimestamp":"2015-04-07T04:12:17Z","labels":{"template":"application-template-stibuild"}},"triggers":[{"type":"ConfigChange"}],"template":{"strategy":{"type":"Recreate"},"controllerTemplate":{"replicas":1,"replicaSelector":{"name":"database"},"podTemplate":{"desiredState":{"manifest":{"version":"v1beta2","id":"","volumes":null,"containers":[{"name":"ruby-helloworld-database","image":"centos/mysql-56-centos7","ports":[{"containerPort":3306,"protocol":"TCP"}],"env":[{"name":"MYSQL_USER","key":"MYSQL_USER","value":"user1CY"},{"name":"MYSQL_PASSWORD","key":"MYSQL_PASSWORD","value":"FfyXmsGG"},{"name":"MYSQL_DATABASE","key":"MYSQL_DATABASE","value":"root"}],"resources":{},"terminationMessagePath":"/dev/termination-log","imagePullPolicy":"PullIfNotPresent","capabilities":{}}],"restartPolicy":{"always":{}},"dnsPolicy":"ClusterFirst"}},"labels":{"name":"database","template":"application-template-stibuild"}}}},"latestVersion":1,"details":{"causes":[{"type":"ConfigChange"}]}}'
      pod: deploy-database-19m1he
    creationTimestamp: 2015-04-07T04:12:17Z
    labels:
      template: application-template-stibuild
    name: database-1
    namespace: example
  spec:
    replicas: 1
    selector:
      deployment: database-1
      deploymentconfig: database
      name: database
    template:
      metadata:
        annotations:
          openshift.io/deployment.name: database-1
          openshift.io/deployment-config.name: database
          openshift.io/deployment-config.latest-version: "1"
        creationTimestamp: null
        labels:
          deployment: database-1
          deploymentconfig: database
          name: database
          template: application-template-stibuild
      spec:
        containers:
        - capabilities: {}
          env:
          - name: MYSQL_USER
            value: user1CY
          - name: MYSQL_PASSWORD
            value: FfyXmsGG
          - name: MYSQL_DATABASE
            value: root
          image: centos/mysql-56-centos7
          imagePullPolicy: IfNotPresent
          name: ruby-helloworld-database
          ports:
          - containerPort: 3306
            protocol: TCP
          resources: {}
          securityContext:
            capabilities: {}
            privileged: false
          terminationMessagePath: /dev/termination-log
        dnsPolicy: ClusterFirst
        restartPolicy: Always
  status:
    replicas: 1
- apiVersion: v1
  kind: DeploymentConfig
  metadata:
    creationTimestamp: 2015-04-07T04:12:17Z
    labels:
      template: application-template-stibuild
    name: database
    namespace: example
  spec:
    replicas: 1
    selector:
      name: database
    strategy:
      resources: {}
      type: Recreate
    template:
      metadata:
        creationTimestamp: null
        labels:
          name: database
          template: application-template-stibuild
      spec:
        containers:
        - capabilities: {}
          env:
          - name: MYSQL_USER
            value: user1CY
          - name: MYSQL_PASSWORD
            value: FfyXmsGG
          - name: MYSQL_DATABASE
            value: root
          image: centos/mysql-56-centos7
          imagePullPolicy: IfNotPresent
          name: ruby-helloworld-database
          ports:
          - containerPort: 3306
            protocol: TCP
          resources: {}
          securityContext:
            capabilities: {}
            privileged: false
          terminationMessagePath: /dev/termination-log
        dnsPolicy: ClusterFirst
        restartPolicy: Always
    test: true
    triggers:
    - type: ConfigChange
  status:
    details:
      causes:
      - type: ConfigChange
    latestVersion: 1
- apiVersion: v1
  kind: ReplicationController
  metadata:
    annotations:
      openshift.io/deployment-config.name: frontend
      openshift.io/deployment.phase: Failed
      openshift.io/deployment-config.latest-version: "2"
      openshift.io/encoded-deployment-config: '{"kind":"DeploymentConfig","apiVersion":"v1beta1","metadata":{"name":"frontend","namespace":"test","selfLink":"/osapi/v1beta1/watch/deploymentConfigs/frontend","uid":"471f24e3-dcdc-11e4-968a-080027c5bfa9","resourceVersion":"346","creationTimestamp":"2015-04-07T04:12:17Z","labels":{"template":"application-template-stibuild"}},"triggers":[{"type":"ImageChange","imageChangeParams":{"automatic":true,"containerNames":["ruby-helloworld"],"from":{"kind":"ImageStreamTag","name":"origin-ruby-sample:latest"},"tag":"latest","lastTriggeredImage":"172.30.17.139:5000/test/origin-ruby-sample:73214fafa244cb8abbe55273dac5d237a589a5fc7ac09926a1756a42c21e8a58"}}],"template":{"strategy":{"type":"Recreate"},"controllerTemplate":{"replicas":1,"replicaSelector":{"name":"frontend"},"podTemplate":{"desiredState":{"manifest":{"version":"v1beta2","id":"","volumes":null,"containers":[{"name":"ruby-helloworld","image":"172.30.17.139:5000/test/origin-ruby-sample:73214fafa244cb8abbe55273dac5d237a589a5fc7ac09926a1756a42c21e8a58","ports":[{"containerPort":8080,"protocol":"TCP"}],"env":[{"name":"ADMIN_USERNAME","key":"ADMIN_USERNAME","value":"adminNPX"},{"name":"ADMIN_PASSWORD","key":"ADMIN_PASSWORD","value":"7q1IdEao"},{"name":"MYSQL_USER","key":"MYSQL_USER","value":"user1CY"},{"name":"MYSQL_PASSWORD","key":"MYSQL_PASSWORD","value":"FfyXmsGG"},{"name":"MYSQL_DATABASE","key":"MYSQL_DATABASE","value":"root"}],"resources":{},"terminationMessagePath":"/dev/termination-log","imagePullPolicy":"PullIfNotPresent","capabilities":{}}],"restartPolicy":{"always":{}},"dnsPolicy":"ClusterFirst"}},"labels":{"name":"frontend","template":"application-template-stibuild"}}}},"latestVersion":1,"details":{"causes":[{"type":"ImageChange","imageTrigger":{"repositoryName":"172.30.17.139:5000/test/origin-ruby-sample:73214fafa244cb8abbe55273dac5d237a589a5fc7ac09926a1756a42c21e8a58","tag":"latest"}}]}}'
      openshift.io/deployment.status-reason: unable to contact server
      pod: deploy-frontend-17mza9
    creationTimestamp: 2015-04-07T04:12:53Z
    labels:
      template: application-template-stibuild
    name: frontend-2
    namespace: example
  spec:
    replicas: 1
    selector:
      deployment: frontend-2
      deploymentconfig: frontend
      name: frontend
    template:
      metadata:
        annotations:
          openshift.io/deployment.name: frontend-2
          openshift.io/deployment-config.name: frontend
          openshift.io/deployment-config.latest-version: "2"
        creationTimestamp: null
        labels:
          deployment: frontend-2
          deploymentconfig: frontend
          name: frontend
          template: application-template-stibuild
      spec:
        containers:
        - capabilities: {}
          env:
          - name: ADMIN_USERNAME
            value: adminNPX
          - name: ADMIN_PASSWORD
            value: 7q1IdEao
          - name: MYSQL_USER
            value: user1CY
          - name: MYSQL_PASSWORD
            value: FfyXmsGG
          - name: MYSQL_DATABASE
            value: root
          image: 172.30.17.139:5000/test/origin-ruby-sample:73214fafa244cb8abbe55273dac5d237a589a5fc7ac09926a1756a42c21e8a58
          imagePullPolicy: IfNotPresent
          name: ruby-helloworld
          ports:
          - containerPort: 8080
            protocol: TCP
          resources: {}
          securityContext:
            capabilities: {}
            privileged: false
          terminationMessagePath: /dev/termination-log
        dnsPolicy: ClusterFirst
        restartPolicy: Always
  status:
    replicas: 0
- apiVersion: v1
  kind: ReplicationController
  metadata:
    annotations:
      openshift.io/deployment-config.name: frontend
      openshift.io/deployment.phase: Complete
      openshift.io/deployment-config.latest-version: "1"
      openshift.io/encoded-deployment-config: '{"kind":"DeploymentConfig","apiVersion":"v1beta1","metadata":{"name":"frontend","namespace":"test","selfLink":"/osapi/v1beta1/watch/deploymentConfigs/frontend","uid":"471f24e3-dcdc-11e4-968a-080027c5bfa9","resourceVersion":"346","creationTimestamp":"2015-04-07T04:12:17Z","labels":{"template":"application-template-stibuild"}},"triggers":[{"type":"ImageChange","imageChangeParams":{"automatic":true,"containerNames":["ruby-helloworld"],"from":{"kind":"ImageStreamTag","name":"origin-ruby-sample:latest"},"tag":"latest","lastTriggeredImage":"172.30.17.139:5000/test/origin-ruby-sample:73214fafa244cb8abbe55273dac5d237a589a5fc7ac09926a1756a42c21e8a58"}}],"template":{"strategy":{"type":"Recreate"},"controllerTemplate":{"replicas":1,"replicaSelector":{"name":"frontend"},"podTemplate":{"desiredState":{"manifest":{"version":"v1beta2","id":"","volumes":null,"containers":[{"name":"ruby-helloworld","image":"172.30.17.139:5000/test/origin-ruby-sample:73214fafa244cb8abbe55273dac5d237a589a5fc7ac09926a1756a42c21e8a58","ports":[{"containerPort":8080,"protocol":"TCP"}],"env":[{"name":"ADMIN_USERNAME","key":"ADMIN_USERNAME","value":"adminNPX"},{"name":"ADMIN_PASSWORD","key":"ADMIN_PASSWORD","value":"7q1IdEao"},{"name":"MYSQL_USER","key":"MYSQL_USER","value":"user1CY"},{"name":"MYSQL_PASSWORD","key":"MYSQL_PASSWORD","value":"FfyXmsGG"},{"name":"MYSQL_DATABASE","key":"MYSQL_DATABASE","value":"root"}],"resources":{},"terminationMessagePath":"/dev/termination-log","imagePullPolicy":"PullIfNotPresent","capabilities":{}}],"restartPolicy":{"always":{}},"dnsPolicy":"ClusterFirst"}},"labels":{"name":"frontend","template":"application-template-stibuild"}}}},"latestVersion":1,"details":{"causes":[{"type":"ImageChange","imageTrigger":{"repositoryName":"172.30.17.139:5000/test/origin-ruby-sample:73214fafa244cb8abbe55273dac5d237a589a5fc7ac09926a1756a42c21e8a58","tag":"latest"}}]}}'
      pod: deploy-frontend-17mza9
    creationTimestamp: 2015-04-07T04:12:53Z
    labels:
      template: application-template-stibuild
    name: frontend-1
    namespace: example
  spec:
    replicas: 1
    selector:
      deployment: frontend-1
      deploymentconfig: frontend
      name: frontend
    template:
      metadata:
        annotations:
          openshift.io/deployment.name: frontend-1
          openshift.io/deployment-config.name: frontend
          openshift.io/deployment-config.latest-version: "1"
        creationTimestamp: null
        labels:
          deployment: frontend-1
          deploymentconfig: frontend
          name: frontend
          template: application-template-stibuild
      spec:
        containers:
        - capabilities: {}
          env:
          - name: ADMIN_USERNAME
            value: adminNPX
          - name: ADMIN_PASSWORD
            value: 7q1IdEao
          - name: MYSQL_USER
            value: user1CY
          - name: MYSQL_PASSWORD
            value: FfyXmsGG
          - name: MYSQL_DATABASE
            value: root
          image: 172.30.17.139:5000/test/origin-ruby-sample:73214fafa244cb8abbe55273dac5d237a589a5fc7ac09926a1756a42c21e8a58
          imagePullPolicy: IfNotPresent
          name: ruby-helloworld
          ports:
          - containerPort: 8080
            protocol: TCP
          resources: {}
          securityContext:
            capabilities: {}
            privileged: false
          terminationMessagePath: /dev/termination-log
        dnsPolicy: ClusterFirst
        restartPolicy: Always
  status:
    replicas: 1
- apiVersion: v1
  kind: DeploymentConfig
  metadata:
    creationTimestamp: 2015-04-07T04:12:17Z
    labels:
      template: application-template-stibuild
    name: frontend
    namespace: example
  spec:
    replicas: 1
    selector:
      name: frontend
    strategy:
      resources: {}
      type: Recreate
    template:
      metadata:
        creationTimestamp: null
        labels:
          name: frontend
          template: application-template-stibuild
      spec:
        containers:
        - capabilities: {}
          env:
          - name: ADMIN_USERNAME
            value: adminNPX
          - name: ADMIN_PASSWORD
            value: 7q1IdEao
          - name: MYSQL_USER
            value: user1CY
          - name: MYSQL_PASSWORD
            value: FfyXmsGG
          - name: MYSQL_DATABASE
            value: root
          image: 172.30.17.139:5000/test/origin-ruby-sample:73214fafa244cb8abbe55273dac5d237a589a5fc7ac09926a1756a42c21e8a58
          imagePullPolicy: IfNotPresent
          name: ruby-helloworld
          ports:
          - containerPort: 8080
            protocol: TCP
          resources: {}
          securityContext:
            capabilities: {}
            privileged: false
          terminationMessagePath: /dev/termination-log
        dnsPolicy: ClusterFirst
        restartPolicy: Always
    triggers:
    - imageChangeParams:
        automatic: true
        containerNames:
        - ruby-helloworld
        from:
          kind: ImageStreamTag
          name: origin-ruby-sample:latest
        lastTriggeredImage: 172.30.17.139:5000/test/origin-ruby-sample:73214fafa244cb8abbe55273dac5d237a589a5fc7ac09926a1756a42c21e8a58
      type: ImageChange
  status:
    details:
      causes:
      - imageTrigger:
          from:
            kind: DockerImage
            name: 172.30.17.139:5000/test/origin-ruby-sample:latest
        type: ImageChange
    latestVersion: 3
- apiVersion: v1
  kind: Service
  metadata:
    creationTimestamp: 2015-04-07T04:12:17Z
    labels:
      template: application-template-stibuild
    name: database
    namespace: example
  spec:
    ports:
    - nodePort: 0
      port: 5434
      protocol: TCP
      targetPort: 3306
    selector:
      name: database
    sessionAffinity: None
    type: ClusterIP
  status:
    loadBalancer: {}
- apiVersion: v1
  kind: Service
  metadata:
    creationTimestamp: 2015-04-07T04:12:17Z
    labels:
      template: application-template-stibuild
    name: database-external
    namespace: example
  spec:
    ports:
    - nodePort: 31000
      port: 5434
      protocol: TCP
      targetPort: 3306
    selector:
      name: database
    sessionAffinity: None
    type: NodePort
  status:
    loadBalancer: {}
- apiVersion: v1
  kind: Service
  metadata:
    creationTimestamp: 2015-04-07T04:12:17Z
    labels:
      template: application-template-stibuild
    name: frontend
    namespace: example
  spec:
    ports:
    - nodePort: 0
      port: 5432
      protocol: TCP
      targetPort: 8080
    selector:
      name: frontend
    sessionAffinity: None
    type: ClusterIP
  status:
    loadBalancer: {}
- apiVersion: v1
  kind: Route
  metadata:
    annotations:
      openshift.io/host.generated: "true"
    creationTimestamp: 2015-04-07T04:12:17Z
    labels:
      template: application-template-stibuild
    name: frontend
    namespace: example
    resourceVersion: "393"
  spec:
    host: frontend-example.router.default.svc.cluster.local
    port:
      targetPort: 8080
    to:
      kind: Service
      name: frontend
  status:
    ingress:
    - routerName: default
      host: frontend-example.router.default.svc.cluster.local
    - routerName: other
      host: www.test.com
      conditions:
      - type: Admitted
        status: "False"
        reason: HostAlreadyClaimed
- apiVersion: v1
  kind: Route
  metadata:
    annotations:
      openshift.io/host.generated: "true"
    creationTimestamp: 2015-04-07T04:12:17Z
    labels:
      template: application-template-stibuild
    name: other
    namespace: example
    resourceVersion: "393"
  spec:
    host: www.test.com
    port:
      targetPort: 8080
    to:
      kind: Service
      name: frontend
    tls:
      insecureEdgeTerminationPolicy: Redirect
      type: Edge
  status:
    ingress:
    - routerName: other
      host: www.test.com
      conditions:
      - type: Admitted
        status: "True"
kind: List
metadata:
  resourceVersion: "592"
`)

func testExtendedTestdataCmdTestCmdTestdataAppScenariosNewProjectDeployedAppYamlBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataAppScenariosNewProjectDeployedAppYaml, nil
}

func testExtendedTestdataCmdTestCmdTestdataAppScenariosNewProjectDeployedAppYaml() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataAppScenariosNewProjectDeployedAppYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/app-scenarios/new-project-deployed-app.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataAppScenariosNewProjectNoBuildYaml = []byte(`apiVersion: v1
items:
- apiVersion: v1
  kind: BuildConfig
  metadata:
    creationTimestamp: 2015-04-06T21:02:00Z
    name: sinatra-example-2
  spec:
    output:
      to:
        kind: ImageStreamTag
        name: sinatra-example-2:latest
    resources: {}
    source:
      git:
        uri: git://github.com/mfojtik/sinatra-example-2
      type: Git
    strategy:
      sourceStrategy:
        from:
          kind: DockerImage
          name: centos/ruby-25-centos7
      type: Source
    triggers:
    - github:
        secret: u5gRhTXiOJpOHxKSI1M6
      type: github
    - generic:
        secret: IDO5sRS52tsUq5hczU6o
      type: generic
  status:
    lastVersion: 0
- apiVersion: v1
  kind: DeploymentConfig
  metadata:
    creationTimestamp: 2015-04-06T21:02:00Z
    name: sinatra-example-2
  spec:
    replicas: 1
    selector:
      deploymentconfig: sinatra-example-2
    strategy:
      resources: {}
      type: Recreate
    template:
      metadata:
        creationTimestamp: null
        labels:
          deploymentconfig: sinatra-example-2
      spec:
        containers:
        - capabilities: {}
          image: library/sinatra-example-2:latest
          imagePullPolicy: Always
          name: sinatra-example-2
          ports:
          - containerPort: 8080
            name: s-tcp-8080
            protocol: TCP
          resources: {}
          securityContext:
            capabilities: {}
            privileged: false
          terminationMessagePath: /dev/termination-log
        dnsPolicy: ClusterFirst
        restartPolicy: Always
    triggers:
    - type: ConfigChange
    - imageChangeParams:
        automatic: true
        containerNames:
        - sinatra-example-2
        from:
          kind: ImageStreamTag
          name: sinatra-example-2:latest
        lastTriggeredImage: ""
      type: ImageChange
  status: {}
- apiVersion: v1
  kind: ImageStream
  metadata:
    creationTimestamp: 2015-04-06T21:18:56Z
    name: sinatra-example-2
  spec: {}
  status:
    dockerImageRepository: ""
- apiVersion: v1
  kind: Service
  metadata:
    creationTimestamp: 2015-04-06T21:02:00Z
    name: sinatra-example-2
  spec:
    ports:
    - nodePort: 0
      port: 8080
      protocol: TCP
      targetPort: 8080
    selector:
      deploymentconfig: sinatra-example-2
    sessionAffinity: None
    type: ClusterIP
  status:
    loadBalancer: {}
kind: List
metadata:
  resourceVersion: "116"
`)

func testExtendedTestdataCmdTestCmdTestdataAppScenariosNewProjectNoBuildYamlBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataAppScenariosNewProjectNoBuildYaml, nil
}

func testExtendedTestdataCmdTestCmdTestdataAppScenariosNewProjectNoBuildYaml() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataAppScenariosNewProjectNoBuildYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/app-scenarios/new-project-no-build.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataAppScenariosNewProjectOneBuildYaml = []byte(`apiVersion: v1
items:
- apiVersion: v1
  kind: BuildConfig
  metadata:
    creationTimestamp: 2015-04-06T21:02:00Z
    name: sinatra-example-1
    namespace: example
  spec:
    output:
      to:
        kind: ImageStreamTag
        name: sinatra-example-1:latest
    resources: {}
    source:
      git:
        uri: git://github.com/mfojtik/sinatra-example-1
      type: Git
    strategy:
      sourceStrategy:
        from:
          kind: DockerImage
          name: centos/ruby-25-centos7
      type: Source
    triggers:
    - github:
        secret: u5gRhTXiOJpOHxKSI1M6
      type: github
    - generic:
        secret: IDO5sRS52tsUq5hczU6o
      type: generic
  status:
    lastVersion: 1
- apiVersion: v1
  kind: ImageStream
  metadata:
    creationTimestamp: 2015-04-06T21:18:56Z
    name: sinatra-example-1
    namespace: example
  spec: {}
  status:
    dockerImageRepository: ""
- apiVersion: v1
  kind: Build
  metadata:
    creationTimestamp: 2015-04-06T21:18:56Z
    labels:
      buildconfig: sinatra-example-1
    name: sinatra-example-1-1
    namespace: example
  spec:
    output:
      to:
        kind: ImageStreamTag
        name: sinatra-example-1:latest
    resources: {}
    source:
      git:
        uri: git://github.com/mfojtik/sinatra-example-1
      type: Git
    strategy:
      sourceStrategy:
        from:
          kind: DockerImage
          name: centos/ruby-25-centos7
      type: Source
  status:
    phase: Running
    startTimestamp: 2015-04-06T21:19:03Z
- apiVersion: v1
  kind: DeploymentConfig
  metadata:
    creationTimestamp: 2015-04-06T21:02:00Z
    name: sinatra-example-1
    namespace: example
  spec:
    replicas: 1
    selector:
      deploymentconfig: sinatra-example-1
    strategy:
      resources: {}
      type: Recreate
    template:
      metadata:
        creationTimestamp: null
        labels:
          deploymentconfig: sinatra-example-1
      spec:
        containers:
        - capabilities: {}
          image: library/sinatra-example-1:latest
          imagePullPolicy: Always
          name: sinatra-example-1
          ports:
          - containerPort: 8080
            name: s-tcp-8080
            protocol: TCP
          resources: {}
          securityContext:
            capabilities: {}
            privileged: false
          terminationMessagePath: /dev/termination-log
        dnsPolicy: ClusterFirst
        restartPolicy: Always
    triggers:
    - type: ConfigChange
    - imageChangeParams:
        automatic: true
        containerNames:
        - sinatra-example-1
        from:
          kind: ImageStreamTag
          name: sinatra-example-1:latest
        lastTriggeredImage: ""
      type: ImageChange
  status: {}
- apiVersion: v1
  kind: Service
  metadata:
    creationTimestamp: 2015-04-06T21:02:00Z
    name: sinatra-example-1
    namespace: example
  spec:
    ports:
    - nodePort: 0
      port: 8080
      protocol: TCP
      targetPort: 8080
    selector:
      deploymentconfig: sinatra-example-1
    sessionAffinity: None
    type: ClusterIP
  status:
    loadBalancer: {}
kind: List
metadata: {}
`)

func testExtendedTestdataCmdTestCmdTestdataAppScenariosNewProjectOneBuildYamlBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataAppScenariosNewProjectOneBuildYaml, nil
}

func testExtendedTestdataCmdTestCmdTestdataAppScenariosNewProjectOneBuildYaml() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataAppScenariosNewProjectOneBuildYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/app-scenarios/new-project-one-build.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataAppScenariosNewProjectTwoDeploymentConfigsYaml = []byte(`apiVersion: v1
items:
- apiVersion: v1
  kind: BuildConfig
  metadata:
    creationTimestamp: 2015-04-06T21:02:00Z
    name: sinatra-app-example
  spec:
    output:
      to:
        kind: ImageStreamTag
        name: sinatra-app-example:latest
    resources: {}
    source:
      git:
        uri: git://github.com/mfojtik/sinatra-app-example
      type: Git
    strategy:
      sourceStrategy:
        from:
          kind: DockerImage
          name: centos/ruby-25-centos7
      type: Source
    triggers:
    - github:
        secret: u5gRhTXiOJpOHxKSI1M6
      type: github
    - generic:
        secret: IDO5sRS52tsUq5hczU6o
      type: generic
  status:
    lastVersion: 1
- apiVersion: v1
  kind: ImageStream
  metadata:
    creationTimestamp: 2015-04-06T21:18:56Z
    name: sinatra-app-example
  spec: {}
  status:
    dockerImageRepository: ""
- apiVersion: v1
  kind: Build
  metadata:
    creationTimestamp: 2015-04-06T21:18:56Z
    labels:
      buildconfig: sinatra-app-example
    name: sinatra-app-example-1
  spec:
    output:
      to:
        kind: ImageStreamTag
        name: sinatra-app-example:latest
    resources: {}
    revision:
      git:
        author:
          email: someguy@outhere.com
          name: Roy Programmer
        commit: 7a4f354721b0c9717e46f2e132b269b495d43e2b
        committer: {}
        message: Prepare v1 Template types
      type: git
    source:
      git:
        uri: git://github.com/mfojtik/sinatra-app-example
      type: Git
    strategy:
      sourceStrategy:
        from:
          kind: DockerImage
          name: centos/ruby-25-centos7
      type: Source
  status:
    phase: Running
    startTimestamp: 2015-04-06T21:19:03Z
- apiVersion: v1
  kind: DeploymentConfig
  metadata:
    creationTimestamp: 2015-04-06T21:02:00Z
    name: sinatra-app-example-a
  spec:
    replicas: 1
    selector:
      deploymentconfig: sinatra-app-example
    strategy:
      resources: {}
      type: Recreate
    template:
      metadata:
        creationTimestamp: null
        labels:
          deploymentconfig: sinatra-app-example
      spec:
        containers:
        - capabilities: {}
          image: library/sinatra-app-example:latest
          imagePullPolicy: Always
          name: sinatra-app-example
          ports:
          - containerPort: 8080
            name: s-tcp-8080
            protocol: TCP
          resources: {}
          securityContext:
            capabilities: {}
            privileged: false
          terminationMessagePath: /dev/termination-log
        dnsPolicy: ClusterFirst
        restartPolicy: Always
    triggers:
    - type: ConfigChange
    - imageChangeParams:
        automatic: true
        containerNames:
        - sinatra-app-example
        from:
          kind: ImageStreamTag
          name: sinatra-app-example:latest
        lastTriggeredImage: ""
      type: ImageChange
  status: {}
- apiVersion: v1
  kind: DeploymentConfig
  metadata:
    creationTimestamp: 2015-04-06T21:02:00Z
    name: sinatra-app-example-b
  spec:
    replicas: 1
    selector:
      deploymentconfig: sinatra-app-example
    strategy:
      resources: {}
      type: Recreate
    template:
      metadata:
        creationTimestamp: null
        labels:
          deploymentconfig: sinatra-app-example
      spec:
        containers:
        - capabilities: {}
          image: library/sinatra-app-example:latest
          imagePullPolicy: Always
          name: sinatra-app-example
          ports:
          - containerPort: 8080
            name: s-tcp-8080
            protocol: TCP
          resources: {}
          securityContext:
            capabilities: {}
            privileged: false
          terminationMessagePath: /dev/termination-log
        dnsPolicy: ClusterFirst
        restartPolicy: Always
    triggers:
    - type: ConfigChange
    - imageChangeParams:
        automatic: true
        containerNames:
        - sinatra-app-example
        from:
          kind: ImageStreamTag
          name: sinatra-app-example:latest
        lastTriggeredImage: ""
      type: ImageChange
  status: {}
- apiVersion: v1
  kind: Service
  metadata:
    creationTimestamp: 2015-04-06T21:02:00Z
    name: sinatra-app-example
  spec:
    ports:
    - nodePort: 0
      port: 8080
      protocol: TCP
      targetPort: 8080
    selector:
      deploymentconfig: sinatra-app-example
    sessionAffinity: None
    type: ClusterIP
  status:
    loadBalancer: {}
kind: List
metadata: {}
`)

func testExtendedTestdataCmdTestCmdTestdataAppScenariosNewProjectTwoDeploymentConfigsYamlBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataAppScenariosNewProjectTwoDeploymentConfigsYaml, nil
}

func testExtendedTestdataCmdTestCmdTestdataAppScenariosNewProjectTwoDeploymentConfigsYaml() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataAppScenariosNewProjectTwoDeploymentConfigsYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/app-scenarios/new-project-two-deployment-configs.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataAppScenariosPetsetYaml = []byte(`apiVersion: v1
items:
- apiVersion: v1
  kind: Service
  metadata:
    annotations:
      service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
    creationTimestamp: 2016-07-21T15:53:09Z
    labels:
      app: mysql
    name: galera
    namespace: default
    resourceVersion: "343"
    selfLink: /api/v1/namespaces/default/services/galera
    uid: 38fb3915-4f5b-11e6-b8a1-080027242396
  spec:
    clusterIP: None
    ports:
    - name: mysql
      port: 3306
      protocol: TCP
      targetPort: 3306
    selector:
      app: mysql
    sessionAffinity: None
    type: ClusterIP
  status:
    loadBalancer: {}
- apiVersion: v1
  kind: Pod
  metadata:
    annotations:
      kubernetes.io/created-by: |
        {"kind":"SerializedReference","apiVersion":"v1","reference":{"kind":"StatefulSet","namespace":"default","name":"mysql","uid":"3900c985-4f5b-11e6-b8a1-080027242396","apiVersion":"apps","resourceVersion":"6784"}}
      openshift.io/scc: anyuid
      pod.alpha.kubernetes.io/init-container-statuses: '[{"name":"install","state":{"terminated":{"exitCode":0,"reason":"Completed","startedAt":"2016-07-27T02:41:12Z","finishedAt":"2016-07-27T02:41:12Z","containerID":"docker://5c727d8732899605fcfe3eecbeeb02576f18f5b989496073340427a8d2134622"}},"lastState":{},"ready":true,"restartCount":0,"image":"gcr.io/google_containers/galera-install:0.1","imageID":"docker://sha256:56ef857005d0ce479f2db0e4ee0ece05e0766ebfa7e79e27e1513915262a18ec","containerID":"docker://5c727d8732899605fcfe3eecbeeb02576f18f5b989496073340427a8d2134622"},{"name":"bootstrap","state":{"terminated":{"exitCode":0,"reason":"Completed","startedAt":"2016-07-27T02:41:14Z","finishedAt":"2016-07-27T02:41:15Z","containerID":"docker://ab4ca0b3b6ec4860cd55c615534e1e2b11f4c3a33746783aab145919feb2446e"}},"lastState":{},"ready":true,"restartCount":0,"image":"debian:jessie","imageID":"docker://sha256:1b088884749bd93867ddb48ff404d4bbff09a17af8d95bc863efa5d133f87b78","containerID":"docker://ab4ca0b3b6ec4860cd55c615534e1e2b11f4c3a33746783aab145919feb2446e"}]'
      pod.alpha.kubernetes.io/init-containers: '[{"name":"install","image":"gcr.io/google_containers/galera-install:0.1","args":["--work-dir=/work-dir"],"resources":{},"volumeMounts":[{"name":"workdir","mountPath":"/work-dir"},{"name":"config","mountPath":"/etc/mysql"},{"name":"default-token-au2xq","readOnly":true,"mountPath":"/var/run/secrets/kubernetes.io/serviceaccount"}],"terminationMessagePath":"/dev/termination-log","imagePullPolicy":"Always"},{"name":"bootstrap","image":"debian:jessie","command":["/work-dir/peer-finder"],"args":["-on-start=\"/work-dir/on-start.sh\"","-service=galera"],"env":[{"name":"POD_NAMESPACE","valueFrom":{"fieldRef":{"apiVersion":"v1","fieldPath":"metadata.namespace"}}}],"resources":{},"volumeMounts":[{"name":"workdir","mountPath":"/work-dir"},{"name":"config","mountPath":"/etc/mysql"},{"name":"default-token-au2xq","readOnly":true,"mountPath":"/var/run/secrets/kubernetes.io/serviceaccount"}],"terminationMessagePath":"/dev/termination-log","imagePullPolicy":"IfNotPresent"}]'
      pod.alpha.kubernetes.io/initialized: "true"
      pod.beta.kubernetes.io/hostname: mysql-0
      pod.beta.kubernetes.io/subdomain: galera
    creationTimestamp: 2016-07-27T02:41:09Z
    generateName: mysql-
    labels:
      app: mysql
    name: mysql-0
    namespace: default
    resourceVersion: "7191"
    selfLink: /api/v1/namespaces/default/pods/mysql-0
    uid: 92e49e79-53a3-11e6-b45a-080027242396
  spec:
    containers:
    - args:
      - --defaults-file=/etc/mysql/my-galera.cnf
      - --user=root
      image: erkules/galera:basic
      imagePullPolicy: IfNotPresent
      name: mysql
      ports:
      - containerPort: 3306
        name: mysql
        protocol: TCP
      - containerPort: 4444
        name: sst
        protocol: TCP
      - containerPort: 4567
        name: replication
        protocol: TCP
      - containerPort: 4568
        name: ist
        protocol: TCP
      readinessProbe:
        exec:
          command:
          - sh
          - -c
          - mysql -u root -e 'show databases;'
        failureThreshold: 3
        initialDelaySeconds: 15
        periodSeconds: 10
        successThreshold: 1
        timeoutSeconds: 5
      resources: {}
      securityContext:
        capabilities:
          drop:
          - MKNOD
          - SYS_CHROOT
        privileged: false
        seLinuxOptions:
          level: s0:c5,c0
      terminationMessagePath: /dev/termination-log
      volumeMounts:
      - mountPath: /var/lib/
        name: datadir
      - mountPath: /etc/mysql
        name: config
      - mountPath: /var/run/secrets/kubernetes.io/serviceaccount
        name: default-token-au2xq
        readOnly: true
    dnsPolicy: ClusterFirst
    host: localhost.localdomain
    imagePullSecrets:
    - name: default-dockercfg-pzhsj
    nodeName: localhost.localdomain
    restartPolicy: Always
    securityContext:
      seLinuxOptions:
        level: s0:c5,c0
    serviceAccount: default
    serviceAccountName: default
    terminationGracePeriodSeconds: 30
    volumes:
    - name: datadir
      persistentVolumeClaim:
        claimName: datadir-mysql-0
    - emptyDir: {}
      name: config
    - emptyDir: {}
      name: workdir
    - name: default-token-au2xq
      secret:
        secretName: default-token-au2xq
  status:
    conditions:
    - lastProbeTime: null
      lastTransitionTime: 2016-07-27T02:41:15Z
      status: "True"
      type: Initialized
    - lastProbeTime: null
      lastTransitionTime: 2016-07-27T03:00:47Z
      status: "True"
      type: Ready
    - lastProbeTime: null
      lastTransitionTime: 2016-07-27T02:41:09Z
      status: "True"
      type: PodScheduled
    containerStatuses:
    - containerID: docker://f2406b0f697c525df44b64aec6b1f6024ab88d9df80256426247dc6e9a92cb30
      image: erkules/galera:basic
      imageID: docker://sha256:b4780e247a38c12612f539ce1ac8e0988e1781d56fddf719c80fb8d4d7b8bbde
      lastState: {}
      name: mysql
      ready: true
      restartCount: 0
      state:
        running:
          startedAt: 2016-07-27T02:41:16Z
    hostIP: 10.0.2.15
    phase: Running
    podIP: 172.17.0.2
    startTime: 2016-07-27T02:41:09Z
- apiVersion: v1
  kind: Pod
  metadata:
    annotations:
      kubernetes.io/created-by: |
        {"kind":"SerializedReference","apiVersion":"v1","reference":{"kind":"StatefulSet","namespace":"default","name":"mysql","uid":"3900c985-4f5b-11e6-b8a1-080027242396","apiVersion":"apps","resourceVersion":"6790"}}
      openshift.io/scc: anyuid
      pod.alpha.kubernetes.io/init-container-statuses: '[{"name":"install","state":{"terminated":{"exitCode":0,"reason":"Completed","startedAt":"2016-07-27T02:41:42Z","finishedAt":"2016-07-27T02:41:42Z","containerID":"docker://2538c65f65557955c02745ef4021181cf322c8dc0db62144dd1e1f8ea9f7fa54"}},"lastState":{},"ready":true,"restartCount":0,"image":"gcr.io/google_containers/galera-install:0.1","imageID":"docker://sha256:56ef857005d0ce479f2db0e4ee0ece05e0766ebfa7e79e27e1513915262a18ec","containerID":"docker://2538c65f65557955c02745ef4021181cf322c8dc0db62144dd1e1f8ea9f7fa54"},{"name":"bootstrap","state":{"terminated":{"exitCode":0,"reason":"Completed","startedAt":"2016-07-27T02:41:44Z","finishedAt":"2016-07-27T02:41:45Z","containerID":"docker://4df7188d37033c182e675d45179941766bd1e6a013469038f43fa3fecc2cc06d"}},"lastState":{},"ready":true,"restartCount":0,"image":"debian:jessie","imageID":"docker://sha256:1b088884749bd93867ddb48ff404d4bbff09a17af8d95bc863efa5d133f87b78","containerID":"docker://4df7188d37033c182e675d45179941766bd1e6a013469038f43fa3fecc2cc06d"}]'
      pod.alpha.kubernetes.io/init-containers: '[{"name":"install","image":"gcr.io/google_containers/galera-install:0.1","args":["--work-dir=/work-dir"],"resources":{},"volumeMounts":[{"name":"workdir","mountPath":"/work-dir"},{"name":"config","mountPath":"/etc/mysql"},{"name":"default-token-au2xq","readOnly":true,"mountPath":"/var/run/secrets/kubernetes.io/serviceaccount"}],"terminationMessagePath":"/dev/termination-log","imagePullPolicy":"Always"},{"name":"bootstrap","image":"debian:jessie","command":["/work-dir/peer-finder"],"args":["-on-start=\"/work-dir/on-start.sh\"","-service=galera"],"env":[{"name":"POD_NAMESPACE","valueFrom":{"fieldRef":{"apiVersion":"v1","fieldPath":"metadata.namespace"}}}],"resources":{},"volumeMounts":[{"name":"workdir","mountPath":"/work-dir"},{"name":"config","mountPath":"/etc/mysql"},{"name":"default-token-au2xq","readOnly":true,"mountPath":"/var/run/secrets/kubernetes.io/serviceaccount"}],"terminationMessagePath":"/dev/termination-log","imagePullPolicy":"IfNotPresent"}]'
      pod.alpha.kubernetes.io/initialized: "true"
      pod.beta.kubernetes.io/hostname: mysql-1
      pod.beta.kubernetes.io/subdomain: galera
    creationTimestamp: 2016-07-27T02:41:39Z
    generateName: mysql-
    labels:
      app: mysql
    name: mysql-1
    namespace: default
    resourceVersion: "7195"
    selfLink: /api/v1/namespaces/default/pods/mysql-1
    uid: a4da4725-53a3-11e6-b45a-080027242396
  spec:
    containers:
    - args:
      - --defaults-file=/etc/mysql/my-galera.cnf
      - --user=root
      image: erkules/galera:basic
      imagePullPolicy: IfNotPresent
      name: mysql
      ports:
      - containerPort: 3306
        name: mysql
        protocol: TCP
      - containerPort: 4444
        name: sst
        protocol: TCP
      - containerPort: 4567
        name: replication
        protocol: TCP
      - containerPort: 4568
        name: ist
        protocol: TCP
      readinessProbe:
        exec:
          command:
          - sh
          - -c
          - mysql -u root -e 'show databases;'
        failureThreshold: 3
        initialDelaySeconds: 15
        periodSeconds: 10
        successThreshold: 1
        timeoutSeconds: 5
      resources: {}
      securityContext:
        capabilities:
          drop:
          - MKNOD
          - SYS_CHROOT
        privileged: false
        seLinuxOptions:
          level: s0:c5,c0
      terminationMessagePath: /dev/termination-log
      volumeMounts:
      - mountPath: /var/lib/
        name: datadir
      - mountPath: /etc/mysql
        name: config
      - mountPath: /var/run/secrets/kubernetes.io/serviceaccount
        name: default-token-au2xq
        readOnly: true
    dnsPolicy: ClusterFirst
    host: localhost.localdomain
    imagePullSecrets:
    - name: default-dockercfg-pzhsj
    nodeName: localhost.localdomain
    restartPolicy: Always
    securityContext:
      seLinuxOptions:
        level: s0:c5,c0
    serviceAccount: default
    serviceAccountName: default
    terminationGracePeriodSeconds: 30
    volumes:
    - name: datadir
      persistentVolumeClaim:
        claimName: datadir-mysql-1
    - emptyDir: {}
      name: config
    - emptyDir: {}
      name: workdir
    - name: default-token-au2xq
      secret:
        secretName: default-token-au2xq
  status:
    conditions:
    - lastProbeTime: null
      lastTransitionTime: 2016-07-27T02:41:46Z
      status: "True"
      type: Initialized
    - lastProbeTime: null
      lastTransitionTime: 2016-07-27T03:00:58Z
      status: "True"
      type: Ready
    - lastProbeTime: null
      lastTransitionTime: 2016-07-27T02:41:39Z
      status: "True"
      type: PodScheduled
    containerStatuses:
    - containerID: docker://be1d5be42ab23d1db23f4552141e9068e2385ba19c3e84596e047eb6d2762d1c
      image: erkules/galera:basic
      imageID: docker://sha256:b4780e247a38c12612f539ce1ac8e0988e1781d56fddf719c80fb8d4d7b8bbde
      lastState:
        terminated:
          containerID: docker://9a662fa5b74a962fa362c6a5d632fe3642b12fefde36c8158ab1a50d8fa4e33e
          exitCode: 1
          finishedAt: 2016-07-27T02:51:40Z
          reason: Error
          startedAt: 2016-07-27T02:51:05Z
      name: mysql
      ready: true
      restartCount: 7
      state:
        running:
          startedAt: 2016-07-27T03:00:39Z
    hostIP: 10.0.2.15
    phase: Running
    podIP: 172.17.0.3
    startTime: 2016-07-27T02:41:39Z
- apiVersion: v1
  kind: Pod
  metadata:
    annotations:
      kubernetes.io/created-by: |
        {"kind":"SerializedReference","apiVersion":"v1","reference":{"kind":"StatefulSet","namespace":"default","name":"mysql","uid":"3900c985-4f5b-11e6-b8a1-080027242396","apiVersion":"apps","resourceVersion":"6790"}}
      openshift.io/scc: anyuid
      pod.alpha.kubernetes.io/init-container-statuses: '[{"name":"install","state":{"terminated":{"exitCode":0,"reason":"Completed","startedAt":"2016-07-27T03:01:01Z","finishedAt":"2016-07-27T03:01:01Z","containerID":"docker://af008b4ce59d36695fbabf40ae2f7431b51441eb2e9c6962378937c06ac69a35"}},"lastState":{},"ready":true,"restartCount":0,"image":"gcr.io/google_containers/galera-install:0.1","imageID":"docker://sha256:56ef857005d0ce479f2db0e4ee0ece05e0766ebfa7e79e27e1513915262a18ec","containerID":"docker://af008b4ce59d36695fbabf40ae2f7431b51441eb2e9c6962378937c06ac69a35"},{"name":"bootstrap","state":{"terminated":{"exitCode":0,"reason":"Completed","startedAt":"2016-07-27T03:01:02Z","finishedAt":"2016-07-27T03:01:03Z","containerID":"docker://ee97005854130335b54a65429865956260b7729e51e6363ab05e63d5c7c9ee48"}},"lastState":{},"ready":true,"restartCount":0,"image":"debian:jessie","imageID":"docker://sha256:1b088884749bd93867ddb48ff404d4bbff09a17af8d95bc863efa5d133f87b78","containerID":"docker://ee97005854130335b54a65429865956260b7729e51e6363ab05e63d5c7c9ee48"}]'
      pod.alpha.kubernetes.io/init-containers: '[{"name":"install","image":"gcr.io/google_containers/galera-install:0.1","args":["--work-dir=/work-dir"],"resources":{},"volumeMounts":[{"name":"workdir","mountPath":"/work-dir"},{"name":"config","mountPath":"/etc/mysql"},{"name":"default-token-au2xq","readOnly":true,"mountPath":"/var/run/secrets/kubernetes.io/serviceaccount"}],"terminationMessagePath":"/dev/termination-log","imagePullPolicy":"Always"},{"name":"bootstrap","image":"debian:jessie","command":["/work-dir/peer-finder"],"args":["-on-start=\"/work-dir/on-start.sh\"","-service=galera"],"env":[{"name":"POD_NAMESPACE","valueFrom":{"fieldRef":{"apiVersion":"v1","fieldPath":"metadata.namespace"}}}],"resources":{},"volumeMounts":[{"name":"workdir","mountPath":"/work-dir"},{"name":"config","mountPath":"/etc/mysql"},{"name":"default-token-au2xq","readOnly":true,"mountPath":"/var/run/secrets/kubernetes.io/serviceaccount"}],"terminationMessagePath":"/dev/termination-log","imagePullPolicy":"IfNotPresent"}]'
      pod.alpha.kubernetes.io/initialized: "true"
      pod.beta.kubernetes.io/hostname: mysql-2
      pod.beta.kubernetes.io/subdomain: galera
    creationTimestamp: 2016-07-27T03:00:58Z
    generateName: mysql-
    labels:
      app: mysql
    name: mysql-2
    namespace: default
    resourceVersion: "7226"
    selfLink: /api/v1/namespaces/default/pods/mysql-2
    uid: 57e618f1-53a6-11e6-b215-080027242396
  spec:
    containers:
    - args:
      - --defaults-file=/etc/mysql/my-galera.cnf
      - --user=root
      image: erkules/galera:basic
      imagePullPolicy: IfNotPresent
      name: mysql
      ports:
      - containerPort: 3306
        name: mysql
        protocol: TCP
      - containerPort: 4444
        name: sst
        protocol: TCP
      - containerPort: 4567
        name: replication
        protocol: TCP
      - containerPort: 4568
        name: ist
        protocol: TCP
      readinessProbe:
        exec:
          command:
          - sh
          - -c
          - mysql -u root -e 'show databases;'
        failureThreshold: 3
        initialDelaySeconds: 15
        periodSeconds: 10
        successThreshold: 1
        timeoutSeconds: 5
      resources: {}
      securityContext:
        capabilities:
          drop:
          - MKNOD
          - SYS_CHROOT
        privileged: false
        seLinuxOptions:
          level: s0:c5,c0
      terminationMessagePath: /dev/termination-log
      volumeMounts:
      - mountPath: /var/lib/
        name: datadir
      - mountPath: /etc/mysql
        name: config
      - mountPath: /var/run/secrets/kubernetes.io/serviceaccount
        name: default-token-au2xq
        readOnly: true
    dnsPolicy: ClusterFirst
    host: localhost.localdomain
    imagePullSecrets:
    - name: default-dockercfg-pzhsj
    nodeName: localhost.localdomain
    restartPolicy: Always
    securityContext:
      seLinuxOptions:
        level: s0:c5,c0
    serviceAccount: default
    serviceAccountName: default
    terminationGracePeriodSeconds: 30
    volumes:
    - name: datadir
      persistentVolumeClaim:
        claimName: datadir-mysql-2
    - emptyDir: {}
      name: config
    - emptyDir: {}
      name: workdir
    - name: default-token-au2xq
      secret:
        secretName: default-token-au2xq
  status:
    conditions:
    - lastProbeTime: null
      lastTransitionTime: 2016-07-27T03:01:03Z
      status: "True"
      type: Initialized
    - lastProbeTime: null
      lastTransitionTime: 2016-07-27T03:01:28Z
      status: "True"
      type: Ready
    - lastProbeTime: null
      lastTransitionTime: 2016-07-27T03:00:58Z
      status: "True"
      type: PodScheduled
    containerStatuses:
    - containerID: docker://82b774855cdb5d12d98e7bc34f4f9d4e88e757e9cc2da1593e2e2f66e3241e5f
      image: erkules/galera:basic
      imageID: docker://sha256:b4780e247a38c12612f539ce1ac8e0988e1781d56fddf719c80fb8d4d7b8bbde
      lastState: {}
      name: mysql
      ready: true
      restartCount: 0
      state:
        running:
          startedAt: 2016-07-27T03:01:04Z
    hostIP: 10.0.2.15
    phase: Running
    podIP: 172.17.0.4
    startTime: 2016-07-27T03:00:58Z
- apiVersion: apps/v1
  kind: StatefulSet
  metadata:
    creationTimestamp: 2016-07-21T15:53:09Z
    generation: 3
    labels:
      app: mysql
    name: mysql
    namespace: default
    resourceVersion: "6790"
    selfLink: /apis/apps/v1/namespaces/default/statefulsets/mysql
    uid: 3900c985-4f5b-11e6-b8a1-080027242396
  spec:
    replicas: 3
    selector:
      matchLabels:
        app: mysql
    serviceName: galera
    template:
      metadata:
        annotations:
          pod.alpha.kubernetes.io/init-containers: '[{"name":"install","image":"gcr.io/google_containers/galera-install:0.1","args":["--work-dir=/work-dir"],"resources":{},"volumeMounts":[{"name":"workdir","mountPath":"/work-dir"},{"name":"config","mountPath":"/etc/mysql"}],"terminationMessagePath":"/dev/termination-log","imagePullPolicy":"Always"},{"name":"bootstrap","image":"debian:jessie","command":["/work-dir/peer-finder"],"args":["-on-start=\"/work-dir/on-start.sh\"","-service=galera"],"env":[{"name":"POD_NAMESPACE","valueFrom":{"fieldRef":{"apiVersion":"v1","fieldPath":"metadata.namespace"}}}],"resources":{},"volumeMounts":[{"name":"workdir","mountPath":"/work-dir"},{"name":"config","mountPath":"/etc/mysql"}],"terminationMessagePath":"/dev/termination-log","imagePullPolicy":"IfNotPresent"}]'
          pod.alpha.kubernetes.io/initialized: "true"
        creationTimestamp: null
        labels:
          app: mysql
      spec:
        containers:
        - args:
          - --defaults-file=/etc/mysql/my-galera.cnf
          - --user=root
          image: erkules/galera:basic
          imagePullPolicy: IfNotPresent
          name: mysql
          ports:
          - containerPort: 3306
            name: mysql
            protocol: TCP
          - containerPort: 4444
            name: sst
            protocol: TCP
          - containerPort: 4567
            name: replication
            protocol: TCP
          - containerPort: 4568
            name: ist
            protocol: TCP
          readinessProbe:
            exec:
              command:
              - sh
              - -c
              - mysql -u root -e 'show databases;'
            failureThreshold: 3
            initialDelaySeconds: 15
            periodSeconds: 10
            successThreshold: 1
            timeoutSeconds: 5
          resources: {}
          terminationMessagePath: /dev/termination-log
          volumeMounts:
          - mountPath: /var/lib/
            name: datadir
          - mountPath: /etc/mysql
            name: config
        dnsPolicy: ClusterFirst
        restartPolicy: Always
        securityContext: {}
        terminationGracePeriodSeconds: 30
        volumes:
        - emptyDir: {}
          name: config
        - emptyDir: {}
          name: workdir
    volumeClaimTemplates:
    - metadata:
        annotations:
          volume.alpha.kubernetes.io/storage-class: anything
        creationTimestamp: null
        name: datadir
      spec:
        accessModes:
        - ReadWriteOnce
        resources:
          requests:
            storage: 10Gi
      status:
        phase: Pending
  status:
    replicas: 3
kind: List
metadata: {}
`)

func testExtendedTestdataCmdTestCmdTestdataAppScenariosPetsetYamlBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataAppScenariosPetsetYaml, nil
}

func testExtendedTestdataCmdTestCmdTestdataAppScenariosPetsetYaml() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataAppScenariosPetsetYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/app-scenarios/petset.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataApplicationTemplateCustombuildJson = []byte(`{
  "kind": "Template",
  "apiVersion": "v1",
  "metadata": {
    "name": "ruby-helloworld-sample",
    "annotations": {
      "description": "This example shows how to create a simple ruby application in openshift origin v3",
      "iconClass": "icon-ruby",
      "tags": "instant-app,ruby,mysql"
    }
  },
  "objects": [
    {
      "kind": "Secret",
      "apiVersion": "v1",
      "metadata": {
        "name": "dbsecret"
      },
      "stringData" : {
        "mysql-user" : "${MYSQL_USER}",
        "mysql-password" : "${MYSQL_PASSWORD}"
      }
    },
    {
      "kind": "Service",
      "apiVersion": "v1",
      "metadata": {
        "name": "frontend"
      },
      "spec": {
        "ports": [
          {
            "name": "web",
            "protocol": "TCP",
            "port": 5432,
            "targetPort": 8080,
            "nodePort": 0
          }
        ],
        "selector": {
          "name": "frontend"
        },
        "type": "ClusterIP",
        "sessionAffinity": "None"
      },
      "status": {
        "loadBalancer": {}
      }
    },
    {
      "kind": "Route",
      "apiVersion": "v1",
      "metadata": {
        "name": "route-edge",
        "annotations": {
          "template.openshift.io/expose-uri": "http://{.spec.host}{.spec.path}"
        }
      },
      "spec": {
        "host": "www.example.com",
        "to": {
          "kind": "Service",
          "name": "frontend"
        },
        "tls": {
          "termination": "edge"
        }
      },
      "status": {}
    },
    {
      "kind": "ImageStream",
      "apiVersion": "v1",
      "metadata": {
        "name": "origin-ruby-sample"
      },
      "spec": {},
      "status": {
        "dockerImageRepository": ""
      }
    },
    {
      "kind": "ImageStream",
      "apiVersion": "v1",
      "metadata": {
        "name": "origin-custom-docker-builder"
      },
      "spec": {
        "dockerImageRepository": "openshift/origin-custom-docker-builder"
      },
      "status": {
        "dockerImageRepository": ""
      }
    },
    {
      "kind": "BuildConfig",
      "apiVersion": "v1",
      "metadata": {
        "name": "ruby-sample-build",
        "labels": {
          "name": "ruby-sample-build"
        },
        "annotations": {
          "template.alpha.openshift.io/wait-for-ready": "true"
        }
      },
      "spec": {
        "triggers": [
          {
            "type": "GitHub",
            "github": {
              "secret": "secret101"
            }
          },
          {
            "type": "Generic",
            "generic": {
              "secret": "secret101",
              "allowEnv": true
            }
          },
          {
            "type": "ImageChange",
            "imageChange": {}
          },
          {
            "type": "ConfigChange"
          }
        ],
        "source": {
          "type": "Git",
          "git": {
            "uri": "https://github.com/openshift/ruby-hello-world.git"
          }
        },
        "strategy": {
          "type": "Custom",
          "customStrategy": {
            "from": {
              "kind": "ImageStreamTag",
              "name": "origin-custom-docker-builder:latest"
            },
            "env": [
              {
                "name": "OPENSHIFT_CUSTOM_BUILD_BASE_IMAGE",
                "value": "openshift/origin-custom-docker-builder"
              }
            ],
            "exposeDockerSocket": true
          }
        },
        "output": {
          "to": {
            "kind": "ImageStreamTag",
            "name": "origin-ruby-sample:latest"
          }
        },
        "postCommit": {
          "script": "bundle exec rake test"
        },
        "resources": {}
      },
      "status": {
        "lastVersion": 0
      }
    },
    {
      "kind": "DeploymentConfig",
      "apiVersion": "v1",
      "metadata": {
        "name": "frontend",
        "annotations": {
          "template.alpha.openshift.io/wait-for-ready": "true"
        }
      },
      "spec": {
        "strategy": {
          "type": "Rolling",
          "rollingParams": {
            "updatePeriodSeconds": 1,
            "intervalSeconds": 1,
            "timeoutSeconds": 120,
            "pre": {
              "failurePolicy": "Abort",
              "execNewPod": {
                "command": [
                  "/bin/true"
                ],
                "env": [
                  {
                    "name": "CUSTOM_VAR1",
                    "value": "custom_value1"
                  }
                ],
                "containerName": "ruby-helloworld"
              }
            },
            "post": {
              "failurePolicy": "Ignore",
              "execNewPod": {
                "command": [
                  "/bin/true"
                ],
                "env": [
                  {
                    "name": "CUSTOM_VAR2",
                    "value": "custom_value2"
                  }
                ],
                "containerName": "ruby-helloworld"
              }
            }
          },
          "resources": {}
        },
        "triggers": [
          {
            "type": "ImageChange",
            "imageChangeParams": {
              "automatic": true,
              "containerNames": [
                "ruby-helloworld"
              ],
              "from": {
                "kind": "ImageStreamTag",
                "name": "origin-ruby-sample:latest"
              }
            }
          },
          {
            "type": "ConfigChange"
          }
        ],
        "replicas": 2,
        "selector": {
          "name": "frontend"
        },
        "template": {
          "metadata": {
            "labels": {
              "name": "frontend"
            }
          },
          "spec": {
            "containers": [
              {
                "name": "ruby-helloworld",
                "image": "origin-ruby-sample",
                "ports": [
                  {
                    "containerPort": 8080,
                    "protocol": "TCP"
                  }
                ],
                "env": [
                  {
                    "name": "MYSQL_USER",
                    "valueFrom": {
                      "secretKeyRef" : {
                        "name" : "dbsecret",
                        "key" : "mysql-user"
                      }
                    }
                  },
                  {
                    "name": "MYSQL_PASSWORD",
                    "valueFrom": {
                      "secretKeyRef" : {
                        "name" : "dbsecret",
                        "key" : "mysql-password"
                      }
                    }
                  },
                  {
                    "name": "MYSQL_DATABASE",
                    "value": "${MYSQL_DATABASE}"
                  }
                ],
                "resources": {},
                "terminationMessagePath": "/dev/termination-log",
                "imagePullPolicy": "IfNotPresent",
                "securityContext": {
                  "capabilities": {},
                  "privileged": false
                }
              }
            ],
            "restartPolicy": "Always",
            "dnsPolicy": "ClusterFirst"
          }
        }
      },
      "status": {}
    },
    {
      "kind": "Service",
      "apiVersion": "v1",
      "metadata": {
        "name": "database"
      },
      "spec": {
        "ports": [
          {
            "name": "db",
            "protocol": "TCP",
            "port": 5434,
            "targetPort": 3306,
            "nodePort": 0
          }
        ],
        "selector": {
          "name": "database"
        },
        "type": "ClusterIP",
        "sessionAffinity": "None"
      },
      "status": {
        "loadBalancer": {}
      }
    },
    {
      "kind": "DeploymentConfig",
      "apiVersion": "v1",
      "metadata": {
        "name": "database",
        "annotations": {
          "template.alpha.openshift.io/wait-for-ready": "true"
        }
      },
      "spec": {
        "strategy": {
          "type": "Recreate",
          "recreateParams": {
            "pre": {
              "failurePolicy": "Abort",
              "execNewPod": {
                "command": [
                  "/bin/true"
                ],
                "env": [
                  {
                    "name": "CUSTOM_VAR1",
                    "value": "custom_value1"
                  }
                ],
                "containerName": "ruby-helloworld-database",
                "volumes": ["ruby-helloworld-data"]
              }
            },
            "mid": {
              "failurePolicy": "Abort",
              "execNewPod": {
                "command": [
                  "/bin/true"
                ],
                "env": [
                  {
                    "name": "CUSTOM_VAR2",
                    "value": "custom_value2"
                  }
                ],
                "containerName": "ruby-helloworld-database",
                "volumes": ["ruby-helloworld-data"]
              }
            },
            "post": {
              "failurePolicy": "Ignore",
              "execNewPod": {
                "command": [
                  "/bin/true"
                ],
                "env": [
                  {
                    "name": "CUSTOM_VAR2",
                    "value": "custom_value2"
                  }
                ],
                "containerName": "ruby-helloworld-database",
                "volumes": ["ruby-helloworld-data"]
              }
            }
          },
          "resources": {}
        },
        "triggers": [
          {
            "type": "ConfigChange"
          }
        ],
        "replicas": 1,
        "selector": {
          "name": "database"
        },
        "template": {
          "metadata": {
            "labels": {
              "name": "database"
            }
          },
          "spec": {
            "containers": [
              {
                "name": "ruby-helloworld-database",
                "image": "centos/mysql-57-centos7:latest",
                "ports": [
                  {
                    "containerPort": 3306,
                    "protocol": "TCP"
                  }
                ],
                "env": [
                  {
                    "name": "MYSQL_USER",
                    "valueFrom": {
                      "secretKeyRef" : {
                        "name" : "dbsecret",
                        "key" : "mysql-user"
                      }
                    }
                  },
                  {
                    "name": "MYSQL_PASSWORD",
                    "valueFrom": {
                      "secretKeyRef" : {
                        "name" : "dbsecret",
                        "key" : "mysql-password"
                      }
                    }
                  },
                  {
                    "name": "MYSQL_DATABASE",
                    "value": "${MYSQL_DATABASE}"
                  }
                ],
                "resources": {},
                "volumeMounts": [
                  {
                    "name": "ruby-helloworld-data",
                    "mountPath": "/var/lib/mysql/data"
                  }
                ],
                "terminationMessagePath": "/dev/termination-log",
                "imagePullPolicy": "Always",
                "securityContext": {
                  "capabilities": {},
                  "privileged": false
                }
              }
            ],
            "volumes": [
              {
                "name": "ruby-helloworld-data",
                "emptyDir": {
                  "medium": ""
                }
              }
            ],
            "restartPolicy": "Always",
            "dnsPolicy": "ClusterFirst"
          }
        }
      },
      "status": {}
    }
  ],
  "parameters": [
    {
      "name": "MYSQL_USER",
      "description": "database username",
      "generate": "expression",
      "from": "user[A-Z0-9]{3}",
      "required": true
    },
    {
      "name": "MYSQL_PASSWORD",
      "description": "database password",
      "generate": "expression",
      "from": "[a-zA-Z0-9]{8}",
      "required": true
    },
    {
      "name": "MYSQL_DATABASE",
      "description": "database name",
      "value": "root",
      "required": true
    }
  ],
  "labels": {
    "template": "application-template-custombuild"
  }
}
`)

func testExtendedTestdataCmdTestCmdTestdataApplicationTemplateCustombuildJsonBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataApplicationTemplateCustombuildJson, nil
}

func testExtendedTestdataCmdTestCmdTestdataApplicationTemplateCustombuildJson() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataApplicationTemplateCustombuildJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/application-template-custombuild.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataApplicationTemplateDockerbuildJson = []byte(`{
  "kind": "Template",
  "apiVersion": "v1",
  "metadata": {
    "name": "ruby-helloworld-sample",
    "annotations": {
      "description": "This example shows how to create a simple ruby application in openshift origin v3",
      "iconClass": "icon-ruby",
      "tags": "instant-app,ruby,mysql"
    }
  },
  "objects": [
    {
      "kind": "Secret",
      "apiVersion": "v1",
      "metadata": {
        "name": "dbsecret"
      },
      "stringData" : {
        "mysql-user" : "${MYSQL_USER}",
        "mysql-password" : "${MYSQL_PASSWORD}"
      }
    },
    {
      "kind": "Service",
      "apiVersion": "v1",
      "metadata": {
        "name": "frontend"
      },
      "spec": {
        "ports": [
          {
            "name": "web",
            "protocol": "TCP",
            "port": 5432,
            "targetPort": 8080,
            "nodePort": 0
          }
        ],
        "selector": {
          "name": "frontend"
        },
        "type": "ClusterIP",
        "sessionAffinity": "None"
      },
      "status": {
        "loadBalancer": {}
      }
    },
    {
      "kind": "Route",
      "apiVersion": "v1",
      "metadata": {
        "name": "route-edge",
        "annotations": {
          "template.openshift.io/expose-uri": "http://{.spec.host}{.spec.path}"
        }
      },
      "spec": {
        "host": "www.example.com",
        "to": {
          "kind": "Service",
          "name": "frontend"
        },
        "tls": {
          "termination": "edge"
        }
      },
      "status": {}
    },
    {
      "kind": "ImageStream",
      "apiVersion": "v1",
      "metadata": {
        "name": "origin-ruby-sample"
      },
      "spec": {},
      "status": {
        "dockerImageRepository": ""
      }
    },
    {
      "kind": "ImageStream",
      "apiVersion": "v1",
      "metadata": {
        "name": "ruby-25-centos7"
      },
      "spec": {
        "tags": [
          {
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/centos/ruby-25-centos7:latest"
            },
            "name": "latest"
          }
        ]
      }
    },
    {
      "kind": "BuildConfig",
      "apiVersion": "v1",
      "metadata": {
        "name": "ruby-sample-build",
        "labels": {
          "name": "ruby-sample-build"
        },
        "annotations": {
          "template.alpha.openshift.io/wait-for-ready": "true"
        }
      },
      "spec": {
        "triggers": [
          {
            "type": "GitHub",
            "github": {
              "secret": "secret101"
            }
          },
          {
            "type": "Generic",
            "generic": {
              "secret": "secret101",
              "allowEnv": true
            }
          },
          {
            "type": "ImageChange",
            "imageChange": {}
          },
          {
            "type": "ConfigChange"
          }
        ],
        "source": {
          "type": "Git",
          "git": {
            "uri": "https://github.com/openshift/ruby-hello-world.git"
          }
        },
        "strategy": {
          "type": "Docker",
          "dockerStrategy": {
            "from": {
              "kind": "ImageStreamTag",
              "name": "ruby-25-centos7:latest"
            },
            "env": [
              {
                "name": "EXAMPLE",
                "value": "sample-app"
              }
            ]
          }
        },
        "output": {
          "to": {
            "kind": "ImageStreamTag",
            "name": "origin-ruby-sample:latest"
          }
        },
        "postCommit": {
          "script": "bundle exec rake test"
        },
        "resources": {}
      },
      "status": {
        "lastVersion": 0
      }
    },
    {
      "kind": "DeploymentConfig",
      "apiVersion": "v1",
      "metadata": {
        "name": "frontend",
        "annotations": {
          "template.alpha.openshift.io/wait-for-ready": "true"
        }
      },
      "spec": {
        "strategy": {
          "type": "Rolling",
          "rollingParams": {
            "updatePeriodSeconds": 1,
            "intervalSeconds": 1,
            "timeoutSeconds": 120,
            "pre": {
              "failurePolicy": "Abort",
              "execNewPod": {
                "command": [
                  "/bin/true"
                ],
                "env": [
                  {
                    "name": "CUSTOM_VAR1",
                    "value": "custom_value1"
                  }
                ],
                "containerName": "ruby-helloworld"
              }
            },
            "post": {
              "failurePolicy": "Ignore",
              "execNewPod": {
                "command": [
                  "/bin/true"
                ],
                "env": [
                  {
                    "name": "CUSTOM_VAR2",
                    "value": "custom_value2"
                  }
                ],
                "containerName": "ruby-helloworld"
              }
            }
          },
          "resources": {}
        },
        "triggers": [
          {
            "type": "ImageChange",
            "imageChangeParams": {
              "automatic": true,
              "containerNames": [
                "ruby-helloworld"
              ],
              "from": {
                "kind": "ImageStreamTag",
                "name": "origin-ruby-sample:latest"
              }
            }
          },
          {
            "type": "ConfigChange"
          }
        ],
        "replicas": 2,
        "selector": {
          "name": "frontend"
        },
        "template": {
          "metadata": {
            "labels": {
              "name": "frontend"
            }
          },
          "spec": {
            "containers": [
              {
                "name": "ruby-helloworld",
                "image": "origin-ruby-sample",
                "ports": [
                  {
                    "containerPort": 8080,
                    "protocol": "TCP"
                  }
                ],
                "env": [
                  {
                    "name": "MYSQL_USER",
                    "valueFrom": {
                      "secretKeyRef" : {
                        "name" : "dbsecret",
                        "key" : "mysql-user"
                      }
                    }
                  },
                  {
                    "name": "MYSQL_PASSWORD",
                    "valueFrom": {
                      "secretKeyRef" : {
                        "name" : "dbsecret",
                        "key" : "mysql-password"
                      }
                    }
                  },
                  {
                    "name": "MYSQL_DATABASE",
                    "value": "${MYSQL_DATABASE}"
                  }
                ],
                "resources": {},
                "terminationMessagePath": "/dev/termination-log",
                "imagePullPolicy": "IfNotPresent",
                "securityContext": {
                  "capabilities": {},
                  "privileged": false
                }
              }
            ],
            "restartPolicy": "Always",
            "dnsPolicy": "ClusterFirst"
          }
        }
      },
      "status": {}
    },
    {
      "kind": "Service",
      "apiVersion": "v1",
      "metadata": {
        "name": "database"
      },
      "spec": {
        "ports": [
          {
            "name": "db",
            "protocol": "TCP",
            "port": 5434,
            "targetPort": 3306,
            "nodePort": 0
          }
        ],
        "selector": {
          "name": "database"
        },
        "type": "ClusterIP",
        "sessionAffinity": "None"
      },
      "status": {
        "loadBalancer": {}
      }
    },
    {
      "kind": "DeploymentConfig",
      "apiVersion": "v1",
      "metadata": {
        "name": "database",
        "annotations": {
          "template.alpha.openshift.io/wait-for-ready": "true"
        }
      },
      "spec": {
        "strategy": {
          "type": "Recreate",
          "resources": {}
        },
        "triggers": [
          {
            "type": "ConfigChange"
          }
        ],
        "replicas": 1,
        "selector": {
          "name": "database"
        },
        "template": {
          "metadata": {
            "labels": {
              "name": "database"
            }
          },
          "spec": {
            "containers": [
              {
                "name": "ruby-helloworld-database",
                "image": "centos/mysql-57-centos7:latest",
                "ports": [
                  {
                    "containerPort": 3306,
                    "protocol": "TCP"
                  }
                ],
                "env": [
                  {
                    "name": "MYSQL_USER",
                    "valueFrom": {
                      "secretKeyRef" : {
                        "name" : "dbsecret",
                        "key" : "mysql-user"
                      }
                    }
                  },
                  {
                    "name": "MYSQL_PASSWORD",
                    "valueFrom": {
                      "secretKeyRef" : {
                        "name" : "dbsecret",
                        "key" : "mysql-password"
                      }
                    }
                  },
                  {
                    "name": "MYSQL_DATABASE",
                    "value": "${MYSQL_DATABASE}"
                  }
                ],
                "resources": {},
                "volumeMounts": [
                  {
                    "name": "ruby-helloworld-data",
                    "mountPath": "/var/lib/mysql/data"
                  }
                ],
                "terminationMessagePath": "/dev/termination-log",
                "imagePullPolicy": "Always",
                "securityContext": {
                  "capabilities": {},
                  "privileged": false
                }
              }
            ],
            "volumes": [
              {
                "name": "ruby-helloworld-data",
                "emptyDir": {
                  "medium": ""
                }
              }
            ],
            "restartPolicy": "Always",
            "dnsPolicy": "ClusterFirst"
          }
        }
      },
      "status": {}
    }
  ],
  "parameters": [
    {
      "name": "MYSQL_USER",
      "description": "database username",
      "generate": "expression",
      "from": "user[A-Z0-9]{3}",
      "required": true
    },
    {
      "name": "MYSQL_PASSWORD",
      "description": "database password",
      "generate": "expression",
      "from": "[a-zA-Z0-9]{8}",
      "required": true
    },
    {
      "name": "MYSQL_DATABASE",
      "description": "database name",
      "value": "root",
      "required": true
    }
  ],
  "labels": {
    "template": "application-template-dockerbuild"
  }
}
`)

func testExtendedTestdataCmdTestCmdTestdataApplicationTemplateDockerbuildJsonBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataApplicationTemplateDockerbuildJson, nil
}

func testExtendedTestdataCmdTestCmdTestdataApplicationTemplateDockerbuildJson() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataApplicationTemplateDockerbuildJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/application-template-dockerbuild.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataApplicationTemplateStibuildJson = []byte(`{
  "kind": "Template",
  "apiVersion": "v1",
  "metadata": {
    "name": "ruby-helloworld-sample",
    "annotations": {
      "description": "This example shows how to create a simple ruby application in openshift origin v3",
      "iconClass": "icon-ruby",
      "tags": "instant-app,ruby,mysql"
    }
  },
  "objects": [
    {
      "kind": "Secret",
      "apiVersion": "v1",
      "metadata": {
        "name": "dbsecret"
      },
      "stringData" : {
        "mysql-user" : "${MYSQL_USER}",
        "mysql-password" : "${MYSQL_PASSWORD}"
      }
    },
    {
      "kind": "Service",
      "apiVersion": "v1",
      "metadata": {
        "name": "frontend"
      },
      "spec": {
        "ports": [
          {
            "name": "web",
            "protocol": "TCP",
            "port": 5432,
            "targetPort": 8080,
            "nodePort": 0
          }
        ],
        "selector": {
          "name": "frontend"
        },
        "type": "ClusterIP",
        "sessionAffinity": "None"
      },
      "status": {
        "loadBalancer": {}
      }
    },
    {
      "kind": "Route",
      "apiVersion": "v1",
      "metadata": {
        "name": "route-edge",
        "annotations": {
          "template.openshift.io/expose-uri": "http://{.spec.host}{.spec.path}"
        }
     },
      "spec": {
        "host": "www.example.com",
        "to": {
          "kind": "Service",
          "name": "frontend"
        },
        "tls": {
          "termination": "edge"
        }
      },
      "status": {}
    },
    {
      "kind": "ImageStream",
      "apiVersion": "v1",
      "metadata": {
        "name": "origin-ruby-sample"
      },
      "spec": {},
      "status": {
        "dockerImageRepository": ""
      }
    },
    {
      "kind": "ImageStream",
      "apiVersion": "v1",
      "metadata": {
        "name": "ruby-25-centos7"
      },
      "spec": {
        "dockerImageRepository": "centos/ruby-25-centos7"
      },
      "status": {
        "dockerImageRepository": ""
      }
    },
    {
      "kind": "BuildConfig",
      "apiVersion": "v1",
      "metadata": {
        "name": "ruby-sample-build",
        "labels": {
          "name": "ruby-sample-build"
        },
        "annotations": {
          "template.alpha.openshift.io/wait-for-ready": "true"
        }
      },
      "spec": {
        "triggers": [
          {
            "type": "GitHub",
            "github": {
              "secret": "secret101"
            }
          },
          {
            "type": "Generic",
            "generic": {
              "secret": "secret101",
              "allowEnv": true
            }
          },
          {
            "type": "ImageChange",
            "imageChange": {}
          },
          {
            "type": "ConfigChange"
          }
        ],
        "source": {
          "type": "Git",
          "git": {
            "uri": "https://github.com/openshift/ruby-hello-world.git"
          }
        },
        "strategy": {
          "type": "Source",
          "sourceStrategy": {
            "from": {
              "kind": "ImageStreamTag",
              "name": "ruby-25-centos7:latest"
            },
            "env": [
              {
                "name": "EXAMPLE",
                "value": "sample-app"
              }
            ]
          }
        },
        "output": {
          "to": {
            "kind": "ImageStreamTag",
            "name": "origin-ruby-sample:latest"
          }
        },
        "postCommit": {
          "script": "bundle exec rake test"
        },
        "resources": {}
      },
      "status": {
        "lastVersion": 0
      }
    },
    {
      "kind": "DeploymentConfig",
      "apiVersion": "v1",
      "metadata": {
        "name": "frontend",
        "annotations": {
          "template.alpha.openshift.io/wait-for-ready": "true"
        }
      },
      "spec": {
        "strategy": {
          "type": "Rolling",
          "rollingParams": {
            "updatePeriodSeconds": 1,
            "intervalSeconds": 1,
            "timeoutSeconds": 120,
            "pre": {
              "failurePolicy": "Abort",
              "execNewPod": {
                "command": [
                  "/bin/true"
                ],
                "env": [
                  {
                    "name": "CUSTOM_VAR1",
                    "value": "custom_value1"
                  }
                ],
                "containerName": "ruby-helloworld"
              }
            },
            "post": {
              "failurePolicy": "Ignore",
              "execNewPod": {
                "command": [
                  "/bin/true"
                ],
                "env": [
                  {
                    "name": "CUSTOM_VAR2",
                    "value": "custom_value2"
                  }
                ],
                "containerName": "ruby-helloworld"
              }
            }
          },
          "resources": {}
        },
        "triggers": [
          {
            "type": "ImageChange",
            "imageChangeParams": {
              "automatic": true,
              "containerNames": [
                "ruby-helloworld"
              ],
              "from": {
                "kind": "ImageStreamTag",
                "name": "origin-ruby-sample:latest"
              }
            }
          },
          {
            "type": "ConfigChange"
          }
        ],
        "replicas": 2,
        "selector": {
          "name": "frontend"
        },
        "template": {
          "metadata": {
            "labels": {
              "name": "frontend"
            }
          },
          "spec": {
            "containers": [
              {
                "name": "ruby-helloworld",
                "image": "origin-ruby-sample",
                "ports": [
                  {
                    "containerPort": 8080,
                    "protocol": "TCP"
                  }
                ],
                "env": [
                  {
                    "name": "MYSQL_USER",
                    "valueFrom": {
                      "secretKeyRef" : {
                        "name" : "dbsecret",
                        "key" : "mysql-user"
                      }
                    }
                  },
                  {
                    "name": "MYSQL_PASSWORD",
                    "valueFrom": {
                      "secretKeyRef" : {
                        "name" : "dbsecret",
                        "key" : "mysql-password"
                      }
                    }
                  },
                  {
                    "name": "MYSQL_DATABASE",
                    "value": "${MYSQL_DATABASE}"
                  }
                ],
                "resources": {},
                "terminationMessagePath": "/dev/termination-log",
                "imagePullPolicy": "IfNotPresent",
                "securityContext": {
                  "capabilities": {},
                  "privileged": false
                }
              }
            ],
            "restartPolicy": "Always",
            "dnsPolicy": "ClusterFirst"
          }
        }
      },
      "status": {}
    },
    {
      "kind": "Service",
      "apiVersion": "v1",
      "metadata": {
        "name": "database"
      },
      "spec": {
        "ports": [
          {
            "name": "db",
            "protocol": "TCP",
            "port": 5434,
            "targetPort": 3306,
            "nodePort": 0
          }
        ],
        "selector": {
          "name": "database"
        },
        "type": "ClusterIP",
        "sessionAffinity": "None"
      },
      "status": {
        "loadBalancer": {}
      }
    },
    {
      "kind": "DeploymentConfig",
      "apiVersion": "v1",
      "metadata": {
        "name": "database",
        "annotations": {
          "template.alpha.openshift.io/wait-for-ready": "true"
        }
      },
      "spec": {
        "strategy": {
          "type": "Recreate",
          "recreateParams": {
            "pre": {
              "failurePolicy": "Abort",
              "execNewPod": {
                "command": [
                  "/bin/true"
                ],
                "env": [
                  {
                    "name": "CUSTOM_VAR1",
                    "value": "custom_value1"
                  }
                ],
                "containerName": "ruby-helloworld-database",
                "volumes": ["ruby-helloworld-data"]
              }
            },
            "mid": {
              "failurePolicy": "Abort",
              "execNewPod": {
                "command": [
                  "/bin/true"
                ],
                "env": [
                  {
                    "name": "CUSTOM_VAR2",
                    "value": "custom_value2"
                  }
                ],
                "containerName": "ruby-helloworld-database",
                "volumes": ["ruby-helloworld-data"]
              }
            },
            "post": {
              "failurePolicy": "Ignore",
              "execNewPod": {
                "command": [
                  "/bin/true"
                ],
                "env": [
                  {
                    "name": "CUSTOM_VAR2",
                    "value": "custom_value2"
                  }
                ],
                "containerName": "ruby-helloworld-database",
                "volumes": ["ruby-helloworld-data"]
              }
            }
          },
          "resources": {}
        },
        "triggers": [
          {
            "type": "ConfigChange"
          }
        ],
        "replicas": 1,
        "selector": {
          "name": "database"
        },
        "template": {
          "metadata": {
            "labels": {
              "name": "database"
            }
          },
          "spec": {
            "containers": [
              {
                "name": "ruby-helloworld-database",
                "image": "centos/mysql-57-centos7:latest",
                "ports": [
                  {
                    "containerPort": 3306,
                    "protocol": "TCP"
                  }
                ],
                "env": [
                  {
                    "name": "MYSQL_USER",
                    "valueFrom": {
                      "secretKeyRef" : {
                        "name" : "dbsecret",
                        "key" : "mysql-user"
                      }
                    }
                  },
                  {
                    "name": "MYSQL_PASSWORD",
                    "valueFrom": {
                      "secretKeyRef" : {
                        "name" : "dbsecret",
                        "key" : "mysql-password"
                      }
                    }
                  },
                  {
                    "name": "MYSQL_DATABASE",
                    "value": "${MYSQL_DATABASE}"
                  }
                ],
                "resources": {},
                "volumeMounts": [
                  {
                    "name": "ruby-helloworld-data",
                    "mountPath": "/var/lib/mysql/data"
                  }
                ],
                "terminationMessagePath": "/dev/termination-log",
                "imagePullPolicy": "Always",
                "securityContext": {
                  "capabilities": {},
                  "privileged": false
                }
              }
            ],
            "volumes": [
              {
                "name": "ruby-helloworld-data",
                "emptyDir": {
                  "medium": ""
                }
              }
            ],
            "restartPolicy": "Always",
            "dnsPolicy": "ClusterFirst"
          }
        }
      },
      "status": {}
    }
  ],
  "parameters": [
    {
      "name": "MYSQL_USER",
      "description": "database username",
      "generate": "expression",
      "from": "user[A-Z0-9]{3}",
      "required": true
    },
    {
      "name": "MYSQL_PASSWORD",
      "description": "database password",
      "generate": "expression",
      "from": "[a-zA-Z0-9]{8}",
      "required": true
    },
    {
      "name": "MYSQL_DATABASE",
      "description": "database name",
      "value": "root",
      "required": true
    }
  ],
  "labels": {
    "template": "application-template-stibuild"
  }
}
`)

func testExtendedTestdataCmdTestCmdTestdataApplicationTemplateStibuildJsonBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataApplicationTemplateStibuildJson, nil
}

func testExtendedTestdataCmdTestCmdTestdataApplicationTemplateStibuildJson() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataApplicationTemplateStibuildJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/application-template-stibuild.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataConvertJobV1Yaml = []byte(`apiVersion: batch/v1
kind: Job
metadata:
  name: pi
spec:
  template:
    metadata:
      name: pi
    spec:
      containers:
      - name: pi
        image: perl
        command: ["perl",  "-Mbignum=bpi", "-wle", "print bpi(2000)"]
      restartPolicy: Never
`)

func testExtendedTestdataCmdTestCmdTestdataConvertJobV1YamlBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataConvertJobV1Yaml, nil
}

func testExtendedTestdataCmdTestCmdTestdataConvertJobV1Yaml() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataConvertJobV1YamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/convert/job-v1.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataConvertJobV2Json = []byte(`{
    "kind": "CronJob",
    "apiVersion": "batch/v2alpha1",
    "metadata": {
        "name": "hello",
        "creationTimestamp": null
    },
    "spec": {
        "schedule": "0/1 * * * ?",
        "concurrencyPolicy": "Allow",
        "suspend": false,
        "jobTemplate": {
            "metadata": {
                "creationTimestamp": null
            },
            "spec": {
                "template": {
                    "metadata": {
                        "creationTimestamp": null
                    },
                    "spec": {
                        "containers": [
                            {
                                "name": "hello",
                                "image": "busybox",
                                "args": [
                                    "/bin/sh",
                                    "-c",
                                    "date; echo Hello from the Kubernetes cluster"
                                ],
                                "resources": {},
                                "terminationMessagePath": "/dev/termination-log",
                                "imagePullPolicy": "Always"
                            }
                        ],
                        "restartPolicy": "OnFailure",
                        "terminationGracePeriodSeconds": 30,
                        "dnsPolicy": "ClusterFirst",
                        "securityContext": {}
                    }
                }
            }
        }
    },
    "status": {}
}
`)

func testExtendedTestdataCmdTestCmdTestdataConvertJobV2JsonBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataConvertJobV2Json, nil
}

func testExtendedTestdataCmdTestCmdTestdataConvertJobV2Json() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataConvertJobV2JsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/convert/job-v2.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataExternalServiceYaml = []byte(`apiVersion: v1
kind: Service
metadata:
  labels:
    external: service
  name: external
  resourceVersion: "1"
  uid: 19cff995-5546-11e5-9f57-080027c5bfa9
spec:
  clusterIP: 172.30.0.100
  ports:
  - nodePort: 0
    port: 443
    protocol: TCP
    targetPort: 443
  sessionAffinity: None
  type: ClusterIP
status:
  loadBalancer: {}
`)

func testExtendedTestdataCmdTestCmdTestdataExternalServiceYamlBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataExternalServiceYaml, nil
}

func testExtendedTestdataCmdTestCmdTestdataExternalServiceYaml() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataExternalServiceYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/external-service.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataHelloOpenshiftHelloPodJson = []byte(`{
  "kind": "Pod",
  "apiVersion": "v1",
  "metadata": {
    "name": "hello-openshift",
    "creationTimestamp": null,
    "labels": {
      "name": "hello-openshift"
    }
  },
  "spec": {
    "containers": [
      {
        "name": "hello-openshift",
        "image": "openshift/hello-openshift",
        "ports": [
          {
            "containerPort": 8080,
            "protocol": "TCP"
          }
        ],
        "resources": {},
        "volumeMounts": [
          {
            "name":"tmp",
            "mountPath":"/tmp"
          }
        ],
        "terminationMessagePath": "/dev/termination-log",
        "imagePullPolicy": "IfNotPresent",
        "securityContext": {
          "capabilities": {},
          "privileged": false
        }
      }
    ],
    "volumes": [
      {
        "name":"tmp",
        "emptyDir": {}
      }
    ],
    "restartPolicy": "Always",
    "dnsPolicy": "ClusterFirst",
    "serviceAccount": ""
  },
  "status": {}
}
`)

func testExtendedTestdataCmdTestCmdTestdataHelloOpenshiftHelloPodJsonBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataHelloOpenshiftHelloPodJson, nil
}

func testExtendedTestdataCmdTestCmdTestdataHelloOpenshiftHelloPodJson() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataHelloOpenshiftHelloPodJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/hello-openshift/hello-pod.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataIdlingDcYaml = []byte(`apiVersion: v1
kind: DeploymentConfig
metadata:
  generateName: idling-echo-
spec:
  replicas: 2
  selector:
    app: idling-echo
    deploymentconfig: idling-echo
  strategy:
    type: Rolling
  template:
    metadata:
      labels:
        app: idling-echo
        deploymentconfig: idling-echo
    spec:
      containers:
      - image: openshift/origin-base
        name: idling-tcp-echo
        command:
          - /usr/bin/socat
          - TCP4-LISTEN:8675,reuseaddr,fork
          - EXEC:'/bin/cat'
        ports:
        - containerPort: 8675
          protocol: TCP
      - image: openshift/origin-base
        name: idling-udp-echo
        command:
          - /usr/bin/socat
          - UDP4-LISTEN:3090,reuseaddr,fork
          - EXEC:'/bin/cat'
        ports:
        - containerPort: 3090
          protocol: UDP
      dnsPolicy: ClusterFirst
      restartPolicy: Always
      securityContext: {}
`)

func testExtendedTestdataCmdTestCmdTestdataIdlingDcYamlBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataIdlingDcYaml, nil
}

func testExtendedTestdataCmdTestCmdTestdataIdlingDcYaml() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataIdlingDcYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/idling-dc.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataIdlingSvcRouteYaml = []byte(`apiVersion: v1
kind: List
metadata: {}
items:
- apiVersion: v1
  kind: Service
  metadata:
    name: idling-echo
    labels:
      app: idling-echo
  spec:
    selector:
      app: idling-echo
    ports:
      - port: 8675
        name: tcp-echo
        protocol: TCP
      - port: 3090
        name: udp-echo
        protocol: UDP
- apiVersion: v1
  kind: Route
  metadata:
    name: idling-echo
  spec:
    to:
      kind: Service
      name: idling-echo
- apiVersion: v1
  kind: Route
  metadata:
    name: idling-echo-reencrypt
  spec:
    tls:
      termination: reencrypt
      # the actual certificate here is not relevant, since we're not
      # actually serving TLS
      destinationCACertificate: |-
        -----BEGIN CERTIFICATE-----
        MIIDIjCCAgqgAwIBAgIBATANBgkqhkiG9w0BAQUFADCBoTELMAkGA1UEBhMCVVMx
        CzAJBgNVBAgMAlNDMRUwEwYDVQQHDAxEZWZhdWx0IENpdHkxHDAaBgNVBAoME0Rl
        ZmF1bHQgQ29tcGFueSBMdGQxEDAOBgNVBAsMB1Rlc3QgQ0ExGjAYBgNVBAMMEXd3
        dy5leGFtcGxlY2EuY29tMSIwIAYJKoZIhvcNAQkBFhNleGFtcGxlQGV4YW1wbGUu
        Y29tMB4XDTE1MDExMjE0MTk0MVoXDTE2MDExMjE0MTk0MVowfDEYMBYGA1UEAwwP
        d3d3LmV4YW1wbGUuY29tMQswCQYDVQQIDAJTQzELMAkGA1UEBhMCVVMxIjAgBgkq
        hkiG9w0BCQEWE2V4YW1wbGVAZXhhbXBsZS5jb20xEDAOBgNVBAoMB0V4YW1wbGUx
        EDAOBgNVBAsMB0V4YW1wbGUwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMrv
        gu6ZTTefNN7jjiZbS/xvQjyXjYMN7oVXv76jbX8gjMOmg9m0xoVZZFAE4XyQDuCm
        47VRx5Qrf/YLXmB2VtCFvB0AhXr5zSeWzPwaAPrjA4ebG+LUo24ziS8KqNxrFs1M
        mNrQUgZyQC6XIe1JHXc9t+JlL5UZyZQC1IfaJulDAgMBAAGjDTALMAkGA1UdEwQC
        MAAwDQYJKoZIhvcNAQEFBQADggEBAFCi7ZlkMnESvzlZCvv82Pq6S46AAOTPXdFd
        TMvrh12E1sdVALF1P1oYFJzG1EiZ5ezOx88fEDTW+Lxb9anw5/KJzwtWcfsupf1m
        V7J0D3qKzw5C1wjzYHh9/Pz7B1D0KthQRATQCfNf8s6bbFLaw/dmiIUhHLtIH5Qc
        yfrejTZbOSP77z8NOWir+BWWgIDDB2//3AkDIQvT20vmkZRhkqSdT7et4NmXOX/j
        jhPti4b2Fie0LeuvgaOdKjCpQQNrYthZHXeVlOLRhMTSk3qUczenkKTOhvP7IS9q
        +Dzv5hqgSfvMG392KWh5f8xXfJNs4W5KLbZyl901MeReiLrPH3w=
        -----END CERTIFICATE-----
    to:
      kind: Service
      name: idling-echo


`)

func testExtendedTestdataCmdTestCmdTestdataIdlingSvcRouteYamlBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataIdlingSvcRouteYaml, nil
}

func testExtendedTestdataCmdTestCmdTestdataIdlingSvcRouteYaml() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataIdlingSvcRouteYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/idling-svc-route.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataImageStreamsImageStreamsCentos7Json = []byte(`{
  "kind": "ImageStreamList",
  "apiVersion": "v1",
  "items": [
    {
      "apiVersion": "v1",
      "kind": "ImageStream",
      "metadata": {
        "annotations": {
          "openshift.io/display-name": ".NET Core"
        },
        "name": "dotnet"
      },
      "spec": {
        "tags": [
          {
            "annotations": {
              "description": "Build and run .NET Core applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore/tree/master/2.1/build/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of .NET Core available on OpenShift, including major versions updates.",
              "iconClass": "icon-dotnet",
              "openshift.io/display-name": ".NET Core (Latest)",
              "sampleContextDir": "app",
              "sampleRef": "dotnetcore-2.1",
              "sampleRepo": "https://github.com/redhat-developer/s2i-dotnetcore-ex.git",
              "supports": "dotnet",
              "tags": "builder,.net,dotnet,dotnetcore"
            },
            "from": {
              "kind": "ImageStreamTag",
              "name": "2.1"
            },
            "name": "latest"
          },
          {
            "annotations": {
              "description": "Build and run .NET Core 2.1 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore/tree/master/2.0/build/README.md.",
              "iconClass": "icon-dotnet",
              "openshift.io/display-name": ".NET Core 2.1",
              "sampleContextDir": "app",
              "sampleRef": "dotnetcore-2.1",
              "sampleRepo": "https://github.com/redhat-developer/s2i-dotnetcore-ex.git",
              "supports": "dotnet:2.1,dotnet",
              "tags": "builder,.net,dotnet,dotnetcore,rh-dotnet21",
              "version": "2.1"
            },
            "from": {
              "kind": "DockerImage",
              "name": "registry.centos.org/dotnet/dotnet-21-centos7:latest"
            },
            "name": "2.1"
          },
          {
            "annotations": {
              "description": "RETIRED: Build and run .NET Core 2.0 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore/tree/master/2.0/build/README.md.",
              "iconClass": "icon-dotnet",
              "openshift.io/display-name": ".NET Core 2.0",
              "sampleContextDir": "app",
              "sampleRef": "dotnetcore-2.0",
              "sampleRepo": "https://github.com/redhat-developer/s2i-dotnetcore-ex.git",
              "supports": "dotnet:2.0,dotnet",
              "tags": "hidden,builder,.net,dotnet,dotnetcore,rh-dotnet20",
              "version": "2.0"
            },
            "from": {
              "kind": "DockerImage",
              "name": "registry.centos.org/dotnet/dotnet-20-centos7:latest"
            },
            "name": "2.0"
          }
        ]
      }
    },
    {
      "apiVersion": "v1",
      "kind": "ImageStream",
      "metadata": {
        "annotations": {
          "openshift.io/display-name": "Apache HTTP Server (httpd)"
        },
        "name": "httpd"
      },
      "spec": {
        "tags": [
          {
            "annotations": {
              "description": "Build and serve static content via Apache HTTP Server (httpd) on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/httpd-container/blob/master/2.4/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Httpd available on OpenShift, including major versions updates.",
              "iconClass": "icon-apache",
              "openshift.io/display-name": "Apache HTTP Server (Latest)",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/httpd-ex.git",
              "supports": "httpd",
              "tags": "builder,httpd"
            },
            "from": {
              "kind": "ImageStreamTag",
              "name": "2.4"
            },
            "name": "latest",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and serve static content via Apache HTTP Server (httpd) 2.4 on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/httpd-container/blob/master/2.4/README.md.",
              "iconClass": "icon-apache",
              "openshift.io/display-name": "Apache HTTP Server 2.4",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/httpd-ex.git",
              "supports": "httpd",
              "tags": "builder,httpd",
              "version": "2.4"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/centos/httpd-24-centos7:latest"
            },
            "name": "2.4",
            "referencePolicy": {
              "type": "Local"
            }
          }
        ]
      }
    },
    {
      "apiVersion": "v1",
      "kind": "ImageStream",
      "metadata": {
        "annotations": {
          "openshift.io/display-name": "Jenkins"
        },
        "name": "jenkins"
      },
      "spec": {
        "tags": [
          {
            "annotations": {
              "description": "Provides a Jenkins server on CentOS 7. For more information about using this container image, including OpenShift considerations, see https://github.com/openshift/jenkins/blob/master/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Jenkins available on OpenShift, including major versions updates.",
              "iconClass": "icon-jenkins",
              "openshift.io/display-name": "Jenkins (Latest)",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "tags": "jenkins"
            },
            "from": {
              "kind": "ImageStreamTag",
              "name": "2"
            },
            "name": "latest",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Provides a Jenkins v2.x server on CentOS 7. For more information about using this container image, including OpenShift considerations, see https://github.com/openshift/jenkins/blob/master/README.md.",
              "iconClass": "icon-jenkins",
              "openshift.io/display-name": "Jenkins 2.X",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "tags": "jenkins",
              "version": "2.x"
            },
            "from": {
              "kind": "DockerImage",
              "name": "quay.io/openshift/origin-jenkins:v4.0"
            },
            "name": "2",
            "referencePolicy": {
              "type": "Local"
            }
          }
        ]
      }
    },
    {
      "apiVersion": "v1",
      "kind": "ImageStream",
      "metadata": {
        "annotations": {
          "openshift.io/display-name": "MariaDB"
        },
        "name": "mariadb"
      },
      "spec": {
        "tags": [
          {
            "annotations": {
              "description": "Provides a MariaDB database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/tree/master/10.2/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of MariaDB available on OpenShift, including major versions updates.",
              "iconClass": "icon-mariadb",
              "openshift.io/display-name": "MariaDB (Latest)",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "tags": "database,mariadb"
            },
            "from": {
              "kind": "ImageStreamTag",
              "name": "10.2"
            },
            "name": "latest",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Provides a MariaDB 10.1 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/tree/master/10.1/README.md.",
              "iconClass": "icon-mariadb",
              "openshift.io/display-name": "MariaDB 10.1",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "tags": "database,mariadb",
              "version": "10.1"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/centos/mariadb-101-centos7:latest"
            },
            "name": "10.1",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Provides a MariaDB 10.2 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/tree/master/10.2/README.md.",
              "iconClass": "icon-mariadb",
              "openshift.io/display-name": "MariaDB 10.2",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "tags": "database,mariadb",
              "version": "10.2"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/centos/mariadb-102-centos7:latest"
            },
            "name": "10.2",
            "referencePolicy": {
              "type": "Local"
            }
          }
        ]
      }
    },
    {
      "apiVersion": "v1",
      "kind": "ImageStream",
      "metadata": {
        "annotations": {
          "openshift.io/display-name": "MongoDB"
        },
        "name": "mongodb"
      },
      "spec": {
        "tags": [
          {
            "annotations": {
              "description": "Provides a MongoDB database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mongodb-container/tree/master/3.4/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of MongoDB available on OpenShift, including major versions updates.",
              "iconClass": "icon-mongodb",
              "openshift.io/display-name": "MongoDB (Latest)",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "tags": "database,mongodb"
            },
            "from": {
              "kind": "ImageStreamTag",
              "name": "3.6"
            },
            "name": "latest",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Provides a MongoDB 2.4 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mongodb-container/tree/master/2.4/README.md.",
              "iconClass": "icon-mongodb",
              "openshift.io/display-name": "MongoDB 2.4",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "tags": "hidden,mongodb",
              "version": "2.4"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/openshift/mongodb-24-centos7:latest"
            },
            "name": "2.4",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Provides a MongoDB 2.6 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mongodb-container/tree/master/2.6/README.md.",
              "iconClass": "icon-mongodb",
              "openshift.io/display-name": "MongoDB 2.6",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "tags": "hidden,database,mongodb",
              "version": "2.6"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/centos/mongodb-26-centos7:latest"
            },
            "name": "2.6",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Provides a MongoDB 3.2 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mongodb-container/tree/master/3.2/README.md.",
              "iconClass": "icon-mongodb",
              "openshift.io/display-name": "MongoDB 3.2",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "tags": "database,mongodb",
              "version": "3.2"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/centos/mongodb-32-centos7:latest"
            },
            "name": "3.2",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Provides a MongoDB 3.4 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mongodb-container/tree/master/3.4/README.md.",
              "iconClass": "icon-mongodb",
              "openshift.io/display-name": "MongoDB 3.4",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "tags": "database,mongodb",
              "version": "3.4"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/centos/mongodb-34-centos7:latest"
            },
            "name": "3.4",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Provides a MongoDB 3.6 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mongodb-container/tree/master/3.6/README.md.",
              "iconClass": "icon-mongodb",
              "openshift.io/display-name": "MongoDB 3.6",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "tags": "database,mongodb",
              "version": "3.6"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/centos/mongodb-36-centos7:latest"
            },
            "name": "3.6",
            "referencePolicy": {
              "type": "Local"
            }
          }
        ]
      }
    },
    {
      "apiVersion": "v1",
      "kind": "ImageStream",
      "metadata": {
        "annotations": {
          "openshift.io/display-name": "MySQL"
        },
        "name": "mysql"
      },
      "spec": {
        "tags": [
          {
            "annotations": {
              "description": "Provides a MySQL database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of MySQL available on OpenShift, including major versions updates.",
              "iconClass": "icon-mysql-database",
              "openshift.io/display-name": "MySQL (Latest)",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "tags": "mysql"
            },
            "from": {
              "kind": "ImageStreamTag",
              "name": "5.7"
            },
            "name": "latest",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Provides a MySQL 5.5 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/README.md.",
              "iconClass": "icon-mysql-database",
              "openshift.io/display-name": "MySQL 5.5",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "tags": "hidden,mysql",
              "version": "5.5"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/openshift/mysql-55-centos7:latest"
            },
            "name": "5.5",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Provides a MySQL 5.6 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/README.md.",
              "iconClass": "icon-mysql-database",
              "openshift.io/display-name": "MySQL 5.6",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "tags": "hidden,mysql",
              "version": "5.6"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/centos/mysql-56-centos7:latest"
            },
            "name": "5.6",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Provides a MySQL 5.7 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/README.md.",
              "iconClass": "icon-mysql-database",
              "openshift.io/display-name": "MySQL 5.7",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "tags": "mysql",
              "version": "5.7"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/centos/mysql-57-centos7:latest"
            },
            "name": "5.7",
            "referencePolicy": {
              "type": "Local"
            }
          }
        ]
      }
    },
    {
      "apiVersion": "v1",
      "kind": "ImageStream",
      "metadata": {
        "annotations": {
          "openshift.io/display-name": "Nginx HTTP server and a reverse proxy (nginx)"
        },
        "name": "nginx"
      },
      "spec": {
        "tags": [
          {
            "annotations": {
              "description": "Build and serve static content via Nginx HTTP Server and a reverse proxy (nginx) on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/nginx-container/blob/master/1.8/README.md.",
              "iconClass": "icon-nginx",
              "openshift.io/display-name": "Nginx HTTP server and a reverse proxy 1.8",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/nginx-ex.git",
              "supports": "nginx",
              "tags": "builder,nginx",
              "version": "1.8"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/centos/nginx-18-centos7:latest"
            },
            "name": "1.8",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and serve static content via Nginx HTTP Server and a reverse proxy (nginx) on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/nginx-container/blob/master/1.10/README.md.",
              "iconClass": "icon-nginx",
              "openshift.io/display-name": "Nginx HTTP server and a reverse proxy 1.10",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/nginx-ex.git",
              "supports": "nginx",
              "tags": "builder,nginx",
              "version": "1.10"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/centos/nginx-110-centos7:latest"
            },
            "name": "1.10",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and serve static content via Nginx HTTP Server and a reverse proxy (nginx) on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/nginx-container/blob/master/1.12/README.md.",
              "iconClass": "icon-nginx",
              "openshift.io/display-name": "Nginx HTTP server and a reverse proxy 1.12",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/nginx-ex.git",
              "supports": "nginx",
              "tags": "builder,nginx",
              "version": "1.12"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/centos/nginx-112-centos7:latest"
            },
            "name": "1.12",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and serve static content via Nginx HTTP Server and a reverse proxy (nginx) on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/nginx-container/blob/master/1.12/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Nginx available on OpenShift, including major versions updates.",
              "iconClass": "icon-nginx",
              "openshift.io/display-name": "Nginx HTTP server and a reverse proxy (Latest)",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/nginx-ex.git",
              "supports": "nginx",
              "tags": "builder,nginx"
            },
            "from": {
              "kind": "ImageStreamTag",
              "name": "1.12"
            },
            "name": "latest",
            "referencePolicy": {
              "type": "Local"
            }
          }
        ]
      }
    },
    {
      "apiVersion": "v1",
      "kind": "ImageStream",
      "metadata": {
        "annotations": {
          "openshift.io/display-name": "Node.js"
        },
        "name": "nodejs"
      },
      "spec": {
        "tags": [
          {
            "annotations": {
              "description": "Build and run Node.js applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/nodeshift/centos7-s2i-nodejs.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Node.js available on OpenShift, including major versions updates.",
              "iconClass": "icon-nodejs",
              "openshift.io/display-name": "Node.js (Latest)",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/nodejs-ex.git",
              "supports": "nodejs",
              "tags": "builder,nodejs"
            },
            "from": {
              "kind": "ImageStreamTag",
              "name": "11"
            },
            "name": "latest",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "DEPRECATED: Build and run Node.js 0.10 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-nodejs-container/blob/master/0.10/README.md.",
              "iconClass": "icon-nodejs",
              "openshift.io/display-name": "Node.js 0.10",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/nodejs-ex.git",
              "supports": "nodejs:0.10,nodejs:0.1,nodejs",
              "tags": "hidden,nodejs",
              "version": "0.10"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/openshift/nodejs-010-centos7:latest"
            },
            "name": "0.10",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run Node.js 4 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-nodejs-container/blob/master/4/README.md.",
              "iconClass": "icon-nodejs",
              "openshift.io/display-name": "Node.js 4",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/nodejs-ex.git",
              "supports": "nodejs:4,nodejs",
              "tags": "hidden,builder,nodejs",
              "version": "4"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/centos/nodejs-4-centos7:latest"
            },
            "name": "4",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run Node.js 6 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-nodejs-container/blob/master/6/README.md.",
              "iconClass": "icon-nodejs",
              "openshift.io/display-name": "Node.js 6",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/nodejs-ex.git",
              "supports": "nodejs:6,nodejs",
              "tags": "builder,nodejs",
              "version": "6"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/centos/nodejs-6-centos7:latest"
            },
            "name": "6",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run Node.js 8 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-nodejs-container/blob/master/8/README.md.",
              "iconClass": "icon-nodejs",
              "openshift.io/display-name": "Node.js 8",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/nodejs-ex.git",
              "tags": "builder,nodejs",
              "version": "8"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/centos/nodejs-8-centos7:latest"
            },
            "name": "8",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run Node.js 8 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/nodeshift/centos7-s2i-nodejs.",
              "iconClass": "icon-nodejs",
              "openshift.io/display-name": "Node.js 8 (RHOAR)",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/nodejs-ex.git",
              "tags": "builder,nodejs",
              "version": "8"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/nodeshift/centos7-s2i-nodejs:8.x"
            },
            "name": "8-RHOAR",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run Node.js 10 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/nodeshift/centos7-s2i-nodejs.",
              "iconClass": "icon-nodejs",
              "openshift.io/display-name": "Node.js 10",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/nodejs-ex.git",
              "tags": "builder,nodejs",
              "version": "10"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/nodeshift/centos7-s2i-nodejs:10.x"
            },
            "name": "10",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run Node.js 11 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/nodeshift/centos7-s2i-nodejs.",
              "iconClass": "icon-nodejs",
              "openshift.io/display-name": "Node.js 11",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/nodejs-ex.git",
              "tags": "builder,nodejs",
              "version": "11"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/nodeshift/centos7-s2i-nodejs:11.x"
            },
            "name": "11",
            "referencePolicy": {
              "type": "Local"
            }
          }
        ]
      }
    },
    {
      "apiVersion": "v1",
      "kind": "ImageStream",
      "metadata": {
        "annotations": {
          "openshift.io/display-name": "Perl"
        },
        "name": "perl"
      },
      "spec": {
        "tags": [
          {
            "annotations": {
              "description": "Build and run Perl applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-perl-container/blob/master/5.20/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Perl available on OpenShift, including major versions updates.",
              "iconClass": "icon-perl",
              "openshift.io/display-name": "Perl (Latest)",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/dancer-ex.git",
              "supports": "perl",
              "tags": "builder,perl"
            },
            "from": {
              "kind": "ImageStreamTag",
              "name": "5.26"
            },
            "name": "latest",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run Perl 5.16 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-perl-container/blob/master/5.16/README.md.",
              "iconClass": "icon-perl",
              "openshift.io/display-name": "Perl 5.16",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/dancer-ex.git",
              "supports": "perl:5.16,perl",
              "tags": "hidden,builder,perl",
              "version": "5.16"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/openshift/perl-516-centos7:latest"
            },
            "name": "5.16",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run Perl 5.20 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-perl-container/blob/master/5.20/README.md.",
              "iconClass": "icon-perl",
              "openshift.io/display-name": "Perl 5.20",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/dancer-ex.git",
              "supports": "perl:5.20,perl",
              "tags": "hidden,builder,perl",
              "version": "5.20"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/centos/perl-520-centos7:latest"
            },
            "name": "5.20",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run Perl 5.24 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-perl-container/blob/master/5.24/README.md.",
              "iconClass": "icon-perl",
              "openshift.io/display-name": "Perl 5.24",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/dancer-ex.git",
              "supports": "perl:5.24,perl",
              "tags": "builder,perl",
              "version": "5.24"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/centos/perl-524-centos7:latest"
            },
            "name": "5.24",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run Perl 5.26 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-perl-container/blob/master/5.26/README.md.",
              "iconClass": "icon-perl",
              "openshift.io/display-name": "Perl 5.26",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/dancer-ex.git",
              "supports": "perl:5.26,perl",
              "tags": "builder,perl",
              "version": "5.26"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/centos/perl-526-centos7:latest"
            },
            "name": "5.26",
            "referencePolicy": {
              "type": "Local"
            }
          }
        ]
      }
    },
    {
      "apiVersion": "v1",
      "kind": "ImageStream",
      "metadata": {
        "annotations": {
          "openshift.io/display-name": "PHP"
        },
        "name": "php"
      },
      "spec": {
        "tags": [
          {
            "annotations": {
              "description": "Build and run PHP applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-php-container/blob/master/7.1/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of PHP available on OpenShift, including major versions updates.",
              "iconClass": "icon-php",
              "openshift.io/display-name": "PHP (Latest)",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/cakephp-ex.git",
              "supports": "php",
              "tags": "builder,php"
            },
            "from": {
              "kind": "ImageStreamTag",
              "name": "7.1"
            },
            "name": "latest",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run PHP 5.5 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-php-container/blob/master/5.5/README.md.",
              "iconClass": "icon-php",
              "openshift.io/display-name": "PHP 5.5",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/cakephp-ex.git",
              "supports": "php:5.5,php",
              "tags": "hidden,builder,php",
              "version": "5.5"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/openshift/php-55-centos7:latest"
            },
            "name": "5.5",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run PHP 5.6 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-php-container/blob/master/5.6/README.md.",
              "iconClass": "icon-php",
              "openshift.io/display-name": "PHP 5.6",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/cakephp-ex.git",
              "supports": "php:5.6,php",
              "tags": "hidden,builder,php",
              "version": "5.6"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/centos/php-56-centos7:latest"
            },
            "name": "5.6",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run PHP 7.0 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-php-container/blob/master/7.0/README.md.",
              "iconClass": "icon-php",
              "openshift.io/display-name": "PHP 7.0",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/cakephp-ex.git",
              "supports": "php:7.0,php",
              "tags": "builder,php",
              "version": "7.0"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/centos/php-70-centos7:latest"
            },
            "name": "7.0",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run PHP 7.1 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-php-container/blob/master/7.1/README.md.",
              "iconClass": "icon-php",
              "openshift.io/display-name": "PHP 7.1",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/cakephp-ex.git",
              "supports": "php:7.1,php",
              "tags": "builder,php",
              "version": "7.1"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/centos/php-71-centos7:latest"
            },
            "name": "7.1",
            "referencePolicy": {
              "type": "Local"
            }
          }
        ]
      }
    },
    {
      "apiVersion": "v1",
      "kind": "ImageStream",
      "metadata": {
        "annotations": {
          "openshift.io/display-name": "PostgreSQL"
        },
        "name": "postgresql"
      },
      "spec": {
        "tags": [
          {
            "annotations": {
              "description": "Provides a PostgreSQL database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of PostgreSQL available on OpenShift, including major versions updates.",
              "iconClass": "icon-postgresql",
              "openshift.io/display-name": "PostgreSQL (Latest)",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "tags": "database,postgresql"
            },
            "from": {
              "kind": "ImageStreamTag",
              "name": "10"
            },
            "name": "latest",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Provides a PostgreSQL 9.2 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.",
              "iconClass": "icon-postgresql",
              "openshift.io/display-name": "PostgreSQL 9.2",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "tags": "hidden,postgresql",
              "version": "9.2"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/openshift/postgresql-92-centos7:latest"
            },
            "name": "9.2",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Provides a PostgreSQL 9.4 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.",
              "iconClass": "icon-postgresql",
              "openshift.io/display-name": "PostgreSQL 9.4",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "tags": "hidden,database,postgresql",
              "version": "9.4"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/centos/postgresql-94-centos7:latest"
            },
            "name": "9.4",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Provides a PostgreSQL 9.5 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.",
              "iconClass": "icon-postgresql",
              "openshift.io/display-name": "PostgreSQL 9.5",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "tags": "database,postgresql",
              "version": "9.5"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/centos/postgresql-95-centos7:latest"
            },
            "name": "9.5",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Provides a PostgreSQL 9.6 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.",
              "iconClass": "icon-postgresql",
              "openshift.io/display-name": "PostgreSQL 9.6",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "tags": "database,postgresql",
              "version": "9.6"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/centos/postgresql-96-centos7:latest"
            },
            "name": "9.6",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Provides a PostgreSQL 10 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.",
              "iconClass": "icon-postgresql",
              "openshift.io/display-name": "PostgreSQL 10",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "tags": "database,postgresql",
              "version": "10"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/centos/postgresql-10-centos7:latest"
            },
            "name": "10",
            "referencePolicy": {
              "type": "Local"
            }
          }
        ]
      }
    },
    {
      "apiVersion": "v1",
      "kind": "ImageStream",
      "metadata": {
        "annotations": {
          "openshift.io/display-name": "Python"
        },
        "name": "python"
      },
      "spec": {
        "tags": [
          {
            "annotations": {
              "description": "Build and run Python applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-python-container/blob/master/3.6/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Python available on OpenShift, including major versions updates.",
              "iconClass": "icon-python",
              "openshift.io/display-name": "Python (Latest)",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/django-ex.git",
              "supports": "python",
              "tags": "builder,python"
            },
            "from": {
              "kind": "ImageStreamTag",
              "name": "3.6"
            },
            "name": "latest",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run Python 3.3 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-python-container/blob/master/3.3/README.md.",
              "iconClass": "icon-python",
              "openshift.io/display-name": "Python 3.3",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/django-ex.git",
              "supports": "python:3.3,python",
              "tags": "hidden,builder,python",
              "version": "3.3"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/openshift/python-33-centos7:latest"
            },
            "name": "3.3",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run Python 2.7 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-python-container/blob/master/2.7/README.md.",
              "iconClass": "icon-python",
              "openshift.io/display-name": "Python 2.7",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/django-ex.git",
              "supports": "python:2.7,python",
              "tags": "builder,python",
              "version": "2.7"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/centos/python-27-centos7:latest"
            },
            "name": "2.7",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run Python 3.4 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-python-container/blob/master/3.4/README.md.",
              "iconClass": "icon-python",
              "openshift.io/display-name": "Python 3.4",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/django-ex.git",
              "supports": "python:3.4,python",
              "tags": "hidden,builder,python",
              "version": "3.4"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/centos/python-34-centos7:latest"
            },
            "name": "3.4",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run Python 3.5 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-python-container/blob/master/3.5/README.md.",
              "iconClass": "icon-python",
              "openshift.io/display-name": "Python 3.5",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/django-ex.git",
              "supports": "python:3.5,python",
              "tags": "builder,python",
              "version": "3.5"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/centos/python-35-centos7:latest"
            },
            "name": "3.5",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run Python 3.6 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-python-container/blob/master/3.6/README.md.",
              "iconClass": "icon-python",
              "openshift.io/display-name": "Python 3.6",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/django-ex.git",
              "supports": "python:3.6,python",
              "tags": "builder,python",
              "version": "3.6"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/centos/python-36-centos7:latest"
            },
            "name": "3.6",
            "referencePolicy": {
              "type": "Local"
            }
          }
        ]
      }
    },
    {
      "apiVersion": "v1",
      "kind": "ImageStream",
      "metadata": {
        "annotations": {
          "openshift.io/display-name": "Redis"
        },
        "name": "redis"
      },
      "spec": {
        "tags": [
          {
            "annotations": {
              "description": "Provides a Redis database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/redis-container/tree/master/3.2/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Redis available on OpenShift, including major versions updates.",
              "iconClass": "icon-redis",
              "openshift.io/display-name": "Redis (Latest)",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "tags": "redis"
            },
            "from": {
              "kind": "ImageStreamTag",
              "name": "3.2"
            },
            "name": "latest",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Provides a Redis 3.2 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/redis-container/tree/master/3.2/README.md.",
              "iconClass": "icon-redis",
              "openshift.io/display-name": "Redis 3.2",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "tags": "redis",
              "version": "3.2"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/centos/redis-32-centos7:latest"
            },
            "name": "3.2",
            "referencePolicy": {
              "type": "Local"
            }
          }
        ]
      }
    },
    {
      "apiVersion": "v1",
      "kind": "ImageStream",
      "metadata": {
        "annotations": {
          "openshift.io/display-name": "Ruby"
        },
        "name": "ruby"
      },
      "spec": {
        "tags": [
          {
            "annotations": {
              "description": "Build and run Ruby applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-ruby-container/tree/master/2.3/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Ruby available on OpenShift, including major versions updates.",
              "iconClass": "icon-ruby",
              "openshift.io/display-name": "Ruby (Latest)",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/ruby-ex.git",
              "supports": "ruby",
              "tags": "builder,ruby"
            },
            "from": {
              "kind": "ImageStreamTag",
              "name": "2.5"
            },
            "name": "latest",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run Ruby 2.0 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-ruby-container/tree/master/2.0/README.md.",
              "iconClass": "icon-ruby",
              "openshift.io/display-name": "Ruby 2.0",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/ruby-ex.git",
              "supports": "ruby:2.0,ruby",
              "tags": "hidden,builder,ruby",
              "version": "2.0"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/openshift/ruby-20-centos7:latest"
            },
            "name": "2.0",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run Ruby 2.2 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-ruby-container/tree/master/2.2/README.md.",
              "iconClass": "icon-ruby",
              "openshift.io/display-name": "Ruby 2.2",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/ruby-ex.git",
              "supports": "ruby:2.2,ruby",
              "tags": "hidden,builder,ruby",
              "version": "2.2"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/centos/ruby-22-centos7:latest"
            },
            "name": "2.2",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run Ruby 2.3 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-ruby-container/blob/master/2.3/README.md.",
              "iconClass": "icon-ruby",
              "openshift.io/display-name": "Ruby 2.3",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/ruby-ex.git",
              "supports": "ruby:2.3,ruby",
              "tags": "builder,ruby",
              "version": "2.3"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/centos/ruby-23-centos7:latest"
            },
            "name": "2.3",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run Ruby 2.4 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-ruby-container/blob/master/2.4/README.md.",
              "iconClass": "icon-ruby",
              "openshift.io/display-name": "Ruby 2.4",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/ruby-ex.git",
              "supports": "ruby:2.4,ruby",
              "tags": "builder,ruby",
              "version": "2.4"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/centos/ruby-24-centos7:latest"
            },
            "name": "2.4",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run Ruby 2.5 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-ruby-container/blob/master/2.5/README.md.",
              "iconClass": "icon-ruby",
              "openshift.io/display-name": "Ruby 2.5",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/sclorg/ruby-ex.git",
              "supports": "ruby:2.5,ruby",
              "tags": "builder,ruby",
              "version": "2.5"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/centos/ruby-25-centos7:latest"
            },
            "name": "2.5",
            "referencePolicy": {
              "type": "Local"
            }
          }
        ]
      }
    },
    {
      "apiVersion": "v1",
      "kind": "ImageStream",
      "metadata": {
        "annotations": {
          "openshift.io/display-name": "WildFly"
        },
        "name": "wildfly"
      },
      "spec": {
        "tags": [
          {
            "annotations": {
              "description": "Build and run WildFly applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/openshift-s2i/s2i-wildfly/blob/master/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of WildFly available on OpenShift, including major versions updates.",
              "iconClass": "icon-wildfly",
              "openshift.io/display-name": "WildFly (Latest)",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git",
              "supports": "jee,java",
              "tags": "builder,wildfly,java"
            },
            "from": {
              "kind": "ImageStreamTag",
              "name": "15.0"
            },
            "name": "latest",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run WildFly 8.1 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/openshift-s2i/s2i-wildfly/blob/master/README.md.",
              "iconClass": "icon-wildfly",
              "openshift.io/display-name": "WildFly 8.1",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git",
              "supports": "wildfly:8.1,jee,java",
              "tags": "builder,wildfly,java",
              "version": "8.1"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/openshift/wildfly-81-centos7:latest"
            },
            "name": "8.1",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run WildFly 9.0 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/openshift-s2i/s2i-wildfly/blob/master/README.md.",
              "iconClass": "icon-wildfly",
              "openshift.io/display-name": "WildFly 9.0",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git",
              "supports": "wildfly:9.0,jee,java",
              "tags": "builder,wildfly,java",
              "version": "9.0"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/openshift/wildfly-90-centos7:latest"
            },
            "name": "9.0",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run WildFly 10.0 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/openshift-s2i/s2i-wildfly/blob/master/README.md.",
              "iconClass": "icon-wildfly",
              "openshift.io/display-name": "WildFly 10.0",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git",
              "supports": "wildfly:10.0,jee,java",
              "tags": "builder,wildfly,java",
              "version": "10.0"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/openshift/wildfly-100-centos7:latest"
            },
            "name": "10.0",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run WildFly 10.1 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/openshift-s2i/s2i-wildfly/blob/master/README.md.",
              "iconClass": "icon-wildfly",
              "openshift.io/display-name": "WildFly 10.1",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git",
              "supports": "wildfly:10.1,jee,java",
              "tags": "builder,wildfly,java",
              "version": "10.1"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/openshift/wildfly-101-centos7:latest"
            },
            "name": "10.1",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run WildFly 11 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/openshift-s2i/s2i-wildfly/blob/master/README.md.",
              "iconClass": "icon-wildfly",
              "openshift.io/display-name": "WildFly 11",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git",
              "supports": "wildfly:11,jee,java",
              "tags": "builder,wildfly,java",
              "version": "11.0"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/openshift/wildfly-110-centos7:latest"
            },
            "name": "11.0",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run WildFly 12 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/openshift-s2i/s2i-wildfly/blob/master/README.md.",
              "iconClass": "icon-wildfly",
              "openshift.io/display-name": "WildFly 12",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git",
              "supports": "wildfly:12,jee,java",
              "tags": "builder,wildfly,java",
              "version": "12.0"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/openshift/wildfly-120-centos7:latest"
            },
            "name": "12.0",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run WildFly 13 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/openshift-s2i/s2i-wildfly/blob/master/README.md.",
              "iconClass": "icon-wildfly",
              "openshift.io/display-name": "WildFly 13",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git",
              "supports": "wildfly:13,jee,java",
              "tags": "builder,wildfly,java",
              "version": "13.0"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/openshift/wildfly-130-centos7:latest"
            },
            "name": "13.0",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run WildFly 14 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/openshift-s2i/s2i-wildfly/blob/master/README.md.",
              "iconClass": "icon-wildfly",
              "openshift.io/display-name": "WildFly 14",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git",
              "supports": "wildfly:14,jee,java",
              "tags": "builder,wildfly,java",
              "version": "14.0"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/openshift/wildfly-140-centos7:latest"
            },
            "name": "14.0",
            "referencePolicy": {
              "type": "Local"
            }
          },
          {
            "annotations": {
              "description": "Build and run WildFly 15 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/openshift-s2i/s2i-wildfly/blob/master/README.md.",
              "iconClass": "icon-wildfly",
              "openshift.io/display-name": "WildFly 15",
              "openshift.io/provider-display-name": "Red Hat, Inc.",
              "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git",
              "supports": "wildfly:15,jee,java",
              "tags": "builder,wildfly,java",
              "version": "15.0"
            },
            "from": {
              "kind": "DockerImage",
              "name": "docker.io/openshift/wildfly-150-centos7:latest"
            },
            "name": "15.0",
            "referencePolicy": {
              "type": "Local"
            }
          }
        ]
      }
    }
  ]
}
`)

func testExtendedTestdataCmdTestCmdTestdataImageStreamsImageStreamsCentos7JsonBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataImageStreamsImageStreamsCentos7Json, nil
}

func testExtendedTestdataCmdTestCmdTestdataImageStreamsImageStreamsCentos7Json() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataImageStreamsImageStreamsCentos7JsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/image-streams/image-streams-centos7.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataJenkinsJenkinsEphemeralTemplateJson = []byte(`{
    "apiVersion": "v1",
    "kind": "Template",
    "labels": {
        "app": "jenkins-ephemeral",
        "template": "jenkins-ephemeral-template"
    },
    "message": "A Jenkins service has been created in your project.  Log into Jenkins with your OpenShift account.  The tutorial at https://github.com/openshift/origin/blob/master/examples/jenkins/README.md contains more information about using this template.",
    "metadata": {
        "annotations": {
            "description": "Jenkins service, without persistent storage.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.",
            "iconClass": "icon-jenkins",
            "openshift.io/display-name": "Jenkins (Ephemeral)",
            "openshift.io/documentation-url": "https://docs.okd.io/latest/using_images/other_images/jenkins.html",
            "openshift.io/long-description": "This template deploys a Jenkins server capable of managing OpenShift Pipeline builds and supporting OpenShift-based oauth login.  The Jenkins configuration is stored in non-persistent storage, so this configuration should be used for experimental purposes only.",
            "openshift.io/provider-display-name": "Red Hat, Inc.",
            "openshift.io/support-url": "https://access.redhat.com",
            "tags": "instant-app,jenkins"
        },
        "name": "jenkins-ephemeral"
    },
    "objects": [
        {
            "apiVersion": "v1",
            "kind": "Route",
            "metadata": {
                "annotations": {
                    "haproxy.router.openshift.io/timeout": "4m",
                    "template.openshift.io/expose-uri": "http://{.spec.host}{.spec.path}"
                },
                "name": "${JENKINS_SERVICE_NAME}"
            },
            "spec": {
                "tls": {
                    "insecureEdgeTerminationPolicy": "Redirect",
                    "termination": "edge"
                },
                "to": {
                    "kind": "Service",
                    "name": "${JENKINS_SERVICE_NAME}"
                }
            }
        },
        {
            "apiVersion": "v1",
            "kind": "DeploymentConfig",
            "metadata": {
                "annotations": {
                    "template.alpha.openshift.io/wait-for-ready": "true"
                },
                "name": "${JENKINS_SERVICE_NAME}"
            },
            "spec": {
                "replicas": 1,
                "selector": {
                    "name": "${JENKINS_SERVICE_NAME}"
                },
                "strategy": {
                    "type": "Recreate"
                },
                "template": {
                    "metadata": {
                        "labels": {
                            "name": "${JENKINS_SERVICE_NAME}"
                        }
                    },
                    "spec": {
                        "containers": [
                            {
                                "env": [
                                    {
                                        "name": "OPENSHIFT_ENABLE_OAUTH",
                                        "value": "${ENABLE_OAUTH}"
                                    },
                                    {
                                        "name": "OPENSHIFT_ENABLE_REDIRECT_PROMPT",
                                        "value": "true"
                                    },
                                    {
                                        "name": "DISABLE_ADMINISTRATIVE_MONITORS",
                                        "value": "${DISABLE_ADMINISTRATIVE_MONITORS}"
                                    },
                                    {
                                        "name": "KUBERNETES_MASTER",
                                        "value": "https://kubernetes.default:443"
                                    },
                                    {
                                        "name": "KUBERNETES_TRUST_CERTIFICATES",
                                        "value": "true"
                                    },
                                    {
                                        "name": "JENKINS_SERVICE_NAME",
                                        "value": "${JENKINS_SERVICE_NAME}"
                                    },
                                    {
                                        "name": "JNLP_SERVICE_NAME",
                                        "value": "${JNLP_SERVICE_NAME}"
                                    }
                                ],
                                "image": " ",
                                "imagePullPolicy": "IfNotPresent",
                                "livenessProbe": {
                                    "failureThreshold": 2,
                                    "httpGet": {
                                        "path": "/login",
                                        "port": 8080
                                    },
                                    "initialDelaySeconds": 420,
                                    "periodSeconds": 360,
                                    "timeoutSeconds": 240
                                },
                                "name": "jenkins",
                                "readinessProbe": {
                                    "httpGet": {
                                        "path": "/login",
                                        "port": 8080
                                    },
                                    "initialDelaySeconds": 3,
                                    "timeoutSeconds": 240
                                },
                                "resources": {
                                    "limits": {
                                        "memory": "${MEMORY_LIMIT}"
                                    }
                                },
                                "securityContext": {
                                    "capabilities": {},
                                    "privileged": false
                                },
                                "terminationMessagePath": "/dev/termination-log",
                                "volumeMounts": [
                                    {
                                        "mountPath": "/var/lib/jenkins",
                                        "name": "${JENKINS_SERVICE_NAME}-data"
                                    }
                                ]
                            }
                        ],
                        "dnsPolicy": "ClusterFirst",
                        "restartPolicy": "Always",
                        "serviceAccountName": "${JENKINS_SERVICE_NAME}",
                        "volumes": [
                            {
                                "emptyDir": {
                                    "medium": ""
                                },
                                "name": "${JENKINS_SERVICE_NAME}-data"
                            }
                        ]
                    }
                },
                "triggers": [
                    {
                        "imageChangeParams": {
                            "automatic": true,
                            "containerNames": [
                                "jenkins"
                            ],
                            "from": {
                                "kind": "ImageStreamTag",
                                "name": "${JENKINS_IMAGE_STREAM_TAG}",
                                "namespace": "${NAMESPACE}"
                            },
                            "lastTriggeredImage": ""
                        },
                        "type": "ImageChange"
                    },
                    {
                        "type": "ConfigChange"
                    }
                ]
            }
        },
        {
            "apiVersion": "v1",
            "kind": "ServiceAccount",
            "metadata": {
                "annotations": {
                    "serviceaccounts.openshift.io/oauth-redirectreference.jenkins": "{\"kind\":\"OAuthRedirectReference\",\"apiVersion\":\"v1\",\"reference\":{\"kind\":\"Route\",\"name\":\"${JENKINS_SERVICE_NAME}\"}}"
                },
                "name": "${JENKINS_SERVICE_NAME}"
            }
        },
        {
            "apiVersion": "v1",
            "groupNames": null,
            "kind": "RoleBinding",
            "metadata": {
                "name": "${JENKINS_SERVICE_NAME}_edit"
            },
            "roleRef": {
                "name": "edit"
            },
            "subjects": [
                {
                    "kind": "ServiceAccount",
                    "name": "${JENKINS_SERVICE_NAME}"
                }
            ]
        },
        {
            "apiVersion": "v1",
            "kind": "Service",
            "metadata": {
                "name": "${JNLP_SERVICE_NAME}"
            },
            "spec": {
                "ports": [
                    {
                        "name": "agent",
                        "nodePort": 0,
                        "port": 50000,
                        "protocol": "TCP",
                        "targetPort": 50000
                    }
                ],
                "selector": {
                    "name": "${JENKINS_SERVICE_NAME}"
                },
                "sessionAffinity": "None",
                "type": "ClusterIP"
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Service",
            "metadata": {
                "annotations": {
                    "service.alpha.openshift.io/dependencies": "[{\"name\": \"${JNLP_SERVICE_NAME}\", \"namespace\": \"\", \"kind\": \"Service\"}]",
                    "service.openshift.io/infrastructure": "true"
                },
                "name": "${JENKINS_SERVICE_NAME}"
            },
            "spec": {
                "ports": [
                    {
                        "name": "web",
                        "nodePort": 0,
                        "port": 80,
                        "protocol": "TCP",
                        "targetPort": 8080
                    }
                ],
                "selector": {
                    "name": "${JENKINS_SERVICE_NAME}"
                },
                "sessionAffinity": "None",
                "type": "ClusterIP"
            }
        }
    ],
    "parameters": [
        {
            "description": "The name of the OpenShift Service exposed for the Jenkins container.",
            "displayName": "Jenkins Service Name",
            "name": "JENKINS_SERVICE_NAME",
            "value": "jenkins"
        },
        {
            "description": "The name of the service used for master/slave communication.",
            "displayName": "Jenkins JNLP Service Name",
            "name": "JNLP_SERVICE_NAME",
            "value": "jenkins-jnlp"
        },
        {
            "description": "Whether to enable OAuth OpenShift integration. If false, the static account 'admin' will be initialized with the password 'password'.",
            "displayName": "Enable OAuth in Jenkins",
            "name": "ENABLE_OAUTH",
            "value": "true"
        },
        {
            "description": "Maximum amount of memory the container can use.",
            "displayName": "Memory Limit",
            "name": "MEMORY_LIMIT",
            "value": "512Mi"
        },
        {
            "description": "The OpenShift Namespace where the Jenkins ImageStream resides.",
            "displayName": "Jenkins ImageStream Namespace",
            "name": "NAMESPACE",
            "value": "openshift"
        },
        {
            "description": "Whether to perform memory intensive, possibly slow, synchronization with the Jenkins Update Center on start.  If true, the Jenkins core update monitor and site warnings monitor are disabled.",
            "displayName": "Disable memory intensive administrative monitors",
            "name": "DISABLE_ADMINISTRATIVE_MONITORS",
            "value": "false"
        },
        {
            "description": "Name of the ImageStreamTag to be used for the Jenkins image.",
            "displayName": "Jenkins ImageStreamTag",
            "name": "JENKINS_IMAGE_STREAM_TAG",
            "value": "jenkins:2"
        }
    ]
}
`)

func testExtendedTestdataCmdTestCmdTestdataJenkinsJenkinsEphemeralTemplateJsonBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataJenkinsJenkinsEphemeralTemplateJson, nil
}

func testExtendedTestdataCmdTestCmdTestdataJenkinsJenkinsEphemeralTemplateJson() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataJenkinsJenkinsEphemeralTemplateJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/jenkins/jenkins-ephemeral-template.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataMixedApiVersionsYaml = []byte(`apiVersion: v1
kind: List
metadata: {}
items:

- apiVersion: v1
  kind: Secret
  metadata:
    annotations:
      description: v1 Secret - used to test v1 negotiation of k8s objects
    name: v1-secret

- apiVersion: v1
  kind: Route
  metadata:
    annotations:
      description: v1 Route - used to test v1 negotiation of origin objects
    name: v1-route
  spec:
    to:
      kind: Service
      name: test

- apiVersion: batch/v1
  kind: Job
  metadata:
    annotations:
      description: v1 Job - used to test v1 negotiation of group k8s objects
    name: v1-job
  spec:
    template:
      metadata:
        labels:
          run: v1-job
      spec:
        containers:
        - image: openshift/hello-openshift
          name: hello-container
        restartPolicy: Never

- apiVersion: v1
  dockerImageMetadata:
    Author: me
    Config:
      Cmd:
      - /bin/sh
      Entrypoint:
      - container-entrypoint
    ContainerConfig: {}
    apiVersion: "1.0"
    kind: DockerImage
  dockerImageMetadataVersion: "1.0"
  dockerImageReference: registry/namespace/name
  kind: Image
  metadata:
    annotations:
      description: v1 Image - used to test annotation/labeling of an object that does not support patch
    name: v1-image
`)

func testExtendedTestdataCmdTestCmdTestdataMixedApiVersionsYamlBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataMixedApiVersionsYaml, nil
}

func testExtendedTestdataCmdTestCmdTestdataMixedApiVersionsYaml() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataMixedApiVersionsYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/mixed-api-versions.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataModifiedRubyImagestreamJson = []byte(`{
  "kind": "ImageStream",
  "apiVersion": "v1",
  "metadata": {
    "name": "ruby",
    "annotations": {
      "openshift.io/display-name": "Ruby"
    }
  },
  "spec": {
    "tags": [
      {
        "name": "2.4",
        "annotations": {
          "openshift.io/display-name": "Ruby Patched",
          "openshift.io/provider-display-name": "Red Hat, Inc.",
          "description": "Build and run Ruby 2.4 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-ruby-container/blob/master/2.4/README.md.",
          "iconClass": "icon-ruby",
          "tags": "builder,ruby",
          "supports": "ruby:2.4,ruby",
          "version": "2.4 patched",
          "sampleRepo": "https://github.com/sclorg/ruby-ex.git"
        },
        "from": {
          "kind": "DockerImage",
          "name": "centos/ruby-24-centos7:latest"
        }
      },
      {
        "name": "newtag",
        "from": {
          "kind": "DockerImage",
          "name": "centos/ruby-24-centos7:latest"
        }
      }
    ]
  }
}
`)

func testExtendedTestdataCmdTestCmdTestdataModifiedRubyImagestreamJsonBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataModifiedRubyImagestreamJson, nil
}

func testExtendedTestdataCmdTestCmdTestdataModifiedRubyImagestreamJson() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataModifiedRubyImagestreamJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/modified-ruby-imagestream.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataMultiportServiceYaml = []byte(`apiVersion: v1
kind: List
items:
- apiVersion: v1
  kind: Service
  metadata:
    creationTimestamp: 2015-10-13T10:13:11Z
    labels:
      test: missing-route-port
    name: frontend
    resourceVersion: "259"
    uid: 024d82eb-7193-11e5-b84d-080027c5bfa9
  spec:
    clusterIP: 172.30.182.32
    ports:
    - name: web
      port: 5432
      protocol: TCP
      targetPort: 8080
    - name: web2
      port: 5433
      protocol: TCP
      targetPort: 8080
    selector:
      name: frontend
    sessionAffinity: None
    type: ClusterIP
  status:
    loadBalancer: {}
`)

func testExtendedTestdataCmdTestCmdTestdataMultiportServiceYamlBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataMultiportServiceYaml, nil
}

func testExtendedTestdataCmdTestCmdTestdataMultiportServiceYaml() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataMultiportServiceYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/multiport-service.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataNewAppBcFromImagestreamimageJson = []byte(`apiVersion: v1
kind: Template
metadata:
  creationTimestamp: null
  name: bc-from-imagestreamimage
objects:
- apiVersion: v1
  kind: BuildConfig
  metadata:
    creationTimestamp: null
    labels:
      name: bc-from-imagestreamimage
      template: application-template-stibuild
    name: bc-from-imagestreamimage
  spec:
    nodeSelector: null
    output:
      to:
        kind: ImageStreamTag
        name: origin-ruby-sample:latest
    postCommit:
      args:
      - bundle
      - exec
      - rake
      - test
    resources: {}
    runPolicy: Serial
    source:
      git:
        uri: https://github.com/openshift/ruby-hello-world.git
      type: Git
    strategy:
      sourceStrategy:
        env:
        - name: EXAMPLE
          value: sample-app
        from:
          kind: ImageStreamImage
          name: ruby@sha256:5dc0856fea9551e102815863cceeabd3aee862ec4ad5f2625eb51564924f0360
      type: Source
    triggers:
    - github:
        secret: secret101
      type: GitHub
    - generic:
        allowEnv: true
        secret: secret101
      type: Generic
    - type: ConfigChange
  status:
    lastVersion: 0
`)

func testExtendedTestdataCmdTestCmdTestdataNewAppBcFromImagestreamimageJsonBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataNewAppBcFromImagestreamimageJson, nil
}

func testExtendedTestdataCmdTestCmdTestdataNewAppBcFromImagestreamimageJson() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataNewAppBcFromImagestreamimageJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/new-app/bc-from-imagestreamimage.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataNewAppBuildArgDockerfileDockerfile = []byte(`FROM centos/ruby-25-centos7
ARG foo
RUN echo $foo
`)

func testExtendedTestdataCmdTestCmdTestdataNewAppBuildArgDockerfileDockerfileBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataNewAppBuildArgDockerfileDockerfile, nil
}

func testExtendedTestdataCmdTestCmdTestdataNewAppBuildArgDockerfileDockerfile() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataNewAppBuildArgDockerfileDockerfileBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/new-app/build-arg-dockerfile/Dockerfile", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataNewAppCircularIsYaml = []byte(`apiVersion: v1
items:
- apiVersion: v1
  kind: ImageStream
  metadata:
    name: newapp-circular-template
  spec: {}
kind: List
metadata: {}`)

func testExtendedTestdataCmdTestCmdTestdataNewAppCircularIsYamlBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataNewAppCircularIsYaml, nil
}

func testExtendedTestdataCmdTestCmdTestdataNewAppCircularIsYaml() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataNewAppCircularIsYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/new-app/circular-is.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataNewAppCircularYaml = []byte(`apiVersion: v1
kind: Template
metadata:
  name: circular
objects:
- apiVersion: v1
  kind: BuildConfig
  metadata:
    name: newapp-circular-template
  spec:
    nodeSelector: null
    output:
      to:
        kind: ImageStreamTag
        name: newapp-circular-template:latest
    postCommit: {}
    resources: {}
    runPolicy: Serial
    source:
      git:
        uri: https://github.com/openshift/ruby-hello-world
      type: Git
    strategy:
      dockerStrategy:
        from:
          kind: ImageStreamTag
          name: newapp-circular-template:latest
      type: Docker
    triggers:
    - github:
        secret: faSaQS1VY-gdRMwge4eV
      type: GitHub
    - generic:
        secret: u-_J-vtKR5K3GykKwCuK
      type: Generic
    - imageChange: {}
      type: ImageChange
  status:
    lastVersion: 0
`)

func testExtendedTestdataCmdTestCmdTestdataNewAppCircularYamlBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataNewAppCircularYaml, nil
}

func testExtendedTestdataCmdTestCmdTestdataNewAppCircularYaml() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataNewAppCircularYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/new-app/circular.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataNewAppImagestreamRefYaml = []byte(`apiVersion: v1
kind: ImageStream
metadata:
  name: myruby
spec:
  tags:
  - from:
      kind: ImageStreamTag
      name: "2.3"
    name: "latest"
  - from:
      kind: ImageStreamTag
      name: ruby:2.3
    name: "2.3"
`)

func testExtendedTestdataCmdTestCmdTestdataNewAppImagestreamRefYamlBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataNewAppImagestreamRefYaml, nil
}

func testExtendedTestdataCmdTestCmdTestdataNewAppImagestreamRefYaml() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataNewAppImagestreamRefYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/new-app/imagestream-ref.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataNewAppInstallableStreamYaml = []byte(`apiVersion: v1
kind: ImageStream
metadata:
  name: installable
spec:
  tags:
  - name: latest
    from:
      kind: ImageStreamTag
      name: installable:token
  - name: no-token
    annotations:
      io.openshift.generate.job: "true"
    from:
      kind: DockerImage
      name: openshift/origin:v1.0.6
  - name: token
    annotations:
      io.openshift.generate.job: "true"
      io.openshift.generate.token.as: "env:TOKEN_ENV"
    from:
      kind: DockerImage
      name: openshift/origin:v1.0.6
  - name: file
    annotations:
      io.openshift.generate.job: "true"
      io.openshift.generate.token.as: "file:/var/run/openshift.secret.token"
    from:
      kind: DockerImage
      name: openshift/origin:v1.0.6
  - name: serviceaccount
    annotations:
      io.openshift.generate.job: "true"
      io.openshift.generate.token.as: "serviceaccount"
    from:
      kind: DockerImage
      name: openshift/origin:v1.0.6
`)

func testExtendedTestdataCmdTestCmdTestdataNewAppInstallableStreamYamlBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataNewAppInstallableStreamYaml, nil
}

func testExtendedTestdataCmdTestCmdTestdataNewAppInstallableStreamYaml() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataNewAppInstallableStreamYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/new-app/installable-stream.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataNewAppInvalidBuildStrategyYaml = []byte(`apiVersion: v1
kind: Template
objects:
- apiVersion: v1
  kind: BuildConfig
  spec:
    strategy:
      type: foobar
`)

func testExtendedTestdataCmdTestCmdTestdataNewAppInvalidBuildStrategyYamlBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataNewAppInvalidBuildStrategyYaml, nil
}

func testExtendedTestdataCmdTestCmdTestdataNewAppInvalidBuildStrategyYaml() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataNewAppInvalidBuildStrategyYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/new-app/invalid-build-strategy.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataNewAppInvalidJson = []byte(`{"test"}`)

func testExtendedTestdataCmdTestCmdTestdataNewAppInvalidJsonBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataNewAppInvalidJson, nil
}

func testExtendedTestdataCmdTestCmdTestdataNewAppInvalidJson() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataNewAppInvalidJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/new-app/invalid.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataNewAppTemplateMinimalExposeJson = []byte(`{
  "kind": "Template",
  "apiVersion": "v1",
  "metadata": {
    "name": "helloworld-sample"
  },
  "objects": [
    {
      "kind": "Service",
      "apiVersion": "v1",
      "metadata": {
        "name": "frontend"
      },
      "spec": {
        "ports": [
          {
            "name": "web",
            "protocol": "TCP",
            "port": 5432,
            "targetPort": 8080,
            "nodePort": 0
          }
        ],
        "selector": {
          "name": "frontend"
        },
        "type": "ClusterIP",
        "sessionAffinity": "None"
      },
      "status": {
        "loadBalancer": {}
      }
    },
    {
      "kind": "Route",
      "apiVersion": "v1",
      "metadata": {
        "name": "route-edge",
        "annotations": {
          "template.openshift.io/expose-uri": "http://{.spec.host}{.spec.path}"
        }
      },
      "spec": {
        "host": "www.example.com",
        "to": {
          "kind": "Service",
          "name": "frontend"
        },
        "tls": {
          "termination": "edge"
        }
      },
      "status": {}
    }
  ],
  "parameters": [],
  "labels": {
    "app": "expose-output"
  }
}`)

func testExtendedTestdataCmdTestCmdTestdataNewAppTemplateMinimalExposeJsonBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataNewAppTemplateMinimalExposeJson, nil
}

func testExtendedTestdataCmdTestCmdTestdataNewAppTemplateMinimalExposeJson() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataNewAppTemplateMinimalExposeJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/new-app/template-minimal-expose.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataNewAppTemplateWithAppLabelJson = []byte(`{
  "kind": "Template",
  "apiVersion": "v1",
  "metadata": {
    "name": "ruby-helloworld-sample",
    "creationTimestamp": null,
    "annotations": {
      "description": "some objects in this template declare their own app label to confirm new-app will tolerate it",
      "iconClass": "icon-ruby",
      "tags": "instant-app,ruby,mysql"
    }
  },
  "objects": [
    {
      "kind": "Service",
      "apiVersion": "v1",
      "metadata": {
        "name": "frontend",
        "creationTimestamp": null
      },
      "spec": {
        "ports": [
          {
            "name": "web",
            "protocol": "TCP",
            "port": 5432,
            "targetPort": 8080,
            "nodePort": 0
          }
        ],
        "selector": {
          "name": "frontend"
        },
        "type": "ClusterIP",
        "sessionAffinity": "None"
      },
      "status": {
        "loadBalancer": {}
      }
    },
    {
      "kind": "Route",
      "apiVersion": "v1",
      "metadata": {
        "name": "route-edge",
        "creationTimestamp": null
      },
      "spec": {
        "host": "www.example.com",
        "to": {
          "kind": "Service",
          "name": "frontend"
        },
        "tls": {
          "termination": "edge"
        }
      },
      "status": {}
    },
    {
      "kind": "ImageStream",
      "apiVersion": "v1",
      "metadata": {
        "name": "origin-ruby-sample",
        "creationTimestamp": null
      },
      "spec": {},
      "status": {
        "dockerImageRepository": ""
      }
    },
    {
      "kind": "ImageStream",
      "apiVersion": "v1",
      "metadata": {
        "name": "ruby-25-centos7",
        "creationTimestamp": null
      },
      "spec": {
        "dockerImageRepository": "centos/ruby-25-centos7"
      },
      "status": {
        "dockerImageRepository": ""
      }
    },
    {
      "kind": "BuildConfig",
      "apiVersion": "v1",
      "metadata": {
        "name": "ruby-sample-build",
        "creationTimestamp": null,
        "labels": {
          "name": "ruby-sample-build",
          "app": "myapp"
        }
      },
      "spec": {
        "triggers": [
          {
            "type": "GitHub",
            "github": {
              "secret": "secret101"
            }
          },
          {
            "type": "Generic",
            "generic": {
              "secret": "secret101"
            }
          },
          {
            "type": "ImageChange",
            "imageChange": {}
          },
          {
            "type": "ConfigChange"
          }
        ],
        "source": {
          "type": "Git",
          "git": {
            "uri": "https://github.com/openshift/ruby-hello-world.git"
          }
        },
        "strategy": {
          "type": "Source",
          "sourceStrategy": {
            "from": {
              "kind": "ImageStreamTag",
              "name": "ruby-25-centos7:latest"
            },
            "env": [
              {
                "name": "EXAMPLE",
                "value": "sample-app"
              }
            ]
          }
        },
        "output": {
          "to": {
            "kind": "ImageStreamTag",
            "name": "origin-ruby-sample:latest"
          }
        },
        "postCommit": {
          "args": ["bundle", "exec", "rake", "test"]
        },
        "resources": {}
      },
      "status": {
        "lastVersion": 0
      }
    },
    {
      "kind": "DeploymentConfig",
      "apiVersion": "v1",
      "metadata": {
        "name": "frontend",
        "creationTimestamp": null
      },
      "spec": {
        "strategy": {
          "type": "Rolling",
          "rollingParams": {
            "updatePeriodSeconds": 1,
            "intervalSeconds": 1,
            "timeoutSeconds": 120,
            "pre": {
              "failurePolicy": "Abort",
              "execNewPod": {
                "command": [
                  "/bin/true"
                ],
                "env": [
                  {
                    "name": "CUSTOM_VAR1",
                    "value": "custom_value1"
                  }
                ],
                "containerName": "ruby-helloworld"
              }
            },
            "post": {
              "failurePolicy": "Ignore",
              "execNewPod": {
                "command": [
                  "/bin/false"
                ],
                "env": [
                  {
                    "name": "CUSTOM_VAR2",
                    "value": "custom_value2"
                  }
                ],
                "containerName": "ruby-helloworld"
              }
            }
          },
          "resources": {}
        },
        "triggers": [
          {
            "type": "ImageChange",
            "imageChangeParams": {
              "automatic": true,
              "containerNames": [
                "ruby-helloworld"
              ],
              "from": {
                "kind": "ImageStreamTag",
                "name": "origin-ruby-sample:latest"
              }
            }
          },
          {
            "type": "ConfigChange"
          }
        ],
        "replicas": 2,
        "selector": {
          "name": "frontend"
        },
        "template": {
          "metadata": {
            "creationTimestamp": null,
            "labels": {
              "name": "frontend"
            }
          },
          "spec": {
            "containers": [
              {
                "name": "ruby-helloworld",
                "image": "origin-ruby-sample",
                "ports": [
                  {
                    "containerPort": 8080,
                    "protocol": "TCP"
                  }
                ],
                "env": [
                  {
                    "name": "ADMIN_USERNAME",
                    "value": "${ADMIN_USERNAME}"
                  },
                  {
                    "name": "ADMIN_PASSWORD",
                    "value": "${ADMIN_PASSWORD}"
                  },
                  {
                    "name": "MYSQL_USER",
                    "value": "${MYSQL_USER}"
                  },
                  {
                    "name": "MYSQL_PASSWORD",
                    "value": "${MYSQL_PASSWORD}"
                  },
                  {
                    "name": "MYSQL_DATABASE",
                    "value": "${MYSQL_DATABASE}"
                  }
                ],
                "resources": {},
                "terminationMessagePath": "/dev/termination-log",
                "imagePullPolicy": "IfNotPresent",
                "securityContext": {
                  "capabilities": {},
                  "privileged": false
                }
              }
            ],
            "restartPolicy": "Always",
            "dnsPolicy": "ClusterFirst"
          }
        }
      },
      "status": {}
    },
    {
      "kind": "Service",
      "apiVersion": "v1",
      "metadata": {
        "name": "database",
        "creationTimestamp": null
      },
      "spec": {
        "ports": [
          {
            "name": "db",
            "protocol": "TCP",
            "port": 5434,
            "targetPort": 3306,
            "nodePort": 0
          }
        ],
        "selector": {
          "name": "database"
        },
        "type": "ClusterIP",
        "sessionAffinity": "None"
      },
      "status": {
        "loadBalancer": {}
      }
    },
    {
      "kind": "DeploymentConfig",
      "apiVersion": "v1",
      "metadata": {
        "name": "database",
        "creationTimestamp": null
      },
      "spec": {
        "strategy": {
          "type": "Recreate",
          "recreateParams": {
            "pre": {
              "failurePolicy": "Abort",
              "execNewPod": {
                "command": [
                  "/bin/true"
                ],
                "env": [
                  {
                    "name": "CUSTOM_VAR1",
                    "value": "custom_value1"
                  }
                ],
                "containerName": "ruby-helloworld-database",
                "volumes": ["ruby-helloworld-data"]
              }
            },
            "mid": {
              "failurePolicy": "Abort",
              "execNewPod": {
                "command": [
                  "/bin/true"
                ],
                "env": [
                  {
                    "name": "CUSTOM_VAR2",
                    "value": "custom_value2"
                  }
                ],
                "containerName": "ruby-helloworld-database",
                "volumes": ["ruby-helloworld-data"]
              }
            },
            "post": {
              "failurePolicy": "Ignore",
              "execNewPod": {
                "command": [
                  "/bin/false"
                ],
                "env": [
                  {
                    "name": "CUSTOM_VAR2",
                    "value": "custom_value2"
                  }
                ],
                "containerName": "ruby-helloworld-database",
                "volumes": ["ruby-helloworld-data"]
              }
            }
          },
          "resources": {}
        },
        "triggers": [
          {
            "type": "ConfigChange"
          }
        ],
        "replicas": 1,
        "selector": {
          "name": "database"
        },
        "template": {
          "metadata": {
            "creationTimestamp": null,
            "labels": {
              "name": "database"
            }
          },
          "spec": {
            "containers": [
              {
                "name": "ruby-helloworld-database",
                "image": "openshift/mysql-55-centos7:latest",
                "ports": [
                  {
                    "containerPort": 3306,
                    "protocol": "TCP"
                  }
                ],
                "env": [
                  {
                    "name": "MYSQL_USER",
                    "value": "${MYSQL_USER}"
                  },
                  {
                    "name": "MYSQL_PASSWORD",
                    "value": "${MYSQL_PASSWORD}"
                  },
                  {
                    "name": "MYSQL_DATABASE",
                    "value": "${MYSQL_DATABASE}"
                  }
                ],
                "resources": {},
                "volumeMounts": [
                  {
                    "name": "ruby-helloworld-data",
                    "mountPath": "/var/lib/mysql/data"
                  }
                ],
                "terminationMessagePath": "/dev/termination-log",
                "imagePullPolicy": "Always",
                "securityContext": {
                  "capabilities": {},
                  "privileged": false
                }
              }
            ],
            "volumes": [
              {
                "name": "ruby-helloworld-data",
                "emptyDir": {
                  "medium": ""
                }
              }
            ],
            "restartPolicy": "Always",
            "dnsPolicy": "ClusterFirst"
          }
        }
      },
      "status": {}
    }
  ],
  "parameters": [
    {
      "name": "ADMIN_USERNAME",
      "description": "administrator username",
      "generate": "expression",
      "from": "admin[A-Z0-9]{3}"
    },
    {
      "name": "ADMIN_PASSWORD",
      "description": "administrator password",
      "generate": "expression",
      "from": "[a-zA-Z0-9]{8}"
    },
    {
      "name": "MYSQL_USER",
      "description": "database username",
      "generate": "expression",
      "from": "user[A-Z0-9]{3}",
      "required": true
    },
    {
      "name": "MYSQL_PASSWORD",
      "description": "database password",
      "generate": "expression",
      "from": "[a-zA-Z0-9]{8}",
      "required": true
    },
    {
      "name": "MYSQL_DATABASE",
      "description": "database name",
      "value": "root",
      "required": true
    }
  ],
  "labels": {
    "template": "application-template-stibuild"
  }
}
`)

func testExtendedTestdataCmdTestCmdTestdataNewAppTemplateWithAppLabelJsonBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataNewAppTemplateWithAppLabelJson, nil
}

func testExtendedTestdataCmdTestCmdTestdataNewAppTemplateWithAppLabelJson() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataNewAppTemplateWithAppLabelJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/new-app/template-with-app-label.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataNewAppTemplateWithCrdYaml = []byte(`apiVersion: v1
kind: Template
metadata:
  name: template-with-crd
objects:
- kind: CustomResourceDefinition
  apiVersion: apiextensions.k8s.io/v1beta1
  metadata:
    name: template-with-crd
`)

func testExtendedTestdataCmdTestCmdTestdataNewAppTemplateWithCrdYamlBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataNewAppTemplateWithCrdYaml, nil
}

func testExtendedTestdataCmdTestCmdTestdataNewAppTemplateWithCrdYaml() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataNewAppTemplateWithCrdYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/new-app/template-with-crd.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataNewAppTemplateWithNamespacesJson = []byte(`{
  "kind": "Template",
  "apiVersion": "v1",
  "metadata": {
    "name": "ruby-helloworld-sample",
    "creationTimestamp": null,
    "annotations": {
      "description": "some objects in this template declare their own namespace via a parameter confirm new-app will tolerate it",
      "iconClass": "icon-ruby",
      "tags": "instant-app,ruby,mysql"
    }
  },
  "objects": [
    {
      "kind": "Route",
      "apiVersion": "v1",
      "metadata": {
        "name": "route-edge-stripped",
        "namespace": "STRIPPED"
      },
      "spec": {
        "host": "www.example.com",
        "to": {
          "kind": "Service",
          "name": "frontend"
        },
        "tls": {
          "termination": "edge"
        }
      },
      "status": {}
    },
    {
      "kind": "Route",
      "apiVersion": "v1",
      "metadata": {
        "name": "route-edge-substituted",
        "namespace": "${SUBSTITUTED}"
      },
      "spec": {
        "host": "www.example.com",
        "to": {
          "kind": "Service",
          "name": "frontend"
        },
        "tls": {
          "termination": "edge"
        }
      },
      "status": {}
    },
    {
      "kind": "Route",
      "apiVersion": "v1",
      "metadata": {
        "name": "route-edge-prefix-substituted",
        "namespace": "prefix-${SUBSTITUTED}"
      },
      "spec": {
        "host": "www.example.com",
        "to": {
          "kind": "Service",
          "name": "frontend"
        },
        "tls": {
          "termination": "edge"
        }
      },
      "status": {}
    },
    {
      "kind": "Route",
      "apiVersion": "v1",
      "metadata": {
        "name": "route-edge-refstripped",
        "namespace": "${{SUBSTITUTED}}"
      },
      "spec": {
        "host": "www.example.com",
        "to": {
          "kind": "Service",
          "name": "frontend"
        },
        "tls": {
          "termination": "edge"
        }
      },
      "status": {}
    },
    {
      "kind": "Route",
      "apiVersion": "v1",
      "metadata": {
        "name": "route-edge-prefix-refstripped",
        "namespace": "prefix-${{SUBSTITUTED}}"
      },
      "spec": {
        "host": "www.example.com",
        "to": {
          "kind": "Service",
          "name": "frontend"
        },
        "tls": {
          "termination": "edge"
        }
      },
      "status": {}
    }
  ],
  "parameters": [
    {
      "name": "SUBSTITUTED",
      "description": "namespace value",
      "value": "substituted",
      "required": true
    }
  ],
  "labels": {
    "template": "application-template-stibuild"
  }
}
`)

func testExtendedTestdataCmdTestCmdTestdataNewAppTemplateWithNamespacesJsonBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataNewAppTemplateWithNamespacesJson, nil
}

func testExtendedTestdataCmdTestCmdTestdataNewAppTemplateWithNamespacesJson() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataNewAppTemplateWithNamespacesJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/new-app/template-with-namespaces.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataNewAppTemplateWithoutAppLabelJson = []byte(`{
  "kind": "Template",
  "apiVersion": "v1",
  "metadata": {
    "name": "ruby-helloworld-sample",
    "creationTimestamp": null,
    "annotations": {
      "description": "some objects in this template declare their own app label to confirm new-app will tolerate it",
      "iconClass": "icon-ruby",
      "tags": "instant-app,ruby,mysql"
    }
  },
  "objects": [
    {
      "kind": "Service",
      "apiVersion": "v1",
      "metadata": {
        "name": "frontend",
        "creationTimestamp": null
      },
      "spec": {
        "ports": [
          {
            "name": "web",
            "protocol": "TCP",
            "port": 5432,
            "targetPort": 8080,
            "nodePort": 0
          }
        ],
        "selector": {
          "name": "frontend"
        },
        "portalIP": "",
        "type": "ClusterIP",
        "sessionAffinity": "None"
      },
      "status": {
        "loadBalancer": {}
      }
    },
    {
      "kind": "Route",
      "apiVersion": "v1",
      "metadata": {
        "name": "route-edge",
        "creationTimestamp": null
      },
      "spec": {
        "host": "www.example.com",
        "to": {
          "kind": "Service",
          "name": "frontend"
        },
        "tls": {
          "termination": "edge",
          "certificate": "-----BEGIN CERTIFICATE-----\nMIIDIjCCAgqgAwIBAgIBATANBgkqhkiG9w0BAQUFADCBoTELMAkGA1UEBhMCVVMx\nCzAJBgNVBAgMAlNDMRUwEwYDVQQHDAxEZWZhdWx0IENpdHkxHDAaBgNVBAoME0Rl\nZmF1bHQgQ29tcGFueSBMdGQxEDAOBgNVBAsMB1Rlc3QgQ0ExGjAYBgNVBAMMEXd3\ndy5leGFtcGxlY2EuY29tMSIwIAYJKoZIhvcNAQkBFhNleGFtcGxlQGV4YW1wbGUu\nY29tMB4XDTE1MDExMjE0MTk0MVoXDTE2MDExMjE0MTk0MVowfDEYMBYGA1UEAwwP\nd3d3LmV4YW1wbGUuY29tMQswCQYDVQQIDAJTQzELMAkGA1UEBhMCVVMxIjAgBgkq\nhkiG9w0BCQEWE2V4YW1wbGVAZXhhbXBsZS5jb20xEDAOBgNVBAoMB0V4YW1wbGUx\nEDAOBgNVBAsMB0V4YW1wbGUwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMrv\ngu6ZTTefNN7jjiZbS/xvQjyXjYMN7oVXv76jbX8gjMOmg9m0xoVZZFAE4XyQDuCm\n47VRx5Qrf/YLXmB2VtCFvB0AhXr5zSeWzPwaAPrjA4ebG+LUo24ziS8KqNxrFs1M\nmNrQUgZyQC6XIe1JHXc9t+JlL5UZyZQC1IfaJulDAgMBAAGjDTALMAkGA1UdEwQC\nMAAwDQYJKoZIhvcNAQEFBQADggEBAFCi7ZlkMnESvzlZCvv82Pq6S46AAOTPXdFd\nTMvrh12E1sdVALF1P1oYFJzG1EiZ5ezOx88fEDTW+Lxb9anw5/KJzwtWcfsupf1m\nV7J0D3qKzw5C1wjzYHh9/Pz7B1D0KthQRATQCfNf8s6bbFLaw/dmiIUhHLtIH5Qc\nyfrejTZbOSP77z8NOWir+BWWgIDDB2//3AkDIQvT20vmkZRhkqSdT7et4NmXOX/j\njhPti4b2Fie0LeuvgaOdKjCpQQNrYthZHXeVlOLRhMTSk3qUczenkKTOhvP7IS9q\n+Dzv5hqgSfvMG392KWh5f8xXfJNs4W5KLbZyl901MeReiLrPH3w=\n-----END CERTIFICATE-----",
          "key": "-----BEGIN PRIVATE KEY-----\nMIICeAIBADANBgkqhkiG9w0BAQEFAASCAmIwggJeAgEAAoGBAMrvgu6ZTTefNN7j\njiZbS/xvQjyXjYMN7oVXv76jbX8gjMOmg9m0xoVZZFAE4XyQDuCm47VRx5Qrf/YL\nXmB2VtCFvB0AhXr5zSeWzPwaAPrjA4ebG+LUo24ziS8KqNxrFs1MmNrQUgZyQC6X\nIe1JHXc9t+JlL5UZyZQC1IfaJulDAgMBAAECgYEAnxOjEj/vrLNLMZE1Q9H7PZVF\nWdP/JQVNvQ7tCpZ3ZdjxHwkvf//aQnuxS5yX2Rnf37BS/TZu+TIkK4373CfHomSx\nUTAn2FsLmOJljupgGcoeLx5K5nu7B7rY5L1NHvdpxZ4YjeISrRtEPvRakllENU5y\ngJE8c2eQOx08ZSRE4TkCQQD7dws2/FldqwdjJucYijsJVuUdoTqxP8gWL6bB251q\nelP2/a6W2elqOcWId28560jG9ZS3cuKvnmu/4LG88vZFAkEAzphrH3673oTsHN+d\nuBd5uyrlnGjWjuiMKv2TPITZcWBjB8nJDSvLneHF59MYwejNNEof2tRjgFSdImFH\nmi995wJBAMtPjW6wiqRz0i41VuT9ZgwACJBzOdvzQJfHgSD9qgFb1CU/J/hpSRIM\nkYvrXK9MbvQFvG6x4VuyT1W8mpe1LK0CQAo8VPpffhFdRpF7psXLK/XQ/0VLkG3O\nKburipLyBg/u9ZkaL0Ley5zL5dFBjTV2Qkx367Ic2b0u9AYTCcgi2DsCQQD3zZ7B\nv7BOm7MkylKokY2MduFFXU0Bxg6pfZ7q3rvg8gqhUFbaMStPRYg6myiDiW/JfLhF\nTcFT4touIo7oriFJ\n-----END PRIVATE KEY-----",
          "caCertificate": "-----BEGIN CERTIFICATE-----\nMIIEFzCCAv+gAwIBAgIJALK1iUpF2VQLMA0GCSqGSIb3DQEBBQUAMIGhMQswCQYD\nVQQGEwJVUzELMAkGA1UECAwCU0MxFTATBgNVBAcMDERlZmF1bHQgQ2l0eTEcMBoG\nA1UECgwTRGVmYXVsdCBDb21wYW55IEx0ZDEQMA4GA1UECwwHVGVzdCBDQTEaMBgG\nA1UEAwwRd3d3LmV4YW1wbGVjYS5jb20xIjAgBgkqhkiG9w0BCQEWE2V4YW1wbGVA\nZXhhbXBsZS5jb20wHhcNMTUwMTEyMTQxNTAxWhcNMjUwMTA5MTQxNTAxWjCBoTEL\nMAkGA1UEBhMCVVMxCzAJBgNVBAgMAlNDMRUwEwYDVQQHDAxEZWZhdWx0IENpdHkx\nHDAaBgNVBAoME0RlZmF1bHQgQ29tcGFueSBMdGQxEDAOBgNVBAsMB1Rlc3QgQ0Ex\nGjAYBgNVBAMMEXd3dy5leGFtcGxlY2EuY29tMSIwIAYJKoZIhvcNAQkBFhNleGFt\ncGxlQGV4YW1wbGUuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA\nw2rK1J2NMtQj0KDug7g7HRKl5jbf0QMkMKyTU1fBtZ0cCzvsF4CqV11LK4BSVWaK\nrzkaXe99IVJnH8KdOlDl5Dh/+cJ3xdkClSyeUT4zgb6CCBqg78ePp+nN11JKuJlV\nIG1qdJpB1J5O/kCLsGcTf7RS74MtqMFo96446Zvt7YaBhWPz6gDaO/TUzfrNcGLA\nEfHVXkvVWqb3gqXUztZyVex/gtP9FXQ7gxTvJml7UkmT0VAFjtZnCqmFxpLZFZ15\n+qP9O7Q2MpsGUO/4vDAuYrKBeg1ZdPSi8gwqUP2qWsGd9MIWRv3thI2903BczDc7\nr8WaIbm37vYZAS9G56E4+wIDAQABo1AwTjAdBgNVHQ4EFgQUugLrSJshOBk5TSsU\nANs4+SmJUGwwHwYDVR0jBBgwFoAUugLrSJshOBk5TSsUANs4+SmJUGwwDAYDVR0T\nBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEAaMJ33zAMV4korHo5aPfayV3uHoYZ\n1ChzP3eSsF+FjoscpoNSKs91ZXZF6LquzoNezbfiihK4PYqgwVD2+O0/Ty7UjN4S\nqzFKVR4OS/6lCJ8YncxoFpTntbvjgojf1DEataKFUN196PAANc3yz8cWHF4uvjPv\nWkgFqbIjb+7D1YgglNyovXkRDlRZl0LD1OQ0ZWhd4Ge1qx8mmmanoBeYZ9+DgpFC\nj9tQAbS867yeOryNe7sEOIpXAAqK/DTu0hB6+ySsDfMo4piXCc2aA/eI2DCuw08e\nw17Dz9WnupZjVdwTKzDhFgJZMLDqn37HQnT6EemLFqbcR0VPEnfyhDtZIQ==\n-----END CERTIFICATE-----"
        }
      },
      "status": {}
    },
    {
      "kind": "ImageStream",
      "apiVersion": "v1",
      "metadata": {
        "name": "origin-ruby-sample",
        "creationTimestamp": null
      },
      "spec": {},
      "status": {
        "dockerImageRepository": ""
      }
    },
    {
      "kind": "ImageStream",
      "apiVersion": "v1",
      "metadata": {
        "name": "ruby-25-centos7",
        "creationTimestamp": null
      },
      "spec": {
        "dockerImageRepository": "centos/ruby-25-centos7"
      },
      "status": {
        "dockerImageRepository": ""
      }
    },
    {
      "kind": "BuildConfig",
      "apiVersion": "v1",
      "metadata": {
        "name": "ruby-sample-build",
        "creationTimestamp": null,
        "labels": {
          "name": "ruby-sample-build"
        }
      },
      "spec": {
        "triggers": [
          {
            "type": "GitHub",
            "github": {
              "secret": "secret101"
            }
          },
          {
            "type": "Generic",
            "generic": {
              "secret": "secret101"
            }
          },
          {
            "type": "ImageChange",
            "imageChange": {}
          },
          {
            "type": "ConfigChange"
          }
        ],
        "source": {
          "type": "Git",
          "git": {
            "uri": "https://github.com/openshift/ruby-hello-world.git"
          }
        },
        "strategy": {
          "type": "Source",
          "sourceStrategy": {
            "from": {
              "kind": "ImageStreamTag",
              "name": "ruby-25-centos7:latest"
            },
            "env": [
              {
                "name": "EXAMPLE",
                "value": "sample-app"
              }
            ]
          }
        },
        "output": {
          "to": {
            "kind": "ImageStreamTag",
            "name": "origin-ruby-sample:latest"
          }
        },
        "postCommit": {
          "args": ["bundle", "exec", "rake", "test"]
        },
        "resources": {}
      },
      "status": {
        "lastVersion": 0
      }
    },
    {
      "kind": "DeploymentConfig",
      "apiVersion": "v1",
      "metadata": {
        "name": "frontend",
        "creationTimestamp": null
      },
      "spec": {
        "strategy": {
          "type": "Rolling",
          "rollingParams": {
            "updatePeriodSeconds": 1,
            "intervalSeconds": 1,
            "timeoutSeconds": 120,
            "pre": {
              "failurePolicy": "Abort",
              "execNewPod": {
                "command": [
                  "/bin/true"
                ],
                "env": [
                  {
                    "name": "CUSTOM_VAR1",
                    "value": "custom_value1"
                  }
                ],
                "containerName": "ruby-helloworld"
              }
            },
            "post": {
              "failurePolicy": "Ignore",
              "execNewPod": {
                "command": [
                  "/bin/false"
                ],
                "env": [
                  {
                    "name": "CUSTOM_VAR2",
                    "value": "custom_value2"
                  }
                ],
                "containerName": "ruby-helloworld"
              }
            }
          },
          "resources": {}
        },
        "triggers": [
          {
            "type": "ImageChange",
            "imageChangeParams": {
              "automatic": true,
              "containerNames": [
                "ruby-helloworld"
              ],
              "from": {
                "kind": "ImageStreamTag",
                "name": "origin-ruby-sample:latest"
              }
            }
          },
          {
            "type": "ConfigChange"
          }
        ],
        "replicas": 2,
        "selector": {
          "name": "frontend"
        },
        "template": {
          "metadata": {
            "creationTimestamp": null,
            "labels": {
              "name": "frontend"
            }
          },
          "spec": {
            "containers": [
              {
                "name": "ruby-helloworld",
                "image": "origin-ruby-sample",
                "ports": [
                  {
                    "containerPort": 8080,
                    "protocol": "TCP"
                  }
                ],
                "env": [
                  {
                    "name": "ADMIN_USERNAME",
                    "value": "${ADMIN_USERNAME}"
                  },
                  {
                    "name": "ADMIN_PASSWORD",
                    "value": "${ADMIN_PASSWORD}"
                  },
                  {
                    "name": "MYSQL_USER",
                    "value": "${MYSQL_USER}"
                  },
                  {
                    "name": "MYSQL_PASSWORD",
                    "value": "${MYSQL_PASSWORD}"
                  },
                  {
                    "name": "MYSQL_DATABASE",
                    "value": "${MYSQL_DATABASE}"
                  }
                ],
                "resources": {},
                "terminationMessagePath": "/dev/termination-log",
                "imagePullPolicy": "IfNotPresent",
                "securityContext": {
                  "capabilities": {},
                  "privileged": false
                }
              }
            ],
            "restartPolicy": "Always",
            "dnsPolicy": "ClusterFirst"
          }
        }
      },
      "status": {}
    },
    {
      "kind": "Service",
      "apiVersion": "v1",
      "metadata": {
        "name": "database",
        "creationTimestamp": null
      },
      "spec": {
        "ports": [
          {
            "name": "db",
            "protocol": "TCP",
            "port": 5434,
            "targetPort": 3306,
            "nodePort": 0
          }
        ],
        "selector": {
          "name": "database"
        },
        "portalIP": "",
        "type": "ClusterIP",
        "sessionAffinity": "None"
      },
      "status": {
        "loadBalancer": {}
      }
    },
    {
      "kind": "DeploymentConfig",
      "apiVersion": "v1",
      "metadata": {
        "name": "database",
        "creationTimestamp": null
      },
      "spec": {
        "strategy": {
          "type": "Recreate",
          "recreateParams": {
            "pre": {
              "failurePolicy": "Abort",
              "execNewPod": {
                "command": [
                  "/bin/true"
                ],
                "env": [
                  {
                    "name": "CUSTOM_VAR1",
                    "value": "custom_value1"
                  }
                ],
                "containerName": "ruby-helloworld-database",
                "volumes": ["ruby-helloworld-data"]
              }
            },
            "mid": {
              "failurePolicy": "Abort",
              "execNewPod": {
                "command": [
                  "/bin/true"
                ],
                "env": [
                  {
                    "name": "CUSTOM_VAR2",
                    "value": "custom_value2"
                  }
                ],
                "containerName": "ruby-helloworld-database",
                "volumes": ["ruby-helloworld-data"]
              }
            },
            "post": {
              "failurePolicy": "Ignore",
              "execNewPod": {
                "command": [
                  "/bin/false"
                ],
                "env": [
                  {
                    "name": "CUSTOM_VAR2",
                    "value": "custom_value2"
                  }
                ],
                "containerName": "ruby-helloworld-database",
                "volumes": ["ruby-helloworld-data"]
              }
            }
          },
          "resources": {}
        },
        "triggers": [
          {
            "type": "ConfigChange"
          }
        ],
        "replicas": 1,
        "selector": {
          "name": "database"
        },
        "template": {
          "metadata": {
            "creationTimestamp": null,
            "labels": {
              "name": "database"
            }
          },
          "spec": {
            "containers": [
              {
                "name": "ruby-helloworld-database",
                "image": "openshift/mysql-55-centos7:latest",
                "ports": [
                  {
                    "containerPort": 3306,
                    "protocol": "TCP"
                  }
                ],
                "env": [
                  {
                    "name": "MYSQL_USER",
                    "value": "${MYSQL_USER}"
                  },
                  {
                    "name": "MYSQL_PASSWORD",
                    "value": "${MYSQL_PASSWORD}"
                  },
                  {
                    "name": "MYSQL_DATABASE",
                    "value": "${MYSQL_DATABASE}"
                  }
                ],
                "resources": {},
                "volumeMounts": [
                  {
                    "name": "ruby-helloworld-data",
                    "mountPath": "/var/lib/mysql/data"
                  }
                ],
                "terminationMessagePath": "/dev/termination-log",
                "imagePullPolicy": "Always",
                "securityContext": {
                  "capabilities": {},
                  "privileged": false
                }
              }
            ],
            "volumes": [
              {
                "name": "ruby-helloworld-data",
                "emptyDir": {
                  "medium": ""
                }
              }
            ],
            "restartPolicy": "Always",
            "dnsPolicy": "ClusterFirst"
          }
        }
      },
      "status": {}
    }
  ],
  "parameters": [
    {
      "name": "ADMIN_USERNAME",
      "description": "administrator username",
      "generate": "expression",
      "from": "admin[A-Z0-9]{3}"
    },
    {
      "name": "ADMIN_PASSWORD",
      "description": "administrator password",
      "generate": "expression",
      "from": "[a-zA-Z0-9]{8}"
    },
    {
      "name": "MYSQL_USER",
      "description": "database username",
      "generate": "expression",
      "from": "user[A-Z0-9]{3}",
      "required": true
    },
    {
      "name": "MYSQL_PASSWORD",
      "description": "database password",
      "generate": "expression",
      "from": "[a-zA-Z0-9]{8}",
      "required": true
    },
    {
      "name": "MYSQL_DATABASE",
      "description": "database name",
      "value": "root",
      "required": true
    }
  ],
  "labels": {
    "template": "application-template-stibuild"
  }
}
`)

func testExtendedTestdataCmdTestCmdTestdataNewAppTemplateWithoutAppLabelJsonBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataNewAppTemplateWithoutAppLabelJson, nil
}

func testExtendedTestdataCmdTestCmdTestdataNewAppTemplateWithoutAppLabelJson() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataNewAppTemplateWithoutAppLabelJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/new-app/template-without-app-label.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataNewAppTemplate_multiple_resource_gvsYaml = []byte(`apiVersion: template.openshift.io/v1
kind: Template
metadata:
  name: prometheus-test
  annotations:
    "openshift.io/display-name": Prometheus
    description: |
      Creates two resources that are part of different groups with no overlapping groupversions.
      Used to test `+"`"+`new-app`+"`"+` versioned output when dealing with lists of varying objects.
    iconClass: icon-cogs
    tags: "monitoring,prometheus, alertmanager,time-series"
parameters:
- description: The namespace to instantiate prometheus under. Defaults to 'kube-system'.
  name: NAMESPACE
  value: kube-system
- description: The location of the proxy image
  name: IMAGE_PROXY
  value: openshift/oauth-proxy:v1.0.0
- description: The location of the prometheus image
  name: IMAGE_PROMETHEUS
  value: openshift/prometheus:v2.0.0-dev
- description: The location of the alertmanager image
  name: IMAGE_ALERTMANAGER
  # TODO: Change to official openshift build
  value: openshift/prometheus-alertmanager:dev
- description: The location of alert-buffer image
  name: IMAGE_ALERT_BUFFER
  # TODO: change to official openshift build
  value: ilackarms/message-buffer
- description: The session secret for the proxy
  name: SESSION_SECRET
  generate: expression
  from: "[a-zA-Z0-9]{43}"
objects:
- apiVersion: v1
  kind: Secret
  metadata:
    name: prometheus-proxy
    namespace: "${NAMESPACE}"
  stringData:
    session_secret: "${SESSION_SECRET}="
- apiVersion: apps/v1
  kind: Deployment
  metadata:
    labels:
      app: prometheus
    name: prometheus
    namespace: "${NAMESPACE}"
  spec:
    replicas: 1
    selector:
      matchLabels:
        app: prometheus
    template:
      metadata:
        labels:
          app: prometheus
        name: prometheus
      spec:
        serviceAccountName: prometheus
        containers:
        # Deploy Prometheus behind an oauth proxy
        - name: prom-proxy
          image: ${IMAGE_PROXY}
          imagePullPolicy: IfNotPresent
          ports:
          - containerPort: 8443
            name: web
          args:
          - -provider=openshift
          - -https-address=:8443
          - -email-domain=*
          - -upstream=http://localhost:9090
          - -client-id=system:serviceaccount:${NAMESPACE}:prometheus
          - '-openshift-sar={"resource": "namespaces", "verb": "get", "resourceName": "${NAMESPACE}", "namespace": "${NAMESPACE}"}'
          - '-openshift-delegate-urls={"/": {"resource": "namespaces", "verb": "get", "resourceName": "${NAMESPACE}", "namespace": "${NAMESPACE}"}}'
          - -tls-cert=/etc/tls/private/tls.crt
          - -tls-key=/etc/tls/private/tls.key
          - -client-secret-file=/var/run/secrets/kubernetes.io/serviceaccount/token
          - -cookie-secret-file=/etc/proxy/secrets/session_secret
          - -skip-auth-regex=^/metrics
          volumeMounts:
          - mountPath: /etc/tls/private
            name: prometheus-tls
          - mountPath: /etc/proxy/secrets
            name: prometheus-secrets
          - mountPath: /prometheus
            name: prometheus-data

        - name: prometheus
          args:
          - --storage.tsdb.retention=6h
          - --config.file=/etc/prometheus/prometheus.yml
          - --web.listen-address=localhost:9090
          image: ${IMAGE_PROMETHEUS}
          imagePullPolicy: IfNotPresent
          volumeMounts:
          - mountPath: /etc/prometheus
            name: prometheus-config
          - mountPath: /prometheus
            name: prometheus-data

        # Deploy alertmanager behind prometheus-alert-buffer behind an oauth proxy
        # use http port=4190 and https port=9943 to differ from prom-proxy
        - name: alerts-proxy
          image: ${IMAGE_PROXY}
          imagePullPolicy: IfNotPresent
          ports:
          - containerPort: 9443
            name: web
          args:
          - -provider=openshift
          - -https-address=:9443
          - -http-address=:4190
          - -email-domain=*
          - -upstream=http://localhost:9099
          - -client-id=system:serviceaccount:${NAMESPACE}:prometheus
          - '-openshift-sar={"resource": "namespaces", "verb": "get", "name": "${NAMESPACE}"}'
          - '-openshift-delegate-urls={"/": {"resource": "namespaces", "verb": "get", "name": "${NAMESPACE}"}}'
          - -tls-cert=/etc/tls/private/tls.crt
          - -tls-key=/etc/tls/private/tls.key
          - -client-secret-file=/var/run/secrets/kubernetes.io/serviceaccount/token
          - -cookie-secret-file=/etc/proxy/secrets/session_secret
          volumeMounts:
          - mountPath: /etc/tls/private
            name: alerts-tls
          - mountPath: /etc/proxy/secrets
            name: alerts-secrets

        - name: alert-buffer
          args:
          - --storage-path=/alert-buffer/messages.db
          image: ${IMAGE_ALERT_BUFFER}
          imagePullPolicy: IfNotPresent
          volumeMounts:
          - mountPath: /alert-buffer
            name: alert-buffer-data
          ports:
          - containerPort: 9099
            name: alert-buf

        - name: alertmanager
          args:
          - -config.file=/etc/alertmanager/alertmanager.yml
          image: ${IMAGE_ALERTMANAGER}
          imagePullPolicy: IfNotPresent
          ports:
          - containerPort: 9093
            name: web
          volumeMounts:
          - mountPath: /etc/alertmanager
            name: alertmanager-config
          - mountPath: /alertmanager
            name: alertmanager-data

        restartPolicy: Always
        volumes:
        - name: prometheus-config
          configMap:
            defaultMode: 420
            name: prometheus
        - name: prometheus-secrets
          secret:
            secretName: prometheus-proxy
        - name: prometheus-tls
          secret:
            secretName: prometheus-tls
        - name: prometheus-data
          emptyDir: {}
        - name: alertmanager-config
          configMap:
            defaultMode: 420
            name: prometheus-alerts
        - name: alerts-secrets
          secret:
            secretName: alerts-proxy
        - name: alerts-tls
          secret:
            secretName: prometheus-alerts-tls
        - name: alertmanager-data
          emptyDir: {}
        - name: alert-buffer-data #TODO: make persistent
          emptyDir: {}

`)

func testExtendedTestdataCmdTestCmdTestdataNewAppTemplate_multiple_resource_gvsYamlBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataNewAppTemplate_multiple_resource_gvsYaml, nil
}

func testExtendedTestdataCmdTestCmdTestdataNewAppTemplate_multiple_resource_gvsYaml() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataNewAppTemplate_multiple_resource_gvsYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/new-app/template_multiple_resource_gvs.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataNewAppTestCmdNewappEnvEnv = []byte(`SOME_VAR=envvarfromfile
`)

func testExtendedTestdataCmdTestCmdTestdataNewAppTestCmdNewappEnvEnvBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataNewAppTestCmdNewappEnvEnv, nil
}

func testExtendedTestdataCmdTestCmdTestdataNewAppTestCmdNewappEnvEnv() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataNewAppTestCmdNewappEnvEnvBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/new-app/test-cmd-newapp-env.env", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataNewAppTestCmdNewappParamsEnv = []byte(`MYSQL_USER='mysql'
MYSQL_DATABASE="thisisadatabase"
`)

func testExtendedTestdataCmdTestCmdTestdataNewAppTestCmdNewappParamsEnvBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataNewAppTestCmdNewappParamsEnv, nil
}

func testExtendedTestdataCmdTestCmdTestdataNewAppTestCmdNewappParamsEnv() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataNewAppTestCmdNewappParamsEnvBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/new-app/test-cmd-newapp-params.env", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataOauthaccesstokenYaml = []byte(`apiVersion: v1
clientName: openshift-challenging-client
expiresIn: 15552000
kind: OAuthAccessToken
metadata:
  name: DYGZDLucARCPIfUeKPhsgPfn0WBLR_9KdeREH0c9iod
redirectURI: https://localhost:8443/oauth/token/implicit
userName: test
userUID: 322b236b-22b9-11e6-b307-080027242396
scopes:
  - user:info
`)

func testExtendedTestdataCmdTestCmdTestdataOauthaccesstokenYamlBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataOauthaccesstokenYaml, nil
}

func testExtendedTestdataCmdTestCmdTestdataOauthaccesstokenYaml() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataOauthaccesstokenYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/oauthaccesstoken.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataOldTemplateJson = []byte(`{
    "kind": "Template",
    "apiVersion": "v1",
    "metadata": {
        "annotations": {
            "iconClass": "icon-jboss",
            "description": "Application template for EAP 6 applications built using S2I.",
            "tags": "eap,javaee,java,jboss,xpaas",
            "version": "1.3.2"
        },
        "name": "eap64-basic-s2i"
    },
    "labels": {
        "template": "eap64-basic-s2i",
        "xpaas": "1.3.2"
    },
    "parameters": [
        {
            "description": "The name for the application.",
            "name": "APPLICATION_NAME",
            "value": "eap-app",
            "required": true
        },
        {
            "description": "Custom hostname for http service route.  Leave blank for default hostname, e.g.: <application-name>-<project>.<default-domain-suffix>",
            "name": "HOSTNAME_HTTP",
            "value": "",
            "required": false
        },
        {
            "description": "Git source URI for application",
            "name": "SOURCE_REPOSITORY_URL",
            "value": "https://github.com/jboss-developer/jboss-eap-quickstarts",
            "required": true
        },
        {
            "description": "Git branch/tag reference",
            "name": "SOURCE_REPOSITORY_REF",
            "value": "6.4.x",
            "required": false
        },
        {
            "description": "Path within Git project to build; empty for root project directory.",
            "name": "CONTEXT_DIR",
            "value": "kitchensink",
            "required": false
        },
        {
            "description": "Queue names",
            "name": "HORNETQ_QUEUES",
            "value": "",
            "required": false
        },
        {
            "description": "Topic names",
            "name": "HORNETQ_TOPICS",
            "value": "",
            "required": false
        },
        {
            "description": "HornetQ cluster admin password",
            "name": "HORNETQ_CLUSTER_PASSWORD",
            "from": "[a-zA-Z0-9]{8}",
            "generate": "expression",
            "required": true
        },
        {
            "description": "GitHub trigger secret",
            "name": "GITHUB_WEBHOOK_SECRET",
            "from": "[a-zA-Z0-9]{8}",
            "generate": "expression",
            "required": true
        },
        {
            "description": "Generic build trigger secret",
            "name": "GENERIC_WEBHOOK_SECRET",
            "from": "[a-zA-Z0-9]{8}",
            "generate": "expression",
            "required": true
        },
        {
            "description": "Namespace in which the ImageStreams for Red Hat Middleware images are installed. These ImageStreams are normally installed in the openshift namespace. You should only need to modify this if you've installed the ImageStreams in a different namespace/project.",
            "name": "IMAGE_STREAM_NAMESPACE",
            "value": "openshift",
            "required": true
        },
        {
            "description": "JGroups cluster password",
            "name": "JGROUPS_CLUSTER_PASSWORD",
            "from": "[a-zA-Z0-9]{8}",
            "generate": "expression",
            "required": true
        },
        {
            "description": "Controls whether exploded deployment content should be automatically deployed",
            "name": "AUTO_DEPLOY_EXPLODED",
            "value": "false",
            "required": false
        }
    ],
    "objects": [
        {
            "kind": "Service",
            "apiVersion": "v1",
            "spec": {
                "ports": [
                    {
                        "port": 8080,
                        "targetPort": 8080
                    }
                ],
                "selector": {
                    "deploymentConfig": "${APPLICATION_NAME}"
                }
            },
            "metadata": {
                "name": "${APPLICATION_NAME}",
                "labels": {
                    "application": "${APPLICATION_NAME}"
                },
                "annotations": {
                    "description": "The web server's http port."
                }
            }
        },
        {
            "kind": "Route",
            "apiVersion": "v1",
            "id": "${APPLICATION_NAME}-http",
            "metadata": {
                "name": "${APPLICATION_NAME}",
                "labels": {
                    "application": "${APPLICATION_NAME}"
                },
                "annotations": {
                    "description": "Route for application's http service."
                }
            },
            "spec": {
                "host": "${HOSTNAME_HTTP}",
                "to": {
                    "name": "${APPLICATION_NAME}"
                }
            }
        },
        {
            "kind": "ImageStream",
            "apiVersion": "v1",
            "metadata": {
                "name": "${APPLICATION_NAME}",
                "labels": {
                    "application": "${APPLICATION_NAME}"
                }
            }
        },
        {
            "kind": "BuildConfig",
            "apiVersion": "v1",
            "metadata": {
                "name": "${APPLICATION_NAME}",
                "labels": {
                    "application": "${APPLICATION_NAME}"
                }
            },
            "spec": {
                "source": {
                    "type": "Git",
                    "git": {
                        "uri": "${SOURCE_REPOSITORY_URL}",
                        "ref": "${SOURCE_REPOSITORY_REF}"
                    },
                    "contextDir": "${CONTEXT_DIR}"
                },
                "strategy": {
                    "type": "Source",
                    "sourceStrategy": {
                        "forcePull": true,
                        "from": {
                            "kind": "ImageStreamTag",
                            "namespace": "${IMAGE_STREAM_NAMESPACE}",
                            "name": "jboss-eap64-openshift:1.4"
                        }
                    }
                },
                "output": {
                    "to": {
                        "kind": "ImageStreamTag",
                        "name": "${APPLICATION_NAME}:latest"
                    }
                },
                "triggers": [
                    {
                        "type": "GitHub",
                        "github": {
                            "secret": "${GITHUB_WEBHOOK_SECRET}"
                        }
                    },
                    {
                        "type": "Generic",
                        "generic": {
                            "secret": "${GENERIC_WEBHOOK_SECRET}"
                        }
                    },
                    {
                        "type": "ImageChange",
                        "imageChange": {}
                    },
                    {
                        "type": "ConfigChange"
                    }
                ]
            }
        },
        {
            "kind": "DeploymentConfig",
            "apiVersion": "v1",
            "metadata": {
                "name": "${APPLICATION_NAME}",
                "labels": {
                    "application": "${APPLICATION_NAME}"
                }
            },
            "spec": {
                "strategy": {
                    "type": "Recreate"
                },
                "triggers": [
                    {
                        "type": "ImageChange",
                        "imageChangeParams": {
                            "automatic": true,
                            "containerNames": [
                                "${APPLICATION_NAME}"
                            ],
                            "from": {
                                "kind": "ImageStream",
                                "name": "${APPLICATION_NAME}"
                            }
                        }
                    },
                    {
                        "type": "ConfigChange"
                    }
                ],
                "replicas": 1,
                "selector": {
                    "deploymentConfig": "${APPLICATION_NAME}"
                },
                "template": {
                    "metadata": {
                        "name": "${APPLICATION_NAME}",
                        "labels": {
                            "deploymentConfig": "${APPLICATION_NAME}",
                            "application": "${APPLICATION_NAME}"
                        }
                    },
                    "spec": {
                        "terminationGracePeriodSeconds": 60,
                        "containers": [
                            {
                                "name": "${APPLICATION_NAME}",
                                "image": "${APPLICATION_NAME}",
                                "imagePullPolicy": "Always",
                                "livenessProbe": {
                                    "exec": {
                                        "command": [
                                            "/bin/bash",
                                            "-c",
                                            "/opt/eap/bin/livenessProbe.sh"
                                        ]
                                    }
                                },
                                "readinessProbe": {
                                    "exec": {
                                        "command": [
                                            "/bin/bash",
                                            "-c",
                                            "/opt/eap/bin/readinessProbe.sh"
                                        ]
                                    }
                                },
                                "ports": [
                                    {
                                        "name": "jolokia",
                                        "containerPort": 8778,
                                        "protocol": "TCP"
                                    },
                                    {
                                        "name": "http",
                                        "containerPort": 8080,
                                        "protocol": "TCP"
                                    },
                                    {
                                        "name": "ping",
                                        "containerPort": 8888,
                                        "protocol": "TCP"
                                    }
                                ],
                                "env": [
                                    {
                                        "name": "OPENSHIFT_KUBE_PING_LABELS",
                                        "value": "application=${APPLICATION_NAME}"
                                    },
                                    {
                                        "name": "OPENSHIFT_KUBE_PING_NAMESPACE",
                                        "valueFrom": {
                                            "fieldRef": {
                                                "fieldPath": "metadata.namespace"
                                            }
                                        }
                                    },
                                    {
                                        "name": "HORNETQ_CLUSTER_PASSWORD",
                                        "value": "${HORNETQ_CLUSTER_PASSWORD}"
                                    },
                                    {
                                        "name": "HORNETQ_QUEUES",
                                        "value": "${HORNETQ_QUEUES}"
                                    },
                                    {
                                        "name": "HORNETQ_TOPICS",
                                        "value": "${HORNETQ_TOPICS}"
                                    },
                                    {
                                        "name": "JGROUPS_CLUSTER_PASSWORD",
                                        "value": "${JGROUPS_CLUSTER_PASSWORD}"
                                    },
                                    {
                                        "name": "AUTO_DEPLOY_EXPLODED",
                                        "value": "${AUTO_DEPLOY_EXPLODED}"
                                    }
                                ]
                            }
                        ]
                    }
                }
            }
        }
    ]
}
`)

func testExtendedTestdataCmdTestCmdTestdataOldTemplateJsonBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataOldTemplateJson, nil
}

func testExtendedTestdataCmdTestCmdTestdataOldTemplateJson() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataOldTemplateJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/old-template.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataResourceBuilderDirectoryJsonNoExtensionInDirectory = []byte(`{"kind":"Secret","apiVersion":"v1","metadata":{"name":"json-no-extension-in-directory"}}`)

func testExtendedTestdataCmdTestCmdTestdataResourceBuilderDirectoryJsonNoExtensionInDirectoryBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataResourceBuilderDirectoryJsonNoExtensionInDirectory, nil
}

func testExtendedTestdataCmdTestCmdTestdataResourceBuilderDirectoryJsonNoExtensionInDirectory() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataResourceBuilderDirectoryJsonNoExtensionInDirectoryBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/resource-builder/directory/json-no-extension-in-directory", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataResourceBuilderDirectoryJsonWithExtensionJson = []byte(`{"kind":"Secret","apiVersion":"v1","metadata":{"name":"json-with-extension"}}`)

func testExtendedTestdataCmdTestCmdTestdataResourceBuilderDirectoryJsonWithExtensionJsonBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataResourceBuilderDirectoryJsonWithExtensionJson, nil
}

func testExtendedTestdataCmdTestCmdTestdataResourceBuilderDirectoryJsonWithExtensionJson() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataResourceBuilderDirectoryJsonWithExtensionJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/resource-builder/directory/json-with-extension.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataResourceBuilderDirectoryNonApiFile = []byte(`non-api file content`)

func testExtendedTestdataCmdTestCmdTestdataResourceBuilderDirectoryNonApiFileBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataResourceBuilderDirectoryNonApiFile, nil
}

func testExtendedTestdataCmdTestCmdTestdataResourceBuilderDirectoryNonApiFile() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataResourceBuilderDirectoryNonApiFileBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/resource-builder/directory/non-api-file", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataResourceBuilderDirectoryYmlWithExtensionYml = []byte(`apiVersion: v1
kind: Secret
metadata:
  name: yml-with-extension
`)

func testExtendedTestdataCmdTestCmdTestdataResourceBuilderDirectoryYmlWithExtensionYmlBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataResourceBuilderDirectoryYmlWithExtensionYml, nil
}

func testExtendedTestdataCmdTestCmdTestdataResourceBuilderDirectoryYmlWithExtensionYml() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataResourceBuilderDirectoryYmlWithExtensionYmlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/resource-builder/directory/yml-with-extension.yml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataResourceBuilderJsonNoExtension = []byte(`{"kind":"Secret","apiVersion":"v1","metadata":{"name":"json-no-extension"}}`)

func testExtendedTestdataCmdTestCmdTestdataResourceBuilderJsonNoExtensionBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataResourceBuilderJsonNoExtension, nil
}

func testExtendedTestdataCmdTestCmdTestdataResourceBuilderJsonNoExtension() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataResourceBuilderJsonNoExtensionBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/resource-builder/json-no-extension", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataResourceBuilderYmlNoExtension = []byte(`apiVersion: v1
kind: Secret
metadata:
  name: yml-no-extension
`)

func testExtendedTestdataCmdTestCmdTestdataResourceBuilderYmlNoExtensionBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataResourceBuilderYmlNoExtension, nil
}

func testExtendedTestdataCmdTestCmdTestdataResourceBuilderYmlNoExtension() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataResourceBuilderYmlNoExtensionBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/resource-builder/yml-no-extension", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataRolesEmptyRoleYaml = []byte(`apiVersion: v1
kind: Role
metadata:
  name: empty-role
`)

func testExtendedTestdataCmdTestCmdTestdataRolesEmptyRoleYamlBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataRolesEmptyRoleYaml, nil
}

func testExtendedTestdataCmdTestCmdTestdataRolesEmptyRoleYaml() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataRolesEmptyRoleYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/roles/empty-role.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataRolesPolicyClusterrolesYaml = []byte(`apiVersion: v1
items:
- apiVersion: v1
  kind: ClusterRole
  metadata:
    creationTimestamp: null
    name: basic-user2
  rules:
  - apiGroups: null
    attributeRestrictions: null
    resourceNames:
    - "~"
    resources:
    - users
    verbs:
    - get
  - apiGroups: null
    attributeRestrictions: null
    resources:
    - projectrequests
    verbs:
    - list
  - apiGroups: null
    attributeRestrictions: null
    resources:
    - clusterroles
    verbs:
    - get
    - list
  - apiGroups: null
    attributeRestrictions: null
    resources:
    - projects
    verbs:
    - list
  - apiGroups:
    - authorization.k8s.io
    attributeRestrictions: null
    resources:
    - selfsubjectaccessreviews
    verbs:
    - create
- apiVersion: v1
  groupNames:
  - system:authenticated
  kind: ClusterRoleBinding
  metadata:
    creationTimestamp: null
    name: basic-users2
  roleRef:
    name: basic-user2
  subjects:
  - kind: SystemGroup
    name: system:authenticated
  userNames: null
kind: List
metadata: {}
`)

func testExtendedTestdataCmdTestCmdTestdataRolesPolicyClusterrolesYamlBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataRolesPolicyClusterrolesYaml, nil
}

func testExtendedTestdataCmdTestCmdTestdataRolesPolicyClusterrolesYaml() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataRolesPolicyClusterrolesYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/roles/policy-clusterroles.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataRolesPolicyRolesYaml = []byte(`kind: Template
apiVersion: v1
metadata:
  name: "policy-roles-template"
labels:
  createdBy: "policy-roles-template"
parameters:
  - description: "The namespace to create roles in."
    name: NAMESPACE
    required: true
objects:
  - apiVersion: v1
    kind: Role
    metadata:
      creationTimestamp: null
      name: basic-user
    rules:
    - apiGroups: null
      attributeRestrictions: null
      resourceNames:
      - "~"
      resources:
      - users
      verbs:
      - get
    - apiGroups: null
      attributeRestrictions: null
      resources:
      - projectrequests
      verbs:
      - list
    - apiGroups: null
      attributeRestrictions: null
      resources:
      - clusterroles
      verbs:
      - get
      - list
    - apiGroups: null
      attributeRestrictions: null
      resources:
      - projects
      verbs:
      - list
    - apiGroups:
      - authorization.k8s.io
      attributeRestrictions: null
      resources:
      - selfsubjectaccessreviews
      verbs:
      - create
  - apiVersion: v1
    groupNames:
    - system:authenticated
    kind: RoleBinding
    metadata:
      creationTimestamp: null
      name: basic-users
    roleRef:
      name: basic-user
      namespace: ${NAMESPACE}
    subjects:
    - kind: SystemGroup
      name: system:authenticated
    userNames: null
`)

func testExtendedTestdataCmdTestCmdTestdataRolesPolicyRolesYamlBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataRolesPolicyRolesYaml, nil
}

func testExtendedTestdataCmdTestCmdTestdataRolesPolicyRolesYaml() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataRolesPolicyRolesYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/roles/policy-roles.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataRollingupdateDaemonsetYaml = []byte(`apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: bind
spec:
  selector:
    matchLabels:
      service: bind
  updateStrategy:
    type: RollingUpdate
    rollingUpdate:
      maxUnavailable: 10%
  template:
    metadata:
      labels:
        service: bind
    spec:
      affinity:
        podAntiAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            - labelSelector:
                matchExpressions:
                - key: "service"
                  operator: "In"
                  values: ["bind"]
              topologyKey: "kubernetes.io/hostname"
              namespaces: []
      containers:
      - name: kubernetes-pause
        image: gcr.io/google-containers/pause:2.0
`)

func testExtendedTestdataCmdTestCmdTestdataRollingupdateDaemonsetYamlBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataRollingupdateDaemonsetYaml, nil
}

func testExtendedTestdataCmdTestCmdTestdataRollingupdateDaemonsetYaml() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataRollingupdateDaemonsetYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/rollingupdate-daemonset.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataServicesYaml = []byte(`kind: List
apiVersion: v1
items:
- kind: Service
  apiVersion: v1
  metadata:
    name: clusterip
  spec:
    ports:
    - name: http
      protocol: TCP
      port: 80
- kind: Endpoints
  apiVersion: v1
  metadata:
    name: clusterip
    annotations:
      "endpoints.beta.kubernetes.io/hostnames-map": '{"10.1.2.4":{"HostName": "test2"}}'
  subsets:
  - addresses:
    - ip: 10.1.2.3
    - ip: 10.1.2.4
    ports:
    - name: http
      protocol: TCP
      port: 80
- kind: Service
  apiVersion: v1
  metadata:
    name: headless
  spec:
    clusterIP: None
    ports:
    - name: http
      protocol: TCP
      port: 80
- kind: Endpoints
  apiVersion: v1
  metadata:
    name: headless
  subsets:
  - addresses:
    - ip: 10.1.2.3
    - ip: 10.1.2.4
      hostname: test2
    ports:
    - name: http
      protocol: TCP
      port: 80`)

func testExtendedTestdataCmdTestCmdTestdataServicesYamlBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataServicesYaml, nil
}

func testExtendedTestdataCmdTestCmdTestdataServicesYaml() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataServicesYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/services.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataSimpleDeploymentYaml = []byte(`apiVersion: apps.openshift.io/v1
kind: DeploymentConfig
metadata:
  name: simple-deployment
spec:
  replicas: 1
  selector:
    name: simple-deployment
  strategy:
    type: Rolling
    rollingParams:
  template:
    metadata:
      labels:
        name: simple-deployment
    spec:
      containers:
      - image: "docker.io/openshift/deployment-example:v1"
        imagePullPolicy: IfNotPresent
        name: myapp
        readinessProbe:
          httpGet:
            path: /
            port: 8080
            scheme: HTTP
  triggers:
  - type: ConfigChange
`)

func testExtendedTestdataCmdTestCmdTestdataSimpleDeploymentYamlBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataSimpleDeploymentYaml, nil
}

func testExtendedTestdataCmdTestCmdTestdataSimpleDeploymentYaml() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataSimpleDeploymentYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/simple-deployment.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataStableBusyboxYaml = []byte(`kind: List
apiVersion: v1
metadata: {}
items:
  - apiVersion: v1
    dockerImageConfig: '{"architecture":"amd64","config":{"Hostname":"55cd1f8f6e5b","Domainname":"","User":"","AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"Tty":false,"OpenStdin":false,"StdinOnce":false,"Env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"],"Cmd":["sh"],"Image":"sha256:e732471cb81a564575aad46b9510161c5945deaf18e9be3db344333d72f0b4b2","Volumes":null,"WorkingDir":"","Entrypoint":null,"OnBuild":null,"Labels":{}},"container":"764ef4448baa9a1ce19e4ae95f8cdd4eda7a1186c512773e56dc634dff208a59","container_config":{"Hostname":"55cd1f8f6e5b","Domainname":"","User":"","AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"Tty":false,"OpenStdin":false,"StdinOnce":false,"Env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"],"Cmd":["/bin/sh","-c","#(nop)
      CMD [\"sh\"]"],"Image":"sha256:e732471cb81a564575aad46b9510161c5945deaf18e9be3db344333d72f0b4b2","Volumes":null,"WorkingDir":"","Entrypoint":null,"OnBuild":null,"Labels":{}},"created":"2016-06-23T23:23:37.198943461Z","docker_version":"1.10.3","history":[{"created":"2016-06-23T23:23:36.73131105Z","created_by":"/bin/sh
      -c #(nop) ADD file:9ca60502d646bdd815bb51e612c458e2d447b597b95cf435f9673f0966d41c1a
      in /"},{"created":"2016-06-23T23:23:37.198943461Z","created_by":"/bin/sh -c #(nop)
      CMD [\"sh\"]","empty_layer":true}],"os":"linux","rootfs":{"type":"layers","diff_ids":["sha256:8ac8bfaff55af948c796026ee867448c5b5b5d9dd3549f4006d9759b25d4a893"]}}'
    dockerImageLayers:
    - mediaType: application/vnd.docker.image.rootfs.diff.tar.gzip
      name: sha256:8ddc19f16526912237dd8af81971d5e4dd0587907234be2b83e249518d5b673f
      size: 667590
    dockerImageManifest: |-
      {
         "schemaVersion": 2,
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "config": {
            "mediaType": "application/octet-stream",
            "size": 1459,
            "digest": "sha256:2b8fd9751c4c0f5dd266fcae00707e67a2545ef34f9a29354585f93dac906749"
         },
         "layers": [
            {
               "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
               "size": 667590,
               "digest": "sha256:8ddc19f16526912237dd8af81971d5e4dd0587907234be2b83e249518d5b673f"
            }
         ]
      }
    dockerImageManifestMediaType: application/vnd.docker.distribution.manifest.v2+json
    dockerImageMetadata:
      Architecture: amd64
      Config:
        Cmd:
        - sh
        Env:
        - PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
        Hostname: 55cd1f8f6e5b
        Image: sha256:e732471cb81a564575aad46b9510161c5945deaf18e9be3db344333d72f0b4b2
      Container: 764ef4448baa9a1ce19e4ae95f8cdd4eda7a1186c512773e56dc634dff208a59
      ContainerConfig:
        Cmd:
        - /bin/sh
        - -c
        - '#(nop) CMD ["sh"]'
        Env:
        - PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
        Hostname: 55cd1f8f6e5b
        Image: sha256:e732471cb81a564575aad46b9510161c5945deaf18e9be3db344333d72f0b4b2
      Created: 2016-06-23T23:23:37Z
      DockerVersion: 1.10.3
      Id: sha256:2b8fd9751c4c0f5dd266fcae00707e67a2545ef34f9a29354585f93dac906749
      Size: 669049
      apiVersion: "1.0"
      kind: DockerImage
    dockerImageMetadataVersion: "1.0"
    dockerImageReference: busybox@sha256:a59906e33509d14c036c8678d687bd4eec81ed7c4b8ce907b888c607f6a1e0e6
    kind: Image
    metadata:
      creationTimestamp: 2016-07-27T15:12:10Z
      name: sha256:a59906e33509d14c036c8678d687bd4eec81ed7c4b8ce907b888c607f6a1e0e6
      resourceVersion: "504"
      selfLink: /oapi/v1/images/sha256:a59906e33509d14c036c8678d687bd4eec81ed7c4b8ce907b888c607f6a1e0e6
      uid: 7d6849b4-540c-11e6-809f-525400f25e34
  - apiVersion: v1
    kind: ImageStream
    metadata:
      annotations:
        openshift.io/image.dockerRepositoryCheck: 2016-07-27T16:08:39Z
      generation: 1
      name: busybox
      namespace: default
      resourceVersion: "505"
      selfLink: /oapi/v1/namespaces/default/imagestreams/busybox
      uid: 7d687e72-540c-11e6-809f-525400f25e34
  - apiVersion: v1
    kind: ImageStreamMapping
    metadata:
      name: busybox
      namespace: default
    tag: latest
    image:
      apiVersion: v1
      kind: Image
      metadata:
        name: sha256:a59906e33509d14c036c8678d687bd4eec81ed7c4b8ce907b888c607f6a1e0e6
      dockerImageReference: busybox@sha256:a59906e33509d14c036c8678d687bd4eec81ed7c4b8ce907b888c607f6a1e0e6
`)

func testExtendedTestdataCmdTestCmdTestdataStableBusyboxYamlBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataStableBusyboxYaml, nil
}

func testExtendedTestdataCmdTestCmdTestdataStableBusyboxYaml() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataStableBusyboxYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/stable-busybox.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataStatefulsetYaml = []byte(`apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: testapp
spec:
  selector:
    matchLabels:
      app: testapp
  replicas: 1
  template:
    metadata:
      labels:
        app: testapp
    spec:
      containers:
      - name: testapp
        image: centos/ruby-25-centos7:latest
        command:
        - /bin/sleep
        args:
        - infinity
`)

func testExtendedTestdataCmdTestCmdTestdataStatefulsetYamlBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataStatefulsetYaml, nil
}

func testExtendedTestdataCmdTestCmdTestdataStatefulsetYaml() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataStatefulsetYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/statefulset.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataTemplateinstance_objectkindsYaml = []byte(`kind: List
apiVersion: v1
items:
- kind: Secret
  apiVersion: v1
  metadata:
    name: configsecret
  stringData:
    NAME: template
- kind: TemplateInstance
  apiVersion: template.openshift.io/v1
  metadata:
    name: templateinstance
  spec:
    template:
      kind: Template
      apiVersion: v1
      metadata:
        name: template
      objects:
      - kind: Secret
        apiVersion: v1
        metadata:
          name: secret
          labels:
            foo: bar
      - kind: Deployment
        apiVersion: apps/v1
        metadata:
          name: deployment
        spec:
          replicas: 0
          selector:
            matchLabels:
              key: value
          template:
            metadata:
              labels:
                key: value
            spec:
              containers:
              - name: hello-openshift
                image: openshift/hello-openshift
      - kind: Route
        apiVersion: v1
        metadata:
          name: route
        spec:
          to:
            name: foo
      - kind: Route
        apiVersion: route.openshift.io/v1
        metadata:
          name: newroute
        spec:
          to:
            name: foo
      parameters:
        - name: NAME
          value: ${NAME}
    secret:
      name: configsecret
`)

func testExtendedTestdataCmdTestCmdTestdataTemplateinstance_objectkindsYamlBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataTemplateinstance_objectkindsYaml, nil
}

func testExtendedTestdataCmdTestCmdTestdataTemplateinstance_objectkindsYaml() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataTemplateinstance_objectkindsYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/templateinstance_objectkinds.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataTemplatesBasicUsersBindingJson = []byte(`{
    "kind": "ClusterRoleBinding",
    "apiVersion": "v1",
    "metadata": {
        "name": "basic-users",
        "selfLink": "/oapi/v1/clusterrolebindings/basic-users",
        "uid": "8dcfc4cd-6917-11e5-8b72-3c970e4b7ffe",
        "resourceVersion": "42",
        "creationTimestamp": "2015-10-02T15:09:18Z",
        "labels": {
        	"custom-label":"value"
        },
        "annotations": {
        	"custom-annotation":"value"
        }
    },
    "subjects": [
        {
            "kind": "SystemGroup",
            "name": "system:authenticated"
        },
        {
            "kind": "User",
            "name": "custom-user"
        }
    ],
    "roleRef": {
        "name": "cluster-status"
    }
}
`)

func testExtendedTestdataCmdTestCmdTestdataTemplatesBasicUsersBindingJsonBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataTemplatesBasicUsersBindingJson, nil
}

func testExtendedTestdataCmdTestCmdTestdataTemplatesBasicUsersBindingJson() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataTemplatesBasicUsersBindingJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/templates/basic-users-binding.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataTemplatesGuestbookEnv = []byte(`ADMIN_USERNAME=root
ADMIN_PASSWORD="adminpass"
REDIS_PASSWORD='redispass'
`)

func testExtendedTestdataCmdTestCmdTestdataTemplatesGuestbookEnvBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataTemplatesGuestbookEnv, nil
}

func testExtendedTestdataCmdTestCmdTestdataTemplatesGuestbookEnv() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataTemplatesGuestbookEnvBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/templates/guestbook.env", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataTemplatesGuestbookJson = []byte(`{
  "kind": "Template",
  "apiVersion": "template.openshift.io/v1",
  "metadata": {
    "name": "guestbook-example",
    "creationTimestamp": null,
    "annotations": {
      "openshift.io/display-name": "Guestbook Example",
      "description": "Example shows how to build a simple multi-tier application using Kubernetes and Docker"
    }
  },
  "message": "Your admin credentials are ${ADMIN_USERNAME}:${ADMIN_PASSWORD}",
  "objects": [
    {
      "kind": "Route",
      "apiVersion": "v1",
      "metadata": {
        "name": "frontend-route",
        "creationTimestamp": null
      },
      "spec": {
        "host": "guestbook.example.com",
        "to": {
          "kind": "Service",
          "name": "frontend-service"
        }
      },
      "status": {}
    },
    {
      "kind": "Service",
      "apiVersion": "v1",
      "metadata": {
        "name": "frontend-service",
        "creationTimestamp": null
      },
      "spec": {
        "ports": [
          {
            "protocol": "TCP",
            "port": 5432,
            "targetPort": 5432,
            "nodePort": 0
          }
        ],
        "selector": {
          "name": "frontend-service"
        },
        "type": "ClusterIP",
        "sessionAffinity": "None"
      },
      "status": {
        "loadBalancer": {}
      }
    },
    {
      "kind": "Service",
      "apiVersion": "v1",
      "metadata": {
        "name": "redis-master",
        "creationTimestamp": null
      },
      "spec": {
        "ports": [
          {
            "protocol": "TCP",
            "port": 10000,
            "targetPort": 10000,
            "nodePort": 0
          }
        ],
        "selector": {
          "name": "redis-master"
        },
        "type": "ClusterIP",
        "sessionAffinity": "None"
      },
      "status": {
        "loadBalancer": {}
      }
    },
    {
      "kind": "Service",
      "apiVersion": "v1",
      "metadata": {
        "name": "${SLAVE_SERVICE_NAME}",
        "creationTimestamp": null
      },
      "spec": {
        "ports": [
          {
            "protocol": "TCP",
            "port": 10001,
            "targetPort": 10001,
            "nodePort": 0
          }
        ],
        "selector": {
          "name": "${SLAVE_SERVICE_NAME}"
        },
        "type": "ClusterIP",
        "sessionAffinity": "None"
      },
      "status": {
        "loadBalancer": {}
      }
    },
    {
      "kind": "Pod",
      "apiVersion": "v1",
      "metadata": {
        "name": "redis-master",
        "creationTimestamp": null,
        "labels": {
          "name": "redis-master"
        }
      },
      "spec": {
        "containers": [
          {
            "name": "master",
            "image": "dockerfile/redis",
            "ports": [
              {
                "containerPort": 6379,
                "protocol": "TCP"
              }
            ],
            "env": [
              {
                "name": "REDIS_PASSWORD",
                "value": "${REDIS_PASSWORD}"
              }
            ],
            "resources": {},
            "terminationMessagePath": "/dev/termination-log",
            "imagePullPolicy": "IfNotPresent",
            "securityContext": {
              "capabilities": {},
              "privileged": false
            }
          }
        ],
        "restartPolicy": "Always",
        "dnsPolicy": "ClusterFirst",
        "serviceAccount": ""
      },
      "status": {}
    },
    {
      "kind": "ReplicationController",
      "apiVersion": "v1",
      "metadata": {
        "name": "guestbook",
        "creationTimestamp": null,
        "labels": {
          "name": "frontend-service"
        }
      },
      "spec": {
        "replicas": 3,
        "selector": {
          "name": "frontend-service"
        },
        "template": {
          "metadata": {
            "creationTimestamp": null,
            "labels": {
              "name": "frontend-service"
            }
          },
          "spec": {
            "containers": [
              {
                "name": "php-redis",
                "image": "brendanburns/php-redis",
                "ports": [
                  {
                    "hostPort": 8000,
                    "containerPort": 80,
                    "protocol": "TCP"
                  }
                ],
                "env": [
                  {
                    "name": "ADMIN_USERNAME",
                    "value": "${ADMIN_USERNAME}"
                  },
                  {
                    "name": "ADMIN_PASSWORD",
                    "value": "${ADMIN_PASSWORD}"
                  },
                  {
                    "name": "REDIS_PASSWORD",
                    "value": "${REDIS_PASSWORD}"
                  }
                ],
                "resources": {},
                "terminationMessagePath": "/dev/termination-log",
                "imagePullPolicy": "IfNotPresent",
                "securityContext": {
                  "capabilities": {},
                  "privileged": false
                }
              }
            ],
            "restartPolicy": "Always",
            "dnsPolicy": "ClusterFirst",
            "serviceAccount": ""
          }
        }
      },
      "status": {
        "replicas": 0
      }
    },
    {
      "kind": "ReplicationController",
      "apiVersion": "v1",
      "metadata": {
        "name": "${SLAVE_SERVICE_NAME}",
        "creationTimestamp": null,
        "labels": {
          "name": "${SLAVE_SERVICE_NAME}"
        }
      },
      "spec": {
        "replicas": 2,
        "selector": {
          "name": "${SLAVE_SERVICE_NAME}"
        },
        "template": {
          "metadata": {
            "creationTimestamp": null,
            "labels": {
              "name": "${SLAVE_SERVICE_NAME}"
            }
          },
          "spec": {
            "containers": [
              {
                "name": "slave",
                "image": "brendanburns/${SLAVE_SERVICE_NAME}",
                "ports": [
                  {
                    "hostPort": 6380,
                    "containerPort": 6379,
                    "protocol": "TCP"
                  }
                ],
                "env": [
                  {
                    "name": "REDIS_PASSWORD",
                    "value": "${REDIS_PASSWORD}"
                  }
                ],
                "resources": {},
                "terminationMessagePath": "/dev/termination-log",
                "imagePullPolicy": "IfNotPresent",
                "securityContext": {
                  "capabilities": {},
                  "privileged": false
                }
              }
            ],
            "restartPolicy": "Always",
            "dnsPolicy": "ClusterFirst",
            "serviceAccount": ""
          }
        }
      },
      "status": {
        "replicas": 0
      }
    }
  ],
  "parameters": [
    {
      "name": "ADMIN_USERNAME",
      "description": "Guestbook administrator username",
      "generate": "expression",
      "from": "admin[A-Z0-9]{3}"
    },
    {
      "name": "ADMIN_PASSWORD",
      "description": "Guestbook administrator password",
      "generate": "expression",
      "from": "[a-zA-Z0-9]{8}"
    },
    {
      "name": "REDIS_PASSWORD",
      "description": "Redis password",
      "generate": "expression",
      "from": "[a-zA-Z0-9]{8}"
    },
    {
      "name": "SLAVE_SERVICE_NAME",
      "description": "Slave Service name",
      "value": "redis-slave"
    }
  ]
}
`)

func testExtendedTestdataCmdTestCmdTestdataTemplatesGuestbookJsonBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataTemplatesGuestbookJson, nil
}

func testExtendedTestdataCmdTestCmdTestdataTemplatesGuestbookJson() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataTemplatesGuestbookJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/templates/guestbook.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataTemplatesGuestbook_listJson = []byte(`{
    "kind": "Template",
    "apiVersion": "template.openshift.io/v1",
    "metadata": {
        "name": "guestbook-example",
        "creationTimestamp": null,
        "annotations": {
            "openshift.io/display-name": "Guestbook Example",
            "description": "Example shows how to build a simple multi-tier application using Kubernetes and Docker"
        }
    },
    "message": "Your admin credentials are adminQ3H:dwNJiJwW",
    "objects": [
        {
            "apiVersion": "route.openshift.io/v1",
            "kind": "Route",
            "metadata": {
                "creationTimestamp": null,
                "name": "frontend-route"
            },
            "spec": {
                "host": "guestbook.example.com",
                "to": {
                    "kind": "Service",
                    "name": "frontend-service"
                }
            },
            "status": {}
        },
        {
            "apiVersion": "v1",
            "kind": "Service",
            "metadata": {
                "creationTimestamp": null,
                "name": "frontend-service"
            },
            "spec": {
                "ports": [
                    {
                        "nodePort": 0,
                        "port": 5432,
                        "protocol": "TCP",
                        "targetPort": 5432
                    }
                ],
                "selector": {
                    "name": "frontend-service"
                },
                "sessionAffinity": "None",
                "type": "ClusterIP"
            },
            "status": {
                "loadBalancer": {}
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Service",
            "metadata": {
                "creationTimestamp": null,
                "name": "redis-master"
            },
            "spec": {
                "ports": [
                    {
                        "nodePort": 0,
                        "port": 10000,
                        "protocol": "TCP",
                        "targetPort": 10000
                    }
                ],
                "selector": {
                    "name": "redis-master"
                },
                "sessionAffinity": "None",
                "type": "ClusterIP"
            },
            "status": {
                "loadBalancer": {}
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Service",
            "metadata": {
                "creationTimestamp": null,
                "name": "redis-slave"
            },
            "spec": {
                "ports": [
                    {
                        "nodePort": 0,
                        "port": 10001,
                        "protocol": "TCP",
                        "targetPort": 10001
                    }
                ],
                "selector": {
                    "name": "redis-slave"
                },
                "sessionAffinity": "None",
                "type": "ClusterIP"
            },
            "status": {
                "loadBalancer": {}
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Pod",
            "metadata": {
                "creationTimestamp": null,
                "labels": {
                    "name": "redis-master"
                },
                "name": "redis-master"
            },
            "spec": {
                "containers": [
                    {
                        "capabilities": {},
                        "env": [
                            {
                                "name": "REDIS_PASSWORD",
                                "value": "P8vxbV4C"
                            }
                        ],
                        "image": "dockerfile/redis",
                        "imagePullPolicy": "IfNotPresent",
                        "name": "master",
                        "ports": [
                            {
                                "containerPort": 6379,
                                "protocol": "TCP"
                            }
                        ],
                        "resources": {},
                        "securityContext": {
                            "capabilities": {},
                            "privileged": false
                        },
                        "terminationMessagePath": "/dev/termination-log"
                    }
                ],
                "dnsPolicy": "ClusterFirst",
                "restartPolicy": "Always",
                "serviceAccount": ""
            },
            "status": {}
        },
        {
            "apiVersion": "v1",
            "kind": "ReplicationController",
            "metadata": {
                "creationTimestamp": null,
                "labels": {
                    "name": "frontend-service"
                },
                "name": "guestbook"
            },
            "spec": {
                "replicas": 3,
                "selector": {
                    "name": "frontend-service"
                },
                "template": {
                    "metadata": {
                        "creationTimestamp": null,
                        "labels": {
                            "name": "frontend-service"
                        }
                    },
                    "spec": {
                        "containers": [
                            {
                                "capabilities": {},
                                "env": [
                                    {
                                        "name": "ADMIN_USERNAME",
                                        "value": "adminQ3H"
                                    },
                                    {
                                        "name": "ADMIN_PASSWORD",
                                        "value": "dwNJiJwW"
                                    },
                                    {
                                        "name": "REDIS_PASSWORD",
                                        "value": "P8vxbV4C"
                                    }
                                ],
                                "image": "brendanburns/php-redis",
                                "imagePullPolicy": "IfNotPresent",
                                "name": "php-redis",
                                "ports": [
                                    {
                                        "containerPort": 80,
                                        "hostPort": 8000,
                                        "protocol": "TCP"
                                    }
                                ],
                                "resources": {},
                                "securityContext": {
                                    "capabilities": {},
                                    "privileged": false
                                },
                                "terminationMessagePath": "/dev/termination-log"
                            }
                        ],
                        "dnsPolicy": "ClusterFirst",
                        "restartPolicy": "Always",
                        "serviceAccount": ""
                    }
                }
            },
            "status": {
                "replicas": 0
            }
        },
        {
            "apiVersion": "v1",
            "kind": "ReplicationController",
            "metadata": {
                "creationTimestamp": null,
                "labels": {
                    "name": "redis-slave"
                },
                "name": "redis-slave"
            },
            "spec": {
                "replicas": 2,
                "selector": {
                    "name": "redis-slave"
                },
                "template": {
                    "metadata": {
                        "creationTimestamp": null,
                        "labels": {
                            "name": "redis-slave"
                        }
                    },
                    "spec": {
                        "containers": [
                            {
                                "capabilities": {},
                                "env": [
                                    {
                                        "name": "REDIS_PASSWORD",
                                        "value": "P8vxbV4C"
                                    }
                                ],
                                "image": "brendanburns/redis-slave",
                                "imagePullPolicy": "IfNotPresent",
                                "name": "slave",
                                "ports": [
                                    {
                                        "containerPort": 6379,
                                        "hostPort": 6380,
                                        "protocol": "TCP"
                                    }
                                ],
                                "resources": {},
                                "securityContext": {
                                    "capabilities": {},
                                    "privileged": false
                                },
                                "terminationMessagePath": "/dev/termination-log"
                            }
                        ],
                        "dnsPolicy": "ClusterFirst",
                        "restartPolicy": "Always",
                        "serviceAccount": ""
                    }
                }
            },
            "status": {
                "replicas": 0
            }
        }
    ],
    "parameters": [
        {
            "name": "ADMIN_USERNAME",
            "description": "Guestbook administrator username",
            "value": "adminQ3H",
            "generate": "expression",
            "from": "admin[A-Z0-9]{3}"
        },
        {
            "name": "ADMIN_PASSWORD",
            "description": "Guestbook administrator password",
            "value": "dwNJiJwW",
            "generate": "expression",
            "from": "[a-zA-Z0-9]{8}"
        },
        {
            "name": "REDIS_PASSWORD",
            "description": "Redis password",
            "value": "P8vxbV4C",
            "generate": "expression",
            "from": "[a-zA-Z0-9]{8}"
        },
        {
            "name": "SLAVE_SERVICE_NAME",
            "description": "Slave Service name",
            "value": "redis-slave"
        },
        {
            "name": "CUSTOM_PARAM1",
            "value": "1"
        }
    ]
}`)

func testExtendedTestdataCmdTestCmdTestdataTemplatesGuestbook_listJsonBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataTemplatesGuestbook_listJson, nil
}

func testExtendedTestdataCmdTestCmdTestdataTemplatesGuestbook_listJson() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataTemplatesGuestbook_listJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/templates/guestbook_list.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataTemplatesMultilineTxt = []byte(`Multiple
lines
also,with=commas.
`)

func testExtendedTestdataCmdTestCmdTestdataTemplatesMultilineTxtBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataTemplatesMultilineTxt, nil
}

func testExtendedTestdataCmdTestCmdTestdataTemplatesMultilineTxt() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataTemplatesMultilineTxtBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/templates/multiline.txt", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataTemplatesTemplateTypePrecisionJson = []byte(`{
    "kind": "Template",
    "apiVersion": "v1",
    "metadata": {
        "name": "template-type-precision",
        "annotations": {
            "description": "template to test type precision in template processing. Sets supplemental groups of 0, 1000030003, maxint32 and maxint64"
        }
    },
    "objects": [
        {
            "apiVersion": "v1",
            "kind": "Pod",
            "metadata": {
                "name": "template-type-precision"
            },
            "spec": {
              "containers": [
                {
                  "name": "test",
                  "image": "busybox",
                  "imagePullPolicy": "IfNotPresent"
                }
              ],
              "restartPolicy": "Never",
              "securityContext": {
                  "supplementalGroups": [
                      0,
                      1000030003,
                      2147483647
                  ]
              },
              "terminationGracePeriodSeconds": 9223372036854775807
            }
        }
    ]
}
`)

func testExtendedTestdataCmdTestCmdTestdataTemplatesTemplateTypePrecisionJsonBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataTemplatesTemplateTypePrecisionJson, nil
}

func testExtendedTestdataCmdTestCmdTestdataTemplatesTemplateTypePrecisionJson() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataTemplatesTemplateTypePrecisionJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/templates/template-type-precision.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataTemplatesTemplate_required_paramsEnv = []byte(`required_param="first\nsecond"
optional_param=foo
`)

func testExtendedTestdataCmdTestCmdTestdataTemplatesTemplate_required_paramsEnvBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataTemplatesTemplate_required_paramsEnv, nil
}

func testExtendedTestdataCmdTestCmdTestdataTemplatesTemplate_required_paramsEnv() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataTemplatesTemplate_required_paramsEnvBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/templates/template_required_params.env", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataTemplatesTemplate_required_paramsYaml = []byte(`kind: Template
apiVersion: v1
metadata:
  name: template
objects:
- kind: User
  apiVersion: v1
  metadata:
    name: ${required_param}
parameters:
- name: optional_param
- name: required_param
  required: true
`)

func testExtendedTestdataCmdTestCmdTestdataTemplatesTemplate_required_paramsYamlBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataTemplatesTemplate_required_paramsYaml, nil
}

func testExtendedTestdataCmdTestCmdTestdataTemplatesTemplate_required_paramsYaml() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataTemplatesTemplate_required_paramsYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/templates/template_required_params.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataTestBcYaml = []byte(`apiVersion: build.openshift.io/v1
kind: BuildConfig
metadata:
  name: test-buildconfig
spec:
  output: {}
  runPolicy: Serial
  source:
    git:
      uri: git://github.com/openshift/ruby-hello-world.git
    secrets: null
    type: Git
  strategy:
    sourceStrategy:
      from:
        kind: DockerImage
        name: centos/ruby-25-centos7
    type: Source
  triggers: []
status:
  lastVersion: 0
`)

func testExtendedTestdataCmdTestCmdTestdataTestBcYamlBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataTestBcYaml, nil
}

func testExtendedTestdataCmdTestCmdTestdataTestBcYaml() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataTestBcYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/test-bc.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataTestBuildcliJson = []byte(`{
  "kind": "List",
  "apiVersion": "v1",
  "metadata": {},
  "items": [
    {
      "kind": "ImageStream",
      "apiVersion": "v1",
      "metadata": {
        "name": "ruby-20-centos7-buildcli",
        "creationTimestamp": null
      },
      "spec": {
        "dockerImageRepository": "centos/ruby-25-centos7",
        "tags": [
          {
            "name": "valid"
          }
        ]
      },
      "status": {
        "dockerImageRepository": ""
      }
    },
    {
      "kind": "BuildConfig",
      "apiVersion": "v1",
      "metadata": {
        "name": "ruby-sample-build-validtag",
        "creationTimestamp": null
      },
      "spec": {
        "triggers": [
          {
            "type": "imageChange",
            "imageChange": {}
          }
        ],
        "source": {
          "type": "Git",
          "git": {
            "uri": "git://github.com/openshift/ruby-hello-world.git"
          }
        },
        "strategy": {
          "type": "Source",
          "sourceStrategy": {
            "from": {
              "kind": "DockerImage",
              "name": "centos/ruby-25-centos7"
            },
            "incremental": true
          }
        },
        "output": {
          "to": {
            "kind": "ImageStreamTag",
            "name": "origin-ruby-sample:latest"
          }
        },
        "resources": {}
      },
      "status": {
        "lastVersion": 0
      }
    },
    {
      "kind": "BuildConfig",
      "apiVersion": "v1",
      "metadata": {
        "name": "ruby-sample-build-invalidtag",
        "creationTimestamp": null
      },
      "spec": {
        "triggers": [
          {
            "type": "imageChange",
            "imageChange": {}
          }
        ],
        "source": {
          "type": "Git",
          "git": {
            "uri": "git://github.com/openshift/ruby-hello-world.git"
          }
        },
        "strategy": {
          "type": "Source",
          "sourceStrategy": {
            "from": {
              "kind": "DockerImage",
              "name": "centos/ruby-25-centos7"
            },
            "incremental": true
          }
        },
        "output": {
          "to": {
            "kind": "ImageStreamTag",
            "name": "origin-ruby-sample:latest"
          }
        },
        "resources": {}
      },
      "status": {
        "lastVersion": 0
      }
    }
  ]
}
`)

func testExtendedTestdataCmdTestCmdTestdataTestBuildcliJsonBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataTestBuildcliJson, nil
}

func testExtendedTestdataCmdTestCmdTestdataTestBuildcliJson() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataTestBuildcliJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/test-buildcli.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataTestDeploymentConfigYaml = []byte(`apiVersion: v1
kind: DeploymentConfig
metadata:
  name: test-deployment-config
spec:
  replicas: 1
  selector:
    name: test-deployment
  strategy:
    type: Recreate
    recreateParams:
      timeoutSeconds: 20
      post:
        failurePolicy: Ignore
        tagImages:
        - containerName: ruby-helloworld
          to:
            kind: ImageStreamTag
            name: origin-ruby-sample:deployed
  template:
    metadata:
      labels:
        name: test-deployment
    spec:
      containers:
      - image: openshift/origin-pod
        imagePullPolicy: IfNotPresent
        name: ruby-helloworld
        ports:
        - containerPort: 8080
          protocol: TCP
        resources:
          limits:
            cpu: 100m
            memory: 3Gi
      dnsPolicy: ClusterFirst
      restartPolicy: Always
      volumes:
      - emptyDir: {}
        name: vol1
  triggers:
  - type: ConfigChange
status: {}
`)

func testExtendedTestdataCmdTestCmdTestdataTestDeploymentConfigYamlBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataTestDeploymentConfigYaml, nil
}

func testExtendedTestdataCmdTestCmdTestdataTestDeploymentConfigYaml() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataTestDeploymentConfigYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/test-deployment-config.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataTestDockerBuildJson = []byte(`{
  "kind":"BuildConfig",
  "apiVersion":"v1",
  "metadata":{
    "name":"test",
    "labels":{
      "name":"test"
    }
  },
  "spec":{
    "triggers":[],
    "source":{
      "git": {
        "uri":"https://github.com/sclorg/nodejs-ex"        
      },
      "dockerfile": "FROM docker.io/busybox:latest"
    },
    "strategy":{
      "type":"Docker",
      "dockerStrategy":{
        "from":{
          "kind":"DockerImage",
          "name":"docker.io/busybox:latest"
        }
      }
    },
    "output":{
      "to":{
        "kind":"ImageStreamTag",
        "name":"test:latest"
      },
      "imageLabels": [
        {
          "name": "user-specified-label",
          "value": "arbitrary-value"
        },
        {
          "name": "io.k8s.display-name",
          "value": "overridden"
        },
        {
          "name": "io.openshift.builder-version",
          "value": "overridden2"
        }
      ]
    }
  }
}
`)

func testExtendedTestdataCmdTestCmdTestdataTestDockerBuildJsonBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataTestDockerBuildJson, nil
}

func testExtendedTestdataCmdTestCmdTestdataTestDockerBuildJson() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataTestDockerBuildJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/test-docker-build.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataTestImageStreamJson = []byte(`{
  "kind": "ImageStream",
  "apiVersion": "v1",
  "metadata": {
    "name": "test",
    "creationTimestamp": null,
    "labels": {
      "color": "blue"
    }
  },
  "spec": {},
  "status": {
    "dockerImageRepository": ""
  }
}`)

func testExtendedTestdataCmdTestCmdTestdataTestImageStreamJsonBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataTestImageStreamJson, nil
}

func testExtendedTestdataCmdTestCmdTestdataTestImageStreamJson() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataTestImageStreamJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/test-image-stream.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataTestImageJson = []byte(`{
  "kind": "Image",
  "apiVersion": "image.openshift.io/v1",
  "metadata": {
    "name": "test",
    "creationTimestamp": null
  },
  "dockerImageReference": "openshift/ruby-19-centos:latest",
  "dockerImageMetadata": {
    "kind": "DockerImage",
    "apiVersion": "1.0",
    "Id": "",
    "ContainerConfig": {},
    "Config": {}
  },
  "dockerImageMetadataVersion": "1.0"
}
`)

func testExtendedTestdataCmdTestCmdTestdataTestImageJsonBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataTestImageJson, nil
}

func testExtendedTestdataCmdTestCmdTestdataTestImageJson() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataTestImageJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/test-image.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataTestMultiarchStreamYaml = []byte(`apiVersion: v1
kind: ImageStream
metadata:
  name: test-multiarch-stream
spec:
  tags:
  - name: linux-amd64
    from:
      kind: DockerImage
      name: bparees/multiplatformtest:latest
    annotations:
      importer.image.openshift.io/prefer-os: linux
      importer.image.openshift.io/prefer-arch: amd64
  - name: linux-s390x
    from:
      kind: DockerImage
      name: bparees/multiplatformtest:latest
    annotations:
      importer.image.openshift.io/prefer-os: linux
      importer.image.openshift.io/prefer-arch: s390x
`)

func testExtendedTestdataCmdTestCmdTestdataTestMultiarchStreamYamlBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataTestMultiarchStreamYaml, nil
}

func testExtendedTestdataCmdTestCmdTestdataTestMultiarchStreamYaml() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataTestMultiarchStreamYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/test-multiarch-stream.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataTestReplicationControllerYaml = []byte(`apiVersion: v1
kind: ReplicationController
metadata:
  annotations:
    openshift.io/deployment-config.latest-version: "1"
    openshift.io/deployment-config.name: test-deployment
    openshift.io/deployment.phase: Complete
    optnshift.io/deployment.replicas: "1"
  name: test-replication-controller
spec:
  replicas: 1
  selector:
    deployment: test-deployment
    deploymentconfig: test-deployment
  template:
    metadata:
      labels:
        deployment: test-deployment
        deploymentconfig: test-deployment
    spec:
      containers:
      - image: openshift/origin-pod
        imagePullPolicy: IfNotPresent
        name: ruby-helloworld
        ports:
        - containerPort: 8080
          protocol: TCP
        resources: {}
      dnsPolicy: ClusterFirst
      restartPolicy: Always
status: {}
`)

func testExtendedTestdataCmdTestCmdTestdataTestReplicationControllerYamlBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataTestReplicationControllerYaml, nil
}

func testExtendedTestdataCmdTestCmdTestdataTestReplicationControllerYaml() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataTestReplicationControllerYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/test-replication-controller.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataTestRouteJson = []byte(`{
  "kind": "Route",
  "apiVersion": "v1",
  "metadata": {
    "name": "testroute",
    "creationTimestamp": null,
    "labels": {
       "rtlabel1": "greatroute"
    }
  },
  "spec": {
    "host": "test.example.com",
    "to": {
      "kind": "Service",
      "name": "testservice"
    }
  },
  "status": {}
}
`)

func testExtendedTestdataCmdTestCmdTestdataTestRouteJsonBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataTestRouteJson, nil
}

func testExtendedTestdataCmdTestCmdTestdataTestRouteJson() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataTestRouteJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/test-route.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataTestS2iBuildJson = []byte(`{
  "kind": "BuildConfig",
  "apiVersion": "v1",
  "metadata": {
    "name": "test",
    "labels": {
      "name": "test"
    }
  },
  "spec": {
    "triggers": [],
    "source": {
      "type": "Git",
      "git": {
        "uri":"https://github.com/sclorg/nodejs-ex"        
      }
    },
    "strategy": {
      "type": "Source",
      "sourceStrategy": {
        "env": [
          {
            "name": "BUILD_LOGLEVEL",
            "value": "5"
          }
        ],
        "from": {
          "kind": "DockerImage",
          "name": "docker.io/openshift/test-build-simples2i:latest"
        }
      }
    },
    "output": {
      "to": {
        "kind": "ImageStreamTag",
        "name": "test:latest"
      },
      "imageLabels": [
        {
          "name": "user-specified-label",
          "value": "arbitrary-value"
        },
        {
          "name": "io.k8s.display-name",
          "value": "overridden"
        },
        {
          "name": "io.openshift.builder-version",
          "value": "overridden2"
        }
      ]
    }
  }
}
`)

func testExtendedTestdataCmdTestCmdTestdataTestS2iBuildJsonBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataTestS2iBuildJson, nil
}

func testExtendedTestdataCmdTestCmdTestdataTestS2iBuildJson() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataTestS2iBuildJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/test-s2i-build.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataTestServiceJson = []byte(`{
  "kind": "Service",
  "apiVersion": "v1",
  "metadata": {
    "name": "frontend",
    "creationTimestamp": null,
    "labels": {
      "name": "frontend"
    }
  },
  "spec": {
    "ports": [
      {
        "protocol": "TCP",
        "port": 9998,
        "targetPort": 9998,
        "nodePort": 0
      }
    ],
    "selector": {
      "name": "frontend"
    },
    "type": "ClusterIP",
    "sessionAffinity": "None"
  },
  "status": {
    "loadBalancer": {}
  }
}`)

func testExtendedTestdataCmdTestCmdTestdataTestServiceJsonBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataTestServiceJson, nil
}

func testExtendedTestdataCmdTestCmdTestdataTestServiceJson() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataTestServiceJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/test-service.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTestdataTestStreamYaml = []byte(`apiVersion: v1
kind: ImageStream
metadata:
  creationTimestamp: 2015-10-12T12:16:36Z
  name: test-stream
  resourceVersion: "327"
  selfLink: /oapi/v1/namespaces/test/imagestreams/test-stream
  uid: 15be89a8-70db-11e5-ae32-080027c5bfa9
spec: 
  dockerImageRepository: 172.30.30.30:5000/test/test-stream
  tags:
  - name: latest
  - name: installable
    from:
      kind: DockerImage
      name: openshift/origin:v1.0.6
    annotations:
      io.openshift.generate.job: "true"
status: {}
`)

func testExtendedTestdataCmdTestCmdTestdataTestStreamYamlBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTestdataTestStreamYaml, nil
}

func testExtendedTestdataCmdTestCmdTestdataTestStreamYaml() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTestdataTestStreamYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/test-stream.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTimeoutSh = []byte(`#!/bin/bash
source "$(dirname "${BASH_SOURCE}")/../../hack/lib/init.sh"
trap os::test::junit::reconcile_output EXIT

# Cleanup cluster resources created by this test
(
  set +e
  oc delete all,templates --all
  exit 0
) &>/dev/null


os::test::junit::declare_suite_start "cmd/request-timeout"
# This test validates the global request-timeout option
os::cmd::expect_success_and_text 'oc new-app node' 'Success'
os::cmd::expect_success_and_text 'oc get dc node -w --request-timeout=1s 2>&1' 'Timeout exceeded while reading body'
os::cmd::expect_success_and_text 'oc get dc node --request-timeout=1s' 'node'
os::cmd::expect_success_and_text 'oc get dc node --request-timeout=1' 'node'
os::cmd::expect_success_and_text 'oc get pods --watch --request-timeout=1s 2>&1' 'Timeout exceeded while reading body'

echo "request-timeout: ok"
os::test::junit::declare_suite_end
`)

func testExtendedTestdataCmdTestCmdTimeoutShBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTimeoutSh, nil
}

func testExtendedTestdataCmdTestCmdTimeoutSh() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTimeoutShBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/timeout.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdTriggersSh = []byte(`#!/bin/bash
source "$(dirname "${BASH_SOURCE}")/../../hack/lib/init.sh"
trap os::test::junit::reconcile_output EXIT

# Cleanup cluster resources created by this test
(
  set +e
  oc delete all --all
  exit 0
) &>/dev/null


url=":${API_PORT:-8443}"
project="$(oc project -q)"

os::test::junit::declare_suite_start "cmd/triggers"
# This test validates triggers

os::cmd::expect_success 'oc new-app centos/ruby-25-centos7~https://github.com/openshift/ruby-hello-world.git'
os::cmd::expect_success 'oc get bc/ruby-hello-world'
os::cmd::expect_success 'oc get dc/ruby-hello-world'

os::cmd::expect_success "oc new-build --name=scratch --docker-image=scratch --dockerfile='FROM scratch'"

os::test::junit::declare_suite_start "cmd/triggers/buildconfigs"
## Build configs

# error conditions
os::cmd::expect_failure_and_text 'oc set triggers bc/ruby-hello-world --remove --remove-all' 'specify either --remove or --remove-all'
os::cmd::expect_failure_and_text 'oc set triggers bc/ruby-hello-world --auto --manual' 'at most one of --auto or --manual'
# print
os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world' 'config.*true'
os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world' 'image.*ruby-25-centos7:latest.*true'
os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world' 'webhook'
os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world' 'github'
# note, oc new-app currently does not set up gitlab or bitbucket webhooks by default
# remove all
os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world --remove-all' 'updated'
# add a new secretReference style webhook to the BC
os::cmd::expect_success "oc patch bc/ruby-hello-world -p '{\"spec\":{\"triggers\":[{\"github\":{\"secretReference\":{\"name\":\"mysecret\"}},\"type\":\"GitHub\"}]}}'"
os::cmd::expect_success_and_text 'oc describe buildConfigs ruby-hello-world' "Webhook GitHub"
# make sure we can still add/set other triggers
os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world --from-gitlab' 'updated'
os::cmd::expect_success_and_text 'oc describe buildConfigs ruby-hello-world' "Webhook GitHub"
os::cmd::expect_success_and_text 'oc describe buildConfigs ruby-hello-world' "Webhook GitLab"
os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world --remove-all' 'updated'

os::cmd::expect_success_and_not_text 'oc set triggers bc/ruby-hello-world' 'webhook|github'
os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world' 'config.*false'
os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world' 'image.*ruby-25-centos7:latest.*false'
# set github hook
os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world --from-github' 'updated'
os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world' 'github'
os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world --remove --from-github' 'updated'
os::cmd::expect_success_and_not_text 'oc set triggers bc/ruby-hello-world' 'github'
# set webhook
os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world --from-webhook' 'updated'
os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world' 'webhook'
os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world --remove --from-webhook' 'updated'
os::cmd::expect_success_and_not_text 'oc set triggers bc/ruby-hello-world' 'webhook'
# set webhook plus envvars
os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world --from-webhook-allow-env' 'updated'
os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world' 'webhook'
os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world --remove --from-webhook-allow-env' 'updated'
os::cmd::expect_success_and_not_text 'oc set triggers bc/ruby-hello-world' 'webhook'
# set gitlab hook
os::cmd::expect_success 'oc set triggers bc/ruby-hello-world --from-gitlab'
os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world' 'gitlab'
os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world --remove --from-gitlab' 'updated'
os::cmd::expect_success_and_not_text 'oc set triggers bc/ruby-hello-world' 'gitlab'
# set bitbucket hook
os::cmd::expect_success 'oc set triggers bc/ruby-hello-world --from-bitbucket'
os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world' 'bitbucket'
os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world --remove --from-bitbucket' 'updated'
os::cmd::expect_success_and_not_text 'oc set triggers bc/ruby-hello-world' 'bitbucket'
# set from-image
os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world --from-image=ruby-25-centos7:other' 'updated'
os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world' 'image.*ruby-25-centos7:other.*true'
# manual and remove both clear build configs
os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world --from-image=ruby-25-centos7:other --manual' 'updated'
os::cmd::expect_success_and_not_text 'oc set triggers bc/ruby-hello-world' 'image.*ruby-25-centos7:other.*false'
os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world --from-image=ruby-25-centos7:other' 'updated'
os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world --from-image=ruby-25-centos7:other --remove' 'updated'
os::cmd::expect_success_and_not_text 'oc set triggers bc/ruby-hello-world' 'image.*ruby-25-centos7:other'
# test --all
os::cmd::expect_success_and_text 'oc set triggers bc --all' 'buildconfigs/ruby-hello-world.*image.*ruby-25-centos7:latest.*false'
os::cmd::expect_success_and_text 'oc set triggers bc --all --auto' 'updated'
os::cmd::expect_success_and_text 'oc set triggers bc --all' 'buildconfigs/ruby-hello-world.*image.*ruby-25-centos7:latest.*true'
# set a trigger on a build that doesn't have an imagestream strategy.from-image
os::cmd::expect_success_and_text 'oc set triggers bc/scratch --from-image=test:latest' 'updated'

os::test::junit::declare_suite_end

os::test::junit::declare_suite_start "cmd/triggers/deploymentconfigs"
## Deployment configs

# error conditions
os::cmd::expect_failure_and_text 'oc set triggers dc/ruby-hello-world --from-github' 'deployment configs do not support GitHub web hooks'
os::cmd::expect_failure_and_text 'oc set triggers dc/ruby-hello-world --from-webhook' 'deployment configs do not support web hooks'
os::cmd::expect_failure_and_text 'oc set triggers dc/ruby-hello-world --from-gitlab' 'deployment configs do not support GitLab web hooks'
os::cmd::expect_failure_and_text 'oc set triggers dc/ruby-hello-world --from-bitbucket' 'deployment configs do not support Bitbucket web hooks'
os::cmd::expect_failure_and_text 'oc set triggers dc/ruby-hello-world --from-image=test:latest' 'you must specify --containers when setting --from-image'
os::cmd::expect_failure_and_text 'oc set triggers dc/ruby-hello-world --from-image=test:latest --containers=other' 'not all container names exist: other \(accepts: ruby-hello-world\)'
# print
os::cmd::expect_success_and_text 'oc set triggers dc/ruby-hello-world' 'config.*true'
os::cmd::expect_success_and_text 'oc set triggers dc/ruby-hello-world' 'image.*ruby-hello-world:latest \(ruby-hello-world\).*true'
os::cmd::expect_success_and_not_text 'oc set triggers dc/ruby-hello-world' 'webhook|github|gitlab|bitbucket'
os::cmd::expect_success_and_not_text 'oc set triggers dc/ruby-hello-world' 'gitlab'
os::cmd::expect_success_and_not_text 'oc set triggers dc/ruby-hello-world' 'bitbucket'
# remove all
os::cmd::expect_success_and_text 'oc set triggers dc/ruby-hello-world --remove-all' 'updated'
os::cmd::expect_success_and_not_text 'oc set triggers dc/ruby-hello-world' 'webhook|github|image|gitlab|bitbucket'
os::cmd::expect_success_and_text 'oc set triggers dc/ruby-hello-world' 'config.*false'
# auto
os::cmd::expect_success_and_text 'oc set triggers dc/ruby-hello-world --auto' 'updated'
os::cmd::expect_success_and_text 'oc set triggers dc/ruby-hello-world' 'config.*true'
os::cmd::expect_success_and_text 'oc set triggers dc/ruby-hello-world --from-image=ruby-hello-world:latest -c ruby-hello-world' 'updated'
os::cmd::expect_success_and_text 'oc set triggers dc/ruby-hello-world' 'image.*ruby-hello-world:latest \(ruby-hello-world\).*true'
os::test::junit::declare_suite_end

os::test::junit::declare_suite_start "cmd/triggers/annotations"
## Deployment configs

os::cmd::expect_success 'oc create deployment test --image=busybox'

# error conditions
os::cmd::expect_failure_and_text 'oc set triggers deploy/test --from-github' 'does not support GitHub web hooks'
os::cmd::expect_failure_and_text 'oc set triggers deploy/test --from-webhook' 'does not support web hooks'
os::cmd::expect_failure_and_text 'oc set triggers deploy/test --from-gitlab' 'does not support GitLab web hooks'
os::cmd::expect_failure_and_text 'oc set triggers deploy/test --from-bitbucket' 'does not support Bitbucket web hooks'
os::cmd::expect_failure_and_text 'oc set triggers deploy/test --from-image=test:latest' 'you must specify --containers when setting --from-image'
os::cmd::expect_failure_and_text 'oc set triggers deploy/test --from-image=test:latest --containers=other' 'not all container names exist: other \(accepts: busybox\)'
# print
os::cmd::expect_success_and_text 'oc set triggers deploy/test' 'config.*true'
os::cmd::expect_success_and_not_text 'oc set triggers deploy/test' 'webhook|github|gitlab|bitbucket'
os::cmd::expect_success_and_not_text 'oc set triggers deploy/test' 'gitlab'
os::cmd::expect_success_and_not_text 'oc set triggers deploy/test' 'bitbucket'
# remove all
os::cmd::expect_success_and_text 'oc set triggers deploy/test --remove-all' 'updated'
os::cmd::expect_success_and_not_text 'oc set triggers deploy/test' 'webhook|github|image|gitlab|bitbucket'
os::cmd::expect_success_and_text 'oc set triggers deploy/test' 'config.*false'
# auto
os::cmd::expect_success_and_text 'oc set triggers deploy/test --auto' 'updated'
os::cmd::expect_success_and_text 'oc set triggers deploy/test' 'config.*true'
os::cmd::expect_success_and_text 'oc set triggers deploy/test --from-image=ruby-hello-world:latest -c busybox' 'updated'
os::cmd::expect_success_and_text 'oc set triggers deploy/test' 'image.*ruby-hello-world:latest \(busybox\).*true'
os::test::junit::declare_suite_end

os::test::junit::declare_suite_end
`)

func testExtendedTestdataCmdTestCmdTriggersShBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdTriggersSh, nil
}

func testExtendedTestdataCmdTestCmdTriggersSh() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdTriggersShBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/triggers.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdVolumesSh = []byte(`#!/bin/bash
source "$(dirname "${BASH_SOURCE}")/../../hack/lib/init.sh"
trap os::test::junit::reconcile_output EXIT

# Cleanup cluster resources created by this test
(
  set +e
  oc delete all,templates,pv,pvc --all
  exit 0
) &>/dev/null


os::test::junit::declare_suite_start "cmd/volumes"
# This test validates the 'volume' command

os::cmd::expect_success 'oc create -f ${TEST_DATA}/test-deployment-config.yaml'
os::cmd::expect_success 'oc create -f ${TEST_DATA}/rollingupdate-daemonset.yaml'

os::cmd::expect_success_and_text 'oc set volume dc/test-deployment-config --list' 'vol1'
os::cmd::expect_success 'oc set volume dc/test-deployment-config --add --name=vol0 -m /opt5'
os::cmd::expect_success 'oc set volume dc/test-deployment-config --add --name=vol2 --type=emptydir -m /opt'
os::cmd::expect_failure_and_text "oc set volume dc/test-deployment-config --add --name=vol1 --type=secret --secret-name='\$ecret' -m /data" 'overwrite to replace'
os::cmd::expect_success "oc set volume dc/test-deployment-config --add --name=vol10 --secret-name='my-secret' -m /data-2"
os::cmd::expect_success "oc set volume dc/test-deployment-config --add --name=vol11 --configmap-name='my-configmap' -m /data-21"
os::cmd::expect_success_and_text 'oc get dc/test-deployment-config -o jsonpath={.spec.template.spec.containers[0].volumeMounts}' '/data-21'
os::cmd::expect_success_and_text 'oc get dc/test-deployment-config -o jsonpath={.spec.template.spec.volumes[4].configMap}' 'my-configmap'
os::cmd::expect_success 'oc set volume dc/test-deployment-config --add --name=vol1 --type=emptyDir -m /data --overwrite'
os::cmd::expect_failure_and_text 'oc set volume dc/test-deployment-config --add -m /opt' "'/opt' already exists"
os::cmd::expect_success_and_text "oc set volume dc/test-deployment-config --add --name=vol2 -m /etc -c 'ruby' --overwrite" 'does not have any containers'
os::cmd::expect_success "oc set volume dc/test-deployment-config --add --name=vol2 -m /etc -c 'ruby*' --overwrite"
os::cmd::expect_success_and_text 'oc set volume dc/test-deployment-config --list --name=vol2' 'mounted at /etc'
os::cmd::expect_success_and_text 'oc set volume dc/test-deployment-config --dry-run --add --name=vol3 -o yaml' 'name: vol3'
os::cmd::expect_failure_and_text 'oc set volume dc/test-deployment-config --list --name=vol3' 'volume "vol3" not found'
os::cmd::expect_failure_and_text 'oc set volume dc/test-deployment-config --remove' 'confirm for removing more than one volume'
os::cmd::expect_success 'oc set volume dc/test-deployment-config --remove --name=vol2'
os::cmd::expect_success_and_not_text 'oc set volume dc/test-deployment-config --list' 'vol2'
os::cmd::expect_success 'oc set volume dc/test-deployment-config --remove --confirm'
os::cmd::expect_success_and_not_text 'oc set volume dc/test-deployment-config --list' 'vol1'

# ensure that resources not present in all versions of a target group
# are still able to be encoded and patched accordingly
os::cmd::expect_success 'oc set volume ds/bind --add --name=vol2 --type=emptydir -m /opt'
os::cmd::expect_success 'oc set volume ds/bind --remove --name=vol2'

os::cmd::expect_success "oc set volume dc/test-deployment-config --add -t 'secret' --secret-name='asdf' --default-mode '765'"
os::cmd::expect_success_and_text 'oc get dc/test-deployment-config -o jsonpath={.spec.template.spec.volumes[0]}' '501'
os::cmd::expect_success 'oc set volume dc/test-deployment-config --remove --confirm'

os::cmd::expect_failure "oc set volume dc/test-deployment-config --add -t 'secret' --secret-name='asdf' --default-mode '888'"

os::cmd::expect_success "oc set volume dc/test-deployment-config --add -t 'configmap' --configmap-name='asdf' --default-mode '123'"
os::cmd::expect_success_and_text 'oc get dc/test-deployment-config -o jsonpath={.spec.template.spec.volumes[0]}' '83'
os::cmd::expect_success 'oc set volume dc/test-deployment-config --remove --confirm'

os::cmd::expect_success_and_text 'oc get pvc --no-headers | wc -l' '0'
os::cmd::expect_success 'oc set volume dc/test-deployment-config --add --mount-path=/other --claim-size=1G'
os::cmd::expect_success 'oc set volume dc/test-deployment-config --add --mount-path=/second --type=pvc --claim-size=1G --claim-mode=rwo'
os::cmd::expect_success_and_text 'oc get pvc --no-headers | wc -l' '2'
# attempt to add the same volume mounted in /other, but with a subpath
# we are not using --overwrite, so expect a failure
os::cmd::expect_failure_and_text 'oc set volume dc/test-deployment-config --add --mount-path=/second --sub-path=foo' "'/second' already exists"
# add --sub-path and expect success and --sub-path added when using --overwrite
os::cmd::expect_success_and_text 'oc set volume dc/test-deployment-config --add --mount-path=/second --sub-path=foo --overwrite' 'deploymentconfig.apps.openshift.io/test-deployment-config volume updated'
os::cmd::expect_success_and_text "oc get dc/test-deployment-config -o jsonpath='{.spec.template.spec.containers[0].volumeMounts[*].subPath}'" 'foo'

# ensure that we can describe volumes of type ConfigMap
os::cmd::expect_success " echo 'apiVersion: v1
kind: DeploymentConfig
metadata:
  name: simple-dc
  creationTimestamp: null
  labels:
    name: test-deployment
spec:
  replicas: 1
  selector:
    name: test-deployment
  template:
    metadata:
      labels:
        name: test-deployment
    spec:
      containers:
      - image: openshift/origin-ruby-sample
        name: helloworld
' | oc create -f -"

os::cmd::expect_success_and_text 'oc get dc simple-dc' 'simple-dc'
os::cmd::expect_success 'oc create cm cmvol'
os::cmd::expect_success 'oc set volume dc/simple-dc --add --name=cmvolume --type=configmap --configmap-name=cmvol'
os::cmd::expect_success_and_text 'oc set volume dc/simple-dc' 'configMap/cmvol as cmvolume'

# command alias
os::cmd::expect_success 'oc set volumes --help'
os::cmd::expect_success 'oc set volumes --help'
os::cmd::expect_success 'oc set volumes dc/test-deployment-config --list'

os::cmd::expect_success 'oc delete dc/test-deployment-config'
echo "volumes: ok"
os::test::junit::declare_suite_end
`)

func testExtendedTestdataCmdTestCmdVolumesShBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdVolumesSh, nil
}

func testExtendedTestdataCmdTestCmdVolumesSh() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdVolumesShBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/volumes.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCmdTestCmdWhoamiSh = []byte(`#!/bin/bash
source "$(dirname "${BASH_SOURCE}")/../../hack/lib/init.sh"
trap os::test::junit::reconcile_output EXIT

# Cleanup cluster resources created by this test
(
  set +e
  oc delete all,templates --all
  exit 0
) &>/dev/null


os::test::junit::declare_suite_start "cmd/whoami"
# This test validates the whoami command's --show-server flag
os::cmd::expect_success_and_text 'oc whoami --show-server' 'http(s)?:\/\/.*\:[0-9]+'
os::cmd::expect_success_and_text 'oc whoami --show-console' 'http(s)?:\/\/.*'

echo "whoami: ok"
os::test::junit::declare_suite_end
`)

func testExtendedTestdataCmdTestCmdWhoamiShBytes() ([]byte, error) {
	return _testExtendedTestdataCmdTestCmdWhoamiSh, nil
}

func testExtendedTestdataCmdTestCmdWhoamiSh() (*asset, error) {
	bytes, err := testExtendedTestdataCmdTestCmdWhoamiShBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/whoami.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataConfigMapJenkinsSlavePodsYaml = []byte(`apiVersion: v1
items:
- apiVersion: v1
  data:
    jenkins-slave: |-
      <org.csanchez.jenkins.plugins.kubernetes.PodTemplate>
        <inheritFrom></inheritFrom>
        <name>jenkins-slave</name>
        <instanceCap>2147483647</instanceCap>
        <idleMinutes>0</idleMinutes>
        <label>jenkins-slave</label>
        <serviceAccount>jenkins</serviceAccount>
        <nodeSelector></nodeSelector>
        <volumes/>
        <containers>
          <org.csanchez.jenkins.plugins.kubernetes.ContainerTemplate>
            <name>jnlp</name>
            <image>openshift/jenkins-slave-maven-centos7</image>
            <privileged>false</privileged>
            <alwaysPullImage>false</alwaysPullImage>
            <workingDir>/tmp</workingDir>
            <command></command>
            <args>${computer.jnlpmac} ${computer.name}</args>
            <ttyEnabled>false</ttyEnabled>
            <resourceRequestCpu></resourceRequestCpu>
            <resourceRequestMemory></resourceRequestMemory>
            <resourceLimitCpu></resourceLimitCpu>
            <resourceLimitMemory></resourceLimitMemory>
            <envVars/>
          </org.csanchez.jenkins.plugins.kubernetes.ContainerTemplate>
        </containers>
        <envVars/>
        <annotations/>
        <imagePullSecrets/>
        <nodeProperties/>
      </org.csanchez.jenkins.plugins.kubernetes.PodTemplate>
  kind: ConfigMap
  metadata:
    labels:
      role: jenkins-slave
    name: jenkins-slave
kind: List
metadata: {}
resourceVersion: ""
selfLink: ""`)

func testExtendedTestdataConfigMapJenkinsSlavePodsYamlBytes() ([]byte, error) {
	return _testExtendedTestdataConfigMapJenkinsSlavePodsYaml, nil
}

func testExtendedTestdataConfigMapJenkinsSlavePodsYaml() (*asset, error) {
	bytes, err := testExtendedTestdataConfigMapJenkinsSlavePodsYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/config-map-jenkins-slave-pods.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCsiAwsEbsInstallTemplateYaml = []byte(`# Installation of AWS EBS CSI driver into OpenShift.
# Source: https://github.com/kubernetes-sigs/aws-ebs-csi-driver/blob/e727882eae38614ec3246b243255e536aeef5a0f/deploy/kubernetes/manifest.yaml
# Tailored for OCP:
#  - Run controllers with hostNetwork: true to access AWS instance metadata (https://bugzilla.redhat.com/show_bug.cgi?id=1734600)
#    - Removed livenessprobe for this
#    - Scaled controllers to 1
#  - Run in kube-system and use aws-creds secrets there

# Controller Service
apiVersion: v1
kind: ServiceAccount
metadata:
  name: ebs-csi-controller-sa
  namespace: kube-system

---

kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: ebs-external-provisioner-role
rules:
  - apiGroups: [""]
    resources: ["persistentvolumes"]
    verbs: ["get", "list", "watch", "create", "delete"]
  - apiGroups: [""]
    resources: ["persistentvolumeclaims"]
    verbs: ["get", "list", "watch", "update"]
  - apiGroups: ["storage.k8s.io"]
    resources: ["storageclasses"]
    verbs: ["get", "list", "watch"]
  - apiGroups: [""]
    resources: ["events"]
    verbs: ["get", "list", "watch", "create", "update", "patch"]
  - apiGroups: ["storage.k8s.io"]
    resources: ["csinodes"]
    verbs: ["get", "list", "watch"]
  - apiGroups: [""]
    resources: ["nodes"]
    verbs: ["get", "list", "watch"]

---

kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: ebs-csi-provisioner-binding
subjects:
  - kind: ServiceAccount
    name: ebs-csi-controller-sa
    namespace: kube-system
roleRef:
  kind: ClusterRole
  name: ebs-external-provisioner-role
  apiGroup: rbac.authorization.k8s.io

---

kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: ebs-external-attacher-role
rules:
  - apiGroups: [""]
    resources: ["persistentvolumes"]
    verbs: ["get", "list", "watch", "update", "patch"]
  - apiGroups: [""]
    resources: ["nodes"]
    verbs: ["get", "list", "watch"]
  - apiGroups: ["csi.storage.k8s.io"]
    resources: ["csinodeinfos"]
    verbs: ["get", "list", "watch"]
  - apiGroups: ["storage.k8s.io"]
    resources: ["volumeattachments"]
    verbs: ["get", "list", "watch", "update", "patch"]

---

kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: ebs-csi-attacher-binding
subjects:
  - kind: ServiceAccount
    name: ebs-csi-controller-sa
    namespace: kube-system
roleRef:
  kind: ClusterRole
  name: ebs-external-attacher-role
  apiGroup: rbac.authorization.k8s.io

---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: ebs-external-resizer-role
rules:
  - apiGroups: [""]
    resources: ["persistentvolumes"]
    verbs: ["get", "list", "watch", "update", "patch"]
  - apiGroups: [""]
    resources: ["persistentvolumeclaims"]
    verbs: ["get", "list", "watch"]
  - apiGroups: [""]
    resources: ["persistentvolumeclaims/status"]
    verbs: ["update", "patch"]
  - apiGroups: ["storage.k8s.io"]
    resources: ["storageclasses"]
    verbs: ["get", "list", "watch"]
  - apiGroups: [""]
    resources: ["events"]
    verbs: ["list", "watch", "create", "update", "patch"]

---

kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: ebs-csi-resizer-binding
subjects:
  - kind: ServiceAccount
    name: ebs-csi-controller-sa
    namespace: kube-system
roleRef:
  kind: ClusterRole
  name: ebs-external-resizer-role
  apiGroup: rbac.authorization.k8s.io

---

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: ebs-external-snapshotter-role
rules:
- apiGroups: [""]
  resources: ["persistentvolumes"]
  verbs: ["get", "list", "watch"]
- apiGroups: [""]
  resources: ["persistentvolumeclaims"]
  verbs: ["get", "list", "watch"]
- apiGroups: ["storage.k8s.io"]
  resources: ["storageclasses"]
  verbs: ["get", "list", "watch"]
- apiGroups: [""]
  resources: ["events"]
  verbs: ["list", "watch", "create", "update", "patch"]
- apiGroups: [""]
  resources: ["secrets"]
  verbs: ["get", "list"]
- apiGroups: ["snapshot.storage.k8s.io"]
  resources: ["volumesnapshotclasses"]
  verbs: ["get", "list", "watch"]
- apiGroups: ["snapshot.storage.k8s.io"]
  resources: ["volumesnapshotcontents"]
  verbs: ["create", "get", "list", "watch", "update", "delete"]
- apiGroups: ["snapshot.storage.k8s.io"]
  resources: ["volumesnapshotcontents/status"]
  verbs: ["update"]
- apiGroups: ["snapshot.storage.k8s.io"]
  resources: ["volumesnapshots"]
  verbs: ["get", "list", "watch", "update"]
- apiGroups: ["apiextensions.k8s.io"]
  resources: ["customresourcedefinitions"]
  verbs: ["create", "list", "watch", "delete"]
- apiGroups: ["coordination.k8s.io"]
  resources: ["leases"]
  verbs: ["get", "watch", "list", "delete", "update", "create"]

---

kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: ebs-csi-snapshotter-binding
subjects:
  - kind: ServiceAccount
    name: ebs-csi-controller-sa
    namespace: kube-system
roleRef:
  kind: ClusterRole
  name: ebs-external-snapshotter-role
  apiGroup: rbac.authorization.k8s.io

---

kind: StatefulSet
apiVersion: apps/v1
metadata:
  name: ebs-csi-controller
  namespace: kube-system
spec:
  selector:
    matchLabels:
      app: ebs-csi-controller
  serviceName: ebs-csi-controller
  replicas: 1
  template:
    metadata:
      labels:
        app: ebs-csi-controller
    spec:
      hostNetwork: true
      serviceAccount: ebs-csi-controller-sa
      priorityClassName: system-cluster-critical
      tolerations:
        - key: CriticalAddonsOnly
          operator: Exists
      containers:
        - name: ebs-plugin
          image: amazon/aws-ebs-csi-driver:latest
          args:
            - --endpoint=$(CSI_ENDPOINT)
            - --logtostderr
            - --v=5
          env:
            - name: CSI_ENDPOINT
              value: unix:///var/lib/csi/sockets/pluginproxy/csi.sock
            - name: AWS_ACCESS_KEY_ID
              valueFrom:
                secretKeyRef:
                  name: aws-creds
                  key: aws_access_key_id
                  optional: true
            - name: AWS_SECRET_ACCESS_KEY
              valueFrom:
                secretKeyRef:
                  name: aws-creds
                  key: aws_secret_access_key
                  optional: true
          ports:
            - name: healthz
              containerPort: 19808
              protocol: TCP
          volumeMounts:
            - name: socket-dir
              mountPath: /var/lib/csi/sockets/pluginproxy/
        - name: csi-provisioner
          image: {{.ProvisionerImage}}
          args:
            - --provisioner=ebs.csi.aws.com
            - --csi-address=$(ADDRESS)
            - --v=5
            - --feature-gates=Topology=true
          env:
            - name: ADDRESS
              value: /var/lib/csi/sockets/pluginproxy/csi.sock
          volumeMounts:
            - name: socket-dir
              mountPath: /var/lib/csi/sockets/pluginproxy/
        - name: csi-attacher
          image: {{.AttacherImage}}
          args:
            - --csi-address=$(ADDRESS)
            - --v=5
          env:
            - name: ADDRESS
              value: /var/lib/csi/sockets/pluginproxy/csi.sock
          volumeMounts:
            - name: socket-dir
              mountPath: /var/lib/csi/sockets/pluginproxy/
        - name: csi-resizer
          image: {{.ResizerImage}}
          args:
            - --csi-address=$(ADDRESS)
            - --v=5
          env:
            - name: ADDRESS
              value: /var/lib/csi/sockets/pluginproxy/csi.sock
          volumeMounts:
            - name: socket-dir
              mountPath: /var/lib/csi/sockets/pluginproxy/
        - name: csi-snapshotter
          image: {{.SnapshotterImage}}
          args:
            - --csi-address=$(ADDRESS)
            - --v=5
          env:
          - name: ADDRESS
            value: /var/lib/csi/sockets/pluginproxy/csi.sock
          volumeMounts:
          - mountPath: /var/lib/csi/sockets/pluginproxy/
            name: socket-dir
      volumes:
        - name: socket-dir
          emptyDir: {}

---

# Node Service
kind: DaemonSet
apiVersion: apps/v1
metadata:
  name: ebs-csi-node
  namespace: kube-system
spec:
  selector:
    matchLabels:
      app: ebs-csi-node
  template:
    metadata:
      labels:
        app: ebs-csi-node
    spec:
      hostNetwork: true
      priorityClassName: system-node-critical
      tolerations:
        - key: CriticalAddonsOnly
          operator: Exists
      containers:
        - name: ebs-plugin
          securityContext:
            privileged: true
          image: amazon/aws-ebs-csi-driver:latest
          args:
            - --endpoint=$(CSI_ENDPOINT)
            - --logtostderr
            - --v=5
          env:
            - name: CSI_ENDPOINT
              value: unix:/csi/csi.sock
          volumeMounts:
            - name: kubelet-dir
              mountPath: /var/lib/kubelet
              mountPropagation: "Bidirectional"
            - name: plugin-dir
              mountPath: /csi
            - name: device-dir
              mountPath: /dev
          ports:
            - name: healthz
              containerPort: 9808
              protocol: TCP
          livenessProbe:
            httpGet:
              path: /healthz
              port: healthz
            initialDelaySeconds: 10
            timeoutSeconds: 3
            periodSeconds: 10
            failureThreshold: 5
        - name: node-driver-registrar
          securityContext:
            privileged: true
          image: {{.NodeDriverRegistrarImage}}
          args:
            - --csi-address=$(ADDRESS)
            - --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)
            - --v=5
          lifecycle:
            preStop:
              exec:
                command: ["/bin/sh", "-c", "rm -rf /registration/ebs.csi.aws.com-reg.sock /csi/csi.sock"]
          env:
            - name: ADDRESS
              value: /csi/csi.sock
            - name: DRIVER_REG_SOCK_PATH
              value: /var/lib/kubelet/plugins/ebs.csi.aws.com/csi.sock
          volumeMounts:
            - name: plugin-dir
              mountPath: /csi
            - name: registration-dir
              mountPath: /registration
        - name: liveness-probe
          image: {{.LivenessProbeImage}}
          args:
            - --csi-address=/csi/csi.sock
            - --probe-timeout=3s
          volumeMounts:
            - name: plugin-dir
              mountPath: /csi
      volumes:
        - name: kubelet-dir
          hostPath:
            path: /var/lib/kubelet
            type: Directory
        - name: plugin-dir
          hostPath:
            path: /var/lib/kubelet/plugins/ebs.csi.aws.com/
            type: DirectoryOrCreate
        - name: registration-dir
          hostPath:
            path: /var/lib/kubelet/plugins_registry/
            type: Directory
        - name: device-dir
          hostPath:
            path: /dev
            type: Directory

---

apiVersion: storage.k8s.io/v1beta1
kind: CSIDriver
metadata:
  name: ebs.csi.aws.com
spec:
  attachRequired: true
  podInfoOnMount: false
`)

func testExtendedTestdataCsiAwsEbsInstallTemplateYamlBytes() ([]byte, error) {
	return _testExtendedTestdataCsiAwsEbsInstallTemplateYaml, nil
}

func testExtendedTestdataCsiAwsEbsInstallTemplateYaml() (*asset, error) {
	bytes, err := testExtendedTestdataCsiAwsEbsInstallTemplateYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/csi/aws-ebs/install-template.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCsiAwsEbsManifestYaml = []byte(`# Test manifest for https://github.com/kubernetes/kubernetes/tree/master/test/e2e/storage/external
ShortName: ebs
StorageClass:
  FromFile: storageclass.yaml
SnapshotClass:
  FromName: true
DriverInfo:
  Name: ebs.csi.aws.com
  SupportedSizeRange:
    Min: 1Gi
    Max: 16Ti
  SupportedFsType:
    xfs: {}
    ext4: {}
  SupportedMountOption:
    dirsync: {}
  TopologyKeys: ["topology.ebs.csi.aws.com/zone"]
  Capabilities:
    persistence: true
    fsGroup: true
    block: true
    exec: true
    volumeLimits: false
    controllerExpansion: true
    nodeExpansion: true
    snapshotDataSource: true
`)

func testExtendedTestdataCsiAwsEbsManifestYamlBytes() ([]byte, error) {
	return _testExtendedTestdataCsiAwsEbsManifestYaml, nil
}

func testExtendedTestdataCsiAwsEbsManifestYaml() (*asset, error) {
	bytes, err := testExtendedTestdataCsiAwsEbsManifestYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/csi/aws-ebs/manifest.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCsiAwsEbsStorageclassYaml = []byte(`kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
  name: ebs.csi.aws.com
provisioner: ebs.csi.aws.com
volumeBindingMode: WaitForFirstConsumer
`)

func testExtendedTestdataCsiAwsEbsStorageclassYamlBytes() ([]byte, error) {
	return _testExtendedTestdataCsiAwsEbsStorageclassYaml, nil
}

func testExtendedTestdataCsiAwsEbsStorageclassYaml() (*asset, error) {
	bytes, err := testExtendedTestdataCsiAwsEbsStorageclassYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/csi/aws-ebs/storageclass.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCustomSecretBuilderDockerfile = []byte(`FROM openshift/origin-custom-docker-builder
# Override the default build script
ADD build.sh /tmp/build.sh
`)

func testExtendedTestdataCustomSecretBuilderDockerfileBytes() ([]byte, error) {
	return _testExtendedTestdataCustomSecretBuilderDockerfile, nil
}

func testExtendedTestdataCustomSecretBuilderDockerfile() (*asset, error) {
	bytes, err := testExtendedTestdataCustomSecretBuilderDockerfileBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/custom-secret-builder/Dockerfile", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataCustomSecretBuilderBuildSh = []byte(`#!/bin/bash

set -e
set -o pipefail

if [ ! -e "${DOCKER_SOCKET}" ]; then
  echo "Docker socket missing at ${DOCKER_SOCKET}"
  exit 1
fi

SECRET_PATH=${PUSH_DOCKERCFG_PATH:-}

if [ -z "${SECRET_PATH}" ]; then
  echo "The dockercfg not found in /var/run/secrets/openshift.io/push"
  exit 1
fi

if [ -n "${OUTPUT_IMAGE}" ]; then
  TAG="${OUTPUT_REGISTRY}/${OUTPUT_IMAGE}"
fi

mkdir -p /tmp/build && cd /tmp/build
cp -v $SECRET_PATH /tmp/build/dockercfg
chmod 0666 /tmp/build/dockercfg

# This ruby app just output content of file referenced by the environment
# variable. For example FOO=/tmp/test and then GET /FOO returns content of
# /tmp/test
cat > config.ru <<- EOF
def readfile(name); File.read(ENV[name]) rescue "not found #{ENV[name]}"; end
run Proc.new { |env|
  path = env['PATH_INFO'].gsub(/^\//,'')
  [200, {"Content-Type" => "text/raw"}, [readfile(path)]]
}
EOF

cat > Dockerfile <<- EOF
FROM centos/ruby-25-centos7
ENV SECRET_FILE /opt/openshift/src/dockercfg
COPY dockercfg ./
COPY config.ru ./
CMD /usr/local/sti/run
EOF

docker build --rm -t "${TAG}" .
docker push "${TAG}"
`)

func testExtendedTestdataCustomSecretBuilderBuildShBytes() ([]byte, error) {
	return _testExtendedTestdataCustomSecretBuilderBuildSh, nil
}

func testExtendedTestdataCustomSecretBuilderBuildSh() (*asset, error) {
	bytes, err := testExtendedTestdataCustomSecretBuilderBuildShBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/custom-secret-builder/build.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataDeploymentsCustomDeploymentYaml = []byte(`apiVersion: apps.openshift.io/v1
kind: DeploymentConfig
metadata:
  name: custom-deployment
spec:
  replicas: 2
  selector:
    name: custom-deployment
  strategy:
    type: Rolling
    rollingParams:
      pre:
        failurePolicy: Abort
        execNewPod:
          containerName: myapp
          volumes:
          - non-existing-volume
          command:
          - /bin/echo
          - test pre hook executed
    customParams:
      command:
      - /bin/sh
      - -c
      - |
        set -e
        sleep 15  # give tests time to set up
        openshift-deploy --until=50%
        echo Halfway
        openshift-deploy
        echo Finished
  template:
    metadata:
      labels:
        name: custom-deployment
    spec:
      terminationGracePeriodSeconds: 0
      containers:
      - image: "registry.access.redhat.com/ubi8/ubi-minimal:latest"
        imagePullPolicy: IfNotPresent
        name: myapp
        command:
        - /bin/sleep
        - "infinity"
  triggers:
  - type: ConfigChange
`)

func testExtendedTestdataDeploymentsCustomDeploymentYamlBytes() ([]byte, error) {
	return _testExtendedTestdataDeploymentsCustomDeploymentYaml, nil
}

func testExtendedTestdataDeploymentsCustomDeploymentYaml() (*asset, error) {
	bytes, err := testExtendedTestdataDeploymentsCustomDeploymentYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/deployments/custom-deployment.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataDeploymentsDeploymentExampleYaml = []byte(`apiVersion: apps.openshift.io/v1
kind: DeploymentConfig
metadata:
  labels:
    app: example
  name: example
spec:
  replicas: 1
  template:
    metadata:
      labels:
        app: example
    spec:
      containers:
      - imagePullPolicy: IfNotPresent
        name: ruby
        command:
        - /bin/sleep
        - "100"
        ports:
        - containerPort: 8080
          protocol: TCP
      - imagePullPolicy: IfNotPresent
        name: mongodb
        command:
        - /bin/sleep
        - "100"
        ports:
        - containerPort: 5000
          protocol: TCP
  test: false
  triggers:
  - type: ConfigChange
  - imageChangeParams:
      automatic: true
      containerNames:
      - ruby
      from:
        kind: ImageStreamTag
        name: ruby:latest
        namespace: openshift
    type: ImageChange
  - imageChangeParams:
      automatic: true
      containerNames:
      - mongodb
      from:
        kind: ImageStreamTag
        name: mongodb:latest
        namespace: openshift
    type: ImageChange
`)

func testExtendedTestdataDeploymentsDeploymentExampleYamlBytes() ([]byte, error) {
	return _testExtendedTestdataDeploymentsDeploymentExampleYaml, nil
}

func testExtendedTestdataDeploymentsDeploymentExampleYaml() (*asset, error) {
	bytes, err := testExtendedTestdataDeploymentsDeploymentExampleYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/deployments/deployment-example.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataDeploymentsDeploymentHistoryLimitYaml = []byte(`apiVersion: apps.openshift.io/v1
kind: DeploymentConfig
metadata:
  name: history-limit
spec:
  replicas: 1
  strategy:
    type: Rolling
  template:
    metadata:
      labels:
        name: history-limit
    spec:
      containers:
      - image: "registry.access.redhat.com/ubi8/ubi-minimal:latest"
        imagePullPolicy: IfNotPresent
        name: myapp
        command:
        - /bin/sleep
        - "infinity"
  triggers:
  - type: ConfigChange
  revisionHistoryLimit: 3
`)

func testExtendedTestdataDeploymentsDeploymentHistoryLimitYamlBytes() ([]byte, error) {
	return _testExtendedTestdataDeploymentsDeploymentHistoryLimitYaml, nil
}

func testExtendedTestdataDeploymentsDeploymentHistoryLimitYaml() (*asset, error) {
	bytes, err := testExtendedTestdataDeploymentsDeploymentHistoryLimitYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/deployments/deployment-history-limit.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataDeploymentsDeploymentIgnoresDeployerYaml = []byte(`apiVersion: apps.openshift.io/v1
kind: DeploymentConfig
metadata:
  annotations:
    deploy.openshift.io/deployer-pod.ignore: "true"
  name: database
spec:
  replicas: 1
  selector:
    name: database
  template:
    metadata:
      labels:
        name: database
    spec:
      terminationGracePeriodSeconds: 0
      containers:
      - image: "registry.access.redhat.com/ubi8/ubi-minimal:latest"
        imagePullPolicy: IfNotPresent
        name: myapp
        command:
        - /bin/sleep
        - "infinity"
`)

func testExtendedTestdataDeploymentsDeploymentIgnoresDeployerYamlBytes() ([]byte, error) {
	return _testExtendedTestdataDeploymentsDeploymentIgnoresDeployerYaml, nil
}

func testExtendedTestdataDeploymentsDeploymentIgnoresDeployerYaml() (*asset, error) {
	bytes, err := testExtendedTestdataDeploymentsDeploymentIgnoresDeployerYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/deployments/deployment-ignores-deployer.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataDeploymentsDeploymentImageResolutionIsYaml = []byte(`apiVersion: image.openshift.io/v1
kind: ImageStream
metadata:
  name: deployment-image-resolution
spec:
  tags:
  - name: pullthrough
    from:
      kind: DockerImage
      name: "registry.access.redhat.com/ubi8/ubi-minimal:latest"
    referencePolicy:
      type: Local
  - name: direct
    from:
      kind: DockerImage
      name: "registry.access.redhat.com/ubi8/ubi-minimal:latest"
    referencePolicy:
     type: Source
`)

func testExtendedTestdataDeploymentsDeploymentImageResolutionIsYamlBytes() ([]byte, error) {
	return _testExtendedTestdataDeploymentsDeploymentImageResolutionIsYaml, nil
}

func testExtendedTestdataDeploymentsDeploymentImageResolutionIsYaml() (*asset, error) {
	bytes, err := testExtendedTestdataDeploymentsDeploymentImageResolutionIsYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/deployments/deployment-image-resolution-is.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataDeploymentsDeploymentImageResolutionYaml = []byte(`apiVersion: apps.openshift.io/v1
kind: DeploymentConfig
metadata:
  name: deployment-image-resolution
spec:
  strategy:
    type: Rolling
    rollingParams:
  template:
    metadata:
      labels:
        name: deployment-image-resolution
    spec:
      containers:
      - name: first
        image: ""
        imagePullPolicy: IfNotPresent
        command:
          - /bin/sleep
          - infinity
      - name: second
        image: " "
        imagePullPolicy: IfNotPresent
        command:
          - /bin/sleep
          - infinity
  triggers:
  - type: ConfigChange
  - imageChangeParams:
      automatic: true
      containerNames:
      - first
      from:
        kind: ImageStreamTag
        name: deployment-image-resolution:pullthrough
    type: ImageChange
  - imageChangeParams:
      automatic: true
      containerNames:
      - second
      from:
        kind: ImageStreamTag
        name: deployment-image-resolution:direct
    type: ImageChange

`)

func testExtendedTestdataDeploymentsDeploymentImageResolutionYamlBytes() ([]byte, error) {
	return _testExtendedTestdataDeploymentsDeploymentImageResolutionYaml, nil
}

func testExtendedTestdataDeploymentsDeploymentImageResolutionYaml() (*asset, error) {
	bytes, err := testExtendedTestdataDeploymentsDeploymentImageResolutionYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/deployments/deployment-image-resolution.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataDeploymentsDeploymentMinReadySecondsYaml = []byte(`apiVersion: apps.openshift.io/v1
kind: DeploymentConfig
metadata:
  name: minreadytest
spec:
  replicas: 2
  minReadySeconds: 60
  selector:
    name: minreadytest
  template:
    metadata:
      labels:
        name: minreadytest
    spec:
      terminationGracePeriodSeconds: 0
      containers:
      - image: "registry.access.redhat.com/ubi8/ubi-minimal:latest"
        imagePullPolicy: IfNotPresent
        name: myapp
        command:
        - /bin/sleep
        - "infinity"
`)

func testExtendedTestdataDeploymentsDeploymentMinReadySecondsYamlBytes() ([]byte, error) {
	return _testExtendedTestdataDeploymentsDeploymentMinReadySecondsYaml, nil
}

func testExtendedTestdataDeploymentsDeploymentMinReadySecondsYaml() (*asset, error) {
	bytes, err := testExtendedTestdataDeploymentsDeploymentMinReadySecondsYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/deployments/deployment-min-ready-seconds.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataDeploymentsDeploymentSimpleYaml = []byte(`apiVersion: apps.openshift.io/v1
kind: DeploymentConfig
metadata:
  name: deployment-simple
spec:
  replicas: 1
  selector:
    name: deployment-simple
  strategy:
    type: Rolling
    rollingParams:
  template:
    metadata:
      labels:
        name: deployment-simple
    spec:
      containers:
      - image: "registry.access.redhat.com/ubi8/ubi-minimal:latest"
        imagePullPolicy: IfNotPresent
        command:
          - /bin/sleep
          - infinity
        name: myapp
        readinessProbe:
          exec:
            command:
            - "true"
  triggers:
  - type: ConfigChange
`)

func testExtendedTestdataDeploymentsDeploymentSimpleYamlBytes() ([]byte, error) {
	return _testExtendedTestdataDeploymentsDeploymentSimpleYaml, nil
}

func testExtendedTestdataDeploymentsDeploymentSimpleYaml() (*asset, error) {
	bytes, err := testExtendedTestdataDeploymentsDeploymentSimpleYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/deployments/deployment-simple.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataDeploymentsDeploymentTriggerYaml = []byte(`apiVersion: apps.openshift.io/v1
kind: DeploymentConfig
metadata:
  labels:
    app: example
  name: example
spec:
  replicas: 1
  template:
    metadata:
      labels:
        app: example
    spec:
      containers:
      - imagePullPolicy: Always
        name: test
        command:
        - /bin/sleep
        - "infinity"
  test: false
  triggers:
  - imageChangeParams:
      automatic: true
      containerNames:
      - test
      from:
        kind: ImageStreamTag
        name: test:v1
    type: ImageChange
`)

func testExtendedTestdataDeploymentsDeploymentTriggerYamlBytes() ([]byte, error) {
	return _testExtendedTestdataDeploymentsDeploymentTriggerYaml, nil
}

func testExtendedTestdataDeploymentsDeploymentTriggerYaml() (*asset, error) {
	bytes, err := testExtendedTestdataDeploymentsDeploymentTriggerYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/deployments/deployment-trigger.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataDeploymentsDeploymentWithRefEnvYaml = []byte(`apiVersion: apps.openshift.io/v1
kind: DeploymentConfig
metadata:
  name: deployment-simple
spec:
  triggers: []
  replicas: 1
  selector:
    name: deployment-simple
  strategy:
    type: Rolling
    rollingParams:
      pre:
        failurePolicy: Abort
        execNewPod:
          containerName: myapp
          env:
            - name: HELLO
              valueFrom:
                configMapKeyRef:
                  name: test
                  key: foo
          command: ["/bin/bash", "-c", "echo hello ${HELLO} && exit 1"]
  template:
    metadata:
      labels:
        name: deployment-simple
    spec:
      containers:
      - image: "registry.access.redhat.com/ubi8/ubi-minimal:latest"
        command: [ "/bin/bash", "-c", "sleep infinity" ]
        imagePullPolicy: IfNotPresent
        name: myapp
`)

func testExtendedTestdataDeploymentsDeploymentWithRefEnvYamlBytes() ([]byte, error) {
	return _testExtendedTestdataDeploymentsDeploymentWithRefEnvYaml, nil
}

func testExtendedTestdataDeploymentsDeploymentWithRefEnvYaml() (*asset, error) {
	bytes, err := testExtendedTestdataDeploymentsDeploymentWithRefEnvYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/deployments/deployment-with-ref-env.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataDeploymentsFailingPreHookYaml = []byte(`apiVersion: apps.openshift.io/v1
kind: DeploymentConfig
metadata:
  name: hook
spec:
  replicas: 1
  selector:
    name: hook
  strategy:
    type: Rolling
    rollingParams:
      pre:
        failurePolicy: Retry
        execNewPod:
          containerName: myapp
          command:
          - /bin/bash
          - -c
          - '/bin/echo pre hook logs ; exit 1'
  template:
    metadata:
      labels:
        name: hook
    spec:
      containers:
      - image: "registry.access.redhat.com/ubi8/ubi-minimal:latest"
        command:
          - /bin/sleep
          - infinity
        name: myapp
  triggers:
  - type: ConfigChange
`)

func testExtendedTestdataDeploymentsFailingPreHookYamlBytes() ([]byte, error) {
	return _testExtendedTestdataDeploymentsFailingPreHookYaml, nil
}

func testExtendedTestdataDeploymentsFailingPreHookYaml() (*asset, error) {
	bytes, err := testExtendedTestdataDeploymentsFailingPreHookYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/deployments/failing-pre-hook.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataDeploymentsGenerationTestYaml = []byte(`apiVersion: apps.openshift.io/v1
kind: DeploymentConfig
metadata:
  name: generation-test
spec:
  replicas: 1
  selector:
    name: generation-test
  strategy:
    type: Rolling
    rollingParams:
      pre:
        failurePolicy: Abort
        execNewPod:
          containerName: myapp
          command:
          - /bin/echo
          - test pre hook executed
  template:
    metadata:
      labels:
        name: generation-test
    spec:
      containers:
      - image: "registry.access.redhat.com/ubi8/ubi-minimal:latest"
        imagePullPolicy: IfNotPresent
        name: myapp
        command:
        - /bin/sleep
        - "infinity"
  triggers:
  - type: ConfigChange
`)

func testExtendedTestdataDeploymentsGenerationTestYamlBytes() ([]byte, error) {
	return _testExtendedTestdataDeploymentsGenerationTestYaml, nil
}

func testExtendedTestdataDeploymentsGenerationTestYaml() (*asset, error) {
	bytes, err := testExtendedTestdataDeploymentsGenerationTestYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/deployments/generation-test.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataDeploymentsMultiIctDeploymentYaml = []byte(`apiVersion: apps.openshift.io/v1
kind: DeploymentConfig
metadata:
  labels:
    app: example
  name: example
spec:
  replicas: 1
  template:
    metadata:
      labels:
        app: example
    spec:
      containers:
      - imagePullPolicy: IfNotPresent
        name: ruby
        command:
        - /bin/sleep
        - "100"
        ports:
        - containerPort: 8080
          protocol: TCP
      - imagePullPolicy: IfNotPresent
        name: ruby2
        command:
        - /bin/sleep
        - "100"
        ports:
        - containerPort: 8081
          protocol: TCP
  test: false
  triggers:
  - type: ConfigChange
  - imageChangeParams:
      automatic: true
      containerNames:
      - ruby
      - ruby2
      from:
        kind: ImageStreamTag
        name: ruby:latest
        namespace: openshift
    type: ImageChange
`)

func testExtendedTestdataDeploymentsMultiIctDeploymentYamlBytes() ([]byte, error) {
	return _testExtendedTestdataDeploymentsMultiIctDeploymentYaml, nil
}

func testExtendedTestdataDeploymentsMultiIctDeploymentYaml() (*asset, error) {
	bytes, err := testExtendedTestdataDeploymentsMultiIctDeploymentYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/deployments/multi-ict-deployment.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataDeploymentsPausedDeploymentYaml = []byte(`apiVersion: apps.openshift.io/v1
kind: DeploymentConfig
metadata:
  name: paused
spec:
  paused: true
  replicas: 1
  template:
    metadata:
      labels:
        name: paused
    spec:
      containers:
      - image: "registry.access.redhat.com/ubi8/ubi-minimal:latest"
        imagePullPolicy: IfNotPresent
        name: myapp
        command:
        - /bin/sleep
        - "infinity"
`)

func testExtendedTestdataDeploymentsPausedDeploymentYamlBytes() ([]byte, error) {
	return _testExtendedTestdataDeploymentsPausedDeploymentYaml, nil
}

func testExtendedTestdataDeploymentsPausedDeploymentYaml() (*asset, error) {
	bytes, err := testExtendedTestdataDeploymentsPausedDeploymentYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/deployments/paused-deployment.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataDeploymentsReadinessTestYaml = []byte(`apiVersion: apps.openshift.io/v1
kind: DeploymentConfig
metadata:
  name: readiness
spec:
  replicas: 1
  strategy:
    rollingParams:
      timeoutSeconds: 30
    type: Rolling
  template:
    metadata:
      labels:
        name: readiness-test
    spec:
      containers:
      - command:
        - /bin/sleep
        - "infinity"
        image: "registry.access.redhat.com/ubi8/ubi-minimal:latest"
        imagePullPolicy: IfNotPresent
        name: never-ready
        readinessProbe:
          exec:
            command:
            - /bin/false
          failureThreshold: 1
`)

func testExtendedTestdataDeploymentsReadinessTestYamlBytes() ([]byte, error) {
	return _testExtendedTestdataDeploymentsReadinessTestYaml, nil
}

func testExtendedTestdataDeploymentsReadinessTestYaml() (*asset, error) {
	bytes, err := testExtendedTestdataDeploymentsReadinessTestYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/deployments/readiness-test.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataDeploymentsTagImagesDeploymentYaml = []byte(`apiVersion: apps.openshift.io/v1
kind: DeploymentConfig
metadata:
  name: tag-images
spec:
  replicas: 1
  test: true
  selector:
    name: tag-images
  strategy:
    type: Recreate
    recreateParams:
      timeoutSeconds: 600
      post:
        failurePolicy: Abort
        tagImages:
        - containerName: sample-name
          to:
            kind: ImageStreamTag
            name: sample-stream:deployed
  template:
    metadata:
      labels:
        name: tag-images
    spec:
      containers:
      - image: openshift/origin-pod
        imagePullPolicy: IfNotPresent
        name: sample-name
        ports:
        - containerPort: 8080
          protocol: TCP
        resources:
          limits:
            cpu: 100m
            memory: 3Gi
`)

func testExtendedTestdataDeploymentsTagImagesDeploymentYamlBytes() ([]byte, error) {
	return _testExtendedTestdataDeploymentsTagImagesDeploymentYaml, nil
}

func testExtendedTestdataDeploymentsTagImagesDeploymentYaml() (*asset, error) {
	bytes, err := testExtendedTestdataDeploymentsTagImagesDeploymentYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/deployments/tag-images-deployment.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataDeploymentsTestDeploymentBrokenYaml = []byte(`apiVersion: apps.openshift.io/v1
kind: DeploymentConfig
metadata:
  name: brokendeployment
spec:
  replicas: 1
  selector:
    name: brokendeployment
  strategy:
    type: Rolling
    rollingParams:
      pre:
        failurePolicy: Abort
        execNewPod:
          containerName: myapp
          command:
          - /bin/false
  template:
    metadata:
      labels:
        name: brokendeployment
    spec:
      containers:
      - image: "registry.access.redhat.com/ubi8/ubi-minimal:latest"
        imagePullPolicy: IfNotPresent
        name: myapp
        command:
        - /bin/sleep
        - "infinity"
  triggers:
  - type: ConfigChange
`)

func testExtendedTestdataDeploymentsTestDeploymentBrokenYamlBytes() ([]byte, error) {
	return _testExtendedTestdataDeploymentsTestDeploymentBrokenYaml, nil
}

func testExtendedTestdataDeploymentsTestDeploymentBrokenYaml() (*asset, error) {
	bytes, err := testExtendedTestdataDeploymentsTestDeploymentBrokenYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/deployments/test-deployment-broken.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataDeploymentsTestDeploymentTestYaml = []byte(`apiVersion: apps.openshift.io/v1
kind: DeploymentConfig
metadata:
  name: deployment-test
spec:
  replicas: 2
  selector:
    name: deployment-test
  strategy:
    type: Rolling
    rollingParams:
      pre:
        failurePolicy: Abort
        execNewPod:
          containerName: myapp
          command:
          - /bin/bash
          - -c
          - |
            sleep 15  # give tests time to setup
            echo 'test pre hook executed'
  template:
    metadata:
      labels:
        name: deployment-test
    spec:
      terminationGracePeriodSeconds: 0
      containers:
      - image: "registry.access.redhat.com/ubi8/ubi-minimal:latest"
        imagePullPolicy: IfNotPresent
        name: myapp
        command:
        - /bin/sleep
        - "infinity"
  test: true
  triggers:
  - type: ConfigChange
`)

func testExtendedTestdataDeploymentsTestDeploymentTestYamlBytes() ([]byte, error) {
	return _testExtendedTestdataDeploymentsTestDeploymentTestYaml, nil
}

func testExtendedTestdataDeploymentsTestDeploymentTestYaml() (*asset, error) {
	bytes, err := testExtendedTestdataDeploymentsTestDeploymentTestYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/deployments/test-deployment-test.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataDisasterRecoveryRestoreEtcdSh = []byte(`#!/bin/bash
set -euo pipefail

if [ -z "${BASTION_HOST}" ]; then exit 1; fi
if [ -z "${MASTERHOSTS}" ]; then exit 1; fi
if [ -z "${KUBE_SSH_KEY_PATH}" ]; then exit 1; fi

MASTERS=(${MASTERHOSTS})
FIRST_MASTER="${MASTERS[0]}"

function retry() {
  local ATTEMPTS="${1}"
  local rc=0
  shift
  for i in $(seq 0 $((ATTEMPTS-1))); do
    echo "--> ${@}"
    set +e
    "${@}"
    rc="$?"
    set -e
    echo "--> exit code: $rc"
    test "${rc}" = 0 && break
    sleep 10
  done
  return "${rc}"
}

function bastion_ssh() {
  retry 60 \
    ssh -o LogLevel=error -o ConnectionAttempts=100 -o ConnectTimeout=30 -o StrictHostKeyChecking=no \
        -o ProxyCommand="ssh -A -o StrictHostKeyChecking=no -o LogLevel=error -o ServerAliveInterval=30 -o ConnectionAttempts=100 -o ConnectTimeout=30 -W %h:%p core@${BASTION_HOST} 2>/dev/null" \
        $@
}

echo "Distribute snapshot across all masters"
for master in "${MASTERS[@]}"
do
  scp -o StrictHostKeyChecking=no -o ProxyCommand="ssh -A -o StrictHostKeyChecking=no -o ServerAliveInterval=30 -W %h:%p core@${BASTION_HOST}" ${KUBE_SSH_KEY_PATH} "core@${master}":/home/core/.ssh/id_rsa
  bastion_ssh "core@${master}" "sudo -i chmod 0600 /home/core/.ssh/id_rsa"
  bastion_ssh "core@${FIRST_MASTER}" "scp -o StrictHostKeyChecking=no /tmp/snapshot.db core@${master}:/tmp/snapshot.db"
done

echo "Collect etcd names"
for master in "${MASTERS[@]}"
do
  bastion_ssh "core@${master}" 'echo "etcd-member-$(hostname -f)" > /tmp/etcd_name && source /run/etcd/environment && echo "https://${ETCD_DNS_NAME}:2380" > /tmp/etcd_uri'
  bastion_ssh "core@${FIRST_MASTER}" "mkdir -p /tmp/etcd/${master} && scp -o StrictHostKeyChecking=no core@${master}:/tmp/etcd_name /tmp/etcd/${master}/etcd_name && scp -o StrictHostKeyChecking=no core@${master}:/tmp/etcd_uri /tmp/etcd/${master}/etcd_uri"
  bastion_ssh "core@${FIRST_MASTER}" "cat /tmp/etcd/${master}/etcd_name"
  bastion_ssh "core@${FIRST_MASTER}" "cat /tmp/etcd/${master}/etcd_uri"
done

echo "Assemble etcd connection string"
bastion_ssh "core@${FIRST_MASTER}" 'rm -rf /tmp/etcd/connstring && mapfile -t MASTERS < <(ls /tmp/etcd) && echo ${MASTERS[@]} && for master in "${MASTERS[@]}"; do echo -n "$(cat /tmp/etcd/${master}/etcd_name)=$(cat /tmp/etcd/${master}/etcd_uri)," >> /tmp/etcd/connstring; done && sed -i '"'$ s/.$//'"' /tmp/etcd/connstring'

echo "Restore etcd cluster from snapshot"
for master in "${MASTERS[@]}"
do
  echo "Running /usr/local/bin/etcd-snapshot-restore.sh on ${master}"
  bastion_ssh "core@${FIRST_MASTER}" "scp -o StrictHostKeyChecking=no /tmp/etcd/connstring core@${master}:/tmp/etcd_connstring"
  bastion_ssh "core@${master}" 'sudo -i /bin/bash -x /usr/local/bin/etcd-snapshot-restore.sh /tmp/snapshot.db $(cat /tmp/etcd_connstring)'
done
`)

func testExtendedTestdataDisasterRecoveryRestoreEtcdShBytes() ([]byte, error) {
	return _testExtendedTestdataDisasterRecoveryRestoreEtcdSh, nil
}

func testExtendedTestdataDisasterRecoveryRestoreEtcdSh() (*asset, error) {
	bytes, err := testExtendedTestdataDisasterRecoveryRestoreEtcdShBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/disaster-recovery/restore-etcd.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataDisasterRecoveryRollbackAYaml = []byte(`apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
metadata:
  labels:
    machineconfiguration.openshift.io/role: master
  name: 99-rollback-test
spec:
  config:
    ignition:
      version: 2.2.0
    storage:
      files:
      - contents:
          source: data:,A
        filesystem: root
        mode: 420
        path: /etc/rollback-test
`)

func testExtendedTestdataDisasterRecoveryRollbackAYamlBytes() ([]byte, error) {
	return _testExtendedTestdataDisasterRecoveryRollbackAYaml, nil
}

func testExtendedTestdataDisasterRecoveryRollbackAYaml() (*asset, error) {
	bytes, err := testExtendedTestdataDisasterRecoveryRollbackAYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/disaster-recovery/rollback-A.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataDisasterRecoveryRollbackBYaml = []byte(`apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
metadata:
  labels:
    machineconfiguration.openshift.io/role: master
  name: 99-rollback-test
spec:
  config:
    ignition:
      version: 2.2.0
    storage:
      files:
      - contents:
          source: data:,B
        filesystem: root
        mode: 420
        path: /etc/rollback-test
`)

func testExtendedTestdataDisasterRecoveryRollbackBYamlBytes() ([]byte, error) {
	return _testExtendedTestdataDisasterRecoveryRollbackBYaml, nil
}

func testExtendedTestdataDisasterRecoveryRollbackBYaml() (*asset, error) {
	bytes, err := testExtendedTestdataDisasterRecoveryRollbackBYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/disaster-recovery/rollback-B.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataDisasterRecoverySshBastionClusterroleYaml = []byte(`apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: ssh-bastion
rules:
- apiGroups:
  - "machineconfiguration.openshift.io"
  resources:
  - "machineconfigs"
  verbs:
  - get
- apiGroups:
  - ""
  resources:
  - "nodes"
  verbs:
  - list
  - get
`)

func testExtendedTestdataDisasterRecoverySshBastionClusterroleYamlBytes() ([]byte, error) {
	return _testExtendedTestdataDisasterRecoverySshBastionClusterroleYaml, nil
}

func testExtendedTestdataDisasterRecoverySshBastionClusterroleYaml() (*asset, error) {
	bytes, err := testExtendedTestdataDisasterRecoverySshBastionClusterroleYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/disaster-recovery/ssh-bastion/clusterrole.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataDisasterRecoverySshBastionClusterrolebindingYaml = []byte(`apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  annotations:
    openshift.io/description: Allows ssh-pod to read nodes and machineconfigs
  name: ssh-bastion
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: ssh-bastion
subjects:
- apiGroup: rbac.authorization.k8s.io
  kind: User
  name: system:serviceaccount:ssh-bastion:ssh-bastion
`)

func testExtendedTestdataDisasterRecoverySshBastionClusterrolebindingYamlBytes() ([]byte, error) {
	return _testExtendedTestdataDisasterRecoverySshBastionClusterrolebindingYaml, nil
}

func testExtendedTestdataDisasterRecoverySshBastionClusterrolebindingYaml() (*asset, error) {
	bytes, err := testExtendedTestdataDisasterRecoverySshBastionClusterrolebindingYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/disaster-recovery/ssh-bastion/clusterrolebinding.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataDisasterRecoverySshBastionDeploymentYaml = []byte(`apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    run: ssh-bastion
  name: ssh-bastion
  namespace: ssh-bastion
spec:
  replicas: 1
  selector:
    matchLabels:
      run: ssh-bastion
  template:
    metadata:
      labels:
        run: ssh-bastion
    spec:
      serviceAccountName: "ssh-bastion"
      containers:
      - image: quay.io/eparis/ssh:latest
        imagePullPolicy: Always
        name: ssh-bastion
        ports:
        - containerPort: 22
          name: ssh
          protocol: TCP
        volumeMounts:
        - name: ssh-host-keys
          mountPath: "/etc/ssh/"
          readOnly: true
        securityContext:
          privileged: true
      volumes:
      - name: ssh-host-keys
        secret:
          secretName: ssh-host-keys
          items:
          - key: ssh_host_rsa_key
            path: ssh_host_rsa_key
            mode: 256
          - key: ssh_host_ecdsa_key
            path: ssh_host_ecdsa_key
            mode: 256
          - key: ssh_host_ed25519_key
            path: ssh_host_ed25519_key
            mode: 256
          - key: sshd_config
            path: sshd_config
      restartPolicy: Always
`)

func testExtendedTestdataDisasterRecoverySshBastionDeploymentYamlBytes() ([]byte, error) {
	return _testExtendedTestdataDisasterRecoverySshBastionDeploymentYaml, nil
}

func testExtendedTestdataDisasterRecoverySshBastionDeploymentYaml() (*asset, error) {
	bytes, err := testExtendedTestdataDisasterRecoverySshBastionDeploymentYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/disaster-recovery/ssh-bastion/deployment.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataDisasterRecoverySshBastionNamespaceYaml = []byte(`apiVersion: v1
kind: Namespace
metadata:
  name: ssh-bastion
  labels:
    openshift.io/run-level: "0"

`)

func testExtendedTestdataDisasterRecoverySshBastionNamespaceYamlBytes() ([]byte, error) {
	return _testExtendedTestdataDisasterRecoverySshBastionNamespaceYaml, nil
}

func testExtendedTestdataDisasterRecoverySshBastionNamespaceYaml() (*asset, error) {
	bytes, err := testExtendedTestdataDisasterRecoverySshBastionNamespaceYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/disaster-recovery/ssh-bastion/namespace.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataDisasterRecoverySshBastionRoleYaml = []byte(`apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  name: ssh-bastion
  namespace: ssh-bastion
rules:
- apiGroups:
  - security.openshift.io
  resources:
  - securitycontextconstraints
  verbs:
  - use
  resourceNames:
  - privileged
`)

func testExtendedTestdataDisasterRecoverySshBastionRoleYamlBytes() ([]byte, error) {
	return _testExtendedTestdataDisasterRecoverySshBastionRoleYaml, nil
}

func testExtendedTestdataDisasterRecoverySshBastionRoleYaml() (*asset, error) {
	bytes, err := testExtendedTestdataDisasterRecoverySshBastionRoleYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/disaster-recovery/ssh-bastion/role.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataDisasterRecoverySshBastionRolebindingYaml = []byte(`apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  annotations:
    openshift.io/description: Allows ssh-pod to run as root
  name: ssh-bastion
  namespace: ssh-bastion
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: Role
  name: ssh-bastion
subjects:
- apiGroup: rbac.authorization.k8s.io
  kind: User
  name: system:serviceaccount:ssh-bastion:ssh-bastion
`)

func testExtendedTestdataDisasterRecoverySshBastionRolebindingYamlBytes() ([]byte, error) {
	return _testExtendedTestdataDisasterRecoverySshBastionRolebindingYaml, nil
}

func testExtendedTestdataDisasterRecoverySshBastionRolebindingYaml() (*asset, error) {
	bytes, err := testExtendedTestdataDisasterRecoverySshBastionRolebindingYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/disaster-recovery/ssh-bastion/rolebinding.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataDisasterRecoverySshBastionServiceYaml = []byte(`apiVersion: v1
kind: Service
metadata:
  labels:
    run: ssh-bastion
  name: ssh-bastion
  namespace: ssh-bastion
spec:
  externalTrafficPolicy: Local
  ports:
  - name: ssh
    port: 22
    protocol: TCP
    targetPort: ssh
  selector:
    run: ssh-bastion
  type: LoadBalancer
`)

func testExtendedTestdataDisasterRecoverySshBastionServiceYamlBytes() ([]byte, error) {
	return _testExtendedTestdataDisasterRecoverySshBastionServiceYaml, nil
}

func testExtendedTestdataDisasterRecoverySshBastionServiceYaml() (*asset, error) {
	bytes, err := testExtendedTestdataDisasterRecoverySshBastionServiceYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/disaster-recovery/ssh-bastion/service.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataDisasterRecoverySshBastionServiceaccountYaml = []byte(`apiVersion: v1
kind: ServiceAccount
metadata:
  name: ssh-bastion
  namespace: ssh-bastion
`)

func testExtendedTestdataDisasterRecoverySshBastionServiceaccountYamlBytes() ([]byte, error) {
	return _testExtendedTestdataDisasterRecoverySshBastionServiceaccountYaml, nil
}

func testExtendedTestdataDisasterRecoverySshBastionServiceaccountYaml() (*asset, error) {
	bytes, err := testExtendedTestdataDisasterRecoverySshBastionServiceaccountYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/disaster-recovery/ssh-bastion/serviceaccount.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataDisasterRecoverySshBastionSshd_config = []byte(`HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_ecdsa_key
HostKey /etc/ssh/ssh_host_ed25519_key
SyslogFacility AUTHPRIV
PermitRootLogin no
AuthorizedKeysFile /home/core/.ssh/authorized_keys
PasswordAuthentication no
ChallengeResponseAuthentication no
GSSAPIAuthentication yes
GSSAPICleanupCredentials no
UsePAM yes
X11Forwarding yes
PrintMotd no
AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
AcceptEnv LC_IDENTIFICATION LC_ALL LANGUAGE
AcceptEnv XMODIFIERS
Subsystem	sftp	/usr/libexec/openssh/sftp-server
`)

func testExtendedTestdataDisasterRecoverySshBastionSshd_configBytes() ([]byte, error) {
	return _testExtendedTestdataDisasterRecoverySshBastionSshd_config, nil
}

func testExtendedTestdataDisasterRecoverySshBastionSshd_config() (*asset, error) {
	bytes, err := testExtendedTestdataDisasterRecoverySshBastionSshd_configBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/disaster-recovery/ssh-bastion/sshd_config", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataDisasterRecoveryUpdate_route_53Py = []byte(`import boto3
import os
import sys
from time import sleep

if len(sys.argv) < 4:
    print("Usage: ./update_route_53.py <DOMAIN> <RECORD> <IP>")
    sys.exit(1)

attempts = 10
pause = 10

domain = sys.argv[1]
record = sys.argv[2]
ip = sys.argv[3]
print("record: %s" % record)
print("ip: %s" % ip)

client = boto3.client('route53')
r = client.list_hosted_zones_by_name(DNSName=domain, MaxItems="1")
zone_id = r['HostedZones'][0]['Id'].split('/')[-1]

response = client.change_resource_record_sets(
    HostedZoneId=zone_id,
    ChangeBatch= {
        'Comment': 'add %s -> %s' % (record, ip),
        'Changes': [
        {
            'Action': 'UPSERT',
            'ResourceRecordSet': {
                'Name': record,
                'Type': 'A',
                'TTL': 60,
                'ResourceRecords': [{'Value': ip}]
            }
        }]
})
for i in range(attempts):
    print('response: %s' % response)
    changeID = response['ChangeInfo']['Id']
    if response['ChangeInfo']['Status'] == "INSYNC":
        print('insync found, response: %s' % response)
        break
    print('waiting for response to complete')
    sleep(pause)
    response = client.get_change(Id=changeID)
`)

func testExtendedTestdataDisasterRecoveryUpdate_route_53PyBytes() ([]byte, error) {
	return _testExtendedTestdataDisasterRecoveryUpdate_route_53Py, nil
}

func testExtendedTestdataDisasterRecoveryUpdate_route_53Py() (*asset, error) {
	bytes, err := testExtendedTestdataDisasterRecoveryUpdate_route_53PyBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/disaster-recovery/update_route_53.py", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataForcepullTestJson = []byte(`{
	"kind": "List",
	"apiVersion": "v1",
	"metadata": {},
	"items": [
		{
			"kind": "BuildConfig",
			"apiVersion": "v1",
			"metadata": {
				"name": "ruby-sample-build-tc",
				"creationTimestamp": null,
				"labels": {
					"name": "ruby-sample-build-tc"
				}
			},
			"spec": {
				"triggers": [],
				"source": {
					"type": "Git",
					"git": {
						"uri": "https://github.com/openshift/ruby-hello-world.git"
					}
				},
				"strategy": {
					"type": "Custom",
					"customStrategy": {
						"from": {
						        "kind": "ImageStreamTag",
						        "namespace": "openshift",
							"name": "ruby:latest"
						},
						"env": [
							{
								"name": "OPENSHIFT_CUSTOM_BUILD_BASE_IMAGE",
								"value": "ruby:latest"
							},
							{
								"name": "BUILD_LOGLEVEL",
								"value": "5"
							}
						],
						"exposeDockerSocket": true,
						"forcePull": true
					}
				}
			}
		},
		{
			"kind": "BuildConfig",
			"apiVersion": "v1",
			"metadata": {
				"name": "ruby-sample-build-td",
				"creationTimestamp": null,
				"labels": {
					"name": "ruby-sample-build-td"
				}
			},
			"spec": {
				"triggers": [],
				"source": {
					"type": "Git",
					"git": {
						"uri": "https://github.com/openshift/ruby-hello-world.git"
					}
				},
				"strategy": {
					"type": "Docker",
					"dockerStrategy": {
						"from": {
							"kind": "ImageStreamTag",
						        "namespace": "openshift",
							"name": "ruby:latest"
						},
						"env": [
							{
								"name": "BUILD_LOGLEVEL",
								"value": "5"
							}
						],
						"forcePull": true
					}
				}
			}
		},
		{
			"kind": "BuildConfig",
			"apiVersion": "v1",
			"metadata": {
				"name": "ruby-sample-build-ts",
				"creationTimestamp": null,
				"labels": {
					"name": "ruby-sample-build-ts"
				}
			},
			"spec": {
				"triggers": [],
				"source": {
					"type": "Git",
					"git": {
						"uri": "https://github.com/openshift/ruby-hello-world.git"
					}
				},
				"strategy": {
					"type": "Source",
					"sourceStrategy": {
						"from": {
							"kind": "ImageStreamTag",
						        "namespace": "openshift",
							"name": "ruby:latest"
						},
						"env": [
							{
								"name": "BUILD_LOGLEVEL",
								"value": "5"
							}
						],
						"forcePull": true
					}
				}
			}
		}
	]
}
`)

func testExtendedTestdataForcepullTestJsonBytes() ([]byte, error) {
	return _testExtendedTestdataForcepullTestJson, nil
}

func testExtendedTestdataForcepullTestJson() (*asset, error) {
	bytes, err := testExtendedTestdataForcepullTestJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/forcepull-test.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataGssapiConfigKubeconfig = []byte(`apiVersion: v1
clusters:
- cluster:
    certificate-authority: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
    server: https://openshift.default.svc.cluster.local:443
  name: GSSAPITEST
contexts:
- context:
    cluster: GSSAPITEST
    namespace: gssapiproxy
  name: gssapi
current-context: gssapi
kind: Config
preferences: {}
users: []
`)

func testExtendedTestdataGssapiConfigKubeconfigBytes() ([]byte, error) {
	return _testExtendedTestdataGssapiConfigKubeconfig, nil
}

func testExtendedTestdataGssapiConfigKubeconfig() (*asset, error) {
	bytes, err := testExtendedTestdataGssapiConfigKubeconfigBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/gssapi/config/kubeconfig", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataGssapiConfigOauth_configJson = []byte(`{
  "oauthConfig": {
    "identityProviders": [{
      "name": "header",
      "challenge": true,
      "mappingMethod": "add",
      "provider": {
        "apiVersion": "v1",
        "kind": "RequestHeaderIdentityProvider",
        "challengeURL": "http://HOST_NAME/mod_auth/oauth/authorize?${query}",
        "headers": ["Remote-User"]
      }
    }]
  }
}
`)

func testExtendedTestdataGssapiConfigOauth_configJsonBytes() ([]byte, error) {
	return _testExtendedTestdataGssapiConfigOauth_configJson, nil
}

func testExtendedTestdataGssapiConfigOauth_configJson() (*asset, error) {
	bytes, err := testExtendedTestdataGssapiConfigOauth_configJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/gssapi/config/oauth_config.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataGssapiFedoraBaseDockerfile = []byte(`# Clone from the Fedora 23 image
FROM fedora:23

ARG REALM
ARG HOST

ENV REALM ${REALM}
ENV HOST ${HOST}

ENV CLIENT CLIENT_HAS_LIBS

ENV OS_ROOT /run/os
ENV KUBECONFIG ${OS_ROOT}/kubeconfig
ENV PATH ${OS_ROOT}/bin:${PATH}

WORKDIR ${OS_ROOT}
ADD gssapi-tests.sh gssapi-tests.sh
ADD test-wrapper.sh test-wrapper.sh
ADD kubeconfig kubeconfig
ADD hack hack
ADD oc bin/oc

# KEYRING does not work inside of a container since it is part of the kernel
RUN sed -i.bak1 's#KEYRING:persistent:#DIR:/tmp/krb5cc_#' /etc/krb5.conf && \
    dnf install -y findutils bc && \
    chmod +x gssapi-tests.sh test-wrapper.sh

ENTRYPOINT /run/os/test-wrapper.sh
`)

func testExtendedTestdataGssapiFedoraBaseDockerfileBytes() ([]byte, error) {
	return _testExtendedTestdataGssapiFedoraBaseDockerfile, nil
}

func testExtendedTestdataGssapiFedoraBaseDockerfile() (*asset, error) {
	bytes, err := testExtendedTestdataGssapiFedoraBaseDockerfileBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/gssapi/fedora/base/Dockerfile", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataGssapiFedoraKerberosDockerfile = []byte(`FROM gssapiproxy/fedora-gssapi-base

ENV CLIENT CLIENT_HAS_LIBS

RUN dnf install -y krb5-workstation
`)

func testExtendedTestdataGssapiFedoraKerberosDockerfileBytes() ([]byte, error) {
	return _testExtendedTestdataGssapiFedoraKerberosDockerfile, nil
}

func testExtendedTestdataGssapiFedoraKerberosDockerfile() (*asset, error) {
	bytes, err := testExtendedTestdataGssapiFedoraKerberosDockerfileBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/gssapi/fedora/kerberos/Dockerfile", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataGssapiFedoraKerberos_configuredDockerfile = []byte(`FROM gssapiproxy/fedora-gssapi-kerberos

ENV CLIENT CLIENT_HAS_LIBS_IS_CONFIGURED

RUN sed -i.bak1 -e "s/\[realms\]/\[realms\]\n${REALM} = {\n kdc = ${HOST}\n admin_server = ${HOST}\n default_domain = ${HOST}\n}/" /etc/krb5.conf && \
    sed -i.bak2 -e "s/\[domain_realm\]/\[domain_realm\]\n.${HOST} = ${REALM}\n${HOST} = ${REALM}/" /etc/krb5.conf && \
    sed -i.bak3 -e "s!# default_realm = ! default_realm = ${REALM}\n#!" /etc/krb5.conf
`)

func testExtendedTestdataGssapiFedoraKerberos_configuredDockerfileBytes() ([]byte, error) {
	return _testExtendedTestdataGssapiFedoraKerberos_configuredDockerfile, nil
}

func testExtendedTestdataGssapiFedoraKerberos_configuredDockerfile() (*asset, error) {
	bytes, err := testExtendedTestdataGssapiFedoraKerberos_configuredDockerfileBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/gssapi/fedora/kerberos_configured/Dockerfile", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataGssapiProxyDockerfile = []byte(`# Clone from the Fedora 23 image
FROM fedora:23

# Install GSSAPI
RUN dnf install -y \
  apr-util-openssl \
  authconfig \
  httpd \
  krb5-libs \
  krb5-server \
  krb5-workstation \
  mod_auth_gssapi \
  mod_ssl \
  && dnf clean all

# Add conf files for Kerberos
ADD krb5.conf /etc/krb5.conf
ADD kdc.conf  /var/kerberos/krb5kdc/kdc.conf
ADD kadm5.acl /var/kerberos/krb5kdc/kadm5.acl

# Add conf file for Apache
ADD proxy.conf /etc/httpd/conf.d/proxy.conf

# Add health check file
ADD healthz /var/www/html/healthz

# 80  = http
# 443 = https
# 88  = kerberos
EXPOSE 80 443 88 88/udp

ADD configure.sh /usr/sbin/configure.sh
ENTRYPOINT /usr/sbin/configure.sh
`)

func testExtendedTestdataGssapiProxyDockerfileBytes() ([]byte, error) {
	return _testExtendedTestdataGssapiProxyDockerfile, nil
}

func testExtendedTestdataGssapiProxyDockerfile() (*asset, error) {
	bytes, err := testExtendedTestdataGssapiProxyDockerfileBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/gssapi/proxy/Dockerfile", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataGssapiProxyConfigureSh = []byte(`#!/usr/bin/env bash

set -o errexit
set -o nounset
set -o pipefail

cd /

# Get environment
export USER="$(whoami)"

# Edit kerberos config files, replacing EXAMPLE.COM with ${REALM}, and example.com with ${HOST}
for file in /etc/krb5.conf /var/kerberos/krb5kdc/kdc.conf /var/kerberos/krb5kdc/kadm5.acl; do
  sed -i.bak1 -e "s/EXAMPLE\.COM/${REALM}/g" $file
  sed -i.bak2 -e "s/example\.com/${HOST}/g" $file
done

# Temporary hack to get around hairpin issue
sed -i.bak3 -e "s/kdc = ${HOST}/kdc = localhost/g" /etc/krb5.conf

# Create ticket database
kdb5_util create -s -r "${REALM}" -P password

# Add local user as admin
kadmin.local -q "addprinc -pw password ${USER}/admin@${REALM}"

# Start ticket server
krb5kdc

# Add user principal for current user, for test users user1-user5, the host principal (for ssh), the HTTP principal (for Apache), and create keytab
for u in "${USER}" user1 user2 user3 user4 user5; do
  kadmin.local -q "addprinc -pw password ${u}@${REALM}"
done

# Setup keytab for sshd
kadmin.local -q "addprinc -randkey host/${HOST}@${REALM}"
kadmin.local -q "ktadd -k /etc/krb5.keytab host/${HOST}@${REALM}"

# Setup keytab for apache
kadmin.local -q "addprinc -randkey HTTP/${HOST}@${REALM}"
kadmin.local -q "ktadd -k /etc/httpd.keytab HTTP/${HOST}@${REALM}"
chown apache /etc/httpd.keytab

# configure Apache proxy and auth
sed -i.bak1 -e "s#proxy\.example\.com#${HOST}#g" /etc/httpd/conf.d/proxy.conf
sed -i.bak2 -e "s#https://backend\.example\.com#${BACKEND}#g" /etc/httpd/conf.d/proxy.conf

# Start apache
httpd -k start

# Keep the service running
while true ; do sleep 60 ; done
`)

func testExtendedTestdataGssapiProxyConfigureShBytes() ([]byte, error) {
	return _testExtendedTestdataGssapiProxyConfigureSh, nil
}

func testExtendedTestdataGssapiProxyConfigureSh() (*asset, error) {
	bytes, err := testExtendedTestdataGssapiProxyConfigureShBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/gssapi/proxy/configure.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataGssapiProxyGssapiproxyBuildconfigYaml = []byte(`kind: "BuildConfig"
apiVersion: "v1"
metadata:
  name: "gssapiproxy"
  labels:
    name: "gssapiproxy"
spec:
  triggers: []
  source:
    type: "Binary"
    binary: {}
  strategy:
    type: "Docker"
    env:
      -
        name: "BUILD_LOGLEVEL"
        value: "5"
    dockerStrategy:
      from:
        kind: "DockerImage"
        name: "fedora:23"
  output:
    to:
      kind: "ImageStreamTag"
      name: "gssapiproxy:latest"
`)

func testExtendedTestdataGssapiProxyGssapiproxyBuildconfigYamlBytes() ([]byte, error) {
	return _testExtendedTestdataGssapiProxyGssapiproxyBuildconfigYaml, nil
}

func testExtendedTestdataGssapiProxyGssapiproxyBuildconfigYaml() (*asset, error) {
	bytes, err := testExtendedTestdataGssapiProxyGssapiproxyBuildconfigYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/gssapi/proxy/gssapiproxy-buildconfig.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataGssapiProxyGssapiproxyDeploymentconfigYaml = []byte(`kind: "DeploymentConfig"
apiVersion: "v1"
metadata:
  name: "gssapiproxy-server"
  creationTimestamp: null
spec:
  strategy:
    type: "Recreate"
    resources: {}
  triggers:
    -
      type: "ImageChange"
      imageChangeParams:
        automatic: true
        containerNames:
          - "gssapiproxy-server"
        from:
          kind: "ImageStreamTag"
          name: "gssapiproxy:latest"
        lastTriggeredImage: ""
    -
      type: "ConfigChange"
  replicas: 1
  selector:
    name: "gssapiproxy-server"
  template:
    metadata:
      creationTimestamp: null
      labels:
        name: "gssapiproxy-server"
    spec:
      containers:
        -
          name: "gssapiproxy-server"
          image: "gssapiproxy"
          ports:
            -
              containerPort: 80
              protocol: "TCP"
            -
              containerPort: 443
              protocol: "TCP"
            -
              containerPort: 88
              protocol: "TCP"
            -
              containerPort: 88
              protocol: "UDP"
          resources: {}
          terminationMessagePath: "/dev/termination-log"
          imagePullPolicy: "IfNotPresent"
          capabilities: {}
          securityContext:
            capabilities: {}
            privileged: false
            runAsUser: 0
          readinessProbe:
            httpGet:
              path: "/healthz"
              port: 80
            initialDelaySeconds: 15
            timeoutSeconds: 1
      restartPolicy: "Always"
      dnsPolicy: "ClusterFirst"
      serviceAccount: ""
status: {}
`)

func testExtendedTestdataGssapiProxyGssapiproxyDeploymentconfigYamlBytes() ([]byte, error) {
	return _testExtendedTestdataGssapiProxyGssapiproxyDeploymentconfigYaml, nil
}

func testExtendedTestdataGssapiProxyGssapiproxyDeploymentconfigYaml() (*asset, error) {
	bytes, err := testExtendedTestdataGssapiProxyGssapiproxyDeploymentconfigYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/gssapi/proxy/gssapiproxy-deploymentconfig.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataGssapiProxyGssapiproxyImagestreamYaml = []byte(`kind: "ImageStream"
apiVersion: "v1"
metadata:
  name: "gssapiproxy"
  creationTimestamp: null
`)

func testExtendedTestdataGssapiProxyGssapiproxyImagestreamYamlBytes() ([]byte, error) {
	return _testExtendedTestdataGssapiProxyGssapiproxyImagestreamYaml, nil
}

func testExtendedTestdataGssapiProxyGssapiproxyImagestreamYaml() (*asset, error) {
	bytes, err := testExtendedTestdataGssapiProxyGssapiproxyImagestreamYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/gssapi/proxy/gssapiproxy-imagestream.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataGssapiProxyGssapiproxyServiceYaml = []byte(`kind: "Service"
apiVersion: "v1"
metadata:
  name: "gssapiproxy-server"
  creationTimestamp: null
spec:
  ports:
    -
      name: "http"
      protocol: "TCP"
      port: 80
      targetPort: 80
      nodePort: 0
    -
      name: "https"
      protocol: "TCP"
      port: 443
      targetPort: 443
      nodePort: 0
    -
      name: "kerberos"
      protocol: "TCP"
      port: 88
      targetPort: 88
      nodePort: 0
    -
      name: "kerberos-udp"
      protocol: "UDP"
      port: 88
      targetPort: 88
      nodePort: 0
  selector:
    name: "gssapiproxy-server"
  type: "ClusterIP"
  sessionAffinity: "None"
status:
  loadBalancer: {}
`)

func testExtendedTestdataGssapiProxyGssapiproxyServiceYamlBytes() ([]byte, error) {
	return _testExtendedTestdataGssapiProxyGssapiproxyServiceYaml, nil
}

func testExtendedTestdataGssapiProxyGssapiproxyServiceYaml() (*asset, error) {
	bytes, err := testExtendedTestdataGssapiProxyGssapiproxyServiceYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/gssapi/proxy/gssapiproxy-service.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataGssapiProxyHealthz = []byte(`ok
`)

func testExtendedTestdataGssapiProxyHealthzBytes() ([]byte, error) {
	return _testExtendedTestdataGssapiProxyHealthz, nil
}

func testExtendedTestdataGssapiProxyHealthz() (*asset, error) {
	bytes, err := testExtendedTestdataGssapiProxyHealthzBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/gssapi/proxy/healthz", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataGssapiProxyKadm5Acl = []byte(`*/admin@EXAMPLE.COM	*
`)

func testExtendedTestdataGssapiProxyKadm5AclBytes() ([]byte, error) {
	return _testExtendedTestdataGssapiProxyKadm5Acl, nil
}

func testExtendedTestdataGssapiProxyKadm5Acl() (*asset, error) {
	bytes, err := testExtendedTestdataGssapiProxyKadm5AclBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/gssapi/proxy/kadm5.acl", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataGssapiProxyKdcConf = []byte(`[kdcdefaults]
 kdc_ports = 88
 kdc_tcp_ports = 88

[realms]
 EXAMPLE.COM = {
  #master_key_type = aes256-cts
  acl_file = /var/kerberos/krb5kdc/kadm5.acl
  dict_file = /usr/share/dict/words
  admin_keytab = /var/kerberos/krb5kdc/kadm5.keytab
  supported_enctypes = aes256-cts:normal aes128-cts:normal des3-hmac-sha1:normal arcfour-hmac:normal camellia256-cts:normal camellia128-cts:normal des-hmac-sha1:normal des-cbc-md5:normal des-cbc-crc:normal
 }
`)

func testExtendedTestdataGssapiProxyKdcConfBytes() ([]byte, error) {
	return _testExtendedTestdataGssapiProxyKdcConf, nil
}

func testExtendedTestdataGssapiProxyKdcConf() (*asset, error) {
	bytes, err := testExtendedTestdataGssapiProxyKdcConfBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/gssapi/proxy/kdc.conf", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataGssapiProxyKrb5Conf = []byte(`[logging]
 default = FILE:/var/log/krb5libs.log
 kdc = FILE:/var/log/krb5kdc.log
 admin_server = FILE:/var/log/kadmind.log

[libdefaults]
 dns_lookup_realm = false
 ticket_lifetime = 24h
 renew_lifetime = 7d
 forwardable = true
 rdns = false
 default_realm = EXAMPLE.COM
 default_ccache_name = DIR:/tmp/krb5cc_%{uid}

[appdefaults]
pam = {
 debug = true
 dns_lookup_realm = false
 ticket_lifetime = 24h
 renew_lifetime = 7d
 forwardable = true
 rdns = false
 default_realm = EXAMPLE.COM
 default_ccache_name = DIR:/tmp/krb5cc_%{uid}
}

[realms]
EXAMPLE.COM = {
 kdc = example.com
 admin_server = example.com
 default_domain = example.com
}

[domain_realm]
.example.com = EXAMPLE.COM
example.com = EXAMPLE.COM
`)

func testExtendedTestdataGssapiProxyKrb5ConfBytes() ([]byte, error) {
	return _testExtendedTestdataGssapiProxyKrb5Conf, nil
}

func testExtendedTestdataGssapiProxyKrb5Conf() (*asset, error) {
	bytes, err := testExtendedTestdataGssapiProxyKrb5ConfBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/gssapi/proxy/krb5.conf", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataGssapiProxyProxyConf = []byte(`ServerName proxy.example.com

SSLProxyEngine On
SSLProxyCheckPeerCN Off
SSLProxyCheckPeerName Off
SSLProxyCheckPeerExpire Off

<If "env('SERVER') == 'SERVER_GSSAPI_BASIC_FALLBACK'">
    # In order to use the basic-auth proxy, an X-Csrf-Token must be present
    # Fail anything that doesn't have that header
    RewriteEngine On
    RewriteCond %{REQUEST_URI} ^/mod_auth/?
    RewriteCond %{HTTP:X-Csrf-Token} ^$ [NC]
    RewriteRule ^.* - [F,L]
</If>

<Location /mod_auth/>

    ProxyPass https://backend.example.com/
    Require valid-user

    AuthType GSSAPI
    AuthName "GSSAPI Login"
    RequestHeader set Remote-User %{REMOTE_USER}s

    <If "env('SERVER') == 'SERVER_GSSAPI_ONLY'">
        # Kerberos auth-protected
        GssapiCredStore keytab:/etc/httpd.keytab
    </If>

    <If "env('SERVER') == 'SERVER_GSSAPI_BASIC_FALLBACK'">
        GssapiCredStore keytab:/etc/httpd.keytab
        GssapiBasicAuth on
    </If>

</Location>

RequestHeader unset Remote-User
RequestHeader unset X-Remote-User
`)

func testExtendedTestdataGssapiProxyProxyConfBytes() ([]byte, error) {
	return _testExtendedTestdataGssapiProxyProxyConf, nil
}

func testExtendedTestdataGssapiProxyProxyConf() (*asset, error) {
	bytes, err := testExtendedTestdataGssapiProxyProxyConfBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/gssapi/proxy/proxy.conf", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataGssapiScriptsGssapiTestsSh = []byte(`#!/usr/bin/env bash

set -o errexit
set -o nounset
set -o pipefail

echo "Running ${TEST_NAME}"

cd "${OS_ROOT}"
source hack/lib/init.sh

function cleanup() {
    out=$?
    # get the jUnit output file into a workable state in case we crashed in the middle of testing something
    os::test::junit::reconcile_output
    # check that we didn't mangle jUnit output
    os::test::junit::check_test_counters
    exit $out
}

trap "cleanup" EXIT
os::test::junit::declare_suite_start "${TEST_NAME}"

# Client has no GSSAPI libs and server is GSSAPI only
# Everything fails
# Errors do NOT mention Kerberos

if [[ "${CLIENT}" = 'CLIENT_MISSING_LIBS' && "${SERVER}" = 'SERVER_GSSAPI_ONLY' ]]; then

    os::cmd::expect_failure_and_text 'oc login' 'Login failed \(401 Unauthorized\)'
    os::cmd::expect_failure_and_text 'oc whoami' 'system:anonymous'

    os::cmd::expect_failure_and_text 'oc login -u user1' 'Login failed \(401 Unauthorized\)'
    os::cmd::expect_failure_and_not_text 'oc whoami' 'user1'

    os::cmd::expect_failure_and_text 'oc login -u user2 -p wrongpassword' 'Login failed \(401 Unauthorized\)'
    os::cmd::expect_failure_and_not_text 'oc whoami' 'user2'

    os::cmd::expect_failure_and_text 'oc login -u user2 -p password' 'Login failed \(401 Unauthorized\)'
    os::cmd::expect_failure_and_not_text 'oc whoami' 'user2'

    os::cmd::expect_failure_and_text "oc login -u 'user3@${REALM}'" 'Login failed \(401 Unauthorized\)'
    os::cmd::expect_failure_and_not_text 'oc whoami' 'user3'

    os::cmd::expect_failure_and_text "oc login -u 'user4@${REALM}' -p wrongpassword" 'Login failed \(401 Unauthorized\)'
    os::cmd::expect_failure_and_not_text 'oc whoami' 'user4'

    os::cmd::expect_failure_and_text "oc login -u 'user5@${REALM}' -p password" 'Login failed \(401 Unauthorized\)'
    os::cmd::expect_failure_and_not_text 'oc whoami' 'user5'

fi

# Client has uncofigured GSSAPI libs and server is GSSAPI only
# Everything fails
# Errors mention Kerberos

if [[ "${CLIENT}" = 'CLIENT_HAS_LIBS' && "${SERVER}" = 'SERVER_GSSAPI_ONLY' ]]; then

    DEFAULT_REALM="$(grep default_realm /etc/krb5.conf | awk {'printf $3'})"

    os::cmd::expect_failure_and_text 'oc login' 'No Kerberos credentials available'
    os::cmd::expect_failure_and_text 'oc whoami' 'system:anonymous'

    # Fedora has no default realm, so a realm-less username is considered invalid
    # Ubuntu has a default realm, so will complain about not finding the credentials for it
    # Hence we accept either of those error messages in the next three sets of tests
    os::cmd::expect_failure_and_text 'oc login -u user1' "An invalid name was supplied|Can't find client principal user1@${DEFAULT_REALM} in cache collection"
    os::cmd::expect_failure_and_not_text 'oc whoami' 'user1'

    os::cmd::expect_failure_and_text 'oc login -u user2 -p wrongpassword' "An invalid name was supplied|Can't find client principal user2@${DEFAULT_REALM} in cache collection"
    os::cmd::expect_failure_and_not_text 'oc whoami' 'user2'

    os::cmd::expect_failure_and_text 'oc login -u user2 -p password' "An invalid name was supplied|Can't find client principal user2@${DEFAULT_REALM} in cache collection"
    os::cmd::expect_failure_and_not_text 'oc whoami' 'user2'

    os::cmd::expect_failure_and_text "oc login -u 'user3@${REALM}'" "Can't find client principal user3@${REALM} in cache collection"
    os::cmd::expect_failure_and_not_text 'oc whoami' 'user3'

    os::cmd::expect_failure_and_text "oc login -u 'user4@${REALM}' -p wrongpassword" "Can't find client principal user4@${REALM} in cache collection"
    os::cmd::expect_failure_and_not_text 'oc whoami' 'user4'

    os::cmd::expect_failure_and_text "oc login -u 'user5@${REALM}' -p password" "Can't find client principal user5@${REALM} in cache collection"
    os::cmd::expect_failure_and_not_text 'oc whoami' 'user5'

fi

# Client has GSSAPI configured and server is GSSAPI only
# Only GSSAPI works
# Errors mention Kerberos

if [[ "${CLIENT}" = 'CLIENT_HAS_LIBS_IS_CONFIGURED' && "${SERVER}" = 'SERVER_GSSAPI_ONLY' ]]; then

    # No ticket
    os::cmd::expect_failure_and_text 'oc login' 'No Kerberos credentials available'
    os::cmd::expect_failure_and_text 'oc whoami' 'system:anonymous'

    os::cmd::expect_failure 'kinit user1 <<< wrongpassword'
    os::cmd::expect_failure_and_text 'oc login' 'No Kerberos credentials available'
    os::cmd::expect_failure_and_not_text 'oc whoami' 'user1'

    # Single ticket
    os::cmd::expect_success 'kinit user1 <<< password'
    os::cmd::expect_success_and_text 'oc login' 'Login successful.'
    os::cmd::expect_success_and_text 'oc whoami' "user1@${REALM}"
    os::cmd::expect_success_and_text 'oc logout' "user1@${REALM}"

    # Having multiple tickets
    os::cmd::expect_success "kinit user2@${REALM} <<< password"
    os::cmd::expect_success 'kinit user3 <<< password'
    os::cmd::expect_failure 'kinit user4 <<< wrongpassword'
    os::cmd::expect_failure "kinit user5@${REALM} <<< wrongpassword"

    # Shortname, non-default ticket
    os::cmd::expect_success_and_text 'oc login -u user1' 'Login successful.'
    os::cmd::expect_success_and_text 'oc whoami' "user1@${REALM}"
    os::cmd::expect_success_and_text 'oc logout' "user1@${REALM}"

    # Longname, non-default ticket
    os::cmd::expect_success_and_text "oc login -u 'user2@${REALM}'" 'Login successful.'
    os::cmd::expect_success_and_text 'oc whoami' "user2@${REALM}"
    os::cmd::expect_success_and_text 'oc logout' "user2@${REALM}"

    # Default ticket
    os::cmd::expect_success_and_text 'oc login' 'Login successful.'
    os::cmd::expect_success_and_text 'oc whoami' "user3@${REALM}"
    os::cmd::expect_success_and_text 'oc logout' "user3@${REALM}"

    # Non-ticket users
    os::cmd::expect_failure_and_text 'oc login -u user4' "Can't find client principal user4@${REALM} in cache collection"
    os::cmd::expect_failure_and_not_text 'oc whoami' 'user4'
    os::cmd::expect_failure_and_text "oc login -u 'user4@${REALM}'" "Can't find client principal user4@${REALM} in cache collection"
    os::cmd::expect_failure_and_not_text 'oc whoami' 'user4'

    os::cmd::expect_failure_and_text 'oc login -u user4 -p password' "Can't find client principal user4@${REALM} in cache collection"
    os::cmd::expect_failure_and_not_text 'oc whoami' 'user4'
    os::cmd::expect_failure_and_text "oc login -u 'user4@${REALM}' -p password" "Can't find client principal user4@${REALM} in cache collection"
    os::cmd::expect_failure_and_not_text 'oc whoami' 'user4'

    os::cmd::expect_failure_and_text 'oc login -u user5 -p wrongpassword' "Can't find client principal user5@${REALM} in cache collection"
    os::cmd::expect_failure_and_not_text 'oc whoami' 'user5'
    os::cmd::expect_failure_and_text "oc login -u 'user5@${REALM}' -p wrongpassword" "Can't find client principal user5@${REALM} in cache collection"
    os::cmd::expect_failure_and_not_text 'oc whoami' 'user5'

    # Password is ignored if you have the ticket for the user
    os::cmd::expect_success_and_text 'oc login -u user1 -p wrongpassword' 'Login successful.'
    os::cmd::expect_success_and_text 'oc whoami' "user1@${REALM}"
    os::cmd::expect_success_and_text 'oc logout' "user1@${REALM}"
    os::cmd::expect_success_and_text "oc login -u 'user2@${REALM}' -p wrongpassword" 'Login successful.'
    os::cmd::expect_success_and_text 'oc whoami' "user2@${REALM}"
    os::cmd::expect_success_and_text 'oc logout' "user2@${REALM}"

fi

# Client has no GSSAPI libs or unconfigured GSSAPI libs and server is GSSAPI with Basic fallback
# Only BASIC works
# Errors do NOT mention Kerberos

if [[ ( "${CLIENT}" = 'CLIENT_MISSING_LIBS' || "${CLIENT}" = 'CLIENT_HAS_LIBS' ) && "${SERVER}" = 'SERVER_GSSAPI_BASIC_FALLBACK' ]]; then

    os::cmd::expect_failure_and_text 'oc login <<< \n' 'Login failed \(401 Unauthorized\)'
    os::cmd::expect_failure_and_text 'oc whoami' 'system:anonymous'

    os::cmd::expect_failure_and_text 'oc login -u user1 <<EOF
    EOF' 'Login failed \(401 Unauthorized\)'
    os::cmd::expect_failure_and_not_text 'oc whoami' 'user1'

    os::cmd::expect_failure_and_text 'oc login -u user2 -p wrongpassword' 'Login failed \(401 Unauthorized\)'
    os::cmd::expect_failure_and_not_text 'oc whoami' 'user2'

    os::cmd::expect_success_and_text 'oc login -u user2 -p password' 'Login successful.'
    os::cmd::expect_success_and_text 'oc whoami' "user2@${REALM}"
    os::cmd::expect_success_and_text 'oc logout' "user2@${REALM}"

    os::cmd::expect_failure_and_text "oc login -u 'user3@${REALM}' <<EOF
    EOF" 'Login failed \(401 Unauthorized\)'
    os::cmd::expect_failure_and_not_text 'oc whoami' 'user3'

    os::cmd::expect_failure_and_text "oc login -u 'user4@${REALM}' -p wrongpassword" 'Login failed \(401 Unauthorized\)'
    os::cmd::expect_failure_and_not_text 'oc whoami' 'user4'

    os::cmd::expect_success_and_text "oc login -u 'user5@${REALM}' -p password" 'Login successful.'
    os::cmd::expect_success_and_text 'oc whoami' "user5@${REALM}"
    os::cmd::expect_success_and_text 'oc logout' "user5@${REALM}"

fi

# Client has GSSAPI configured and server is GSSAPI with Basic fallback
# Everything works
# Errors do NOT mention Kerberos

if [[ "${CLIENT}" = 'CLIENT_HAS_LIBS_IS_CONFIGURED' && "${SERVER}" = 'SERVER_GSSAPI_BASIC_FALLBACK' ]]; then

    # No ticket
    os::cmd::expect_failure_and_text 'oc login <<< \n' 'Login failed \(401 Unauthorized\)'
    os::cmd::expect_failure_and_text 'oc whoami' 'system:anonymous'

    os::cmd::expect_failure 'kinit user1 <<< wrongpassword'
    os::cmd::expect_failure_and_text 'oc login <<< \n' 'Login failed \(401 Unauthorized\)'
    os::cmd::expect_failure_and_not_text 'oc whoami' 'user1'

    # Single ticket
    os::cmd::expect_success 'kinit user1 <<< password'
    os::cmd::expect_success_and_text 'oc login' 'Login successful.'
    os::cmd::expect_success_and_text 'oc whoami' "user1@${REALM}"
    os::cmd::expect_success_and_text 'oc logout' "user1@${REALM}"

    # Having multiple tickets
    os::cmd::expect_success "kinit user2@${REALM} <<< password"
    os::cmd::expect_success 'kinit user3 <<< password'
    os::cmd::expect_failure 'kinit user4 <<< wrongpassword'
    os::cmd::expect_failure "kinit user5@${REALM} <<< wrongpassword"

    # Shortname, non-default ticket
    os::cmd::expect_success_and_text 'oc login -u user1' 'Login successful.'
    os::cmd::expect_success_and_text 'oc whoami' "user1@${REALM}"
    os::cmd::expect_success_and_text 'oc logout' "user1@${REALM}"

    # Longname, non-default ticket
    os::cmd::expect_success_and_text "oc login -u 'user2@${REALM}'" 'Login successful.'
    os::cmd::expect_success_and_text 'oc whoami' "user2@${REALM}"
    os::cmd::expect_success_and_text 'oc logout' "user2@${REALM}"

    # Default ticket
    os::cmd::expect_success_and_text 'oc login' 'Login successful.'
    os::cmd::expect_success_and_text 'oc whoami' "user3@${REALM}"
    os::cmd::expect_success_and_text 'oc logout' "user3@${REALM}"

    # Non-ticket users
    os::cmd::expect_failure_and_text 'oc login -u user4 <<EOF
    EOF' 'Login failed \(401 Unauthorized\)'
    os::cmd::expect_failure_and_not_text 'oc whoami' 'user4'
    os::cmd::expect_failure_and_text "oc login -u 'user4@${REALM}' <<EOF
    EOF" 'Login failed \(401 Unauthorized\)'
    os::cmd::expect_failure_and_not_text 'oc whoami' 'user4'

    os::cmd::expect_success_and_text 'oc login -u user4 -p password' 'Login successful.'
    os::cmd::expect_success_and_text 'oc whoami' "user4@${REALM}"
    os::cmd::expect_success_and_text 'oc logout' "user4@${REALM}"
    os::cmd::expect_success_and_text "oc login -u 'user4@${REALM}' -p password" 'Login successful.'
    os::cmd::expect_success_and_text 'oc whoami' "user4@${REALM}"
    os::cmd::expect_success_and_text 'oc logout' "user4@${REALM}"

    os::cmd::expect_failure_and_text 'oc login -u user5 -p wrongpassword' 'Login failed \(401 Unauthorized\)'
    os::cmd::expect_failure_and_not_text 'oc whoami' 'user5'
    os::cmd::expect_failure_and_text "oc login -u 'user5@${REALM}' -p wrongpassword" 'Login failed \(401 Unauthorized\)'
    os::cmd::expect_failure_and_not_text 'oc whoami' 'user5'

    # Password is ignored if you have the ticket for the user
    os::cmd::expect_success_and_text 'oc login -u user1 -p wrongpassword' 'Login successful.'
    os::cmd::expect_success_and_text 'oc whoami' "user1@${REALM}"
    os::cmd::expect_success_and_text 'oc logout' "user1@${REALM}"
    os::cmd::expect_success_and_text "oc login -u 'user2@${REALM}' -p wrongpassword" 'Login successful.'
    os::cmd::expect_success_and_text 'oc whoami' "user2@${REALM}"
    os::cmd::expect_success_and_text 'oc logout' "user2@${REALM}"

fi

os::test::junit::declare_suite_end

# Make sure we made it to the end of the script
echo "Finished running ${TEST_NAME}"
`)

func testExtendedTestdataGssapiScriptsGssapiTestsShBytes() ([]byte, error) {
	return _testExtendedTestdataGssapiScriptsGssapiTestsSh, nil
}

func testExtendedTestdataGssapiScriptsGssapiTestsSh() (*asset, error) {
	bytes, err := testExtendedTestdataGssapiScriptsGssapiTestsShBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/gssapi/scripts/gssapi-tests.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataGssapiScriptsTestWrapperSh = []byte(`#!/usr/bin/env bash

set -o errexit
set -o nounset
set -o pipefail

cd "${OS_ROOT}"
source hack/lib/init.sh

export TEST_NAME="test-extended/gssapiproxy-tests/$(uname -n)-${CLIENT}-${SERVER}"
os::util::environment::setup_time_vars
os::cleanup::tmpdir
export JUNIT_REPORT_OUTPUT="${LOG_DIR}/raw_test_output.log"

# use a subshell and `+"`"+`if`+"`"+` statement to prevent `+"`"+`exit`+"`"+` calls from killing this script
if ! ( './gssapi-tests.sh' ) 2>&1; then
    return_code=$?
fi

cat "${JUNIT_REPORT_OUTPUT}" 1>&2
exit "${return_code:-0}"
`)

func testExtendedTestdataGssapiScriptsTestWrapperShBytes() ([]byte, error) {
	return _testExtendedTestdataGssapiScriptsTestWrapperSh, nil
}

func testExtendedTestdataGssapiScriptsTestWrapperSh() (*asset, error) {
	bytes, err := testExtendedTestdataGssapiScriptsTestWrapperShBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/gssapi/scripts/test-wrapper.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataGssapiUbuntuBaseDockerfile = []byte(`# Clone from the Ubuntu 16.04 LTS image
FROM ubuntu:16.04

ARG REALM
ARG HOST

ENV REALM ${REALM}
ENV HOST ${HOST}

ENV CLIENT CLIENT_MISSING_LIBS

ENV OS_ROOT /run/os
ENV KUBECONFIG ${OS_ROOT}/kubeconfig
ENV PATH ${OS_ROOT}/bin:${PATH}

WORKDIR ${OS_ROOT}
ADD gssapi-tests.sh gssapi-tests.sh
ADD test-wrapper.sh test-wrapper.sh
ADD kubeconfig kubeconfig
ADD hack hack
ADD oc bin/oc

RUN chmod +x gssapi-tests.sh test-wrapper.sh && \
    apt-get update && apt-get install -y bc

ENTRYPOINT /run/os/test-wrapper.sh
`)

func testExtendedTestdataGssapiUbuntuBaseDockerfileBytes() ([]byte, error) {
	return _testExtendedTestdataGssapiUbuntuBaseDockerfile, nil
}

func testExtendedTestdataGssapiUbuntuBaseDockerfile() (*asset, error) {
	bytes, err := testExtendedTestdataGssapiUbuntuBaseDockerfileBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/gssapi/ubuntu/base/Dockerfile", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataGssapiUbuntuKerberosDockerfile = []byte(`FROM gssapiproxy/ubuntu-gssapi-base

ENV CLIENT CLIENT_HAS_LIBS

RUN apt-get install -y krb5-user
`)

func testExtendedTestdataGssapiUbuntuKerberosDockerfileBytes() ([]byte, error) {
	return _testExtendedTestdataGssapiUbuntuKerberosDockerfile, nil
}

func testExtendedTestdataGssapiUbuntuKerberosDockerfile() (*asset, error) {
	bytes, err := testExtendedTestdataGssapiUbuntuKerberosDockerfileBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/gssapi/ubuntu/kerberos/Dockerfile", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataGssapiUbuntuKerberos_configuredDockerfile = []byte(`FROM gssapiproxy/ubuntu-gssapi-kerberos

ENV CLIENT CLIENT_HAS_LIBS_IS_CONFIGURED

RUN sed -i.bak1 -e "s/\[realms\]/\[realms\]\n${REALM} = {\n kdc = ${HOST}\n admin_server = ${HOST}\n default_domain = ${HOST}\n}/" /etc/krb5.conf && \
    sed -i.bak2 -e "s/\[domain_realm\]/\[domain_realm\]\n.${HOST} = ${REALM}\n${HOST} = ${REALM}/" /etc/krb5.conf && \
    sed -i.bak3 -e "s!default_realm = !default_realm = ${REALM}\ndefault_ccache_name = DIR:/tmp/krb5cc_%{uid}\n#!" /etc/krb5.conf
`)

func testExtendedTestdataGssapiUbuntuKerberos_configuredDockerfileBytes() ([]byte, error) {
	return _testExtendedTestdataGssapiUbuntuKerberos_configuredDockerfile, nil
}

func testExtendedTestdataGssapiUbuntuKerberos_configuredDockerfile() (*asset, error) {
	bytes, err := testExtendedTestdataGssapiUbuntuKerberos_configuredDockerfileBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/gssapi/ubuntu/kerberos_configured/Dockerfile", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataHelloBuilderDockerfile = []byte(`FROM openshift/origin-release:latest
LABEL io.openshift.s2i.scripts-url=image:///usr/libexec/s2i
ENV STI_SCRIPTS_PATH=/usr/libexec/s2i
COPY scripts $STI_SCRIPTS_PATH
RUN chown 1001 /openshifttmp
USER 1001 
`)

func testExtendedTestdataHelloBuilderDockerfileBytes() ([]byte, error) {
	return _testExtendedTestdataHelloBuilderDockerfile, nil
}

func testExtendedTestdataHelloBuilderDockerfile() (*asset, error) {
	bytes, err := testExtendedTestdataHelloBuilderDockerfileBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/hello-builder/Dockerfile", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataHelloBuilderScriptsAssemble = []byte(`#!/bin/sh
unset GOPATH
cd /tmp/src
CGO_ENABLED=0 go build -a -installsuffix cgo -o hello-openshift -tags netgo
mv hello-openshift /tmp
`)

func testExtendedTestdataHelloBuilderScriptsAssembleBytes() ([]byte, error) {
	return _testExtendedTestdataHelloBuilderScriptsAssemble, nil
}

func testExtendedTestdataHelloBuilderScriptsAssemble() (*asset, error) {
	bytes, err := testExtendedTestdataHelloBuilderScriptsAssembleBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/hello-builder/scripts/assemble", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataHelloBuilderScriptsRun = []byte(`#!/bin/sh
echo This image is not meant to be run by itself
`)

func testExtendedTestdataHelloBuilderScriptsRunBytes() ([]byte, error) {
	return _testExtendedTestdataHelloBuilderScriptsRun, nil
}

func testExtendedTestdataHelloBuilderScriptsRun() (*asset, error) {
	bytes, err := testExtendedTestdataHelloBuilderScriptsRunBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/hello-builder/scripts/run", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataIdlingEchoServerRcYaml = []byte(`apiVersion: v1
kind: List
items:
- apiVersion: v1
  kind: ReplicationController
  metadata:
    name: idling-echo-rc
  spec:
    replicas: 2
    selector:
      app: idling-echo
      replicationcontroller: idling-echo
    template:
      metadata:
        labels:
          app: idling-echo
          replicationcontroller: idling-echo
      spec:
        containers:
        - image: openshift/origin-base
          name: idling-echo
          command:
            - /usr/bin/socat
            - TCP4-LISTEN:8675,reuseaddr,fork
            - EXEC:'/bin/cat'
          ports:
          - containerPort: 8675
            protocol: TCP
        dnsPolicy: ClusterFirst
        restartPolicy: Always
        securityContext: {}
- apiVersion: v1
  kind: Service
  metadata:
    name: idling-echo
  spec:
    selector:
      app: idling-echo
    ports:
      - port: 8675
- apiVersion: v1
  kind: Route
  metadata:
    name: idling-echo
  spec:
    to:
      kind: Service
      name: idling-echo

`)

func testExtendedTestdataIdlingEchoServerRcYamlBytes() ([]byte, error) {
	return _testExtendedTestdataIdlingEchoServerRcYaml, nil
}

func testExtendedTestdataIdlingEchoServerRcYaml() (*asset, error) {
	bytes, err := testExtendedTestdataIdlingEchoServerRcYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/idling-echo-server-rc.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataIdlingEchoServerYaml = []byte(`apiVersion: v1
kind: List
metadata: {}
items:
- apiVersion: v1
  kind: DeploymentConfig
  metadata:
    name: idling-echo
  spec:
    replicas: 2
    selector:
      app: idling-echo
      deploymentconfig: idling-echo
    strategy:
      type: Rolling
    template:
      metadata:
        labels:
          app: idling-echo
          deploymentconfig: idling-echo
      spec:
        containers:
        - image: openshift/origin-base
          name: idling-tcp-echo
          command:
            - /usr/bin/socat
            - TCP4-LISTEN:8675,reuseaddr,fork
            - EXEC:'/bin/cat'
          ports:
          - containerPort: 8675
            protocol: TCP
        - image: openshift/origin-base
          name: idling-udp-echo
          command:
            - /usr/bin/socat
            - UDP4-LISTEN:3090,reuseaddr,fork
            - EXEC:'/bin/cat'
          ports:
          - containerPort: 3090
            protocol: UDP
        dnsPolicy: ClusterFirst
        restartPolicy: Always
        securityContext: {}
- apiVersion: v1
  kind: Service
  metadata:
    name: idling-echo
    labels:
      app: idling-echo
  spec:
    selector:
      app: idling-echo
    ports:
      - port: 8675
        name: tcp-echo
        protocol: TCP
      - port: 3090
        name: udp-echo
        protocol: UDP
- apiVersion: v1
  kind: Route
  metadata:
    name: idling-echo
  spec:
    to:
      kind: Service
      name: idling-echo
- apiVersion: v1
  kind: Route
  metadata:
    name: idling-echo-reencrypt
  spec:
    tls:
      termination: reencrypt
      # the actual certificate here is not relevant, since we're not
      # actually serving TLS
      destinationCACertificate: |-
        -----BEGIN CERTIFICATE-----
        MIIDIjCCAgqgAwIBAgIBATANBgkqhkiG9w0BAQUFADCBoTELMAkGA1UEBhMCVVMx
        CzAJBgNVBAgMAlNDMRUwEwYDVQQHDAxEZWZhdWx0IENpdHkxHDAaBgNVBAoME0Rl
        ZmF1bHQgQ29tcGFueSBMdGQxEDAOBgNVBAsMB1Rlc3QgQ0ExGjAYBgNVBAMMEXd3
        dy5leGFtcGxlY2EuY29tMSIwIAYJKoZIhvcNAQkBFhNleGFtcGxlQGV4YW1wbGUu
        Y29tMB4XDTE1MDExMjE0MTk0MVoXDTE2MDExMjE0MTk0MVowfDEYMBYGA1UEAwwP
        d3d3LmV4YW1wbGUuY29tMQswCQYDVQQIDAJTQzELMAkGA1UEBhMCVVMxIjAgBgkq
        hkiG9w0BCQEWE2V4YW1wbGVAZXhhbXBsZS5jb20xEDAOBgNVBAoMB0V4YW1wbGUx
        EDAOBgNVBAsMB0V4YW1wbGUwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMrv
        gu6ZTTefNN7jjiZbS/xvQjyXjYMN7oVXv76jbX8gjMOmg9m0xoVZZFAE4XyQDuCm
        47VRx5Qrf/YLXmB2VtCFvB0AhXr5zSeWzPwaAPrjA4ebG+LUo24ziS8KqNxrFs1M
        mNrQUgZyQC6XIe1JHXc9t+JlL5UZyZQC1IfaJulDAgMBAAGjDTALMAkGA1UdEwQC
        MAAwDQYJKoZIhvcNAQEFBQADggEBAFCi7ZlkMnESvzlZCvv82Pq6S46AAOTPXdFd
        TMvrh12E1sdVALF1P1oYFJzG1EiZ5ezOx88fEDTW+Lxb9anw5/KJzwtWcfsupf1m
        V7J0D3qKzw5C1wjzYHh9/Pz7B1D0KthQRATQCfNf8s6bbFLaw/dmiIUhHLtIH5Qc
        yfrejTZbOSP77z8NOWir+BWWgIDDB2//3AkDIQvT20vmkZRhkqSdT7et4NmXOX/j
        jhPti4b2Fie0LeuvgaOdKjCpQQNrYthZHXeVlOLRhMTSk3qUczenkKTOhvP7IS9q
        +Dzv5hqgSfvMG392KWh5f8xXfJNs4W5KLbZyl901MeReiLrPH3w=
        -----END CERTIFICATE-----
    to:
      kind: Service
      name: idling-echo
`)

func testExtendedTestdataIdlingEchoServerYamlBytes() ([]byte, error) {
	return _testExtendedTestdataIdlingEchoServerYaml, nil
}

func testExtendedTestdataIdlingEchoServerYaml() (*asset, error) {
	bytes, err := testExtendedTestdataIdlingEchoServerYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/idling-echo-server.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataImageDeploymentWithAnnotationTriggerYaml = []byte(`apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
    image.openshift.io/triggers: '[{"from":{"kind":"ImageStreamTag","name":"test:v1"},"fieldPath":"spec.template.spec.containers[?(@.name==\"test\")].image"}]'
  name: test
spec:
  progressDeadlineSeconds: 600
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      app: test
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app: test
    spec:
      containers:
        - image: " "
          name: test
          command: ["/bin/sleep"]
          args:
           - infinity
`)

func testExtendedTestdataImageDeploymentWithAnnotationTriggerYamlBytes() ([]byte, error) {
	return _testExtendedTestdataImageDeploymentWithAnnotationTriggerYaml, nil
}

func testExtendedTestdataImageDeploymentWithAnnotationTriggerYaml() (*asset, error) {
	bytes, err := testExtendedTestdataImageDeploymentWithAnnotationTriggerYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/image/deployment-with-annotation-trigger.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataImageTestImageJson = []byte(`{
  "kind": "Image",
  "apiVersion": "image.openshift.io/v1",
  "metadata": {
    "name": "test",
    "creationTimestamp": null
  },
  "dockerImageReference": "openshift/ruby-19-centos:latest",
  "dockerImageMetadata": {
    "kind": "DockerImage",
    "apiVersion": "1.0",
    "Id": "",
    "ContainerConfig": {},
    "Config": {}
  },
  "dockerImageMetadataVersion": "1.0"
}
`)

func testExtendedTestdataImageTestImageJsonBytes() ([]byte, error) {
	return _testExtendedTestdataImageTestImageJson, nil
}

func testExtendedTestdataImageTestImageJson() (*asset, error) {
	bytes, err := testExtendedTestdataImageTestImageJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/image/test-image.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataImagePullSecretsDcWithNewPullSecretYaml = []byte(`kind: Template
apiVersion: v1
metadata:
  name: template
objects:
- kind: DeploymentConfig
  apiVersion: v1
  metadata:
    name: my-dc
  spec:
    replicas: 1
    selector:
      deploymentconfig: my-dc
    strategy:
      type: Rolling
      rollingParams:
        pre: 
          failurePolicy: Abort
          execNewPod: 
            containerName: dc-pod
            command:
            - ls
    template:
      metadata:
        labels:
          deploymentconfig: my-dc
      spec:
        containers:
        - name: dc-pod
          image: ${DOCKER_REGISTRY}/image-ns/busybox
        imagePullSecrets:
        - name: image-ns-pull
parameters:
- name: DOCKER_REGISTRY`)

func testExtendedTestdataImagePullSecretsDcWithNewPullSecretYamlBytes() ([]byte, error) {
	return _testExtendedTestdataImagePullSecretsDcWithNewPullSecretYaml, nil
}

func testExtendedTestdataImagePullSecretsDcWithNewPullSecretYaml() (*asset, error) {
	bytes, err := testExtendedTestdataImagePullSecretsDcWithNewPullSecretYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/image-pull-secrets/dc-with-new-pull-secret.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataImagePullSecretsDcWithOldPullSecretYaml = []byte(`kind: Template
apiVersion: v1
metadata:
  name: template
objects:
- kind: DeploymentConfig
  apiVersion: v1
  metadata:
    name: my-dc-old
  spec:
    replicas: 1
    selector:
      deploymentconfig: my-dc-old
    strategy:
      type: Rolling
      rollingParams:
        pre: 
          failurePolicy: Abort
          execNewPod: 
            containerName: dc-pod-old
            command:
            - ls
    template:
      metadata:
        labels:
          deploymentconfig: my-dc-old
      spec:
        containers:
        - name: dc-pod-old
          image: ${DOCKER_REGISTRY}/image-ns/busybox
        imagePullSecrets:
        - name: image-ns-pull-old
parameters:
- name: DOCKER_REGISTRY`)

func testExtendedTestdataImagePullSecretsDcWithOldPullSecretYamlBytes() ([]byte, error) {
	return _testExtendedTestdataImagePullSecretsDcWithOldPullSecretYaml, nil
}

func testExtendedTestdataImagePullSecretsDcWithOldPullSecretYaml() (*asset, error) {
	bytes, err := testExtendedTestdataImagePullSecretsDcWithOldPullSecretYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/image-pull-secrets/dc-with-old-pull-secret.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataImagePullSecretsPodWithNewPullSecretYaml = []byte(`kind: Template
apiVersion: v1
metadata:
  name: template
objects:
- kind: Pod 
  apiVersion: v1 
  metadata: 
    name: new-pull-pod
  spec: 
    containers: 
    - name: new-pull-pod
      image: ${DOCKER_REGISTRY}/image-ns/busybox
      command:
      - ls
    imagePullSecrets:
      - name: image-ns-pull
parameters:
- name: DOCKER_REGISTRY`)

func testExtendedTestdataImagePullSecretsPodWithNewPullSecretYamlBytes() ([]byte, error) {
	return _testExtendedTestdataImagePullSecretsPodWithNewPullSecretYaml, nil
}

func testExtendedTestdataImagePullSecretsPodWithNewPullSecretYaml() (*asset, error) {
	bytes, err := testExtendedTestdataImagePullSecretsPodWithNewPullSecretYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/image-pull-secrets/pod-with-new-pull-secret.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataImagePullSecretsPodWithNoPullSecretYaml = []byte(`kind: Template
apiVersion: v1
metadata:
  name: template
objects:
- kind: Pod 
  apiVersion: v1 
  metadata: 
    name: no-pull-pod
  spec: 
    containers: 
    - name: no-pull-pod
      image: ${DOCKER_REGISTRY}/image-ns/busybox
      command:
      - ls
parameters:
- name: DOCKER_REGISTRY`)

func testExtendedTestdataImagePullSecretsPodWithNoPullSecretYamlBytes() ([]byte, error) {
	return _testExtendedTestdataImagePullSecretsPodWithNoPullSecretYaml, nil
}

func testExtendedTestdataImagePullSecretsPodWithNoPullSecretYaml() (*asset, error) {
	bytes, err := testExtendedTestdataImagePullSecretsPodWithNoPullSecretYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/image-pull-secrets/pod-with-no-pull-secret.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataImagePullSecretsPodWithOldPullSecretYaml = []byte(`kind: Template
apiVersion: v1
metadata:
  name: template
objects:
- kind: Pod 
  apiVersion: v1 
  metadata: 
    name: old-pull-pod
  spec: 
    containers: 
    - name: old-pull-pod
      image: ${DOCKER_REGISTRY}/image-ns/busybox
      command:
      - ls
    imagePullSecrets:
      - name: image-ns-pull-old
parameters:
- name: DOCKER_REGISTRY`)

func testExtendedTestdataImagePullSecretsPodWithOldPullSecretYamlBytes() ([]byte, error) {
	return _testExtendedTestdataImagePullSecretsPodWithOldPullSecretYaml, nil
}

func testExtendedTestdataImagePullSecretsPodWithOldPullSecretYaml() (*asset, error) {
	bytes, err := testExtendedTestdataImagePullSecretsPodWithOldPullSecretYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/image-pull-secrets/pod-with-old-pull-secret.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataImage_ecosystemPerlHotdeployIndexPl = []byte(`#!/usr/bin/perl
use strict;
use warnings;

use File::Basename qw(dirname);
use Cwd  qw(abs_path);

use lib (dirname abs_path $0) .'/lib';
use My::Test qw(test);
   
print qq(Content-type: text/plain\n\n);
     
test();

`)

func testExtendedTestdataImage_ecosystemPerlHotdeployIndexPlBytes() ([]byte, error) {
	return _testExtendedTestdataImage_ecosystemPerlHotdeployIndexPl, nil
}

func testExtendedTestdataImage_ecosystemPerlHotdeployIndexPl() (*asset, error) {
	bytes, err := testExtendedTestdataImage_ecosystemPerlHotdeployIndexPlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/image_ecosystem/perl-hotdeploy/index.pl", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataImage_ecosystemPerlHotdeployLibMyTestPm = []byte(`package My::Test;
use strict; 
use warnings;

use Exporter qw(import);
 
our @EXPORT_OK = qw(test);

sub test {
  print "initial value\n";
}

1;
`)

func testExtendedTestdataImage_ecosystemPerlHotdeployLibMyTestPmBytes() ([]byte, error) {
	return _testExtendedTestdataImage_ecosystemPerlHotdeployLibMyTestPm, nil
}

func testExtendedTestdataImage_ecosystemPerlHotdeployLibMyTestPm() (*asset, error) {
	bytes, err := testExtendedTestdataImage_ecosystemPerlHotdeployLibMyTestPmBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/image_ecosystem/perl-hotdeploy/lib/My/Test.pm", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataImage_ecosystemPerlHotdeployPerlJson = []byte(`{
  "kind": "Template",
  "apiVersion": "v1",
  "metadata": {
    "name": "perl-hotdeploy-example"
  },
  "objects": [
    {
      "kind": "Service",
      "apiVersion": "v1",
      "metadata": {
        "name": "${NAME}"
      },
      "spec": {
        "ports": [
          {
            "name": "web",
            "port": 8080,
            "targetPort": 8080
          }
        ],
        "selector": {
          "name": "${NAME}"
        }
      }
    },
    {
      "kind": "ImageStream",
      "apiVersion": "v1",
      "metadata": {
        "name": "${NAME}",
        "annotations": {
          "description": "Keeps track of changes in the application image"
        }
      }
    },
    {
      "kind": "BuildConfig",
      "apiVersion": "v1",
      "metadata": {
        "name": "${NAME}"
      },
      "spec": {
        "strategy": {
          "type": "Source",
          "sourceStrategy": {
            "from": {
              "kind": "ImageStreamTag",
              "namespace": "openshift",
              "name": "perl:5.26"
            }
          }
        },
        "output": {
          "to": {
            "kind": "ImageStreamTag",
            "name": "${NAME}:latest"
          }
        } 
      }
    },
    {
      "kind": "DeploymentConfig",
      "apiVersion": "v1",
      "metadata": {
        "name": "${NAME}"
      },
      "spec": {
        "strategy": {
          "type": "Rolling"
        },
        "triggers": [
          {
            "type": "ImageChange",
            "imageChangeParams": {
              "automatic": true,
              "containerNames": [
                "perl"
              ],
              "from": {
                "kind": "ImageStreamTag",
                "name": "${NAME}:latest"
              }
            }
          },
          {
            "type": "ConfigChange"
          }
        ],
        "replicas": 1,
        "selector": {
          "name": "${NAME}"
        },
        "template": {
          "metadata": {
            "name": "${NAME}",
            "labels": {
              "name": "${NAME}"
            }
          },
          "spec": {
            "containers": [
              {
                "name": "perl",
                "image": " ",
                "ports": [
                  {
                    "containerPort": 8080
                  }
                ],
                "readinessProbe": {
                  "timeoutSeconds": 3,
                  "initialDelaySeconds": 3,
                  "httpGet": {
                    "path": "/",
                    "port": 8080
                  }
                }
              }
            ]
          }
        }
      }
    }
  ],
  "parameters": [
    {
      "name": "NAME",
      "displayName": "Name",
      "description": "The name assigned to all of the frontend objects defined in this template.",
      "required": true,
      "value": "perl"
    }
  ]
}
`)

func testExtendedTestdataImage_ecosystemPerlHotdeployPerlJsonBytes() ([]byte, error) {
	return _testExtendedTestdataImage_ecosystemPerlHotdeployPerlJson, nil
}

func testExtendedTestdataImage_ecosystemPerlHotdeployPerlJson() (*asset, error) {
	bytes, err := testExtendedTestdataImage_ecosystemPerlHotdeployPerlJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/image_ecosystem/perl-hotdeploy/perl.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataImagestreamJenkinsSlavePodsYaml = []byte(`apiVersion: v1
kind: ImageStream
metadata:
  labels:
    role: jenkins-slave
  name: jenkins-slave
spec:
  tags:
  - from:
      kind: DockerImage
      name: docker.io/openshift/jenkins-slave-maven-centos7:latest
    name: base
  - from:
      kind: ImageStreamTag
      name: base
    name: latest
`)

func testExtendedTestdataImagestreamJenkinsSlavePodsYamlBytes() ([]byte, error) {
	return _testExtendedTestdataImagestreamJenkinsSlavePodsYaml, nil
}

func testExtendedTestdataImagestreamJenkinsSlavePodsYaml() (*asset, error) {
	bytes, err := testExtendedTestdataImagestreamJenkinsSlavePodsYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/imagestream-jenkins-slave-pods.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataImagestreamtagJenkinsSlavePodsYaml = []byte(`apiVersion: v1
kind: ImageStream
metadata:
  name: slave-jenkins
spec:
  tags:
  - from:
      kind: DockerImage
      name: docker.io/openshift/jenkins-slave-maven-centos7:latest
    name: base
  - annotations:
      role: jenkins-slave
      slave-label: jenkins-slave
    from:
      kind: ImageStreamTag
      name: base
    name: latest
`)

func testExtendedTestdataImagestreamtagJenkinsSlavePodsYamlBytes() ([]byte, error) {
	return _testExtendedTestdataImagestreamtagJenkinsSlavePodsYaml, nil
}

func testExtendedTestdataImagestreamtagJenkinsSlavePodsYaml() (*asset, error) {
	bytes, err := testExtendedTestdataImagestreamtagJenkinsSlavePodsYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/imagestreamtag-jenkins-slave-pods.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataJenkinsPluginBuildJobCloneXml = []byte(`<?xml version='1.0' encoding='UTF-8'?>                                                                                                                                                                                                                         
<flow-definition plugin="workflow-job@2.8">                                                                                                                                                                                                                    
  <actions/>                                                                                                                                                                                                                                                   
  <description></description>                                                                                                                                                                                                                                  
  <keepDependencies>false</keepDependencies>                                                                                                                                                                                                                   
  <properties>                                                                                                                                                                                                                                                 
    <io.fabric8.jenkins.openshiftsync.BuildConfigProjectProperty plugin="openshift-sync@0.1.1">                                                                                                                                                                
      <uid></uid>                                                                                                                                                                                                                                              
      <namespace></namespace>                                                                                                                                                                                                                                  
      <name></name>                                                                                                                                                                                                                                            
      <resourceVersion></resourceVersion>                                                                                                                                                                                                                      
    </io.fabric8.jenkins.openshiftsync.BuildConfigProjectProperty>                                                                                                                                                                                             
    <org.jenkinsci.plugins.workflow.job.properties.PipelineTriggersJobProperty>                                                                                                                                                                                
      <triggers/>                                                                                                                                                                                                                                              
    </org.jenkinsci.plugins.workflow.job.properties.PipelineTriggersJobProperty>                                                                                                                                                                               
  </properties>                                                                                                                                                                                                                                                
  <definition class="org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition" plugin="workflow-cps@2.22">                                                                                                                                                         
    <script>node{                                                                                                                                                                                                                                              
    openshiftBuild namespace: &apos;${PROJECT_NAME}&apos;, bldCfg: &apos;frontend&apos;, buildName: &apos;frontend-1&apos;, showBuildLogs: &apos;false&apos;, verbose: &apos;true&apos;                                                                                     
}</script>                                                                                                                                                                                                                                                     
    <sandbox>true</sandbox>
  </definition>
  <triggers/>
</flow-definition>
`)

func testExtendedTestdataJenkinsPluginBuildJobCloneXmlBytes() ([]byte, error) {
	return _testExtendedTestdataJenkinsPluginBuildJobCloneXml, nil
}

func testExtendedTestdataJenkinsPluginBuildJobCloneXml() (*asset, error) {
	bytes, err := testExtendedTestdataJenkinsPluginBuildJobCloneXmlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/jenkins-plugin/build-job-clone.xml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataJenkinsPluginBuildJobSlaveXml = []byte(`<?xml version='1.0' encoding='UTF-8'?>                                                                                                                                                                                                                         
<project>                                                                                                                                                                                                                                                      
  <actions/>                                                                                                                                                                                                                                                   
  <description></description>                                                                                                                                                                                                                                  
  <keepDependencies>false</keepDependencies>                                                                                                                                                                                                                   
  <properties/>                                                                                                                                                                                                                                                
  <scm class="hudson.scm.NullSCM"/>                                                                                                                                                                                                                            
  <assignedNode>nodejs</assignedNode>                                                                                                                                                                                                                          
  <canRoam>false</canRoam>                                                                                                                                                                                                                                     
  <disabled>false</disabled>                                                                                                                                                                                                                                   
  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>                                                                                                                                                                                   
  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>                                                                                                                                                                                       
  <triggers/>                                                                                                                                                                                                                                                  
  <concurrentBuild>false</concurrentBuild>                                                                                                                                                                                                                     
  <builders>
    
        <com.openshift.jenkins.plugins.pipeline.OpenShiftScaler>
            <apiURL>https://openshift.default.svc.cluster.local</apiURL>
            <depCfg>frontend</depCfg>
            <namespace>${PROJECT_NAME}</namespace>
            <replicaCount>0</replicaCount>
            <authToken></authToken>
        </com.openshift.jenkins.plugins.pipeline.OpenShiftScaler>

        <com.openshift.jenkins.plugins.pipeline.OpenShiftBuilder>
            <apiURL>https://openshift.default.svc.cluster.local</apiURL>
            <bldCfg>frontend</bldCfg>
            <namespace>${PROJECT_NAME}</namespace>
            <authToken></authToken>
            <followLog>true</followLog>
            <checkForTriggeredDeployments>true</checkForTriggeredDeployments>
        </com.openshift.jenkins.plugins.pipeline.OpenShiftBuilder>

        <com.openshift.jenkins.plugins.pipeline.OpenShiftDeployer>
          <apiURL></apiURL>
          <namespace>${PROJECT_NAME}</namespace>
          <authToken></authToken>
          <verbose>false</verbose>
          <waitTime></waitTime>
          <waitUnit>sec</waitUnit>
          <depCfg>frontend</depCfg>
        </com.openshift.jenkins.plugins.pipeline.OpenShiftDeployer>
    
        <com.openshift.jenkins.plugins.pipeline.OpenShiftServiceVerifier>
            <apiURL>https://openshift.default.svc.cluster.local</apiURL>
            <svcName>frontend</svcName>
            <namespace>${PROJECT_NAME}</namespace>
            <authToken></authToken>
        </com.openshift.jenkins.plugins.pipeline.OpenShiftServiceVerifier>

        <com.openshift.jenkins.plugins.pipeline.OpenShiftImageTagger>
            <apiURL>https://openshift.default.svc.cluster.local</apiURL>
            <namespace>${PROJECT_NAME}</namespace>
            <testStream>origin-nodejs-sample</testStream>
            <testTag>latest</testTag>
            <prodStream>origin-nodejs-sample</prodStream>
            <prodTag>prod</prodTag>
            <authToken></authToken>
        </com.openshift.jenkins.plugins.pipeline.OpenShiftImageTagger>

        <com.openshift.jenkins.plugins.pipeline.OpenShiftDeploymentVerifier>
            <apiURL>https://openshift.default.svc.cluster.local</apiURL>
            <depCfg>frontend-prod</depCfg>
            <namespace>${PROJECT_NAME}</namespace>
            <replicaCount>0</replicaCount>
            <authToken></authToken>
        </com.openshift.jenkins.plugins.pipeline.OpenShiftDeploymentVerifier>
    
  </builders>                                                                                                                                                                                                                                                  
  <publishers/>                                                                                                                                                                                                                                                
  <buildWrappers/>                                                                                                                                                                                                                                             
</project>
`)

func testExtendedTestdataJenkinsPluginBuildJobSlaveXmlBytes() ([]byte, error) {
	return _testExtendedTestdataJenkinsPluginBuildJobSlaveXml, nil
}

func testExtendedTestdataJenkinsPluginBuildJobSlaveXml() (*asset, error) {
	bytes, err := testExtendedTestdataJenkinsPluginBuildJobSlaveXmlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/jenkins-plugin/build-job-slave.xml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataJenkinsPluginBuildJobXml = []byte(`<?xml version='1.0' encoding='UTF-8'?>
<project>
    <actions/>
    <description></description>
    <keepDependencies>false</keepDependencies>
    <scm class="hudson.scm.NullSCM"/>
    <canRoam>true</canRoam>
    <disabled>false</disabled>
    <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
    <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
    <triggers/>
    <concurrentBuild>false</concurrentBuild>
    <builders>

        <com.openshift.jenkins.plugins.pipeline.OpenShiftScaler>
            <apiURL>https://openshift.default.svc.cluster.local</apiURL>
            <depCfg>frontend</depCfg>
            <namespace>${PROJECT_NAME}</namespace>
            <replicaCount>0</replicaCount>
            <authToken></authToken>
        </com.openshift.jenkins.plugins.pipeline.OpenShiftScaler>

        <com.openshift.jenkins.plugins.pipeline.OpenShiftBuilder>
            <apiURL>https://openshift.default.svc.cluster.local</apiURL>
            <bldCfg>frontend</bldCfg>
            <namespace>${PROJECT_NAME}</namespace>
            <authToken></authToken>
            <followLog>true</followLog>
            <checkForTriggeredDeployments>true</checkForTriggeredDeployments>
        </com.openshift.jenkins.plugins.pipeline.OpenShiftBuilder>

        <com.openshift.jenkins.plugins.pipeline.OpenShiftDeployer>
          <apiURL></apiURL>
          <namespace>${PROJECT_NAME}</namespace>
          <authToken></authToken>
          <verbose>false</verbose>
          <waitTime></waitTime>
          <waitUnit>sec</waitUnit>
          <depCfg>frontend</depCfg>
        </com.openshift.jenkins.plugins.pipeline.OpenShiftDeployer>
    
        <com.openshift.jenkins.plugins.pipeline.OpenShiftServiceVerifier>
            <apiURL>https://openshift.default.svc.cluster.local</apiURL>
            <svcName>frontend</svcName>
            <namespace>${PROJECT_NAME}</namespace>
            <authToken></authToken>
        </com.openshift.jenkins.plugins.pipeline.OpenShiftServiceVerifier>

        <com.openshift.jenkins.plugins.pipeline.OpenShiftImageTagger>
            <apiURL>https://openshift.default.svc.cluster.local</apiURL>
            <namespace>${PROJECT_NAME}</namespace>
            <testStream>origin-nodejs-sample</testStream>
            <testTag>latest</testTag>
            <prodStream>origin-nodejs-sample</prodStream>
            <prodTag>prod</prodTag>
            <authToken></authToken>
        </com.openshift.jenkins.plugins.pipeline.OpenShiftImageTagger>

        <com.openshift.jenkins.plugins.pipeline.OpenShiftDeploymentVerifier>
            <apiURL>https://openshift.default.svc.cluster.local</apiURL>
            <depCfg>frontend-prod</depCfg>
            <namespace>${PROJECT_NAME}</namespace>
            <replicaCount>0</replicaCount>
            <authToken></authToken>
        </com.openshift.jenkins.plugins.pipeline.OpenShiftDeploymentVerifier>

    </builders>
    <publishers/>
    <buildWrappers/>
</project>
`)

func testExtendedTestdataJenkinsPluginBuildJobXmlBytes() ([]byte, error) {
	return _testExtendedTestdataJenkinsPluginBuildJobXml, nil
}

func testExtendedTestdataJenkinsPluginBuildJobXml() (*asset, error) {
	bytes, err := testExtendedTestdataJenkinsPluginBuildJobXmlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/jenkins-plugin/build-job.xml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataJenkinsPluginBuildWithEnvJobXml = []byte(`<?xml version='1.0' encoding='UTF-8'?>
<project>
    <actions/>
    <description></description>
    <keepDependencies>false</keepDependencies>
    <scm class="hudson.scm.NullSCM"/>
    <canRoam>true</canRoam>
    <disabled>false</disabled>
    <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
    <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
    <triggers/>
    <concurrentBuild>false</concurrentBuild>
    <builders>

        <com.openshift.jenkins.plugins.pipeline.OpenShiftBuilder>
            <apiURL>https://openshift.default.svc.cluster.local</apiURL>
            <bldCfg>frontend</bldCfg>
            <namespace>${PROJECT_NAME}</namespace>
            <authToken></authToken>
            <followLog>true</followLog>
            <checkForTriggeredDeployments>false</checkForTriggeredDeployments>

            <envVars>
                <com.openshift.jenkins.plugins.pipeline.NameValuePair>
                    <name>a</name>
                    <value>b</value>
                </com.openshift.jenkins.plugins.pipeline.NameValuePair>
                <com.openshift.jenkins.plugins.pipeline.NameValuePair>
                    <name>C</name>
                    <value>D</value>
                </com.openshift.jenkins.plugins.pipeline.NameValuePair>
                <com.openshift.jenkins.plugins.pipeline.NameValuePair>
                    <name>e</name>
                    <value></value>
                </com.openshift.jenkins.plugins.pipeline.NameValuePair>
            </envVars>

        </com.openshift.jenkins.plugins.pipeline.OpenShiftBuilder>

    </builders>
    <publishers/>
    <buildWrappers/>
</project>
`)

func testExtendedTestdataJenkinsPluginBuildWithEnvJobXmlBytes() ([]byte, error) {
	return _testExtendedTestdataJenkinsPluginBuildWithEnvJobXml, nil
}

func testExtendedTestdataJenkinsPluginBuildWithEnvJobXml() (*asset, error) {
	bytes, err := testExtendedTestdataJenkinsPluginBuildWithEnvJobXmlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/jenkins-plugin/build-with-env-job.xml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataJenkinsPluginBuildWithExecStepsXml = []byte(`<?xml version='1.0' encoding='UTF-8'?>
<project>
    <actions/>
    <description></description>
    <keepDependencies>false</keepDependencies>
    <properties>
        <io.fabric8.jenkins.openshiftsync.BuildConfigProjectProperty plugin="openshift-sync@0.0.13">
            <uid></uid>
            <namespace></namespace>
            <name></name>
            <resourceVersion></resourceVersion>
            <contextDir></contextDir>
        </io.fabric8.jenkins.openshiftsync.BuildConfigProjectProperty>
    </properties>
    <scm class="hudson.scm.NullSCM"/>
    <canRoam>true</canRoam>
    <disabled>false</disabled>
    <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
    <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
    <triggers/>
    <concurrentBuild>false</concurrentBuild>
    <builders>
        <com.openshift.jenkins.plugins.pipeline.OpenShiftExec plugin="openshift-pipeline@1.0.31-SNAPSHOT">
            <apiURL></apiURL>
            <namespace>${PROJECT_NAME}</namespace>
            <authToken></authToken>
            <verbose>true</verbose>
            <waitTime>120000</waitTime>
            <waitUnit>milli</waitUnit>
            <pod>${POD_NAME}</pod>
            <container>${CONTAINER_NAME}</container>
            <command>echo</command>
        </com.openshift.jenkins.plugins.pipeline.OpenShiftExec>
        <com.openshift.jenkins.plugins.pipeline.OpenShiftExec plugin="openshift-pipeline@1.0.31-SNAPSHOT">
            <apiURL></apiURL>
            <namespace>${PROJECT_NAME}</namespace>
            <authToken></authToken>
            <verbose>true</verbose>
            <waitTime>120000</waitTime>
            <waitUnit>milli</waitUnit>
            <pod>${POD_NAME}</pod>
            <container>${CONTAINER_NAME}</container>
            <command>echo</command>
            <arguments>
                <com.openshift.jenkins.plugins.pipeline.Argument>
                    <value>hello</value>
                </com.openshift.jenkins.plugins.pipeline.Argument>
                <com.openshift.jenkins.plugins.pipeline.Argument>
                    <value>world</value>
                </com.openshift.jenkins.plugins.pipeline.Argument>
                <com.openshift.jenkins.plugins.pipeline.Argument>
                    <value>1</value>
                </com.openshift.jenkins.plugins.pipeline.Argument>
            </arguments>
        </com.openshift.jenkins.plugins.pipeline.OpenShiftExec>
    </builders>
    <publishers/>
    <buildWrappers/>
</project>`)

func testExtendedTestdataJenkinsPluginBuildWithExecStepsXmlBytes() ([]byte, error) {
	return _testExtendedTestdataJenkinsPluginBuildWithExecStepsXml, nil
}

func testExtendedTestdataJenkinsPluginBuildWithExecStepsXml() (*asset, error) {
	bytes, err := testExtendedTestdataJenkinsPluginBuildWithExecStepsXmlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/jenkins-plugin/build-with-exec-steps.xml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataJenkinsPluginCreateJobXml = []byte(`<?xml version='1.0' encoding='UTF-8'?>
<project>
    <actions/>
    <description></description>
    <keepDependencies>false</keepDependencies>
    <scm class="hudson.scm.NullSCM"/>
    <canRoam>true</canRoam>
    <disabled>false</disabled>
    <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
    <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
    <triggers/>
    <concurrentBuild>false</concurrentBuild>
    <builders>

        <com.openshift.jenkins.plugins.pipeline.OpenShiftCreator>
          <namespace>${PROJECT_NAME}</namespace>
	  <jsonyaml>{
    "kind": "List",
    "apiVersion": "v1",
    "metadata": {},
    "items": [
	{
    
	    "kind": "ImageStream",
	    "apiVersion": "v1",
	    "metadata": {
		"name": "forcepull-extended-test-builder",
                "labels": {
                    "foo": "bar"
                },
		"creationTimestamp": null
	    },
	    "spec": {},
	    "status": {
		"dockerImageRepository": ""
	    }
    
	},
	{
	    "kind": "BuildConfig",
	    "apiVersion": "v1",
	    "metadata": {
		"name": "forcepull-bldr",
		"creationTimestamp": null,
		"labels": {
                    "foo": "bar"
		}
	    },
	    "spec": {
		"triggers": [],
		"source": {
		    "type": "Git",
		    "git": {
			"uri": "https://github.com/openshift/ruby-hello-world.git"
		    }
		},
		"strategy": {
		    "type": "Docker",
		    "dockerStrategy": {
			"nocache": true
		    }
		},
		"output":{
		    "to":{
			"kind":"ImageStreamTag",
			"name":"forcepull-extended-test-builder:latest"
		    }
		}
	    }
	}
    ]
}
	  </jsonyaml>
        </com.openshift.jenkins.plugins.pipeline.OpenShiftCreator>

    </builders>
    <publishers/>
    <buildWrappers/>
</project>
`)

func testExtendedTestdataJenkinsPluginCreateJobXmlBytes() ([]byte, error) {
	return _testExtendedTestdataJenkinsPluginCreateJobXml, nil
}

func testExtendedTestdataJenkinsPluginCreateJobXml() (*asset, error) {
	bytes, err := testExtendedTestdataJenkinsPluginCreateJobXmlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/jenkins-plugin/create-job.xml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataJenkinsPluginDeleteJobKeysXml = []byte(`<?xml version='1.0' encoding='UTF-8'?>
<project>
    <actions/>
    <description></description>
    <keepDependencies>false</keepDependencies>
    <scm class="hudson.scm.NullSCM"/>
    <canRoam>true</canRoam>
    <disabled>false</disabled>
    <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
    <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
    <triggers/>
    <concurrentBuild>false</concurrentBuild>
    <builders>

        <com.openshift.jenkins.plugins.pipeline.OpenShiftDeleterList>
          <namespace>${PROJECT_NAME}</namespace>
          <types>is,bc</types>                                                                                                                                                                                                             
          <keys>forcepull-extended-test-builder,forcepull-bldr</keys>                                                                                                                                                                                                                 
        </com.openshift.jenkins.plugins.pipeline.OpenShiftDeleterList>

    </builders>
    <publishers/>
    <buildWrappers/>
</project>
`)

func testExtendedTestdataJenkinsPluginDeleteJobKeysXmlBytes() ([]byte, error) {
	return _testExtendedTestdataJenkinsPluginDeleteJobKeysXml, nil
}

func testExtendedTestdataJenkinsPluginDeleteJobKeysXml() (*asset, error) {
	bytes, err := testExtendedTestdataJenkinsPluginDeleteJobKeysXmlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/jenkins-plugin/delete-job-keys.xml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataJenkinsPluginDeleteJobLabelsXml = []byte(`<?xml version='1.0' encoding='UTF-8'?>
<project>
    <actions/>
    <description></description>
    <keepDependencies>false</keepDependencies>
    <scm class="hudson.scm.NullSCM"/>
    <canRoam>true</canRoam>
    <disabled>false</disabled>
    <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
    <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
    <triggers/>
    <concurrentBuild>false</concurrentBuild>
    <builders>

        <com.openshift.jenkins.plugins.pipeline.OpenShiftDeleterLabels>
          <namespace>${PROJECT_NAME}</namespace>
          <types>bc,is</types>                                                                                                                                                                                                             
          <keys>foo</keys>                                                                                                                                                                                                                 
          <values>bar</values>                                                                                                                                                                                                             
        </com.openshift.jenkins.plugins.pipeline.OpenShiftDeleterLabels>

    </builders>
    <publishers/>
    <buildWrappers/>
</project>
`)

func testExtendedTestdataJenkinsPluginDeleteJobLabelsXmlBytes() ([]byte, error) {
	return _testExtendedTestdataJenkinsPluginDeleteJobLabelsXml, nil
}

func testExtendedTestdataJenkinsPluginDeleteJobLabelsXml() (*asset, error) {
	bytes, err := testExtendedTestdataJenkinsPluginDeleteJobLabelsXmlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/jenkins-plugin/delete-job-labels.xml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataJenkinsPluginDeleteJobXml = []byte(`<?xml version='1.0' encoding='UTF-8'?>
<project>
    <actions/>
    <description></description>
    <keepDependencies>false</keepDependencies>
    <scm class="hudson.scm.NullSCM"/>
    <canRoam>true</canRoam>
    <disabled>false</disabled>
    <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
    <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
    <triggers/>
    <concurrentBuild>false</concurrentBuild>
    <builders>

        <com.openshift.jenkins.plugins.pipeline.OpenShiftDeleterJsonYaml>
          <namespace>${PROJECT_NAME}</namespace>
	  <jsonyaml>{
    "kind": "List",
    "apiVersion": "v1",
    "metadata": {},
    "items": [
	{
    
	    "kind": "ImageStream",
	    "apiVersion": "v1",
	    "metadata": {
		"name": "forcepull-extended-test-builder",
		"creationTimestamp": null
	    },
	    "spec": {},
	    "status": {
		"dockerImageRepository": ""
	    }
    
	},
	{
	    "kind": "BuildConfig",
	    "apiVersion": "v1",
	    "metadata": {
		"name": "forcepull-bldr",
		"creationTimestamp": null,
		"labels": {
		    "name": "forcepull-bldr"
		}
	    },
	    "spec": {
		"triggers": [],
		"source": {
		    "type": "Git",
		    "git": {
			"uri": "https://github.com/openshift/ruby-hello-world.git"
		    }
		},
		"strategy": {
		    "type": "Docker",
		    "dockerStrategy": {
			"nocache": true
		    }
		},
		"output":{
		    "to":{
			"kind":"ImageStreamTag",
			"name":"forcepull-extended-test-builder:latest"
		    }
		}
	    }
	}
    ]
}
	  </jsonyaml>
        </com.openshift.jenkins.plugins.pipeline.OpenShiftDeleterJsonYaml>

    </builders>
    <publishers/>
    <buildWrappers/>
</project>
`)

func testExtendedTestdataJenkinsPluginDeleteJobXmlBytes() ([]byte, error) {
	return _testExtendedTestdataJenkinsPluginDeleteJobXml, nil
}

func testExtendedTestdataJenkinsPluginDeleteJobXml() (*asset, error) {
	bytes, err := testExtendedTestdataJenkinsPluginDeleteJobXmlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/jenkins-plugin/delete-job.xml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataJenkinsPluginImagestreamScmDslJobXml = []byte(`<?xml version='1.0' encoding='UTF-8'?>
<flow-definition plugin="workflow-job@2.2">
  <actions/>
  <description></description>
  <keepDependencies>false</keepDependencies>
  <properties>
    <io.fabric8.jenkins.openshiftsync.BuildConfigProjectProperty plugin="openshift-sync@0.0.12">
      <uid></uid>
      <namespace></namespace>
      <name></name>
      <resourceVersion></resourceVersion>
      <contextDir></contextDir>
    </io.fabric8.jenkins.openshiftsync.BuildConfigProjectProperty>
  </properties>
  <definition class="org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition" plugin="workflow-cps@2.6">
    <script>node {
   openshiftImageStream name: "testimage", tag: "v1", namespace: "${PROJECT_NAME}" &#xD; &#xA;
   openshiftTag destStream: "localjenkins", destTag: "develop", destinationNamespace: "${PROJECT_NAME}", namespace: "openshift", srcStream: "jenkins", srcTag: "latest"
}</script>
    <sandbox>true</sandbox>
  </definition>
  <triggers>
    <hudson.triggers.SCMTrigger>
      <spec>* * * * *</spec>
      <ignorePostCommitHooks>false</ignorePostCommitHooks>
    </hudson.triggers.SCMTrigger>
  </triggers>
</flow-definition>
`)

func testExtendedTestdataJenkinsPluginImagestreamScmDslJobXmlBytes() ([]byte, error) {
	return _testExtendedTestdataJenkinsPluginImagestreamScmDslJobXml, nil
}

func testExtendedTestdataJenkinsPluginImagestreamScmDslJobXml() (*asset, error) {
	bytes, err := testExtendedTestdataJenkinsPluginImagestreamScmDslJobXmlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/jenkins-plugin/imagestream-scm-dsl-job.xml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataJenkinsPluginImagestreamScmJobXml = []byte(`<?xml version='1.0' encoding='UTF-8'?>
<project>
  <actions/>
  <description></description>
  <keepDependencies>false</keepDependencies>
  <properties>
    <io.fabric8.jenkins.openshiftsync.BuildConfigProjectProperty plugin="openshift-sync@0.0.13">
      <uid></uid>
      <namespace></namespace>
      <name></name>
      <resourceVersion></resourceVersion>
      <contextDir></contextDir>
    </io.fabric8.jenkins.openshiftsync.BuildConfigProjectProperty>
  </properties>
  <scm class="com.openshift.jenkins.plugins.pipeline.OpenShiftImageStreams" plugin="openshift-pipeline@1.0.23">
    <imageStreamName>testimage</imageStreamName>
    <tag>v1</tag>
    <apiURL></apiURL>
    <namespace>${PROJECT_NAME}</namespace>
    <authToken></authToken>
  </scm>
  <canRoam>true</canRoam>
  <disabled>false</disabled>
  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
  <triggers>
    <hudson.triggers.SCMTrigger>
      <spec>* * * * *</spec>
      <ignorePostCommitHooks>false</ignorePostCommitHooks>
    </hudson.triggers.SCMTrigger>
  </triggers>
  <concurrentBuild>false</concurrentBuild>
  <builders>
    <com.openshift.jenkins.plugins.pipeline.OpenShiftImageTagger plugin="openshift-pipeline@1.0.23">
      <apiURL></apiURL>
      <namespace>openshift</namespace>
      <authToken></authToken>
      <verbose>false</verbose>
      <testTag>latest</testTag>
      <prodTag>develop</prodTag>
      <testStream>jenkins</testStream>
      <prodStream>localjenkins</prodStream>
      <destinationNamespace>${PROJECT_NAME}</destinationNamespace>
      <destinationAuthToken></destinationAuthToken>
      <alias>false</alias>
    </com.openshift.jenkins.plugins.pipeline.OpenShiftImageTagger>
  </builders>
  <publishers/>
  <buildWrappers/>
</project>
`)

func testExtendedTestdataJenkinsPluginImagestreamScmJobXmlBytes() ([]byte, error) {
	return _testExtendedTestdataJenkinsPluginImagestreamScmJobXml, nil
}

func testExtendedTestdataJenkinsPluginImagestreamScmJobXml() (*asset, error) {
	bytes, err := testExtendedTestdataJenkinsPluginImagestreamScmJobXmlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/jenkins-plugin/imagestream-scm-job.xml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataJenkinsPluginMultitagJobXml = []byte(`<?xml version='1.0' encoding='UTF-8'?>
<project>
    <actions/>
    <description></description>
    <keepDependencies>false</keepDependencies>
    <scm class="hudson.scm.NullSCM"/>
    <canRoam>true</canRoam>
    <disabled>false</disabled>
    <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
    <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
    <triggers/>
    <concurrentBuild>false</concurrentBuild>
    <builders>

        <!-- 1 to 1 mapping -->
        <com.openshift.jenkins.plugins.pipeline.OpenShiftImageTagger>
            <apiURL>https://openshift.default.svc.cluster.local</apiURL>
            <namespace>${PROJECT_NAME}</namespace>
            <testStream>multitag</testStream>
            <testTag>orig</testTag>
            <prodStream>multitag</prodStream>
            <prodTag>prod</prodTag>
            <authToken></authToken>
        </com.openshift.jenkins.plugins.pipeline.OpenShiftImageTagger>

        <!-- 1 to N mapping -->
        <com.openshift.jenkins.plugins.pipeline.OpenShiftImageTagger>
            <apiURL>https://openshift.default.svc.cluster.local</apiURL>
            <namespace>${PROJECT_NAME}</namespace>
            <testStream>multitag</testStream>
            <testTag>prod</testTag>
            <prodStream>multitag</prodStream>
            <prodTag>prod2,prod3,prod4</prodTag>
            <authToken></authToken>
        </com.openshift.jenkins.plugins.pipeline.OpenShiftImageTagger>

        <!-- N to 1 mapping -->
        <com.openshift.jenkins.plugins.pipeline.OpenShiftImageTagger>
            <apiURL>https://openshift.default.svc.cluster.local</apiURL>
            <namespace>${PROJECT_NAME}</namespace>
            <testStream>multitag</testStream>
            <testTag>prod4</testTag>
            <prodStream>multitag, multitag2, multitag3</prodStream>
            <prodTag>prod5</prodTag>
            <authToken></authToken>
        </com.openshift.jenkins.plugins.pipeline.OpenShiftImageTagger>

        <!-- N to N tagging -->
        <com.openshift.jenkins.plugins.pipeline.OpenShiftImageTagger>
            <apiURL>https://openshift.default.svc.cluster.local</apiURL>
            <namespace>${PROJECT_NAME}</namespace>
            <testStream>multitag3</testStream>
            <testTag>prod5</testTag>
            <prodStream>multitag, multitag2, multitag3</prodStream>
            <prodTag>prod6, prod7, prod8</prodTag>
            <authToken></authToken>
        </com.openshift.jenkins.plugins.pipeline.OpenShiftImageTagger>

        <!-- N to N tagging with creation-->
        <com.openshift.jenkins.plugins.pipeline.OpenShiftImageTagger>
            <apiURL>https://openshift.default.svc.cluster.local</apiURL>
            <namespace>${PROJECT_NAME}</namespace>
            <testStream>multitag3</testStream>
            <testTag>prod8</testTag>
            <prodStream>multitag4, multitag5, multitag6</prodStream>
            <prodTag>prod9, prod10, prod11</prodTag>
            <authToken></authToken>
        </com.openshift.jenkins.plugins.pipeline.OpenShiftImageTagger>

    </builders>
    <publishers/>
    <buildWrappers/>
</project>
`)

func testExtendedTestdataJenkinsPluginMultitagJobXmlBytes() ([]byte, error) {
	return _testExtendedTestdataJenkinsPluginMultitagJobXml, nil
}

func testExtendedTestdataJenkinsPluginMultitagJobXml() (*asset, error) {
	bytes, err := testExtendedTestdataJenkinsPluginMultitagJobXmlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/jenkins-plugin/multitag-job.xml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataJenkinsPluginMultitagTemplateJson = []byte(`{
  "kind": "Template",
  "apiVersion": "v1",
  "metadata": {
    "name": "multitag",
    "creationTimestamp": null
  },
  "objects": [
    {
      "kind": "ImageStream",
      "apiVersion": "v1",
      "metadata": {
        "name": "multitag"
      },
      "spec": {
        "tags": [
          {
            "name": "orig",
            "from": {
              "kind": "DockerImage",
              "name": "centos/ruby-25-centos7"
            }
          }
        ]
      }
    },
    {
      "kind": "ImageStream",
      "apiVersion": "v1",
      "metadata": {
        "name": "multitag2"
      },
      "spec": {
        "tags": [
          {
            "name": "orig",
            "from": {
              "kind": "DockerImage",
              "name": "centos/ruby-25-centos7"
            }
          }
        ]
      }
    },
    {
      "kind": "ImageStream",
      "apiVersion": "v1",
      "metadata": {
        "name": "multitag3"
      },
      "spec": {
        "tags": [
          {
            "name": "orig",
            "from": {
              "kind": "DockerImage",
              "name": "centos/ruby-25-centos7"
            }
          }
        ]
      }
    }
  ]
}
`)

func testExtendedTestdataJenkinsPluginMultitagTemplateJsonBytes() ([]byte, error) {
	return _testExtendedTestdataJenkinsPluginMultitagTemplateJson, nil
}

func testExtendedTestdataJenkinsPluginMultitagTemplateJson() (*asset, error) {
	bytes, err := testExtendedTestdataJenkinsPluginMultitagTemplateJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/jenkins-plugin/multitag-template.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataJenkinsPluginSharedResourcesTemplateJson = []byte(`{
  "kind": "Template",
  "apiVersion": "v1",
  "metadata": {
    "name": "nodejs-helloworld-sample",
    "annotations": {
      "description": "This example shows how to create a simple nodejs application in openshift origin v3",
      "iconClass": "icon-nodejs",
      "tags": "instant-app,nodejs"
    }
  },
  "objects": [
    {
      "kind": "Service",
      "apiVersion": "v1",
      "metadata": {
        "name": "frontend-prod"
      },
      "spec": {
        "ports": [
          {
            "name": "web",
            "protocol": "TCP",
            "port": 8080,
            "targetPort": 8080,
            "nodePort": 0
          }
        ],
        "selector": {
          "name": "frontend-prod"
        },
        "type": "ClusterIP",
        "sessionAffinity": "None"
      },
      "status": {
        "loadBalancer": {}
      }
    },
    {
      "kind": "Route",
      "apiVersion": "v1",
      "metadata": {
        "name": "frontend"
      },
      "spec": {
        "to": {
          "kind": "Service",
          "name": "frontend"
        },
        "tls": {
          "termination": "edge"
        }
      }
    },
    {
      "kind": "DeploymentConfig",
      "apiVersion": "v1",
      "metadata": {
        "name": "frontend-prod"
      },
      "spec": {
        "strategy": {
          "type": "Rolling",
          "rollingParams": {
            "updatePeriodSeconds": 1,
            "intervalSeconds": 1,
            "timeoutSeconds": 120
          }
        },
        "triggers": [
          {
            "type": "ImageChange",
            "imageChangeParams": {
              "automatic": true,
              "containerNames": [
                "nodejs-helloworld"
              ],
              "from": {
                "kind": "ImageStreamTag",
                "name": "origin-nodejs-sample:prod"
              }
            }
          },
          {
            "type": "ConfigChange"
          }
        ],
        "replicas": 1,
        "selector": {
          "name":"frontend-prod"
        },
        "template": {
          "metadata": {
            "labels": {
              "name": "frontend-prod"
            }
          },
          "spec": {
            "containers": [
              {
                "name": "nodejs-helloworld",
                "image": " ",
                "ports": [
                  {
                    "containerPort": 8080,
                    "protocol": "TCP"
                  }
                ],
                "resources": {
                  "limits": {
                    "memory": "${MEMORY_LIMIT}"
                  }
                },
                "terminationMessagePath": "/dev/termination-log",
                "imagePullPolicy": "IfNotPresent",
                "securityContext": {
                  "capabilities": {},
                  "privileged": false
                }
              }
            ],
            "restartPolicy": "Always",
            "dnsPolicy": "ClusterFirst"
          }
        }
      }
    },

    {
      "kind": "Service",
      "apiVersion": "v1",
      "metadata": {
        "name": "frontend"
      },
      "spec": {
        "ports": [
          {
            "name": "web",
            "protocol": "TCP",
            "port": 8080,
            "targetPort": 8080,
            "nodePort": 0
          }
        ],
        "selector": {
          "name": "frontend"
        },
        "type": "ClusterIP",
        "sessionAffinity": "None"
      }
    },
    {
      "kind": "ImageStream",
      "apiVersion": "v1",
      "metadata": {
        "name": "origin-nodejs-sample"
      }
    },
    {
      "kind": "ImageStream",
      "apiVersion": "v1",
      "metadata": {
        "name": "origin-nodejs-sample2"
      }
    },
    {
      "kind": "ImageStream",
      "apiVersion": "v1",
      "metadata": {
        "name": "origin-nodejs-sample3"
      }
    },
    {
      "kind": "BuildConfig",
      "apiVersion": "v1",
      "metadata": {
        "name": "frontend",
        "labels": {
          "name": "nodejs-sample-build"
        }
      },
      "spec": {
        "triggers": [
          {
            "type": "GitHub",
            "github": {
              "secret": "secret101"
            }
          },
          {
            "type": "Generic",
            "generic": {
              "secret": "secret101"
            }
          }
        ],
        "source": {
          "type": "Git",
          "git": {
            "uri": "https://github.com/sclorg/nodejs-ex.git"
          }
        },
        "strategy": {
          "type": "Source",
          "sourceStrategy": {
            "from": {
              "kind": "ImageStreamTag",
              "namespace": "openshift",
              "name": "nodejs:latest"
            }
          }
        },
        "output": {
          "to": {
            "kind": "ImageStreamTag",
            "name": "origin-nodejs-sample:latest"
          }
        },
        "resources": {}
      }
    },
    {
      "kind": "DeploymentConfig",
      "apiVersion": "v1",
      "metadata": {
        "name": "frontend"
      },
      "spec": {
        "strategy": {
          "type": "Rolling",
          "rollingParams": {
            "updatePeriodSeconds": 1,
            "intervalSeconds": 1,
            "timeoutSeconds": 120
          }
        },
        "triggers": [
          {
            "type": "ImageChange",
            "imageChangeParams": {
              "automatic": true,
              "containerNames": [
                "nodejs-helloworld"
              ],
              "from": {
                "kind": "ImageStreamTag",
                "name": "origin-nodejs-sample:latest"
              }
            }
          },
          {
            "type": "ConfigChange"
          }
        ],
        "replicas": 1,
        "selector": {
          "name":"frontend"
          },
        "template": {
          "metadata": {
            "labels": {
              "name": "frontend"
            }
          },
          "spec": {
            "containers": [
              {
                "name": "nodejs-helloworld",
                "image": " ",
                "ports": [
                  {
                    "containerPort": 8080,
                    "protocol": "TCP"
                  }
                ],
                "resources": {
		    "limits": {
			"memory": "${MEMORY_LIMIT}"
		    }
		},
                "terminationMessagePath": "/dev/termination-log",
                "imagePullPolicy": "IfNotPresent",
                "securityContext": {
                  "capabilities": {},
                  "privileged": false
                }
              }
            ],
            "restartPolicy": "Always",
            "dnsPolicy": "ClusterFirst"
          }
        }
      }
    }
  ],
  "parameters": [
    {
      "name": "MEMORY_LIMIT",
      "displayName": "Memory Limit",
      "description": "Maximum amount of memory the container can use.",
      "value": "512Mi"
    },
    {
      "name": "NAMESPACE",
      "displayName": "Namespace",
      "description": "The OpenShift Namespace where the ImageStream resides.",
      "value": "openshift"
    },
   {
      "name": "ADMIN_USERNAME",
      "displayName": "Administrator Username",
      "description": "Username for the administrator of this application.",
      "generate": "expression",
      "from": "admin[A-Z0-9]{3}"
    },
    {
      "name": "ADMIN_PASSWORD",
      "displayName": "Administrator Password",
      "description": "Password for the administrator of this application.",
      "generate": "expression",
      "from": "[a-zA-Z0-9]{8}"
    }
  ],
  "labels": {
    "template": "application-template-stibuild"
  }
}
`)

func testExtendedTestdataJenkinsPluginSharedResourcesTemplateJsonBytes() ([]byte, error) {
	return _testExtendedTestdataJenkinsPluginSharedResourcesTemplateJson, nil
}

func testExtendedTestdataJenkinsPluginSharedResourcesTemplateJson() (*asset, error) {
	bytes, err := testExtendedTestdataJenkinsPluginSharedResourcesTemplateJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/jenkins-plugin/shared-resources-template.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataJenkinsSlaveTemplateYaml = []byte(`apiVersion: v1
kind: Template
metadata:
  name: jenkins-slave-pipeline
objects:
- apiVersion: v1
  kind: BuildConfig
  metadata:
    creationTimestamp: null
    name: openshift-jee-sample
  spec:
    strategy:
      jenkinsPipelineStrategy:
        jenkinsfile: |-
          try {
             timeout(time: 20, unit: 'MINUTES') {
        
                node("jenkins-slave") {
                  sh "mvn --version"
                }

             }
          } catch (err) {
             echo "in catch block"
             echo "Caught: ${err}"
             currentBuild.result = 'FAILURE'
             throw err
          }
      type: JenkinsPipeline
`)

func testExtendedTestdataJenkinsSlaveTemplateYamlBytes() ([]byte, error) {
	return _testExtendedTestdataJenkinsSlaveTemplateYaml, nil
}

func testExtendedTestdataJenkinsSlaveTemplateYaml() (*asset, error) {
	bytes, err := testExtendedTestdataJenkinsSlaveTemplateYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/jenkins-slave-template.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataJobsV1Yaml = []byte(`apiVersion: batch/v1
kind: Job
metadata:
  name: simplev1
spec:
  template:
    metadata:
      name: simplev1
      labels:
        app: simplev1
    spec:
      containers:
      - name: simplev1
        image: docker.io/busybox
        command: ["/bin/sh", "-c", "exit 0"]
      restartPolicy: Never
`)

func testExtendedTestdataJobsV1YamlBytes() ([]byte, error) {
	return _testExtendedTestdataJobsV1Yaml, nil
}

func testExtendedTestdataJobsV1Yaml() (*asset, error) {
	bytes, err := testExtendedTestdataJobsV1YamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/jobs/v1.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataLdapGroupsyncSh = []byte(`#!/bin/bash
#
# This scripts starts the OpenShift server with a default configuration.
# The OpenShift Docker registry and router are installed.
# It will run all tests that are imported into test/extended.
source "/usr/hack/lib/init.sh"
os::util::environment::setup_time_vars
os::build::setup_env

export KUBECONFIG="${ADMIN_KUBECONFIG}"
LDAP_SERVICE_IP="${LDAP_SERVICE}"

function cleanup() {
       return_code=$?
       os::test::junit::generate_report
       os::cleanup::all
       os::util::describe_return_code "${return_code}"
       exit "${return_code}"
}
trap "cleanup" EXIT

function compare_and_cleanup() {
       validation_file=$1
       actual_file=actual-${validation_file}
       rm -f ${WORKINGDIR}/${actual_file}
       oc get groups --no-headers | awk '{print $1}' | sort | xargs -I{} oc get --export group {} -o yaml >> ${WORKINGDIR}/${actual_file}
       os::util::sed '/sync-time/d' ${WORKINGDIR}/${actual_file}
       diff ${validation_file} ${WORKINGDIR}/${actual_file}
       oc delete groups --all
       echo -e "\tSUCCESS"
}

os::log::info "Running extended tests"

schema=('rfc2307' 'ad' 'augmented-ad')

for (( i=0; i<${#schema[@]}; i++ )); do
       current_schema=${schema[$i]}
       os::log::info "Testing schema: ${current_schema}"
       os::test::junit::declare_suite_start "extended/ldap-groups/${current_schema}"

       WORKINGDIR=${BASETMPDIR}/${current_schema}
       mkdir ${WORKINGDIR}

       os::log::info "working dir ${WORKINGDIR}"
       # create a temp copy of the test files
       cp /tmp/ldap/${current_schema}/* ${WORKINGDIR}
       pushd ${WORKINGDIR} > /dev/null

       # load OpenShift and LDAP group UIDs, needed for literal whitelists
       # use awk instead of sed for compatibility (see os::util::sed)
       group1_ldapuid=$(awk 'NR == 1 {print $0}' ldapgroupuids.txt)
       group2_ldapuid=$(awk 'NR == 2 {print $0}' ldapgroupuids.txt)
       group3_ldapuid=$(awk 'NR == 3 {print $0}' ldapgroupuids.txt)

       group1_osuid=$(awk 'NR == 1 {print $0}' osgroupuids.txt)
       group2_osuid=$(awk 'NR == 2 {print $0}' osgroupuids.txt)
       group3_osuid=$(awk 'NR == 3 {print $0}' osgroupuids.txt)

       # update sync-configs and validation files with the LDAP server's IP
       config_files=sync-config*.yaml
       validation_files=valid*.yaml
       for config in ${config_files} ${validation_files}
       do
               os::util::sed "s/LDAP_SERVICE_IP/${LDAP_SERVICE_IP}/g" ${config}
               os::util::sed "s@LDAP_CA@${LDAP_CA}@g" ${config}
       done

       echo -e "\tTEST: Sync all LDAP groups from LDAP server"
       oc adm groups sync --sync-config=sync-config.yaml --confirm
       compare_and_cleanup valid_all_ldap_sync.yaml


       # WHITELISTS
       echo -e "\tTEST: Sync subset of LDAP groups from LDAP server using whitelist file"
       oc adm groups sync --whitelist=whitelist_ldap.txt --sync-config=sync-config.yaml --confirm
       compare_and_cleanup valid_whitelist_sync.yaml

       echo -e "\tTEST: Sync subset of LDAP groups from LDAP server using literal whitelist"
       oc adm groups sync ${group1_ldapuid} --sync-config=sync-config.yaml --confirm
       compare_and_cleanup valid_whitelist_sync.yaml

       echo -e "\tTEST: Sync subset of LDAP groups from LDAP server using union of literal whitelist and whitelist file"
       oc adm groups sync ${group2_ldapuid} --whitelist=whitelist_ldap.txt --sync-config=sync-config.yaml --confirm
       compare_and_cleanup valid_whitelist_union_sync.yaml

       echo -e "\tTEST: Sync subset of OpenShift groups from LDAP server using whitelist file"
       oc adm groups sync ${group1_ldapuid} --sync-config=sync-config.yaml --confirm
       oc patch group ${group1_osuid} -p 'users: []'
       oc adm groups sync --type=openshift --whitelist=whitelist_openshift.txt --sync-config=sync-config.yaml --confirm
       compare_and_cleanup valid_whitelist_sync.yaml

       echo -e "\tTEST: Sync subset of OpenShift groups from LDAP server using literal whitelist"
       # sync group from LDAP
       oc adm groups sync ${group1_ldapuid} --sync-config=sync-config.yaml --confirm
       oc patch group ${group1_osuid} -p 'users: []'
       oc adm groups sync --type=openshift ${group1_osuid} --sync-config=sync-config.yaml --confirm
       compare_and_cleanup valid_whitelist_sync.yaml

       echo -e "\tTEST: Sync subset of OpenShift groups from LDAP server using union of literal whitelist and whitelist file"
       # sync groups from LDAP
       oc adm groups sync ${group1_ldapuid} ${group2_ldapuid} --sync-config=sync-config.yaml --confirm
       oc patch group ${group1_osuid} -p 'users: []'
       oc patch group ${group2_osuid} -p 'users: []'
       oc adm groups sync --type=openshift group/${group2_osuid} --whitelist=whitelist_openshift.txt --sync-config=sync-config.yaml --confirm
       compare_and_cleanup valid_whitelist_union_sync.yaml


       # BLACKLISTS
       echo -e "\tTEST: Sync subset of LDAP groups from LDAP server using whitelist and blacklist file"
       # oc adm groups sync --whitelist=ldapgroupuids.txt --blacklist=blacklist_ldap.txt --blacklist-group="${group1_ldapuid}" --sync-config=sync-config.yaml --confirm
       oc adm groups sync --whitelist=ldapgroupuids.txt --blacklist=blacklist_ldap.txt --sync-config=sync-config.yaml --confirm
       compare_and_cleanup valid_all_blacklist_sync.yaml

       echo -e "\tTEST: Sync subset of LDAP groups from LDAP server using blacklist"
       # oc adm groups sync --blacklist=blacklist_ldap.txt --blacklist-group=${group1_ldapuid} --sync-config=sync-config.yaml --confirm
       oc adm groups sync --blacklist=blacklist_ldap.txt --sync-config=sync-config.yaml --confirm
       compare_and_cleanup valid_all_blacklist_sync.yaml

       echo -e "\tTEST: Sync subset of OpenShift groups from LDAP server using whitelist and blacklist file"
       oc adm groups sync --sync-config=sync-config.yaml --confirm
       oc get group -o name --no-headers | xargs -n 1 oc patch -p 'users: []'
       # oc adm groups sync --type=openshift --whitelist=osgroupuids.txt --blacklist=blacklist_openshift.txt --blacklist-group=${group1_osuid} --sync-config=sync-config.yaml --confirm
       oc adm groups sync --type=openshift --whitelist=osgroupuids.txt --blacklist=blacklist_openshift.txt --sync-config=sync-config.yaml --confirm
       compare_and_cleanup valid_all_openshift_blacklist_sync.yaml


       # MAPPINGS
       echo -e "\tTEST: Sync all LDAP groups from LDAP server using a user-defined mapping"
       oc adm groups sync --sync-config=sync-config-user-defined.yaml --confirm
       compare_and_cleanup valid_all_ldap_sync_user_defined.yaml

       echo -e "\tTEST: Sync all LDAP groups from LDAP server using a partially user-defined mapping"
       oc adm groups sync --sync-config=sync-config-partially-user-defined.yaml --confirm
       compare_and_cleanup valid_all_ldap_sync_partially_user_defined.yaml

       echo -e "\tTEST: Sync based on OpenShift groups respecting OpenShift mappings"
       oc adm groups sync --sync-config=sync-config-user-defined.yaml --confirm
       oc get group -o name --no-headers | xargs -n 1 oc patch -p 'users: []'
       oc adm groups sync --type=openshift --sync-config=sync-config.yaml --confirm
       compare_and_cleanup valid_all_ldap_sync_user_defined.yaml

       echo -e "\tTEST: Sync all LDAP groups from LDAP server using DN as attribute whenever possible"
    oc adm groups sync --sync-config=sync-config-dn-everywhere.yaml --confirm
       compare_and_cleanup valid_all_ldap_sync_dn_everywhere.yaml

       echo -e "\tTEST: Sync based on OpenShift groups respecting OpenShift mappings and whitelist file"
       os::cmd::expect_success_and_text 'oc adm groups sync --whitelist=ldapgroupuids.txt --sync-config=sync-config-user-defined.yaml --confirm' 'group/'
       os::cmd::expect_success_and_text 'oc get group -o jsonpath={.items[*].metadata.name}' 'firstgroup secondgroup thirdgroup'
       os::cmd::expect_success_and_text 'oc adm groups sync --type=openshift --whitelist=ldapgroupuids.txt --sync-config=sync-config-user-defined.yaml --confirm' 'group/'
       os::cmd::expect_success_and_text 'oc get group -o jsonpath={.items[*].metadata.name}' 'firstgroup secondgroup thirdgroup'
       os::cmd::expect_success_and_text 'oc delete groups --all' 'deleted'
       os::cmd::expect_success_and_text 'oc get group -o jsonpath={.items[*].metadata.name} | wc -l' '0'

       # PRUNING
       echo -e "\tTEST: Sync all LDAP groups from LDAP server, change LDAP UID, then prune OpenShift groups"
       oc adm groups sync --sync-config=sync-config.yaml --confirm
       oc patch group ${group2_osuid} -p "{\"metadata\":{\"annotations\":{\"openshift.io/ldap.uid\":\"cn=garbage,${group2_ldapuid}\"}}}"
       oc adm groups prune --sync-config=sync-config.yaml --confirm
       compare_and_cleanup valid_all_ldap_sync_prune.yaml

       echo -e "\tTEST: Sync all LDAP groups from LDAP server using whitelist file, then prune OpenShift groups using the same whitelist file"
       os::cmd::expect_success_and_text 'oc adm groups sync --whitelist=ldapgroupuids.txt --sync-config=sync-config-user-defined.yaml --confirm' 'group/'
       os::cmd::expect_success_and_text 'oc get group -o jsonpath={.items[*].metadata.name}' 'firstgroup secondgroup thirdgroup'
       os::cmd::expect_success_and_text 'oc adm groups prune --whitelist=ldapgroupuids.txt --sync-config=sync-config-user-defined.yaml --confirm | wc -l' '0'
       os::cmd::expect_success_and_text 'oc get group -o jsonpath={.items[*].metadata.name}' 'firstgroup secondgroup thirdgroup'
       os::cmd::expect_success_and_text 'oc patch group secondgroup -p "{\"metadata\":{\"annotations\":{\"openshift.io/ldap.uid\":\"cn=garbage\"}}}"' 'group.user.openshift.io/secondgroup patched'
       os::cmd::expect_success_and_text 'oc adm groups prune --whitelist=ldapgroupuids.txt --sync-config=sync-config-user-defined.yaml --confirm' 'group/secondgroup'
       os::cmd::expect_success_and_text 'oc get group -o jsonpath={.items[*].metadata.name}' 'firstgroup thirdgroup'
       os::cmd::expect_success_and_text 'oc delete groups --all' 'deleted'
       os::cmd::expect_success_and_text 'oc get group -o jsonpath={.items[*].metadata.name} | wc -l' '0'


       # PAGING
       echo -e "\tTEST: Sync all LDAP groups from LDAP server using paged queries"
       oc adm groups sync --sync-config=sync-config-paging.yaml --confirm
       compare_and_cleanup valid_all_ldap_sync.yaml


       os::test::junit::declare_suite_end
    popd > /dev/null
done

# special test for RFC2307
pushd ${BASETMPDIR}/rfc2307 > /dev/null
echo -e "\tTEST: Sync groups from LDAP server, tolerating errors"
oc adm groups sync --sync-config=sync-config-tolerating.yaml --confirm 2>"${LOG_DIR}/tolerated-output.txt"
grep 'For group "cn=group1,ou=groups,ou=incomplete\-rfc2307,dc=example,dc=com", ignoring member "cn=INVALID,ou=people,ou=rfc2307,dc=example,dc=com"' "${LOG_DIR}/tolerated-output.txt"
grep 'For group "cn=group2,ou=groups,ou=incomplete\-rfc2307,dc=example,dc=com", ignoring member "cn=OUTOFSCOPE,ou=people,ou=OUTOFSCOPE,dc=example,dc=com"' "${LOG_DIR}/tolerated-output.txt"
grep 'For group "cn=group3,ou=groups,ou=incomplete\-rfc2307,dc=example,dc=com", ignoring member "cn=INVALID,ou=people,ou=rfc2307,dc=example,dc=com"' "${LOG_DIR}/tolerated-output.txt"
grep 'For group "cn=group3,ou=groups,ou=incomplete\-rfc2307,dc=example,dc=com", ignoring member "cn=OUTOFSCOPE,ou=people,ou=OUTOFSCOPE,dc=example,dc=com"' "${LOG_DIR}/tolerated-output.txt"
compare_and_cleanup valid_all_ldap_sync_tolerating.yaml
popd > /dev/null

# special test for augmented-ad
pushd ${BASETMPDIR}/augmented-ad > /dev/null
echo -e "\tTEST: Sync all LDAP groups from LDAP server, remove LDAP group metadata entry, then prune OpenShift groups"
oc adm groups sync --sync-config=sync-config.yaml --confirm
ldapdelete -x -h $LDAP_SERVICE_IP -p 389 -D cn=Manager,dc=example,dc=com -w admin "${group1_ldapuid}"
oc adm groups prune --sync-config=sync-config.yaml --confirm
compare_and_cleanup valid_all_ldap_sync_delete_prune.yaml
popd > /dev/null`)

func testExtendedTestdataLdapGroupsyncShBytes() ([]byte, error) {
	return _testExtendedTestdataLdapGroupsyncSh, nil
}

func testExtendedTestdataLdapGroupsyncSh() (*asset, error) {
	bytes, err := testExtendedTestdataLdapGroupsyncShBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/ldap/groupsync.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataLdapLdapserverConfigCmYaml = []byte(`---
apiVersion: v1
kind: ConfigMap
metadata:
  name: ldap-config
data:
  ldap.conf: |
    TLS_CACERTDIR   /usr/local/etc/ldapcert
    TLS_CACERT      /usr/local/etc/ldapcert/ca.crt

  tls_conf.ldif: |
    # Configures the TLS certs for slapd
    dn: cn=config
    changetype: modify
    add: olcTLSCACertificateFile
    olcTLSCACertificateFile: /usr/local/etc/ldapcert/ca.crt
    -
    replace: olcTLSCertificateFile
    olcTLSCertificateFile: /usr/local/etc/ldapcert/tls.crt
    -
    replace: olcTLSCertificateKeyFile
    olcTLSCertificateKeyFile: /usr/local/etc/ldapcert/tls.key

  base_conf.ldif: |
    # The base LDIF data
    dn: dc=example,dc=com
    objectClass: top
    objectClass: dcObject
    objectclass: organization
    o: Example Com
    dc: Example

    dn: cn=Manager,dc=example,dc=com
    objectClass: organizationalRole
    cn: Manager
    description: LDAP Directory Manager

    dn: ou=People,dc=example,dc=com
    objectClass: organizationalUnit
    ou: People

    dn: ou=Group,dc=example,dc=com
    objectClass: organizationalUnit
    ou: Group

  domain_conf.ldif: |
    # Domain setup
    dn: olcDatabase={1}monitor,cn=config
    changetype: modify
    replace: olcAccess
    olcAccess: {0}to * by dn.base="gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth"
      read by dn.base="cn=Manager,dc=example,dc=com" read by * none

    dn: olcDatabase={2}mdb,cn=config
    changetype: modify
    replace: olcSuffix
    olcSuffix: dc=example,dc=com

    dn: olcDatabase={2}mdb,cn=config
    changetype: modify
    replace: olcRootDN
    olcRootDN: cn=Manager,dc=example,dc=com

    dn: olcDatabase={2}mdb,cn=config
    changetype: modify
    add: olcRootPW
    olcRootPW: admin

    dn: olcDatabase={2}mdb,cn=config
    changetype: modify
    add: olcAccess
    olcAccess: {0}to attrs=userPassword,shadowLastChange by
      dn="cn=Manager,dc=example,dc=com" write by anonymous auth by self write by * none
    olcAccess: {1}to dn.base="" by * read
    olcAccess: {2}to * by dn="cn=Manager,dc=example,dc=com" write by * read


  groupsync.ldif: |
    # Groupsync LDIF data
    dn: ou=rfc2307,dc=example,dc=com
    objectClass: organizationalUnit
    ou: rfc2307
    description: RFC2307-style Entries

    dn: ou=groups,ou=rfc2307,dc=example,dc=com
    objectClass: organizationalUnit
    ou: groups
    description: User Groups

    dn: ou=people,ou=rfc2307,dc=example,dc=com
    objectClass: organizationalUnit
    ou: people
    description: Users

    dn: cn=Person1,ou=people,ou=rfc2307,dc=example,dc=com
    objectClass: person
    objectClass: organizationalPerson
    objectClass: inetOrgPerson
    sn: Smith
    cn: Person1
    displayName: person1smith
    mail: person1smith@example.com

    dn: cn=Person2,ou=people,ou=rfc2307,dc=example,dc=com
    objectClass: person
    objectClass: organizationalPerson
    objectClass: inetOrgPerson
    sn: Smith
    cn: Person2
    displayName: person2smith
    mail: person2smith@example.com

    dn: cn=Person3,ou=people,ou=rfc2307,dc=example,dc=com
    objectClass: person
    objectClass: organizationalPerson
    objectClass: inetOrgPerson
    sn: Smith
    cn: Person3
    displayName: person3smith
    mail: person3smith@example.com

    dn: cn=Person4,ou=people,ou=rfc2307,dc=example,dc=com
    objectClass: person
    objectClass: organizationalPerson
    objectClass: inetOrgPerson
    sn: Smith
    cn: Person4
    displayName: person4smith
    mail: person4smith@example.com

    dn: cn=Person5,ou=people,ou=rfc2307,dc=example,dc=com
    objectClass: person
    objectClass: organizationalPerson
    objectClass: inetOrgPerson
    sn: Smith
    cn: Person5
    displayName: person5smith
    mail: person5smith@example.com

    dn: cn=group1,ou=groups,ou=rfc2307,dc=example,dc=com
    objectClass: groupOfNames
    cn: group1
    owner: cn=Person1,ou=people,ou=rfc2307,dc=example,dc=com
    description: Person1's Group
    member: cn=Person1,ou=people,ou=rfc2307,dc=example,dc=com
    member: cn=Person2,ou=people,ou=rfc2307,dc=example,dc=com
    member: cn=Person3,ou=people,ou=rfc2307,dc=example,dc=com
    member: cn=Person4,ou=people,ou=rfc2307,dc=example,dc=com
    member: cn=Person5,ou=people,ou=rfc2307,dc=example,dc=com

    dn: cn=group2,ou=groups,ou=rfc2307,dc=example,dc=com
    objectClass: groupOfNames
    cn: group2
    owner: cn=Person2,ou=people,ou=rfc2307,dc=example,dc=com
    description: Person2's Group
    member: cn=Person1,ou=people,ou=rfc2307,dc=example,dc=com
    member: cn=Person2,ou=people,ou=rfc2307,dc=example,dc=com
    member: cn=Person3,ou=people,ou=rfc2307,dc=example,dc=com

    dn: cn=group3,ou=groups,ou=rfc2307,dc=example,dc=com
    objectClass: groupOfNames
    cn: group3
    owner: cn=Person3,ou=people,ou=rfc2307,dc=example,dc=com
    description: Person3's Group
    member: cn=Person1,ou=people,ou=rfc2307,dc=example,dc=com
    member: cn=Person5,ou=people,ou=rfc2307,dc=example,dc=com

    dn: ou=ad,dc=example,dc=com
    objectClass: organizationalUnit
    ou: ad
    description: Active Directory-style Entries

    dn: ou=people,ou=ad,dc=example,dc=com
    objectClass: organizationalUnit
    ou: people
    description: AD-style users

    dn: cn=Person1,ou=people,ou=ad,dc=example,dc=com
    objectClass: person
    objectClass: organizationalPerson
    objectClass: inetOrgPerson
    objectClass: testPerson
    sn: Smith
    cn: Person1
    displayName: person1smith
    mail: person1smith@example.com
    testMemberOf: group1
    testMemberOf: group2
    testMemberOf: group3

    dn: cn=Person2,ou=people,ou=ad,dc=example,dc=com
    objectClass: person
    objectClass: organizationalPerson
    objectClass: inetOrgPerson
    objectClass: testPerson
    sn: Smith
    cn: Person2
    displayName: person2smith
    mail: person2smith@example.com
    testMemberOf: group1
    testMemberOf: group2

    dn: cn=Person3,ou=people,ou=ad,dc=example,dc=com
    objectClass: person
    objectClass: organizationalPerson
    objectClass: inetOrgPerson
    objectClass: testPerson
    sn: Smith
    cn: Person3
    displayName: person3smith
    mail: person3smith@example.com
    testMemberOf: group1
    testMemberOf: group2

    dn: cn=Person4,ou=people,ou=ad,dc=example,dc=com
    objectClass: person
    objectClass: organizationalPerson
    objectClass: inetOrgPerson
    objectClass: testPerson
    sn: Smith
    cn: Person4
    displayName: person4smith
    mail: person4smith@example.com
    testMemberOf: group1

    dn: cn=Person5,ou=people,ou=ad,dc=example,dc=com
    objectClass: person
    objectClass: organizationalPerson
    objectClass: inetOrgPerson
    objectClass: testPerson
    sn: Smith
    cn: Person5
    displayName: person5smith
    mail: person5smith@example.com
    testMemberOf: group1
    testMemberOf: group3

    dn: ou=adextended,dc=example,dc=com
    objectClass: organizationalUnit
    ou: adextended
    description: AD-style Entries with Group Entries

    dn: ou=people,ou=adextended,dc=example,dc=com
    objectClass: organizationalUnit
    ou: people
    description: AD-style users

    dn: cn=Person1,ou=people,ou=adextended,dc=example,dc=com
    objectClass: person
    objectClass: organizationalPerson
    objectClass: inetOrgPerson
    objectClass: testPerson
    sn: Smith
    cn: Person1
    displayName: person1smith
    mail: person1smith@example.com
    testMemberOf: cn=group1,ou=groups,ou=adextended,dc=example,dc=com
    testMemberOf: cn=group2,ou=groups,ou=adextended,dc=example,dc=com
    testMemberOf: cn=group3,ou=groups,ou=adextended,dc=example,dc=com

    dn: cn=Person2,ou=people,ou=adextended,dc=example,dc=com
    objectClass: person
    objectClass: organizationalPerson
    objectClass: inetOrgPerson
    objectClass: testPerson
    sn: Smith
    cn: Person2
    displayName: person2smith
    mail: person2smith@example.com
    testMemberOf: cn=group1,ou=groups,ou=adextended,dc=example,dc=com
    testMemberOf: cn=group2,ou=groups,ou=adextended,dc=example,dc=com

    dn: cn=Person3,ou=people,ou=adextended,dc=example,dc=com
    objectClass: person
    objectClass: organizationalPerson
    objectClass: inetOrgPerson
    objectClass: testPerson
    sn: Smith
    cn: Person3
    displayName: person3smith
    mail: person3smith@example.com
    testMemberOf: cn=group1,ou=groups,ou=adextended,dc=example,dc=com
    testMemberOf: cn=group2,ou=groups,ou=adextended,dc=example,dc=com

    dn: cn=Person4,ou=people,ou=adextended,dc=example,dc=com
    objectClass: person
    objectClass: organizationalPerson
    objectClass: inetOrgPerson
    objectClass: testPerson
    sn: Smith
    cn: Person4
    displayName: person4smith
    mail: person4smith@example.com
    testMemberOf: cn=group1,ou=groups,ou=adextended,dc=example,dc=com

    dn: cn=Person5,ou=people,ou=adextended,dc=example,dc=com
    objectClass: person
    objectClass: organizationalPerson
    objectClass: inetOrgPerson
    objectClass: testPerson
    sn: Smith
    cn: person5smith
    displayName: person5smith
    mail: person5smith@example.com
    testMemberOf: cn=group1,ou=groups,ou=adextended,dc=example,dc=com
    testMemberOf: cn=group3,ou=groups,ou=adextended,dc=example,dc=com

    dn: ou=groups,ou=adextended,dc=example,dc=com
    objectClass: organizationalUnit
    ou: groups
    description: Group entries with metadata

    dn: cn=group1,ou=groups,ou=adextended,dc=example,dc=com
    objectClass: groupOfNames
    cn: extended-group1
    owner: cn=Person1,ou=people,ou=adextended,dc=example,dc=com
    description: Person1's Group
    member: cn=Person5,ou=people,ou=rfc2307,dc=example,dc=com

    dn: cn=group2,ou=groups,ou=adextended,dc=example,dc=com
    objectClass: groupOfNames
    cn: extended-group2
    owner: cn=Person2,ou=people,ou=adextended,dc=example,dc=com
    description: Person2's Group
    member: cn=fake

    dn: cn=group3,ou=groups,ou=adextended,dc=example,dc=com
    objectClass: groupOfNames
    cn: extended-group3
    owner: cn=Person3,ou=people,ou=adextended,dc=example,dc=com
    description: Person3's Group
    member: cn=fake

    dn: ou=incomplete-rfc2307,dc=example,dc=com
    objectClass: organizationalUnit
    ou: incomplete-rfc2307
    description: OrganizationalUnit to hold malformed entries

    dn: ou=groups,ou=incomplete-rfc2307,dc=example,dc=com
    objectClass: organizationalUnit
    ou: groups
    description: Group entries with member lists containing missing members

    dn: cn=group1,ou=groups,ou=incomplete-rfc2307,dc=example,dc=com
    objectClass: groupOfNames
    cn: group1
    owner: cn=Person1,ou=people,ou=rfc2307,dc=example,dc=com
    description: Person1's Group
    member: cn=Person1,ou=people,ou=rfc2307,dc=example,dc=com
    member: cn=Person2,ou=people,ou=rfc2307,dc=example,dc=com
    member: cn=Person3,ou=people,ou=rfc2307,dc=example,dc=com
    member: cn=Person4,ou=people,ou=rfc2307,dc=example,dc=com
    member: cn=Person5,ou=people,ou=rfc2307,dc=example,dc=com
    member: cn=INVALID,ou=people,ou=rfc2307,dc=example,dc=com

    dn: cn=group2,ou=groups,ou=incomplete-rfc2307,dc=example,dc=com
    objectClass: groupOfNames
    cn: group2
    owner: cn=Person2,ou=people,ou=rfc2307,dc=example,dc=com
    description: Person2's Group
    member: cn=Person1,ou=people,ou=rfc2307,dc=example,dc=com
    member: cn=Person2,ou=people,ou=rfc2307,dc=example,dc=com
    member: cn=Person3,ou=people,ou=rfc2307,dc=example,dc=com
    member: cn=OUTOFSCOPE,ou=people,ou=OUTOFSCOPE,dc=example,dc=com

    dn: cn=group3,ou=groups,ou=incomplete-rfc2307,dc=example,dc=com
    objectClass: groupOfNames
    cn: group3
    owner: cn=Person3,ou=people,ou=rfc2307,dc=example,dc=com
    description: Person3's Group
    member: cn=Person1,ou=people,ou=rfc2307,dc=example,dc=com
    member: cn=Person5,ou=people,ou=rfc2307,dc=example,dc=com
    member: cn=INVALID,ou=people,ou=rfc2307,dc=example,dc=com
    member: cn=OUTOFSCOPE,ou=people,ou=OUTOFSCOPE,dc=example,dc=com

`)

func testExtendedTestdataLdapLdapserverConfigCmYamlBytes() ([]byte, error) {
	return _testExtendedTestdataLdapLdapserverConfigCmYaml, nil
}

func testExtendedTestdataLdapLdapserverConfigCmYaml() (*asset, error) {
	bytes, err := testExtendedTestdataLdapLdapserverConfigCmYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/ldap/ldapserver-config-cm.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataLdapLdapserverDeploymentYaml = []byte(`---
kind: Deployment
apiVersion: apps/v1
metadata:
  name: openldap-server
  labels:
    app: openldap-server
spec:
  replicas: 1
  selector:
    matchLabels:
      app: openldap-server
  template:
    metadata:
      name: openldap-server
      labels:
        app: openldap-server
    spec:
      serviceAccountName: ldap
      containers:
      - name: openldap-server
        securityContext:
          privileged: true
        # This image is built from the images/openldap directory. Temporary repo location.
        image: docker.io/mrogers950/origin-openldap-test:fedora29
        ports:
        # StartTLS works over 389
        - containerPort: 389
          protocol: TCP
        terminationMessagePath: "/dev/termination-log"
        imagePullPolicy: Always
        volumeMounts:
        - name: ldap-config
          # Configs get copied to /etc/openldap by container run script.
          mountPath: /usr/local/etc/ldapconf
        - name: scripts
          mountPath: /usr/local/bin
        - name: ldap-cert
          mountPath: /usr/local/etc/ldapcert
      volumes:
      - name: ldap-cert
        secret:
          secretName: ldap-cert
      - name: ldap-config
        configMap:
          name: ldap-config
      - name: scripts
        configMap:
          name: scripts
          defaultMode: 0777
      restartPolicy: Always
`)

func testExtendedTestdataLdapLdapserverDeploymentYamlBytes() ([]byte, error) {
	return _testExtendedTestdataLdapLdapserverDeploymentYaml, nil
}

func testExtendedTestdataLdapLdapserverDeploymentYaml() (*asset, error) {
	bytes, err := testExtendedTestdataLdapLdapserverDeploymentYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/ldap/ldapserver-deployment.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataLdapLdapserverScriptsCmYaml = []byte(`---
apiVersion: v1
kind: ConfigMap
metadata:
  name: scripts
data:
  run-openldap.sh: |
    #!/bin/bash -x
    # This script is the entrypoint for the openldap container. It configures and runs slapd.
    # Modified slightly from https://raw.githubusercontent.com/openshift/openldap/master/2.4.41/run-openldap.sh

    # Reduce maximum number of number of open file descriptors to 1024
    # otherwise slapd consumes two orders of magnitude more of RAM
    # see https://github.com/docker/docker/issues/8231
    ulimit -n 1024

    OPENLDAP_ROOT_PASSWORD=${OPENLDAP_ROOT_PASSWORD:-admin}
    OPENLDAP_ROOT_DN_PREFIX=${OPENLDAP_ROOT_DN_PREFIX:-'cn=Manager'}
    OPENLDAP_ROOT_DN_SUFFIX=${OPENLDAP_ROOT_DN_SUFFIX:-'dc=example,dc=com'}
    OPENLDAP_DEBUG_LEVEL=${OPENLDAP_DEBUG_LEVEL:-256}

    # Only run if no config has happened fully before
    if [ ! -f /etc/openldap/CONFIGURED ]; then
        user=`+"`"+`id | grep -Po "(?<=uid=)\d+"`+"`"+`
        if (( user == 0 ))
        then
            # We are root, we can use user input!
            # Bring in default databse config
            cp /usr/share/openldap-servers/DB_CONFIG.example /var/lib/ldap/DB_CONFIG

            # start the daemon in another process and make config changes
            slapd -h "ldap:/// ldaps:/// ldapi:///" -d $OPENLDAP_DEBUG_LEVEL &
            for ((i=30; i>0; i--))
            do
                ping_result=`+"`"+`ldapsearch 2>&1 | grep "Can.t contact LDAP server"`+"`"+`
                if [ -z "$ping_result" ]
                then
                    break
                fi
                sleep 1
            done
            if [ $i -eq 0 ]
            then
                echo "slapd did not start correctly"
                exit 1
            fi

            # add useful schemas
            ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/openldap/schema/cosine.ldif -d $OPENLDAP_DEBUG_LEVEL
            ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/openldap/schema/nis.ldif -d $OPENLDAP_DEBUG_LEVEL
            ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/openldap/schema/inetorgperson.ldif -d $OPENLDAP_DEBUG_LEVEL
            ldapadd -Y EXTERNAL -H ldapi:/// -f /usr/local/etc/openldap/testPerson.ldif -d $OPENLDAP_DEBUG_LEVEL

            # domain and TLS setup
            ldapmodify -Y EXTERNAL -H ldapi:/// -f /usr/local/etc/ldapconf/domain_conf.ldif -d $OPENLDAP_DEBUG_LEVEL
            ldapmodify -Y EXTERNAL -H ldapi:/// -f /usr/local/etc/ldapconf/tls_conf.ldif -d $OPENLDAP_DEBUG_LEVEL

            # base and groupsync data
            ldapadd -x -D cn=Manager,dc=example,dc=com -w admin -f /usr/local/etc/ldapconf/base_conf.ldif -d $OPENLDAP_DEBUG_LEVEL
            ldapadd -x -D cn=Manager,dc=example,dc=com -w admin -f /usr/local/etc/ldapconf/groupsync.ldif -d $OPENLDAP_DEBUG_LEVEL

            # stop the daemon
            pid=$(ps -A | grep slapd | awk '{print $1}')
            kill -2 $pid || echo $?

            # ensure the daemon stopped
            for ((i=30; i>0; i--))
            do
                exists=$(ps -A | grep $pid)
                if [ -z "${exists}" ]
                then
                    break
                fi
                sleep 1
            done
            if [ $i -eq 0 ]
            then
                echo "slapd did not stop correctly"
                exit 1
            fi
        else
            # Something has gone wrong with our image build
            echo "FAILURE: Need to run pod as root"
            exit 1
        fi

        # copy in ldap.conf
        cp /usr/local/etc/ldapconf/*.conf /etc/openldap/

        # Test configuration files, log checksum errors. Errors may be tolerated and repaired by slapd so don't exit
        LOG=`+"`"+`slaptest 2>&1`+"`"+`
        CHECKSUM_ERR=$(echo "${LOG}" | grep -Po "(?<=ldif_read_file: checksum error on \").+(?=\")")
        for err in $CHECKSUM_ERR
        do
            echo "The file ${err} has a checksum error. Ensure that this file is not edited manually, or re-calculate the checksum."
        done

        touch /etc/openldap/CONFIGURED
    fi

    # Start the slapd service
    exec slapd -h "ldap:///${HOSTNAME} ldapi:/// ldaps:///${HOSTNAME}" -d $OPENLDAP_DEBUG_LEVEL
`)

func testExtendedTestdataLdapLdapserverScriptsCmYamlBytes() ([]byte, error) {
	return _testExtendedTestdataLdapLdapserverScriptsCmYaml, nil
}

func testExtendedTestdataLdapLdapserverScriptsCmYaml() (*asset, error) {
	bytes, err := testExtendedTestdataLdapLdapserverScriptsCmYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/ldap/ldapserver-scripts-cm.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataLdapLdapserverServiceYaml = []byte(`---
kind: Service
apiVersion: v1
metadata:
  name: openldap-server
spec:
  ports:
  - name: ldap
    protocol: TCP
    port: 389
    targetPort: 389
  selector:
    app: openldap-server
  type: ClusterIP
`)

func testExtendedTestdataLdapLdapserverServiceYamlBytes() ([]byte, error) {
	return _testExtendedTestdataLdapLdapserverServiceYaml, nil
}

func testExtendedTestdataLdapLdapserverServiceYaml() (*asset, error) {
	bytes, err := testExtendedTestdataLdapLdapserverServiceYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/ldap/ldapserver-service.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataLong_namesDockerfile = []byte(`FROM centos/ruby-25-centos7

CMD ["/bin/sh", "-c", "echo", "hello"]
`)

func testExtendedTestdataLong_namesDockerfileBytes() ([]byte, error) {
	return _testExtendedTestdataLong_namesDockerfile, nil
}

func testExtendedTestdataLong_namesDockerfile() (*asset, error) {
	bytes, err := testExtendedTestdataLong_namesDockerfileBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/long_names/Dockerfile", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataLong_namesFixtureJson = []byte(`{
    "kind": "List",
    "apiVersion": "v1",
    "metadata": {},
    "items": [
        {
            "kind": "BuildConfig",
            "apiVersion": "v1",
            "metadata": {
                "name": "12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890a",
                "labels": {
                    "name": "12345678901234567890123456789012345678901234567890123456789012a"
                }
            },
            "spec": {
                "triggers": [],
                "source": {
                    "type": "Git",
                    "git": {
                        "uri": "git://github.com/openshift/ruby-hello-world.git"
                    }
                },
                "strategy": {
                    "type": "Source",
                    "env": [],
                    "sourceStrategy": {
                        "from": {
                            "kind": "DockerImage",
                            "name": "centos/ruby-25-centos7"
                        }
                    }
                }
            }
        },
        {
            "kind": "BuildConfig",
            "apiVersion": "v1",
            "metadata": {
                "name": "12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890b",
                "labels": {
                    "name": "12345678901234567890123456789012345678901234567890123456789012b"
                }
            },
            "spec": {
                "triggers": [],
                "source": {
                    "type": "Git",
                    "git": {
                        "uri": "git://github.com/openshift/ruby-hello-world.git"
                    }
                },
                "strategy": {
                    "type": "Source",
                    "env": [],
                    "sourceStrategy": {
                        "from": {
                            "kind": "DockerImage",
                            "name": "centos/ruby-25-centos7"
                        }
                    }
                }
            }
        }
    ]
}`)

func testExtendedTestdataLong_namesFixtureJsonBytes() ([]byte, error) {
	return _testExtendedTestdataLong_namesFixtureJson, nil
}

func testExtendedTestdataLong_namesFixtureJson() (*asset, error) {
	bytes, err := testExtendedTestdataLong_namesFixtureJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/long_names/fixture.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataMarketplaceCsc02CscYaml = []byte(`apiVersion: v1
kind: Template
metadata:
  name: csc-template
objects:
- apiVersion: operators.coreos.com/v1
  kind: CatalogSourceConfig
  metadata:
    name: "${NAME}"
    namespace: "${MARKETPLACE}"
  spec:
    targetNamespace: "${NAMESPACE}"
    source: ""
    packages: "${PACKAGES}"
    csDisplayName: "${DISPLAYNAME}"
    csPublisher: "${PUBLISHER}"

parameters:
- name: NAME
- name: NAMESPACE
- name: MARKETPLACE
- name: PACKAGES
- name: DISPLAYNAME
- name: PUBLISHER
`)

func testExtendedTestdataMarketplaceCsc02CscYamlBytes() ([]byte, error) {
	return _testExtendedTestdataMarketplaceCsc02CscYaml, nil
}

func testExtendedTestdataMarketplaceCsc02CscYaml() (*asset, error) {
	bytes, err := testExtendedTestdataMarketplaceCsc02CscYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/marketplace/csc/02-csc.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataMarketplaceOpsrc02OpsrcYaml = []byte(`apiVersion: v1
kind: Template
metadata:
  name: opsrc-template
objects:
- apiVersion: operators.coreos.com/v1
  kind: OperatorSource
  metadata:
    name: "${NAME}"
    namespace: "${MARKETPLACE}"
    labels:
      opsrc-provider: "${LABEL}"
  spec:
    type: appregistry
    endpoint: "https://quay.io/cnr"
    registryNamespace: "${NAMESPACE}"
    displayName: "${DISPLAYNAME}"
    publisher: "${PUBLISHER}"

parameters:
- name: NAME
- name: NAMESPACE
- name: MARKETPLACE
- name: LABEL
- name: DISPLAYNAME
- name: PUBLISHER
`)

func testExtendedTestdataMarketplaceOpsrc02OpsrcYamlBytes() ([]byte, error) {
	return _testExtendedTestdataMarketplaceOpsrc02OpsrcYaml, nil
}

func testExtendedTestdataMarketplaceOpsrc02OpsrcYaml() (*asset, error) {
	bytes, err := testExtendedTestdataMarketplaceOpsrc02OpsrcYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/marketplace/opsrc/02-opsrc.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataMultiNamespacePipelineYaml = []byte(`apiVersion: v1
kind: Template
labels:
  template: multi-namespace-pipeline
metadata:
  annotations:
    iconClass: icon-jenkins
    tags: instant-app,jenkins
  name: 
parameters:
- description: namespace
  displayName: namespace
  name: NAMESPACE
  value: namespace
- description: namespace2
  displayName: namespace2
  name: NAMESPACE2
  value: namespace2
- description: namespace3
  displayName: namespace3
  name: NAMESPACE3
  value: namespace3
objects:
- apiVersion: v1
  kind: BuildConfig
  metadata:
    labels:
      name: multi-namespace-pipeline
    name: multi-namespace-pipeline
  spec:
    strategy:
      jenkinsPipelineStrategy:
        env:
          - name: NAMESPACE
            value: ${NAMESPACE}
          - name: NAMESPACE2
            value: ${NAMESPACE2}
          - name: NAMESPACE3
            value: ${NAMESPACE3}
        jenkinsfile: |-
          try {
              timeout(time: 20, unit: 'MINUTES') {
                  // Select the default cluster
                  openshift.withCluster() {
                      // Select the default project
                      openshift.withProject() {

                          // Output the url of the currently selected cluster
                          echo "Using project ${openshift.project()} in cluster with url ${openshift.cluster()}"

                          template = openshift.create('https://raw.githubusercontent.com/openshift/origin/master/test/extended/testdata/multi-namespace-template.yaml').object()

                          // Explore the Groovy object which models the OpenShift template as a Map
                          echo "Template contains ${template.parameters.size()} parameters"

                          // Process the modeled template. We could also pass JSON/YAML, a template name, or a url instead.
                          def objectModels = openshift.process( template, "-p", "NAMESPACE=${env.NAMESPACE}", "-p", "NAMESPACE2=${env.NAMESPACE2}", "-p", "NAMESPACE3=${env.NAMESPACE3}" )

                          // objectModels is a list of objects the template defined, modeled as Groovy objects
                          echo "The template references ${objectModels.size()} objects"

                          def objects = openshift.create(objectModels)

                          // Create returns a selector which will always select the objects created
                          objects.withEach {
                              // Each loop binds the variable 'it' to a selector which selects a single object
                              echo "Created ${it.name()} from template with labels ${it.object().metadata.labels}"
                          }

               
                      }
                  }
              }
          } catch (err) {
             echo "in catch block"
             echo "Caught: ${err}"
             currentBuild.result = 'FAILURE'
             throw err
          }
      type: JenkinsPipeline
`)

func testExtendedTestdataMultiNamespacePipelineYamlBytes() ([]byte, error) {
	return _testExtendedTestdataMultiNamespacePipelineYaml, nil
}

func testExtendedTestdataMultiNamespacePipelineYaml() (*asset, error) {
	bytes, err := testExtendedTestdataMultiNamespacePipelineYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/multi-namespace-pipeline.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataMultiNamespaceTemplateYaml = []byte(`apiVersion: v1
items:
- apiVersion: template.openshift.io/v1
  kind: Template
  labels:
    template: mongodb-ephemeral-template
  metadata:
    name: mongodb-ephemeral
  objects:
  - apiVersion: v1
    kind: Secret
    metadata:
      annotations:
        template.openshift.io/expose-admin_password: '{.data[''database-admin-password'']}'
        template.openshift.io/expose-database_name: '{.data[''database-name'']}'
        template.openshift.io/expose-password: '{.data[''database-password'']}'
        template.openshift.io/expose-username: '{.data[''database-user'']}'
      name: ${DATABASE_SERVICE_NAME}
      namespace: ${NAMESPACE2}
    stringData:
      database-admin-password: ${MONGODB_ADMIN_PASSWORD}
      database-name: ${MONGODB_DATABASE}
      database-password: ${MONGODB_PASSWORD}
      database-user: ${MONGODB_USER}
  - apiVersion: v1
    kind: Service
    metadata:
      annotations:
        template.openshift.io/expose-uri: mongodb://{.spec.clusterIP}:{.spec.ports[?(.name=="mongo")].port}
      name: ${DATABASE_SERVICE_NAME}
      namespace: ${NAMESPACE3}
    spec:
      ports:
      - name: mongo
        nodePort: 0
        port: 27017
        protocol: TCP
        targetPort: 27017
      selector:
        name: ${DATABASE_SERVICE_NAME}
      sessionAffinity: None
      type: ClusterIP
    status:
      loadBalancer: {}
  - apiVersion: v1
    kind: DeploymentConfig
    metadata:
      annotations:
        template.alpha.openshift.io/wait-for-ready: "true"
      name: ${DATABASE_SERVICE_NAME}
      namespace: ${NAMESPACE2}
    spec:
      replicas: 1
      selector:
        name: ${DATABASE_SERVICE_NAME}
      strategy:
        type: Recreate
      template:
        metadata:
          labels:
            name: ${DATABASE_SERVICE_NAME}
        spec:
          containers:
          - capabilities: {}
            env:
            - name: MONGODB_USER
              valueFrom:
                secretKeyRef:
                  key: database-user
                  name: ${DATABASE_SERVICE_NAME}
            - name: MONGODB_PASSWORD
              valueFrom:
                secretKeyRef:
                  key: database-password
                  name: ${DATABASE_SERVICE_NAME}
            - name: MONGODB_ADMIN_PASSWORD
              valueFrom:
                secretKeyRef:
                  key: database-admin-password
                  name: ${DATABASE_SERVICE_NAME}
            - name: MONGODB_DATABASE
              valueFrom:
                secretKeyRef:
                  key: database-name
                  name: ${DATABASE_SERVICE_NAME}
            image: ' '
            imagePullPolicy: IfNotPresent
            livenessProbe:
              initialDelaySeconds: 30
              tcpSocket:
                port: 27017
              timeoutSeconds: 1
            name: mongodb
            ports:
            - containerPort: 27017
              protocol: TCP
            readinessProbe:
              exec:
                command:
                - /bin/sh
                - -i
                - -c
                - mongo 127.0.0.1:27017/$MONGODB_DATABASE -u $MONGODB_USER -p $MONGODB_PASSWORD
                  --eval="quit()"
              initialDelaySeconds: 3
              timeoutSeconds: 1
            resources:
              limits:
                memory: ${MEMORY_LIMIT}
            securityContext:
              capabilities: {}
              privileged: false
            terminationMessagePath: /dev/termination-log
            volumeMounts:
            - mountPath: /var/lib/mongodb/data
              name: ${DATABASE_SERVICE_NAME}-data
          dnsPolicy: ClusterFirst
          restartPolicy: Always
          volumes:
          - emptyDir:
              medium: ""
            name: ${DATABASE_SERVICE_NAME}-data
      triggers:
      - imageChangeParams:
          automatic: true
          containerNames:
          - mongodb
          from:
            kind: ImageStreamTag
            name: mongodb:${MONGODB_VERSION}
            namespace: ${NAMESPACE}
          lastTriggeredImage: ""
        type: ImageChange
      - type: ConfigChange
    status: {}
  parameters:
  - description: Maximum amount of memory the container can use.
    displayName: Memory Limit
    name: MEMORY_LIMIT
    required: true
    value: 512Mi
  - description: The OpenShift Namespace where the ImageStream resides.
    displayName: Namespace
    name: NAMESPACE
    value: openshift
  - description: The OpenShift Namespace where the ImageStream resides.
    displayName: Namespace2
    name: NAMESPACE2
    value: ggm-namespace
  - description: The OpenShift Namespace where the ImageStream resides.
    displayName: Namespace3
    name: NAMESPACE3
    value: myproject
  - description: The name of the OpenShift Service exposed for the database.
    displayName: Database Service Name
    name: DATABASE_SERVICE_NAME
    required: true
    value: mongodb
  - description: Username for MongoDB user that will be used for accessing the database.
    displayName: MongoDB Connection Username
    from: user[A-Z0-9]{3}
    generate: expression
    name: MONGODB_USER
    required: true
  - description: Password for the MongoDB connection user.
    displayName: MongoDB Connection Password
    from: '[a-zA-Z0-9]{16}'
    generate: expression
    name: MONGODB_PASSWORD
    required: true
  - description: Name of the MongoDB database accessed.
    displayName: MongoDB Database Name
    name: MONGODB_DATABASE
    required: true
    value: sampledb
  - description: Password for the database admin user.
    displayName: MongoDB Admin Password
    from: '[a-zA-Z0-9]{16}'
    generate: expression
    name: MONGODB_ADMIN_PASSWORD
    required: true
  - description: Version of MongoDB image to be used (2.4, 2.6, 3.2 or latest).
    displayName: Version of MongoDB Image
    name: MONGODB_VERSION
    required: true
    value: "3.2"
kind: List
metadata:
  resourceVersion: ""
  selfLink: ""`)

func testExtendedTestdataMultiNamespaceTemplateYamlBytes() ([]byte, error) {
	return _testExtendedTestdataMultiNamespaceTemplateYaml, nil
}

func testExtendedTestdataMultiNamespaceTemplateYaml() (*asset, error) {
	bytes, err := testExtendedTestdataMultiNamespaceTemplateYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/multi-namespace-template.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataOauthserverCabundleCmYaml = []byte(`apiVersion: v1
kind: ConfigMap
metadata:
  annotations:
    service.beta.openshift.io/inject-cabundle: "true"
  labels:
    app: test-oauth-server
  name: service-ca
`)

func testExtendedTestdataOauthserverCabundleCmYamlBytes() ([]byte, error) {
	return _testExtendedTestdataOauthserverCabundleCmYaml, nil
}

func testExtendedTestdataOauthserverCabundleCmYaml() (*asset, error) {
	bytes, err := testExtendedTestdataOauthserverCabundleCmYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/oauthserver/cabundle-cm.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataOauthserverOauthNetworkYaml = []byte(`apiVersion: v1
kind: Service
metadata:
  annotations:
    service.alpha.openshift.io/serving-cert-secret-name: serving-cert
  labels:
    app: test-oauth-server
  name: test-oauth-svc
spec:
  ports:
  - name: https
    port: 443
    protocol: TCP
    targetPort: 6443
  selector:
    app: test-oauth-server
  type: ClusterIP
---

apiVersion: route.openshift.io/v1
kind: Route
metadata:
  labels:
    app: test-oauth-server
  name: test-oauth-route
spec:
  port:
    targetPort: 6443
  tls:
    insecureEdgeTerminationPolicy: Redirect
    termination: passthrough
  to:
    kind: Service
    name: test-oauth-svc
    weight: 100
  wildcardPolicy: None

`)

func testExtendedTestdataOauthserverOauthNetworkYamlBytes() ([]byte, error) {
	return _testExtendedTestdataOauthserverOauthNetworkYaml, nil
}

func testExtendedTestdataOauthserverOauthNetworkYaml() (*asset, error) {
	bytes, err := testExtendedTestdataOauthserverOauthNetworkYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/oauthserver/oauth-network.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataOauthserverOauthPodYaml = []byte(`apiVersion: v1
kind: Pod
metadata:
  labels:
    app: test-oauth-server
  name: test-oauth-server
spec:
  containers:
  - command:
    - oauth-server
    - osinserver
    - --config=/var/config/system/configmaps/oauth-config/oauth.conf
    - --v=100
    image: quay.io/openshift/origin-oauth-server:latest
    imagePullPolicy: IfNotPresent
    name: oauth-server
    ports:
    - containerPort: 6443
      name: https
      protocol: TCP
    readinessProbe:
      failureThreshold: 3
      httpGet:
        path: /healthz
        port: 6443
        scheme: HTTPS
      initialDelaySeconds: 5
      periodSeconds: 10
      successThreshold: 1
      timeoutSeconds: 1
    resources:
      requests:
        cpu: 10m
        memory: 50Mi
    securityContext:
      capabilities:
        drop:
        - MKNOD
      procMount: Default
    volumeMounts:
    - mountPath: /var/config/system/secrets/session-secret
      name: session-secret
      readOnly: true
    - mountPath: /var/config/system/configmaps/oauth-config
      name: oauth-config
      readOnly: true
    - mountPath: /var/config/system/secrets/serving-cert
      name: serving-cert
      readOnly: true
    - mountPath: /var/config/system/secrets/router-certs
      name: router-certs
      readOnly: true
    - mountPath: /var/config/system/configmaps/service-ca
      name: service-ca
      readOnly: true
  serviceAccountName: e2e-oauth
  volumes:
  - configMap:
      defaultMode: 420
      items:
      - key: oauth.conf
        path: oauth.conf
      name: oauth-config
    name: oauth-config
  - name: session-secret
    secret:
      defaultMode: 420
      items:
      - key: session
        path: session
      secretName: session-secret
  - name: serving-cert
    secret:
      defaultMode: 420
      items:
      - key: tls.crt
        path: tls.crt
      - key: tls.key
        path: tls.key
      secretName: serving-cert
  - name: router-certs
    secret:
      defaultMode: 420
      secretName: router-certs
  - configMap:
      defaultMode: 420
      items:
      - key: service-ca.crt
        path: service-ca.crt
      name: service-ca
    name: service-ca

`)

func testExtendedTestdataOauthserverOauthPodYamlBytes() ([]byte, error) {
	return _testExtendedTestdataOauthserverOauthPodYaml, nil
}

func testExtendedTestdataOauthserverOauthPodYaml() (*asset, error) {
	bytes, err := testExtendedTestdataOauthserverOauthPodYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/oauthserver/oauth-pod.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataOauthserverOauthSaYaml = []byte(`apiVersion: v1
kind: ServiceAccount
metadata:
  name: e2e-oauth
  labels:
    app: test-oauth-server
`)

func testExtendedTestdataOauthserverOauthSaYamlBytes() ([]byte, error) {
	return _testExtendedTestdataOauthserverOauthSaYaml, nil
}

func testExtendedTestdataOauthserverOauthSaYaml() (*asset, error) {
	bytes, err := testExtendedTestdataOauthserverOauthSaYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/oauthserver/oauth-sa.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataOlmEtcdSubscriptionYaml = []byte(`apiVersion: v1
kind: Template
metadata:
  name: subscription-template
objects:
- apiVersion: operators.coreos.com/v1alpha1
  kind: Subscription
  metadata:
    name: "${NAME}"
    namespace: "${NAMESPACE}"
  spec:
    channel: singlenamespace-alpha
    installPlanApproval: Automatic
    name: etcd
    source: "${SOURCENAME}"
    sourceNamespace: "${SOURCENAMESPACE}"
    startingCSV: etcdoperator.v0.9.4
parameters:
- name: NAME
- name: NAMESPACE
- name: SOURCENAME
- name: SOURCENAMESPACE
`)

func testExtendedTestdataOlmEtcdSubscriptionYamlBytes() ([]byte, error) {
	return _testExtendedTestdataOlmEtcdSubscriptionYaml, nil
}

func testExtendedTestdataOlmEtcdSubscriptionYaml() (*asset, error) {
	bytes, err := testExtendedTestdataOlmEtcdSubscriptionYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/olm/etcd-subscription.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataOlmOperatorgroupYaml = []byte(`apiVersion: v1
kind: Template
metadata:
  name: operatorgroup-template
objects:
- kind: OperatorGroup
  apiVersion: operators.coreos.com/v1
  metadata:
    name: "${NAME}"
    namespace: "${NAMESPACE}"
  spec:
    targetNamespaces:
    - "${NAMESPACE}"

parameters:
- name: NAME
- name: NAMESPACE
  
`)

func testExtendedTestdataOlmOperatorgroupYamlBytes() ([]byte, error) {
	return _testExtendedTestdataOlmOperatorgroupYaml, nil
}

func testExtendedTestdataOlmOperatorgroupYaml() (*asset, error) {
	bytes, err := testExtendedTestdataOlmOperatorgroupYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/olm/operatorgroup.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataOpenshiftSecretToJenkinsCredentialYaml = []byte(`apiVersion: v1
data:
  password: c2VjcmV0Y3JlZHN5bmMK
  username: c2VjcmV0Y3JlZHN5bmMK
kind: Secret
metadata:
  labels:
    credential.sync.jenkins.openshift.io: "true"
  name: secret-to-credential
type: Opaque
`)

func testExtendedTestdataOpenshiftSecretToJenkinsCredentialYamlBytes() ([]byte, error) {
	return _testExtendedTestdataOpenshiftSecretToJenkinsCredentialYaml, nil
}

func testExtendedTestdataOpenshiftSecretToJenkinsCredentialYaml() (*asset, error) {
	bytes, err := testExtendedTestdataOpenshiftSecretToJenkinsCredentialYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/openshift-secret-to-jenkins-credential.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataReleasesPayload1EtcdOperatorImageReferences = []byte(`kind: ImageStream
apiVersion: image.openshift.io/v1
spec:
  tags:
  - name: etcd-operator
    from:
      name: quay.io/coreos/etcd-operator
      kind: DockerImage
`)

func testExtendedTestdataReleasesPayload1EtcdOperatorImageReferencesBytes() ([]byte, error) {
	return _testExtendedTestdataReleasesPayload1EtcdOperatorImageReferences, nil
}

func testExtendedTestdataReleasesPayload1EtcdOperatorImageReferences() (*asset, error) {
	bytes, err := testExtendedTestdataReleasesPayload1EtcdOperatorImageReferencesBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/releases/payload-1/etcd-operator/image-references", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataReleasesPayload1EtcdOperatorManifestYaml = []byte(`kind: List
apiVersion: v1
items:
- kind: ServiceAccount
  apiVersion: v1
  metadata:
    name: etcd-operator
- kind: Deployment
  apiVersion: apps/v1
  metadata:
    name: etcd-operator
  spec:
    template:
      spec:
        containers:
        - name: main
          image: quay.io/coreos/etcd-operator@sha256:12341234`)

func testExtendedTestdataReleasesPayload1EtcdOperatorManifestYamlBytes() ([]byte, error) {
	return _testExtendedTestdataReleasesPayload1EtcdOperatorManifestYaml, nil
}

func testExtendedTestdataReleasesPayload1EtcdOperatorManifestYaml() (*asset, error) {
	bytes, err := testExtendedTestdataReleasesPayload1EtcdOperatorManifestYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/releases/payload-1/etcd-operator/manifest.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataReleasesPayload1ImageRegistry10_imageRegistry_crdYaml = []byte(`kind: CustomResourceDefinition
apiVersion: apiextensions/v1
metadata:
  name: registry`)

func testExtendedTestdataReleasesPayload1ImageRegistry10_imageRegistry_crdYamlBytes() ([]byte, error) {
	return _testExtendedTestdataReleasesPayload1ImageRegistry10_imageRegistry_crdYaml, nil
}

func testExtendedTestdataReleasesPayload1ImageRegistry10_imageRegistry_crdYaml() (*asset, error) {
	bytes, err := testExtendedTestdataReleasesPayload1ImageRegistry10_imageRegistry_crdYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/releases/payload-1/image-registry/10_image-registry_crd.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataReleasesPayload1ImageRegistryImageReferences = []byte(`kind: ImageStream
apiVersion: image.openshift.io/v1
spec:
  tags:
  - name: image-registry
    from:
      name: openshift/origin-image-registry
      kind: DockerImage
`)

func testExtendedTestdataReleasesPayload1ImageRegistryImageReferencesBytes() ([]byte, error) {
	return _testExtendedTestdataReleasesPayload1ImageRegistryImageReferences, nil
}

func testExtendedTestdataReleasesPayload1ImageRegistryImageReferences() (*asset, error) {
	bytes, err := testExtendedTestdataReleasesPayload1ImageRegistryImageReferencesBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/releases/payload-1/image-registry/image-references", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataReleasesPayload1ImageRegistryManifestYaml = []byte(`kind: List
apiVersion: v1
items:
- kind: ServiceAccount
  apiVersion: v1
  metadata:
    name: image-registry
- kind: Deployment
  apiVersion: apps/v1
  metadata:
    name: image-registry
  spec:
    template:
      spec:
        containers:
        - name: main
          image: openshift/origin-image-registry:latest`)

func testExtendedTestdataReleasesPayload1ImageRegistryManifestYamlBytes() ([]byte, error) {
	return _testExtendedTestdataReleasesPayload1ImageRegistryManifestYaml, nil
}

func testExtendedTestdataReleasesPayload1ImageRegistryManifestYaml() (*asset, error) {
	bytes, err := testExtendedTestdataReleasesPayload1ImageRegistryManifestYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/releases/payload-1/image-registry/manifest.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataRolesEmptyRoleYaml = []byte(`apiVersion: v1
kind: Role
metadata:
  name: empty-role
`)

func testExtendedTestdataRolesEmptyRoleYamlBytes() ([]byte, error) {
	return _testExtendedTestdataRolesEmptyRoleYaml, nil
}

func testExtendedTestdataRolesEmptyRoleYaml() (*asset, error) {
	bytes, err := testExtendedTestdataRolesEmptyRoleYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/roles/empty-role.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataRolesPolicyClusterrolesYaml = []byte(`apiVersion: v1
items:
- apiVersion: v1
  kind: ClusterRole
  metadata:
    creationTimestamp: null
    name: basic-user2
  rules:
  - apiGroups: null
    attributeRestrictions: null
    resourceNames:
    - "~"
    resources:
    - users
    verbs:
    - get
  - apiGroups: null
    attributeRestrictions: null
    resources:
    - projectrequests
    verbs:
    - list
  - apiGroups: null
    attributeRestrictions: null
    resources:
    - clusterroles
    verbs:
    - get
    - list
  - apiGroups: null
    attributeRestrictions: null
    resources:
    - projects
    verbs:
    - list
  - apiGroups:
    - authorization.k8s.io
    attributeRestrictions: null
    resources:
    - selfsubjectaccessreviews
    verbs:
    - create
- apiVersion: v1
  groupNames:
  - system:authenticated
  kind: ClusterRoleBinding
  metadata:
    creationTimestamp: null
    name: basic-users2
  roleRef:
    name: basic-user2
  subjects:
  - kind: SystemGroup
    name: system:authenticated
  userNames: null
kind: List
metadata: {}
`)

func testExtendedTestdataRolesPolicyClusterrolesYamlBytes() ([]byte, error) {
	return _testExtendedTestdataRolesPolicyClusterrolesYaml, nil
}

func testExtendedTestdataRolesPolicyClusterrolesYaml() (*asset, error) {
	bytes, err := testExtendedTestdataRolesPolicyClusterrolesYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/roles/policy-clusterroles.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataRolesPolicyRolesYaml = []byte(`kind: Template
apiVersion: v1
metadata:
  name: "policy-roles-template"
labels:
  createdBy: "policy-roles-template"
parameters:
  - description: "The namespace to create roles in."
    name: NAMESPACE
    required: true
objects:
  - apiVersion: v1
    kind: Role
    metadata:
      creationTimestamp: null
      name: basic-user
    rules:
    - apiGroups: null
      attributeRestrictions: null
      resourceNames:
      - "~"
      resources:
      - users
      verbs:
      - get
    - apiGroups: null
      attributeRestrictions: null
      resources:
      - projectrequests
      verbs:
      - list
    - apiGroups: null
      attributeRestrictions: null
      resources:
      - clusterroles
      verbs:
      - get
      - list
    - apiGroups: null
      attributeRestrictions: null
      resources:
      - projects
      verbs:
      - list
    - apiGroups:
      - authorization.k8s.io
      attributeRestrictions: null
      resources:
      - selfsubjectaccessreviews
      verbs:
      - create
  - apiVersion: v1
    groupNames:
    - system:authenticated
    kind: RoleBinding
    metadata:
      creationTimestamp: null
      name: basic-users
    roleRef:
      name: basic-user
      namespace: ${NAMESPACE}
    subjects:
    - kind: SystemGroup
      name: system:authenticated
    userNames: null
`)

func testExtendedTestdataRolesPolicyRolesYamlBytes() ([]byte, error) {
	return _testExtendedTestdataRolesPolicyRolesYaml, nil
}

func testExtendedTestdataRolesPolicyRolesYaml() (*asset, error) {
	bytes, err := testExtendedTestdataRolesPolicyRolesYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/roles/policy-roles.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataRouterIngressYaml = []byte(`kind: List
apiVersion: v1
items:
# an ingress that should be captured as individual routes
- apiVersion: networking.k8s.io/v1beta1
  kind: Ingress
  metadata:
    name: test
  spec:
    tls:
    - hosts:
      - 3.ingress-test.com
      secretName: ingress-endpoint-secret
    rules:
    - host: 1.ingress-test.com
      http:
        paths:
        - path: /test
          backend:
            serviceName: ingress-endpoint-1
            servicePort: 80
        - path: /other
          backend:
            serviceName: ingress-endpoint-2
            servicePort: 80
    - host: 2.ingress-test.com
      http:
        paths:
        - path: /
          backend:
            serviceName: ingress-endpoint-1
            servicePort: 80
    - host: 3.ingress-test.com
      http:
        paths:
        - path: /
          backend:
            serviceName: ingress-endpoint-1
            servicePort: 80
# an empty secret
- apiVersion: v1
  kind: Secret
  metadata:
    name: ingress-endpoint-secret
  type: kubernetes.io/tls
  stringData:
    tls.key: ""
    tls.crt: ""
# a service to be routed to
- apiVersion: v1
  kind: Service
  metadata:
    name: ingress-endpoint-1
  spec:
    selector:
      app: ingress-endpoint-1
    ports:
    - port: 80
      targetPort: 8080
# a service to be routed to
- apiVersion: v1
  kind: Service
  metadata:
    name: ingress-endpoint-2
  spec:
    selector:
      app: ingress-endpoint-2
    ports:
    - port: 80
      targetPort: 8080
# a pod that serves a response
- apiVersion: v1
  kind: Pod
  metadata:
    name: ingress-endpoint-1
    labels:
      app: ingress-endpoint-1
  spec:
    terminationGracePeriodSeconds: 1
    containers:
    - name: test
      image: openshift/hello-openshift
      ports:
      - containerPort: 8080
        name: http
      - containerPort: 100
        protocol: UDP
# a pod that serves a response
- apiVersion: v1
  kind: Pod
  metadata:
    name: ingress-endpoint-2
    labels:
      app: ingress-endpoint-2
  spec:
    terminationGracePeriodSeconds: 1
    containers:
    - name: test
      image: openshift/hello-openshift
      ports:
      - containerPort: 8080
        name: http
      - containerPort: 100
        protocol: UDP
`)

func testExtendedTestdataRouterIngressYamlBytes() ([]byte, error) {
	return _testExtendedTestdataRouterIngressYaml, nil
}

func testExtendedTestdataRouterIngressYaml() (*asset, error) {
	bytes, err := testExtendedTestdataRouterIngressYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/router/ingress.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataRouterReencryptServingCertYaml = []byte(`apiVersion: v1
kind: List
items:
- apiVersion: v1
  kind: Pod
  metadata:
    name: serving-cert
    labels:
      app: serving-cert
  spec:
    containers:
    - image: nginx:1.15.3
      name: serve
      command:
        - /usr/sbin/nginx
      args:
        - -c
        - /etc/nginx/nginx.conf
      ports:
      - containerPort: 8443
        protocol: TCP
      volumeMounts:
      - name: cert
        mountPath: /etc/serving-cert
      - name: conf
        mountPath: /etc/nginx
      - name: tmp
        mountPath: /var/cache/nginx
      - name: tmp
        mountPath: /var/run
    volumes:
    - name: conf
      configMap:
        name: serving-cert
    - name: cert
      secret:
        secretName: serving-cert
    - name: tmp
      emptyDir: {}
    - name: tmp2
      emptyDir: {}
- apiVersion: v1
  kind: ConfigMap
  metadata:
    name: serving-cert
  data:
    nginx.conf: |
      daemon off;
      events { }
      http {
        server {
            listen 8443;
            ssl    on;
            ssl_certificate     /etc/serving-cert/tls.crt;
            ssl_certificate_key    /etc/serving-cert/tls.key;
            server_name  "*.svc";
            location / {
                root   /usr/share/nginx/html;
                index  index.html index.htm;
            }
            error_page   500 502 503 504  /50x.html;
            location = /50x.html {
                root   /usr/share/nginx/html;
            }
        }
      }
- apiVersion: v1
  kind: Service
  metadata:
    name: serving-cert
    annotations:
      service.alpha.openshift.io/serving-cert-secret-name: serving-cert
  spec:
    selector:
      app: serving-cert
    ports:
      - port: 443
        name: https
        targetPort: 8443
        protocol: TCP
- apiVersion: v1
  kind: Route
  metadata:
    name: serving-cert
  spec:
    tls:
      termination: Reencrypt
      # no destination CA certificate needed
    to:
      kind: Service
      name: serving-cert
`)

func testExtendedTestdataRouterReencryptServingCertYamlBytes() ([]byte, error) {
	return _testExtendedTestdataRouterReencryptServingCertYaml, nil
}

func testExtendedTestdataRouterReencryptServingCertYaml() (*asset, error) {
	bytes, err := testExtendedTestdataRouterReencryptServingCertYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/router/reencrypt-serving-cert.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataRouterRouterCommonYaml = []byte(`apiVersion: v1
kind: Template
parameters:
objects:

# ensure the router can access routes and endpoints
- apiVersion: v1
  kind: RoleBinding
  metadata:
    name: system-router
  subjects:
  - kind: ServiceAccount
    name: default
  roleRef:
    name: system:router

# two routes that differ only by their labels and names
- apiVersion: v1
  kind: Route
  metadata:
    name: route-1
    labels:
      test: router
      select: first
  spec:
    host: first.example.com
    path: /Letter
    to:
      name: endpoints
    ports:
    - targetPort: 8080
- apiVersion: v1
  kind: Route
  metadata:
    name: route-2
    labels:
      test: router
      select: second
  spec:
    host: second.example.com
    path: /Letter
    to:
      name: endpoints
    ports:
    - targetPort: http

# routes that contain overridden domains
- apiVersion: v1
  kind: Route
  metadata:
    name: route-override-domain-1
    labels:
      test: router
      select: override-domains
  spec:
    host: y.a.null.ptr
    path: /Letter
    to:
      name: endpoints
    ports:
    - targetPort: 8080
- apiVersion: v1
  kind: Route
  metadata:
    name: route-override-domain-2
    labels:
      test: router
      select: override-domains
  spec:
    host: main.void.str
    path: /Letter
    to:
      name: endpoints
    ports:
    - targetPort: 8080

# a service to be routed to
- apiVersion: v1
  kind: Service
  metadata:
    name: endpoints
    labels:
      test: router
  spec:
    selector:
      test: router
      endpoints: router
    ports:
    - port: 8080
# a pod that serves a response
- apiVersion: v1
  kind: Pod
  metadata:
    name: endpoint-1
    labels:
      test: router
      endpoints: router
  spec:
    terminationGracePeriodSeconds: 1
    containers:
    - name: test
      image: openshift/hello-openshift
      # image: openshift/deployment-example:v1
      ports:
      - containerPort: 8080
        name: http
      - containerPort: 100
        protocol: UDP
`)

func testExtendedTestdataRouterRouterCommonYamlBytes() ([]byte, error) {
	return _testExtendedTestdataRouterRouterCommonYaml, nil
}

func testExtendedTestdataRouterRouterCommonYaml() (*asset, error) {
	bytes, err := testExtendedTestdataRouterRouterCommonYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/router/router-common.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataRouterRouterConfigManagerYaml = []byte(`apiVersion: v1
kind: Template
parameters:
- name: IMAGE
  value: openshift/origin-haproxy-router:latest
objects:
- apiVersion: v1
  kind: Pod
  metadata:
    name: router-haproxy-cfgmgr
    labels:
      test: router-haproxy-cfgmgr
  spec:
    terminationGracePeriodSeconds: 1
    containers:
    - name: router
      image: ${IMAGE}
      imagePullPolicy: IfNotPresent
      env:
      - name: POD_NAMESPACE
        valueFrom:
          fieldRef:
            fieldPath: metadata.namespace
      args: ["--namespace=$(POD_NAMESPACE)", "-v=4", "--haproxy-config-manager=true", "--blueprint-route-labels=select=hapcm-blueprint", "--labels=select=haproxy-cfgmgr", "--stats-password=password", "--stats-port=1936", "--stats-user=admin"]
      hostNetwork: false
      ports:
      - containerPort: 80
      - containerPort: 443
      - containerPort: 1936
        name: stats
        protocol: TCP
    serviceAccountName: default

# ensure the router can access routes and endpoints
- apiVersion: v1
  kind: RoleBinding
  metadata:
    name: system-router
  subjects:
  - kind: ServiceAccount
    name: default
  roleRef:
    name: system:router

# blueprints for edge, reencrypt and passthrough routes with annotation(s)
- apiVersion: v1
  kind: Route
  metadata:
    name: edge-blueprint
    labels:
      test: router
      select: hapcm-blueprint
    annotations:
      router.openshift.io/cookie_name: empire
  spec:
    tls:
      termination: edge
    host: edge.blueprint.hapcm.test
    to:
      name: insecure-service
      kind: Service
    ports:
    - targetPort: 8080
- apiVersion: v1
  kind: Route
  metadata:
    name: reencrypt-blueprint
    labels:
      test: router
      select: hapcm-blueprint
    annotations:
      ren: stimpy
  spec:
    tls:
      termination: reencrypt
    host: reencrypt.blueprint.hapcm.test
    to:
      name: secure-service
      kind: Service
    ports:
    - targetPort: 8443
- apiVersion: v1
  kind: Route
  metadata:
    name: passthrough-blueprint
    labels:
      test: router
      select: hapcm-blueprint
    annotations:
      test: ptcruiser
      foo: bar
  spec:
    tls:
      termination: passthrough
    host: passthrough.blueprint.hapcm.test
    to:
      name: secure-service
      kind: Service

# config map for nginx
- apiVersion: v1
  kind: ConfigMap
  metadata:
    name: serving-cert
  data:
    nginx.conf: |
      daemon off;
      events { }
      http {
        server {
            listen 8443;
            ssl    on;
            ssl_certificate     /etc/serving-cert/tls.crt;
            ssl_certificate_key    /etc/serving-cert/tls.key;
            server_name  "*.svc";
            location / {
                root   /usr/share/nginx/html;
                index  index.html index.htm;
            }
            error_page   500 502 503 504  /50x.html;
            location = /50x.html {
                root   /usr/share/nginx/html;
            }
        }
      }

# pods that service http[s] requests
- apiVersion: v1
  kind: Pod
  metadata:
    name: insecure-endpoint
    labels:
      test: haproxy-cfgmgr
      endpoints: insecure-endpoint
  spec:
    terminationGracePeriodSeconds: 1
    containers:
    - name: test
      image: openshift/hello-openshift
      ports:
      - containerPort: 8080
        name: http
      - containerPort: 100
        protocol: UDP
- apiVersion: v1
  kind: Pod
  metadata:
    name: secure-endpoint
    labels:
      app: secure-endpoint
  spec:
    containers:
    - image: nginx:1.15.3
      name: serve
      command:
        - /usr/sbin/nginx
      args:
        - -c
        - /etc/nginx/nginx.conf
      ports:
      - containerPort: 8443
        protocol: TCP
      volumeMounts:
      - name: cert
        mountPath: /etc/serving-cert
      - name: conf
        mountPath: /etc/nginx
      - name: tmp
        mountPath: /var/cache/nginx
      - name: tmp
        mountPath: /var/run
    volumes:
    - name: conf
      configMap:
        name: serving-cert
    - name: cert
      secret:
        secretName: serving-cert
    - name: tmp
      emptyDir: {}
    - name: tmp2
      emptyDir: {}

# services that can be routed to
- apiVersion: v1
  kind: Service
  metadata:
    name: insecure-service
    labels:
      test: router
  spec:
    selector:
      test: haproxy-cfgmgr
      endpoints: insecure-endpoint
    ports:
    - port: 8080
- apiVersion: v1
  kind: Service
  metadata:
    name: secure-service
    annotations:
      service.alpha.openshift.io/serving-cert-secret-name: serving-cert
  spec:
    selector:
      app: secure-endpoint
    ports:
      - port: 443
        name: https
        targetPort: 8443
        protocol: TCP


# insecure, edge secured, reencrypt and passthrough routes
- apiVersion: v1
  kind: Route
  metadata:
    name: insecure-route
    labels:
      test: haproxy-cfgmgr
      select: haproxy-cfgmgr
  spec:
    host: insecure.hapcm.test
    to:
      name: insecure-service
      kind: Service
    ports:
    - targetPort: 8080
- apiVersion: v1
  kind: Route
  metadata:
    name: edge-allow-http-route
    labels:
      test: haproxy-cfgmgr
      select: haproxy-cfgmgr
  spec:
    tls:
      termination: edge
      insecureEdgeTerminationPolicy: Allow
    host: edge.allow.hapcm.test
    to:
      name: insecure-service
      kind: Service
    ports:
    - targetPort: 8080
- apiVersion: v1
  kind: Route
  metadata:
    name: reencrypt-route
    labels:
      test: haproxy-cfgmgr
      select: haproxy-cfgmgr
  spec:
    tls:
      termination: reencrypt
    host: reencrypt.hapcm.test
    to:
      name: secure-service
      kind: Service
    ports:
    - targetPort: 8443
- apiVersion: v1
  kind: Route
  metadata:
    name: passthrough-route
    labels:
      test: haproxy-cfgmgr
      select: haproxy-cfgmgr
  spec:
    tls:
      termination: passthrough
    host: passthrough.hapcm.test
    to:
      name: secure-service
      kind: Service
`)

func testExtendedTestdataRouterRouterConfigManagerYamlBytes() ([]byte, error) {
	return _testExtendedTestdataRouterRouterConfigManagerYaml, nil
}

func testExtendedTestdataRouterRouterConfigManagerYaml() (*asset, error) {
	bytes, err := testExtendedTestdataRouterRouterConfigManagerYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/router/router-config-manager.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataRouterRouterHttpEchoServerYaml = []byte(`apiVersion: v1
kind: List
metadata: {}
items:
- apiVersion: v1
  kind: DeploymentConfig
  metadata:
    name: router-http-echo
  spec:
    replicas: 1
    selector:
      app: router-http-echo
      deploymentconfig: router-http-echo
    strategy:
      type: Rolling
    template:
      metadata:
        labels:
          app: router-http-echo
          deploymentconfig: router-http-echo
      spec:
        containers:
        - image: openshift/origin-node
          name: router-http-echo
          command:
            - /usr/bin/socat
            - TCP4-LISTEN:8676,reuseaddr,fork
            - EXEC:'/bin/bash -c \"printf \\\"HTTP/1.0 200 OK\r\n\r\n\\\"; sed -e \\\"/^\r/q\\\"\"'
          ports:
          - containerPort: 8676
            protocol: TCP
        dnsPolicy: ClusterFirst
        restartPolicy: Always
        securityContext: {}
- apiVersion: v1
  kind: Service
  metadata:
    name: router-http-echo
    labels:
      app: router-http-echo
  spec:
    selector:
      app: router-http-echo
    ports:
      - port: 8676
        name: router-http-echo
        protocol: TCP
- apiVersion: v1
  kind: Route
  metadata:
    name: router-http-echo
  spec:
    host: router-headers.example.com
    to:
      kind: Service
      name: router-http-echo
`)

func testExtendedTestdataRouterRouterHttpEchoServerYamlBytes() ([]byte, error) {
	return _testExtendedTestdataRouterRouterHttpEchoServerYaml, nil
}

func testExtendedTestdataRouterRouterHttpEchoServerYaml() (*asset, error) {
	bytes, err := testExtendedTestdataRouterRouterHttpEchoServerYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/router/router-http-echo-server.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataRouterRouterMetricsYaml = []byte(`apiVersion: v1
kind: List
items:
# a route that has multiple weighted services that it points to
- apiVersion: v1
  kind: Route
  metadata:
    name: weightedroute
    labels:
      test: router
      select: weighted
  spec:
    host: weighted.metrics.example.com
    to:
      name: weightedendpoints1
      kind: Service
      weight: 50
    alternateBackends:
    - name: weightedendpoints2
      kind: Service
      weight: 50
    ports:
    - targetPort: 8080

# a route that has multiple services but all weights are zero
- apiVersion: v1
  kind: Route
  metadata:
    name: zeroweightroute
    labels:
      test: router
      select: weighted
  spec:
    host: zeroweight.metrics.example.com
    to:
      name: weightedendpoints1
      kind: Service
      weight: 0
    alternateBackends:
    - name: weightedendpoints2
      kind: Service
      weight: 0
    ports:
    - targetPort: 8080

# two services that can be routed to
- apiVersion: v1
  kind: Service
  metadata:
    name: weightedendpoints1
    labels:
      test: router
  spec:
    selector:
      test: weightedrouter1
      endpoints: weightedrouter1
    ports:
    - port: 8080
- apiVersion: v1
  kind: Service
  metadata:
    name: weightedendpoints2
    labels:
      test: router
  spec:
    selector:
      test: weightedrouter2
      endpoints: weightedrouter2
    ports:
    - port: 8080
# two pods that serves a response
- apiVersion: v1
  kind: Pod
  metadata:
    name: endpoint-1
    labels:
      test: weightedrouter1
      endpoints: weightedrouter1
  spec:
    terminationGracePeriodSeconds: 1
    containers:
    - name: test
      image: openshift/hello-openshift
      ports:
      - containerPort: 8080
        name: http
      - containerPort: 100
        protocol: UDP
- apiVersion: v1
  kind: Pod
  metadata:
    name: endpoint-2
    labels:
      test: weightedrouter2
      endpoints: weightedrouter2
  spec:
    terminationGracePeriodSeconds: 1
    containers:
    - name: test
      image: openshift/hello-openshift
      ports:
      - containerPort: 8080
        name: http
      - containerPort: 100
        protocol: UDP
`)

func testExtendedTestdataRouterRouterMetricsYamlBytes() ([]byte, error) {
	return _testExtendedTestdataRouterRouterMetricsYaml, nil
}

func testExtendedTestdataRouterRouterMetricsYaml() (*asset, error) {
	bytes, err := testExtendedTestdataRouterRouterMetricsYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/router/router-metrics.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataRouterRouterOverrideDomainsYaml = []byte(`apiVersion: v1
kind: Template
parameters:
- name: IMAGE
  value: openshift/origin-haproxy-router:latest
objects:

# a router that overrides domains
- apiVersion: v1
  kind: Pod
  metadata:
    name: router-override-domains
    labels:
      test: router-override-domains
  spec:
    terminationGracePeriodSeconds: 1
    containers:
    - name: router
      image: ${IMAGE}
      imagePullPolicy: IfNotPresent
      env:
      - name: POD_NAMESPACE
        valueFrom:
          fieldRef:
            fieldPath: metadata.namespace
      args:
      - "--name=test-override-domains"
      - "--namespace=$(POD_NAMESPACE)"
      - "-v=4"
      - "--override-domains=null.ptr,void.str"
      - "--hostname-template=${name}-${namespace}.apps.veto.test"
      - "--stats-port=1936"
      - "--metrics-type=haproxy"
      hostNetwork: false
      ports:
      - containerPort: 80
      - containerPort: 443
      - containerPort: 1936
        name: stats
        protocol: TCP
      readinessProbe:
        initialDelaySeconds: 10
        httpGet:
          path: /healthz/ready
          port: 1936
    serviceAccountName: default
`)

func testExtendedTestdataRouterRouterOverrideDomainsYamlBytes() ([]byte, error) {
	return _testExtendedTestdataRouterRouterOverrideDomainsYaml, nil
}

func testExtendedTestdataRouterRouterOverrideDomainsYaml() (*asset, error) {
	bytes, err := testExtendedTestdataRouterRouterOverrideDomainsYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/router/router-override-domains.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataRouterRouterOverrideYaml = []byte(`apiVersion: v1
kind: Template
parameters:
- name: IMAGE
  value: openshift/origin-haproxy-router:latest
objects:

# a router that overrides host
- apiVersion: v1
  kind: Pod
  metadata:
    name: router-override
    labels:
      test: router-override
  spec:
    terminationGracePeriodSeconds: 1
    containers:
    - name: router
      image: ${IMAGE}
      imagePullPolicy: IfNotPresent
      env:
      - name: POD_NAMESPACE
        valueFrom:
          fieldRef:
            fieldPath: metadata.namespace
      args:
      - "--name=test-override"
      - "--namespace=$(POD_NAMESPACE)"
      - "-v=4"
      - "--override-hostname"
      - "--hostname-template=${name}-${namespace}.myapps.mycompany.com"
      - "--stats-port=1936"
      - "--metrics-type=haproxy"
      hostNetwork: false
      ports:
      - containerPort: 80
      - containerPort: 443
      - containerPort: 1936
        name: stats
        protocol: TCP
      readinessProbe:
        initialDelaySeconds: 10
        httpGet:
          path: /healthz/ready
          port: 1936
    serviceAccountName: default
`)

func testExtendedTestdataRouterRouterOverrideYamlBytes() ([]byte, error) {
	return _testExtendedTestdataRouterRouterOverrideYaml, nil
}

func testExtendedTestdataRouterRouterOverrideYaml() (*asset, error) {
	bytes, err := testExtendedTestdataRouterRouterOverrideYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/router/router-override.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataRouterRouterScopedYaml = []byte(`apiVersion: v1
kind: Template
parameters:
- name: IMAGE
  value: openshift/origin-haproxy-router:latest
- name: ROUTER_NAME
  value: "test-scoped"
- name: UPDATE_STATUS
  value: "true"
objects:
# a scoped router
- apiVersion: v1
  kind: Pod
  metadata:
    name: router-scoped
    labels:
      test: router-scoped
  spec:
    terminationGracePeriodSeconds: 1
    containers:
    - name: router
      image: ${IMAGE}
      imagePullPolicy: IfNotPresent
      env:
      - name: POD_NAMESPACE
        valueFrom:
          fieldRef:
            fieldPath: metadata.namespace
      args:
      - "--name=${ROUTER_NAME}"
      - "--namespace=$(POD_NAMESPACE)"
      - "--update-status=${UPDATE_STATUS}"
      - "-v=4"
      - "--labels=select=first"
      - "--stats-port=1936"
      - "--metrics-type=haproxy"
      hostNetwork: false
      ports:
      - containerPort: 80
      - containerPort: 443
      - containerPort: 1936
        name: stats
        protocol: TCP
      readinessProbe:
        initialDelaySeconds: 10
        httpGet:
          path: /healthz/ready
          port: 1936
    serviceAccountName: default
`)

func testExtendedTestdataRouterRouterScopedYamlBytes() ([]byte, error) {
	return _testExtendedTestdataRouterRouterScopedYaml, nil
}

func testExtendedTestdataRouterRouterScopedYaml() (*asset, error) {
	bytes, err := testExtendedTestdataRouterRouterScopedYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/router/router-scoped.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataRouterWeightedRouterYaml = []byte(`apiVersion: v1
kind: Template
parameters:
- name: IMAGE
  value: openshift/origin-haproxy-router:latest
objects:
# a weighted router
- apiVersion: v1
  kind: Pod
  metadata:
    name: weighted-router
    labels:
      test: weighted-router
  spec:
    terminationGracePeriodSeconds: 1
    containers:
    - name: router
      image: ${IMAGE}
      imagePullPolicy: IfNotPresent
      env:
      - name: POD_NAMESPACE
        valueFrom:
          fieldRef:
            fieldPath: metadata.namespace
      args: ["--namespace=$(POD_NAMESPACE)", "-v=4", "--labels=select=weighted", "--stats-password=password", "--stats-port=1936", "--stats-user=admin"]
      hostNetwork: false
      ports:
      - containerPort: 80
      - containerPort: 443
      - containerPort: 1936
        name: stats
        protocol: TCP
    serviceAccountName: default

# ensure the router can access routes and endpoints
- apiVersion: v1
  kind: RoleBinding
  metadata:
    name: system-router
  subjects:
  - kind: ServiceAccount
    name: default
  roleRef:
    name: system:router

# a route that has multiple weighted services that it points to
- apiVersion: v1
  kind: Route
  metadata:
    name: weightedroute
    labels:
      test: router
      select: weighted
  spec:
    host: weighted.example.com
    to:
      name: weightedendpoints1
      kind: Service
      weight: 90
    alternateBackends:
    - name: weightedendpoints2
      kind: Service
      weight: 10
    ports:
    - targetPort: 8080

# a route that has multiple services but all weights are zero
- apiVersion: v1
  kind: Route
  metadata:
    name: zeroweightroute
    labels:
      test: router
      select: weighted
  spec:
    host: zeroweight.example.com
    to:
      name: weightedendpoints1
      kind: Service
      weight: 0
    alternateBackends:
    - name: weightedendpoints2
      kind: Service
      weight: 0
    ports:
    - targetPort: 8080

# two services that can be routed to
- apiVersion: v1
  kind: Service
  metadata:
    name: weightedendpoints1
    labels:
      test: router
  spec:
    selector:
      test: weightedrouter1
      endpoints: weightedrouter1
    ports:
    - port: 8080
- apiVersion: v1
  kind: Service
  metadata:
    name: weightedendpoints2
    labels:
      test: router
  spec:
    selector:
      test: weightedrouter2
      endpoints: weightedrouter2
    ports:
    - port: 8080
# two pods that serves a response
- apiVersion: v1
  kind: Pod
  metadata:
    name: endpoint-1
    labels:
      test: weightedrouter1
      endpoints: weightedrouter1
  spec:
    terminationGracePeriodSeconds: 1
    containers:
    - name: test
      image: openshift/hello-openshift
      ports:
      - containerPort: 8080
        name: http
      - containerPort: 100
        protocol: UDP
- apiVersion: v1
  kind: Pod
  metadata:
    name: endpoint-2
    labels:
      test: weightedrouter2
      endpoints: weightedrouter2
  spec:
    terminationGracePeriodSeconds: 1
    containers:
    - name: test
      image: openshift/hello-openshift
      ports:
      - containerPort: 8080
        name: http
      - containerPort: 100
        protocol: UDP
- apiVersion: v1
  kind: Pod
  metadata:
    name: endpoint-3
    labels:
      test: weightedrouter2
      endpoints: weightedrouter2
  spec:
    terminationGracePeriodSeconds: 1
    containers:
    - name: test
      image: openshift/hello-openshift
      ports:
      - containerPort: 8080
        name: http
      - containerPort: 100
        protocol: UDP
`)

func testExtendedTestdataRouterWeightedRouterYamlBytes() ([]byte, error) {
	return _testExtendedTestdataRouterWeightedRouterYaml, nil
}

func testExtendedTestdataRouterWeightedRouterYaml() (*asset, error) {
	bytes, err := testExtendedTestdataRouterWeightedRouterYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/router/weighted-router.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataRun_policyParallelBcYaml = []byte(`---
  kind: "List"
  apiVersion: "v1"
  metadata: {}
  items: 
    - 
      kind: "ImageStream"
      apiVersion: "v1"
      metadata: 
        name: "origin-ruby-sample"
        creationTimestamp: null
      spec: {}
      status: 
        dockerImageRepository: ""
    - 
      kind: "BuildConfig"
      apiVersion: "v1"
      metadata: 
        name: "sample-parallel-build"
      spec: 
        runPolicy: "Parallel"
        triggers: 
          - 
            type: "imageChange"
            imageChange: {}
        source: 
          type: "Git"
          git: 
            uri: "git://github.com/openshift/ruby-hello-world.git"
        strategy: 
          type: "Source"
          sourceStrategy: 
            from: 
              kind: "DockerImage"
              name: "centos/ruby-25-centos7"
        resources: {}
      status: 
        lastVersion: 0

`)

func testExtendedTestdataRun_policyParallelBcYamlBytes() ([]byte, error) {
	return _testExtendedTestdataRun_policyParallelBcYaml, nil
}

func testExtendedTestdataRun_policyParallelBcYaml() (*asset, error) {
	bytes, err := testExtendedTestdataRun_policyParallelBcYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/run_policy/parallel-bc.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataRun_policySerialBcYaml = []byte(`---
  kind: "List"
  apiVersion: "v1"
  metadata: {}
  items: 
    - 
      kind: "BuildConfig"
      apiVersion: "v1"
      metadata: 
        name: "sample-serial-build"
      spec: 
        runPolicy: "Serial"
        triggers: 
          - 
            type: "imageChange"
            imageChange: {}
        source: 
          type: "Git"
          git: 
            uri: "git://github.com/openshift/ruby-hello-world.git"
        strategy: 
          type: "Source"
          sourceStrategy: 
            from: 
              kind: "DockerImage"
              name: "centos/ruby-25-centos7"
    - 
      kind: "BuildConfig"
      apiVersion: "v1"
      metadata: 
        name: "sample-serial-build-fail"
      spec: 
        runPolicy: "Serial"
        triggers: 
          - 
            type: "imageChange"
            imageChange: {}
        source: 
          type: "Git"
          git: 
            uri: "git://github.com/openshift/invalidrepo.git"
        strategy: 
          type: "Source"
          sourceStrategy: 
            from: 
              kind: "DockerImage"
              name: "centos/ruby-25-centos7"
`)

func testExtendedTestdataRun_policySerialBcYamlBytes() ([]byte, error) {
	return _testExtendedTestdataRun_policySerialBcYaml, nil
}

func testExtendedTestdataRun_policySerialBcYaml() (*asset, error) {
	bytes, err := testExtendedTestdataRun_policySerialBcYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/run_policy/serial-bc.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataRun_policySerialLatestOnlyBcYaml = []byte(`---
  kind: "List"
  apiVersion: "v1"
  metadata: {}
  items: 
    - 
      kind: "BuildConfig"
      apiVersion: "v1"
      metadata: 
        name: "sample-serial-latest-only-build"
      spec: 
        runPolicy: "SerialLatestOnly"
        triggers: 
          - 
            type: "imageChange"
            imageChange: {}
        source: 
          type: "Git"
          git: 
            uri: "git://github.com/openshift/ruby-hello-world.git"
        strategy: 
          type: "Source"
          sourceStrategy: 
            from: 
              kind: "DockerImage"
              name: "centos/ruby-25-centos7"
        resources: {}
      status: 
        lastVersion: 0

`)

func testExtendedTestdataRun_policySerialLatestOnlyBcYamlBytes() ([]byte, error) {
	return _testExtendedTestdataRun_policySerialLatestOnlyBcYaml, nil
}

func testExtendedTestdataRun_policySerialLatestOnlyBcYaml() (*asset, error) {
	bytes, err := testExtendedTestdataRun_policySerialLatestOnlyBcYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/run_policy/serial-latest-only-bc.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataS2iDropcapsRootAccessBuildYaml = []byte(`apiVersion: v1
items:
- apiVersion: v1
  kind: BuildConfig
  metadata:
    labels:
      build: root-access-build
    name: root-access-build
  spec:
    output:
      to:
        kind: ImageStreamTag
        name: root-access-build:latest
    postCommit: {}
    resources: {}
    source:
      git:
        uri: https://github.com/openshift/ruby-hello-world.git
      secrets: []
      type: Git
    strategy:
      sourceStrategy:
        from:
          kind: ImageStreamTag
          name: rootable-ruby:latest
      type: Source
    triggers: []
- apiVersion: v1
  kind: ImageStream
  metadata:
    labels:
      build: root-access-build
    name: root-access-build
  spec: {}
kind: List
metadata: {}
`)

func testExtendedTestdataS2iDropcapsRootAccessBuildYamlBytes() ([]byte, error) {
	return _testExtendedTestdataS2iDropcapsRootAccessBuildYaml, nil
}

func testExtendedTestdataS2iDropcapsRootAccessBuildYaml() (*asset, error) {
	bytes, err := testExtendedTestdataS2iDropcapsRootAccessBuildYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/s2i-dropcaps/root-access-build.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataS2iDropcapsRootableRubyDockerfile = []byte(`FROM centos/ruby-25-centos7:latest
USER root
RUN rm -f /usr/bin/ls
RUN echo "root:redhat" | chpasswd
USER 1001
COPY ./adduser /usr/libexec/s2i/
COPY ./assemble /usr/libexec/s2i/
`)

func testExtendedTestdataS2iDropcapsRootableRubyDockerfileBytes() ([]byte, error) {
	return _testExtendedTestdataS2iDropcapsRootableRubyDockerfile, nil
}

func testExtendedTestdataS2iDropcapsRootableRubyDockerfile() (*asset, error) {
	bytes, err := testExtendedTestdataS2iDropcapsRootableRubyDockerfileBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/s2i-dropcaps/rootable-ruby/Dockerfile", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataS2iDropcapsRootableRubyAdduser = []byte(`#!/usr/bin/expect

spawn su
expect "Password:" {
    send "redhat\r"
}

expect "#" {
    send "adduser mytestuser\r"
}

expect "#" {
    send "exit\r"
}

expect "$" {}
`)

func testExtendedTestdataS2iDropcapsRootableRubyAdduserBytes() ([]byte, error) {
	return _testExtendedTestdataS2iDropcapsRootableRubyAdduser, nil
}

func testExtendedTestdataS2iDropcapsRootableRubyAdduser() (*asset, error) {
	bytes, err := testExtendedTestdataS2iDropcapsRootableRubyAdduserBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/s2i-dropcaps/rootable-ruby/adduser", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataS2iDropcapsRootableRubyAssemble = []byte(`#!/bin/bash
set -e
/usr/libexec/s2i/adduser
cat /etc/passwd
grep "mytestuser" /etc/passwd
`)

func testExtendedTestdataS2iDropcapsRootableRubyAssembleBytes() ([]byte, error) {
	return _testExtendedTestdataS2iDropcapsRootableRubyAssemble, nil
}

func testExtendedTestdataS2iDropcapsRootableRubyAssemble() (*asset, error) {
	bytes, err := testExtendedTestdataS2iDropcapsRootableRubyAssembleBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/s2i-dropcaps/rootable-ruby/assemble", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataSampleImageStreamJson = []byte(`{
  "kind": "ImageStream",
  "apiVersion": "v1",
  "metadata": {
    "name": "samplerepository",
    "creationTimestamp": null
  },
  "spec": {},
  "status": {
    "dockerImageRepository": ""
  }
}`)

func testExtendedTestdataSampleImageStreamJsonBytes() ([]byte, error) {
	return _testExtendedTestdataSampleImageStreamJson, nil
}

func testExtendedTestdataSampleImageStreamJson() (*asset, error) {
	bytes, err := testExtendedTestdataSampleImageStreamJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/sample-image-stream.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataSamplepipelineWithenvsYaml = []byte(`apiVersion: v1
kind: Template
labels:
  template: application-template-sample-pipeline
metadata:
  annotations:
    iconClass: icon-jenkins
    tags: instant-app,jenkins
  name: jenkins-pipeline-example
parameters:
objects:
- apiVersion: v1
  kind: BuildConfig
  metadata:
    labels:
      name: sample-pipeline-withenvs
    name: sample-pipeline-withenvs
  spec:
    strategy:
      jenkinsPipelineStrategy:
        env:
          - name: FOO1
            value: BAR1
        jenkinsfile: |-
          node() {
            echo "FOO1 is ${env.FOO1}"
            echo "FOO2 is ${env.FOO2}"
          }
      type: JenkinsPipeline
`)

func testExtendedTestdataSamplepipelineWithenvsYamlBytes() ([]byte, error) {
	return _testExtendedTestdataSamplepipelineWithenvsYaml, nil
}

func testExtendedTestdataSamplepipelineWithenvsYaml() (*asset, error) {
	bytes, err := testExtendedTestdataSamplepipelineWithenvsYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/samplepipeline-withenvs.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataServiceServingCertNginxServingCertConf = []byte(`server {
    listen   443;

    ssl    on;
    ssl_certificate     /etc/serving-cert/tls.crt;
    ssl_certificate_key    /etc/serving-cert/tls.key;
    server_name  localhost;

    #charset koi8-r;
    #access_log  /var/log/nginx/log/host.access.log  main;

    location / {
        root   /usr/share/nginx/html;
        index  index.html index.htm;
    }

    #error_page  404              /404.html;

    # redirect server error pages to the static page /50x.html
    #
    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   /usr/share/nginx/html;
    }

    # proxy the PHP scripts to Apache listening on 127.0.0.1:80
    #
    #location ~ \.php$ {
    #    proxy_pass   http://127.0.0.1;
    #}

    # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
    #
    #location ~ \.php$ {
    #    root           html;
    #    fastcgi_pass   127.0.0.1:9000;
    #    fastcgi_index  index.php;
    #    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
    #    include        fastcgi_params;
    #}

    # deny access to .htaccess files, if Apache's document root
    # concurs with nginx's one
    #
    #location ~ /\.ht {
    #    deny  all;
    #}
}
`)

func testExtendedTestdataServiceServingCertNginxServingCertConfBytes() ([]byte, error) {
	return _testExtendedTestdataServiceServingCertNginxServingCertConf, nil
}

func testExtendedTestdataServiceServingCertNginxServingCertConf() (*asset, error) {
	bytes, err := testExtendedTestdataServiceServingCertNginxServingCertConfBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/service-serving-cert/nginx-serving-cert.conf", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataSignerBuildconfigYaml = []byte(`kind: List
apiVersion: v1
items:

- kind: ImageStream
  apiVersion: v1
  metadata:
    name: signer

- kind: BuildConfig
  apiVersion: v1
  metadata:
    name: signer
  spec:
    triggers:
      - type: ConfigChange
    source:
      dockerfile: |
        FROM openshift/origin-control-plane:latest
        RUN yum-config-manager --disable origin-local-release ||:
        RUN yum install -y skopeo && \
            yum clean all && mkdir -p gnupg && chmod -R 0777 /var/lib/origin
        RUN echo $'%echo Generating openpgp key ...\n\
            Key-Type: DSA \n\
            Key-Length: 1024 \n\
            Subkey-Type: ELG-E \n\
            Subkey-Length: 1024 \n\
            Name-Real: Joe Tester \n\
            Name-Comment: with stupid passphrase \n\
            Name-Email: joe@foo.bar \n\
            Expire-Date: 0 \n\
            Creation-Date: 2017-01-01 \n\
            %commit \n\
            %echo done \n' >> dummy_key.conf
    strategy:
      type: Docker
      dockerStrategy:
        from:
          kind: DockerImage
          name: openshift/origin-control-plane:latest
    output:
      to:
        kind: ImageStreamTag
        name: signer:latest
`)

func testExtendedTestdataSignerBuildconfigYamlBytes() ([]byte, error) {
	return _testExtendedTestdataSignerBuildconfigYaml, nil
}

func testExtendedTestdataSignerBuildconfigYaml() (*asset, error) {
	bytes, err := testExtendedTestdataSignerBuildconfigYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/signer-buildconfig.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataTemplatesCrunchydataPodJson = []byte(`{
  "kind": "Template",
  "apiVersion": "template.openshift.io/v1",
  "metadata": {
    "name": "node-example",
    "creationTimestamp": null
  },
  "objects": [
    {
      "kind": "Pod",
      "apiVersion": "v1",
      "metadata": {
        "name": "pg-standalone-1",
        "creationTimestamp": null,
        "labels": {
          "name": "crunchy-node"
        }
      },
      "spec": {
        "volumes": [
          {
            "name": "pgdata",
            "hostPath": {
              "path": "/var/lib/pgsql/exampleuser"
            },
            "rbd": null
          }
        ],
        "containers": [
          {
            "name": "master",
            "image": "registry:5000/crunchy-node",
            "ports": [
              {
                "hostPort": 9000,
                "containerPort": 5432,
                "protocol": "TCP"
              }
            ],
            "env": [
              {
                "name": "PG_USERNAME",
                "value": "exampleuser"
              },
              {
                "name": "PG_PASSWORD",
                "value": "example"
              }
            ],
            "resources": {},
            "volumeMounts": [
              {
                "name": "pgdata",
                "mountPath": "/pgdata"
              }
            ],
            "terminationMessagePath": "/dev/termination-log",
            "imagePullPolicy": "IfNotPresent",
            "capabilities": {},
            "securityContext": {
              "capabilities": {},
              "privileged": false
            }
          }
        ],
        "restartPolicy": "Always",
        "dnsPolicy": "ClusterFirst",
        "serviceAccount": ""
      },
      "status": {}
    }
  ]
}
`)

func testExtendedTestdataTemplatesCrunchydataPodJsonBytes() ([]byte, error) {
	return _testExtendedTestdataTemplatesCrunchydataPodJson, nil
}

func testExtendedTestdataTemplatesCrunchydataPodJson() (*asset, error) {
	bytes, err := testExtendedTestdataTemplatesCrunchydataPodJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/templates/crunchydata-pod.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataTemplatesGuestbookJson = []byte(`{
  "kind": "Template",
  "apiVersion": "template.openshift.io/v1",
  "metadata": {
    "name": "guestbook-example",
    "creationTimestamp": null,
    "annotations": {
      "openshift.io/display-name": "Guestbook Example",
      "description": "Example shows how to build a simple multi-tier application using Kubernetes and Docker"
    }
  },
  "message": "Your admin credentials are ${ADMIN_USERNAME}:${ADMIN_PASSWORD}",
  "objects": [
    {
      "kind": "Route",
      "apiVersion": "v1",
      "metadata": {
        "name": "frontend-route",
        "creationTimestamp": null
      },
      "spec": {
        "host": "guestbook.example.com",
        "to": {
          "kind": "Service",
          "name": "frontend-service"
        }
      },
      "status": {}
    },
    {
      "kind": "Service",
      "apiVersion": "v1",
      "metadata": {
        "name": "frontend-service",
        "creationTimestamp": null
      },
      "spec": {
        "ports": [
          {
            "protocol": "TCP",
            "port": 5432,
            "targetPort": 5432,
            "nodePort": 0
          }
        ],
        "selector": {
          "name": "frontend-service"
        },
        "type": "ClusterIP",
        "sessionAffinity": "None"
      },
      "status": {
        "loadBalancer": {}
      }
    },
    {
      "kind": "Service",
      "apiVersion": "v1",
      "metadata": {
        "name": "redis-master",
        "creationTimestamp": null
      },
      "spec": {
        "ports": [
          {
            "protocol": "TCP",
            "port": 10000,
            "targetPort": 10000,
            "nodePort": 0
          }
        ],
        "selector": {
          "name": "redis-master"
        },
        "type": "ClusterIP",
        "sessionAffinity": "None"
      },
      "status": {
        "loadBalancer": {}
      }
    },
    {
      "kind": "Service",
      "apiVersion": "v1",
      "metadata": {
        "name": "${SLAVE_SERVICE_NAME}",
        "creationTimestamp": null
      },
      "spec": {
        "ports": [
          {
            "protocol": "TCP",
            "port": 10001,
            "targetPort": 10001,
            "nodePort": 0
          }
        ],
        "selector": {
          "name": "${SLAVE_SERVICE_NAME}"
        },
        "type": "ClusterIP",
        "sessionAffinity": "None"
      },
      "status": {
        "loadBalancer": {}
      }
    },
    {
      "kind": "Pod",
      "apiVersion": "v1",
      "metadata": {
        "name": "redis-master",
        "creationTimestamp": null,
        "labels": {
          "name": "redis-master"
        }
      },
      "spec": {
        "containers": [
          {
            "name": "master",
            "image": "dockerfile/redis",
            "ports": [
              {
                "containerPort": 6379,
                "protocol": "TCP"
              }
            ],
            "env": [
              {
                "name": "REDIS_PASSWORD",
                "value": "${REDIS_PASSWORD}"
              }
            ],
            "resources": {},
            "terminationMessagePath": "/dev/termination-log",
            "imagePullPolicy": "IfNotPresent",
            "securityContext": {
              "capabilities": {},
              "privileged": false
            }
          }
        ],
        "restartPolicy": "Always",
        "dnsPolicy": "ClusterFirst",
        "serviceAccount": ""
      },
      "status": {}
    },
    {
      "kind": "ReplicationController",
      "apiVersion": "v1",
      "metadata": {
        "name": "guestbook",
        "creationTimestamp": null,
        "labels": {
          "name": "frontend-service"
        }
      },
      "spec": {
        "replicas": 3,
        "selector": {
          "name": "frontend-service"
        },
        "template": {
          "metadata": {
            "creationTimestamp": null,
            "labels": {
              "name": "frontend-service"
            }
          },
          "spec": {
            "containers": [
              {
                "name": "php-redis",
                "image": "brendanburns/php-redis",
                "ports": [
                  {
                    "hostPort": 8000,
                    "containerPort": 80,
                    "protocol": "TCP"
                  }
                ],
                "env": [
                  {
                    "name": "ADMIN_USERNAME",
                    "value": "${ADMIN_USERNAME}"
                  },
                  {
                    "name": "ADMIN_PASSWORD",
                    "value": "${ADMIN_PASSWORD}"
                  },
                  {
                    "name": "REDIS_PASSWORD",
                    "value": "${REDIS_PASSWORD}"
                  }
                ],
                "resources": {},
                "terminationMessagePath": "/dev/termination-log",
                "imagePullPolicy": "IfNotPresent",
                "securityContext": {
                  "capabilities": {},
                  "privileged": false
                }
              }
            ],
            "restartPolicy": "Always",
            "dnsPolicy": "ClusterFirst",
            "serviceAccount": ""
          }
        }
      },
      "status": {
        "replicas": 0
      }
    },
    {
      "kind": "ReplicationController",
      "apiVersion": "v1",
      "metadata": {
        "name": "${SLAVE_SERVICE_NAME}",
        "creationTimestamp": null,
        "labels": {
          "name": "${SLAVE_SERVICE_NAME}"
        }
      },
      "spec": {
        "replicas": 2,
        "selector": {
          "name": "${SLAVE_SERVICE_NAME}"
        },
        "template": {
          "metadata": {
            "creationTimestamp": null,
            "labels": {
              "name": "${SLAVE_SERVICE_NAME}"
            }
          },
          "spec": {
            "containers": [
              {
                "name": "slave",
                "image": "brendanburns/${SLAVE_SERVICE_NAME}",
                "ports": [
                  {
                    "hostPort": 6380,
                    "containerPort": 6379,
                    "protocol": "TCP"
                  }
                ],
                "env": [
                  {
                    "name": "REDIS_PASSWORD",
                    "value": "${REDIS_PASSWORD}"
                  }
                ],
                "resources": {},
                "terminationMessagePath": "/dev/termination-log",
                "imagePullPolicy": "IfNotPresent",
                "securityContext": {
                  "capabilities": {},
                  "privileged": false
                }
              }
            ],
            "restartPolicy": "Always",
            "dnsPolicy": "ClusterFirst",
            "serviceAccount": ""
          }
        }
      },
      "status": {
        "replicas": 0
      }
    }
  ],
  "parameters": [
    {
      "name": "ADMIN_USERNAME",
      "description": "Guestbook administrator username",
      "generate": "expression",
      "from": "admin[A-Z0-9]{3}"
    },
    {
      "name": "ADMIN_PASSWORD",
      "description": "Guestbook administrator password",
      "generate": "expression",
      "from": "[a-zA-Z0-9]{8}"
    },
    {
      "name": "REDIS_PASSWORD",
      "description": "Redis password",
      "generate": "expression",
      "from": "[a-zA-Z0-9]{8}"
    },
    {
      "name": "SLAVE_SERVICE_NAME",
      "description": "Slave Service name",
      "value": "redis-slave"
    }
  ]
}
`)

func testExtendedTestdataTemplatesGuestbookJsonBytes() ([]byte, error) {
	return _testExtendedTestdataTemplatesGuestbookJson, nil
}

func testExtendedTestdataTemplatesGuestbookJson() (*asset, error) {
	bytes, err := testExtendedTestdataTemplatesGuestbookJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/templates/guestbook.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataTemplatesGuestbook_listJson = []byte(`{
    "kind": "Template",
    "apiVersion": "template.openshift.io/v1",
    "metadata": {
        "name": "guestbook-example",
        "creationTimestamp": null,
        "annotations": {
            "openshift.io/display-name": "Guestbook Example",
            "description": "Example shows how to build a simple multi-tier application using Kubernetes and Docker"
        }
    },
    "message": "Your admin credentials are adminQ3H:dwNJiJwW",
    "objects": [
        {
            "apiVersion": "route.openshift.io/v1",
            "kind": "Route",
            "metadata": {
                "creationTimestamp": null,
                "name": "frontend-route"
            },
            "spec": {
                "host": "guestbook.example.com",
                "to": {
                    "kind": "Service",
                    "name": "frontend-service"
                }
            },
            "status": {}
        },
        {
            "apiVersion": "v1",
            "kind": "Service",
            "metadata": {
                "creationTimestamp": null,
                "name": "frontend-service"
            },
            "spec": {
                "ports": [
                    {
                        "nodePort": 0,
                        "port": 5432,
                        "protocol": "TCP",
                        "targetPort": 5432
                    }
                ],
                "selector": {
                    "name": "frontend-service"
                },
                "sessionAffinity": "None",
                "type": "ClusterIP"
            },
            "status": {
                "loadBalancer": {}
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Service",
            "metadata": {
                "creationTimestamp": null,
                "name": "redis-master"
            },
            "spec": {
                "ports": [
                    {
                        "nodePort": 0,
                        "port": 10000,
                        "protocol": "TCP",
                        "targetPort": 10000
                    }
                ],
                "selector": {
                    "name": "redis-master"
                },
                "sessionAffinity": "None",
                "type": "ClusterIP"
            },
            "status": {
                "loadBalancer": {}
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Service",
            "metadata": {
                "creationTimestamp": null,
                "name": "redis-slave"
            },
            "spec": {
                "ports": [
                    {
                        "nodePort": 0,
                        "port": 10001,
                        "protocol": "TCP",
                        "targetPort": 10001
                    }
                ],
                "selector": {
                    "name": "redis-slave"
                },
                "sessionAffinity": "None",
                "type": "ClusterIP"
            },
            "status": {
                "loadBalancer": {}
            }
        },
        {
            "apiVersion": "v1",
            "kind": "Pod",
            "metadata": {
                "creationTimestamp": null,
                "labels": {
                    "name": "redis-master"
                },
                "name": "redis-master"
            },
            "spec": {
                "containers": [
                    {
                        "capabilities": {},
                        "env": [
                            {
                                "name": "REDIS_PASSWORD",
                                "value": "P8vxbV4C"
                            }
                        ],
                        "image": "dockerfile/redis",
                        "imagePullPolicy": "IfNotPresent",
                        "name": "master",
                        "ports": [
                            {
                                "containerPort": 6379,
                                "protocol": "TCP"
                            }
                        ],
                        "resources": {},
                        "securityContext": {
                            "capabilities": {},
                            "privileged": false
                        },
                        "terminationMessagePath": "/dev/termination-log"
                    }
                ],
                "dnsPolicy": "ClusterFirst",
                "restartPolicy": "Always",
                "serviceAccount": ""
            },
            "status": {}
        },
        {
            "apiVersion": "v1",
            "kind": "ReplicationController",
            "metadata": {
                "creationTimestamp": null,
                "labels": {
                    "name": "frontend-service"
                },
                "name": "guestbook"
            },
            "spec": {
                "replicas": 3,
                "selector": {
                    "name": "frontend-service"
                },
                "template": {
                    "metadata": {
                        "creationTimestamp": null,
                        "labels": {
                            "name": "frontend-service"
                        }
                    },
                    "spec": {
                        "containers": [
                            {
                                "capabilities": {},
                                "env": [
                                    {
                                        "name": "ADMIN_USERNAME",
                                        "value": "adminQ3H"
                                    },
                                    {
                                        "name": "ADMIN_PASSWORD",
                                        "value": "dwNJiJwW"
                                    },
                                    {
                                        "name": "REDIS_PASSWORD",
                                        "value": "P8vxbV4C"
                                    }
                                ],
                                "image": "brendanburns/php-redis",
                                "imagePullPolicy": "IfNotPresent",
                                "name": "php-redis",
                                "ports": [
                                    {
                                        "containerPort": 80,
                                        "hostPort": 8000,
                                        "protocol": "TCP"
                                    }
                                ],
                                "resources": {},
                                "securityContext": {
                                    "capabilities": {},
                                    "privileged": false
                                },
                                "terminationMessagePath": "/dev/termination-log"
                            }
                        ],
                        "dnsPolicy": "ClusterFirst",
                        "restartPolicy": "Always",
                        "serviceAccount": ""
                    }
                }
            },
            "status": {
                "replicas": 0
            }
        },
        {
            "apiVersion": "v1",
            "kind": "ReplicationController",
            "metadata": {
                "creationTimestamp": null,
                "labels": {
                    "name": "redis-slave"
                },
                "name": "redis-slave"
            },
            "spec": {
                "replicas": 2,
                "selector": {
                    "name": "redis-slave"
                },
                "template": {
                    "metadata": {
                        "creationTimestamp": null,
                        "labels": {
                            "name": "redis-slave"
                        }
                    },
                    "spec": {
                        "containers": [
                            {
                                "capabilities": {},
                                "env": [
                                    {
                                        "name": "REDIS_PASSWORD",
                                        "value": "P8vxbV4C"
                                    }
                                ],
                                "image": "brendanburns/redis-slave",
                                "imagePullPolicy": "IfNotPresent",
                                "name": "slave",
                                "ports": [
                                    {
                                        "containerPort": 6379,
                                        "hostPort": 6380,
                                        "protocol": "TCP"
                                    }
                                ],
                                "resources": {},
                                "securityContext": {
                                    "capabilities": {},
                                    "privileged": false
                                },
                                "terminationMessagePath": "/dev/termination-log"
                            }
                        ],
                        "dnsPolicy": "ClusterFirst",
                        "restartPolicy": "Always",
                        "serviceAccount": ""
                    }
                }
            },
            "status": {
                "replicas": 0
            }
        }
    ],
    "parameters": [
        {
            "name": "ADMIN_USERNAME",
            "description": "Guestbook administrator username",
            "value": "adminQ3H",
            "generate": "expression",
            "from": "admin[A-Z0-9]{3}"
        },
        {
            "name": "ADMIN_PASSWORD",
            "description": "Guestbook administrator password",
            "value": "dwNJiJwW",
            "generate": "expression",
            "from": "[a-zA-Z0-9]{8}"
        },
        {
            "name": "REDIS_PASSWORD",
            "description": "Redis password",
            "value": "P8vxbV4C",
            "generate": "expression",
            "from": "[a-zA-Z0-9]{8}"
        },
        {
            "name": "SLAVE_SERVICE_NAME",
            "description": "Slave Service name",
            "value": "redis-slave"
        },
        {
            "name": "CUSTOM_PARAM1",
            "value": "1"
        }
    ]
}
`)

func testExtendedTestdataTemplatesGuestbook_listJsonBytes() ([]byte, error) {
	return _testExtendedTestdataTemplatesGuestbook_listJson, nil
}

func testExtendedTestdataTemplatesGuestbook_listJson() (*asset, error) {
	bytes, err := testExtendedTestdataTemplatesGuestbook_listJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/templates/guestbook_list.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataTemplatesTemplateinstance_badobjectYaml = []byte(`kind: List
apiVersion: v1
items:
- kind: TemplateInstance
  apiVersion: template.openshift.io/v1
  metadata:
    name: invalidtemplateinstance
  spec:
    template:
      kind: Template
      apiVersion: v1
      metadata:
        name: template
      objects:
      - kind: Deployment
        apiVersion: apps/v1
        metadata:
          name: "invalidname!@#$%^&*"
        spec:
          replicas: 0
          selector:
            matchLabels:
              key: value
          template:
            metadata:
              labels:
                key: value
            spec:
              containers:
              - name: hello-openshift
                image: openshift/hello-openshift
`)

func testExtendedTestdataTemplatesTemplateinstance_badobjectYamlBytes() ([]byte, error) {
	return _testExtendedTestdataTemplatesTemplateinstance_badobjectYaml, nil
}

func testExtendedTestdataTemplatesTemplateinstance_badobjectYaml() (*asset, error) {
	bytes, err := testExtendedTestdataTemplatesTemplateinstance_badobjectYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/templates/templateinstance_badobject.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataTemplatesTemplateinstance_objectkindsYaml = []byte(`kind: List
apiVersion: v1
items:
- kind: Secret
  apiVersion: v1
  metadata:
    name: configsecret
  stringData:
    NAME: template
- kind: TemplateInstance
  apiVersion: template.openshift.io/v1
  metadata:
    name: templateinstance
  spec:
    template:
      kind: Template
      apiVersion: v1
      metadata:
        name: template
      objects:
      - kind: Secret
        apiVersion: v1
        metadata:
          name: secret
          labels:
            foo: bar
      - kind: Deployment
        apiVersion: apps/v1
        metadata:
          name: deployment
        spec:
          replicas: 0
          selector:
            matchLabels:
              key: value
          template:
            metadata:
              labels:
                key: value
            spec:
              containers:
              - name: hello-openshift
                image: openshift/hello-openshift
      - kind: Route
        apiVersion: v1
        metadata:
          name: route
        spec:
          to:
            name: foo
      - kind: Route
        apiVersion: route.openshift.io/v1
        metadata:
          name: newroute
        spec:
          to:
            name: foo
      parameters:
        - name: NAME
          value: ${NAME}
    secret:
      name: configsecret
`)

func testExtendedTestdataTemplatesTemplateinstance_objectkindsYamlBytes() ([]byte, error) {
	return _testExtendedTestdataTemplatesTemplateinstance_objectkindsYaml, nil
}

func testExtendedTestdataTemplatesTemplateinstance_objectkindsYaml() (*asset, error) {
	bytes, err := testExtendedTestdataTemplatesTemplateinstance_objectkindsYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/templates/templateinstance_objectkinds.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataTemplatesTemplateinstance_readinessYaml = []byte(`kind: Template
apiVersion: v1
metadata:
  name: simple-example
  annotations:
objects:
- kind: Service
  apiVersion: v1
  metadata:
    name: "${NAME}"
    annotations:
      description: Exposes and load balances the application pods
  spec:
    ports:
    - name: web
      port: 8080
      targetPort: 8080
    selector:
      name: "${NAME}"
- kind: Route
  apiVersion: v1
  metadata:
    name: "${NAME}"
  spec:
    host: "${APPLICATION_DOMAIN}"
    to:
      kind: Service
      name: "${NAME}"
- kind: ImageStream
  apiVersion: v1
  metadata:
    name: "${NAME}"
    annotations:
      description: Keeps track of changes in the application image
- kind: BuildConfig
  apiVersion: v1
  metadata:
    name: "${NAME}"
    annotations:
      description: Defines how to build the application
      template.alpha.openshift.io/wait-for-ready: 'true'
  spec:
    source:
      type: Git
      git:
        uri: ${SOURCE_REPOSITORY_URL}
    strategy:
      type: Source
      sourceStrategy:
        from:
          kind: DockerImage
          name: docker.io/openshift/test-build-simples2i:latest
    output:
      to:
        kind: ImageStreamTag
        name: "${NAME}:latest"
    triggers:
    - type: ConfigChange
- kind: DeploymentConfig
  apiVersion: v1
  metadata:
    name: "${NAME}"
    annotations:
      description: Defines how to deploy the application server
      template.alpha.openshift.io/wait-for-ready: 'true'
  spec:
    strategy:
      type: Rolling
    triggers:
    - type: ImageChange
      imageChangeParams:
        automatic: true
        containerNames:
        - simple-example
        from:
          kind: ImageStreamTag
          name: "${NAME}:latest"
    - type: ConfigChange
    replicas: 1
    selector:
      name: "${NAME}"
    template:
      metadata:
        name: "${NAME}"
        labels:
          name: "${NAME}"
      spec:
        containers:
        - name: simple-example
          image: " "
          ports:
          - containerPort: 8080
parameters:
- name: NAME
  displayName: Name
  description: The name assigned to all of the frontend objects defined in this template.
  required: true
  value: simple-example
- name: SOURCE_REPOSITORY_URL
  displayName: sourceurl
  required: true
  value: https://github.com/sclorg/nodejs-ex
- name: APPLICATION_DOMAIN
  displayName: Application Hostname
  description: The exposed hostname that will route to the Node.js service, if left
    blank a value will be defaulted.
  value: ''
`)

func testExtendedTestdataTemplatesTemplateinstance_readinessYamlBytes() ([]byte, error) {
	return _testExtendedTestdataTemplatesTemplateinstance_readinessYaml, nil
}

func testExtendedTestdataTemplatesTemplateinstance_readinessYaml() (*asset, error) {
	bytes, err := testExtendedTestdataTemplatesTemplateinstance_readinessYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/templates/templateinstance_readiness.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataTemplatesTemplateservicebroker_bindYaml = []byte(`apiVersion: v1
kind: Template
metadata:
  name: tsbtemplate
objects:
- apiVersion: v1
  kind: Secret
  metadata:
    name: aadda50d-d92c-402d-bd29-5ed2095aad2c
    namespace: ${NAMESPACE}

- apiVersion: template.openshift.io/v1
  kind: TemplateInstance
  metadata:
    name: aadda50d-d92c-402d-bd29-5ed2095aad2c
    namespace: ${NAMESPACE}
  spec:
    template:
      apiVersion: v1
      kind: Template
      metadata:
        uid: d261a5c9-db37-40b5-ac0f-5709e0e3aac4
      objects:
      - apiVersion: v1
        data:
          username: configmap-username
        kind: ConfigMap
        metadata:
          annotations:
            template.openshift.io/expose-configmap-username: "{.data['username']}"
          name: configmap
      - apiVersion: v1
        kind: Secret
        metadata:
          annotations:
            template.openshift.io/base64-expose-secret-password: "{.data['password']}"
            template.openshift.io/expose-secret-username: "{.data['username']}"
          name: secret
        stringData:
          password: secret-password
          username: secret-username
      - apiVersion: v1
        kind: Service
        metadata:
          annotations:
            template.openshift.io/expose-service-uri: http://{.spec.clusterIP}:{.spec.ports[?(.name=="port")].port}
          name: service
        spec:
          ports:
          - name: port
            port: 1234
      - apiVersion: v1
        kind: Route
        metadata:
          annotations:
            template.openshift.io/expose-route-uri: http://{.spec.host}{.spec.path}
          name: route
        spec:
          host: host
          path: /path
          to:
            kind: Service
            name: service

- apiVersion: template.openshift.io/v1
  kind: BrokerTemplateInstance
  metadata:
    name: aadda50d-d92c-402d-bd29-5ed2095aad2c
  spec:
    templateInstance:
      apiVersion: template.openshift.io/v1
      kind: TemplateInstance
      name: aadda50d-d92c-402d-bd29-5ed2095aad2c
      namespace: ${NAMESPACE}

    secret:
      apiVersion: v1
      kind: Secret
      name: aadda50d-d92c-402d-bd29-5ed2095aad2c
      namespace: ${NAMESPACE}

parameters:
- name: NAMESPACE
  required: true
`)

func testExtendedTestdataTemplatesTemplateservicebroker_bindYamlBytes() ([]byte, error) {
	return _testExtendedTestdataTemplatesTemplateservicebroker_bindYaml, nil
}

func testExtendedTestdataTemplatesTemplateservicebroker_bindYaml() (*asset, error) {
	bytes, err := testExtendedTestdataTemplatesTemplateservicebroker_bindYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/templates/templateservicebroker_bind.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataTestCliDebugYaml = []byte(`kind: List
apiVersion: v1
items:
- kind: ImageStream
  apiVersion: v1
  metadata:
    name: local-busybox

- kind: BuildConfig
  apiVersion: v1
  metadata:
    name: local-busybox
  spec:
    strategy:
      type: Docker
    source:
      type: Git
      dockerfile: "FROM busybox:latest\n"
    output:
      to:
        kind: ImageStreamTag
        name: local-busybox:latest
    triggers:
    - type: ConfigChange

- kind: DeploymentConfig
  apiVersion: v1
  metadata:
    name: local-busybox1
  spec:
    replicas: 0
    selector:
      deploymentconfig: local-busybox1
    template:
      metadata:
        labels:
          deploymentconfig: local-busybox1
      spec:
        containers:
        - name: local-busybox
    triggers:
    - type: ImageChange
      imageChangeParams:
        automatic: true
        containerNames:
        - local-busybox
        from:
          kind: ImageStreamTag
          name: local-busybox:latest

- kind: DeploymentConfig
  apiVersion: v1
  metadata:
    name: local-busybox2
  spec:
    replicas: 0
    selector:
      deploymentconfig: local-busybox2
    template:
      metadata:
        labels:
          deploymentconfig: local-busybox2
      spec:
        containers:
        - name: local-busybox
          command:
          - foo
          - bar
          args:
          - baz
          - qux
    triggers:
    - type: ImageChange
      imageChangeParams:
        automatic: true
        containerNames:
        - local-busybox
        from:
          kind: ImageStreamTag
          name: local-busybox:latest

- kind: DeploymentConfig
  apiVersion: v1
  metadata:
    name: busybox1
  spec:
    replicas: 0
    selector:
      deploymentconfig: busybox1
    template:
      metadata:
        labels:
          deploymentconfig: busybox1
      spec:
        containers:
        - name: busybox
          image: busybox

- kind: DeploymentConfig
  apiVersion: v1
  metadata:
    name: busybox2
  spec:
    replicas: 0
    selector:
      deploymentconfig: busybox2
    template:
      metadata:
        labels:
          deploymentconfig: busybox2
      spec:
        containers:
        - name: busybox
          image: busybox
          command:
          - foo
          - bar
          args:
          - baz
          - qux
`)

func testExtendedTestdataTestCliDebugYamlBytes() ([]byte, error) {
	return _testExtendedTestdataTestCliDebugYaml, nil
}

func testExtendedTestdataTestCliDebugYaml() (*asset, error) {
	bytes, err := testExtendedTestdataTestCliDebugYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/test-cli-debug.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataTestEnvPodJson = []byte(`{
  "kind":"Pod",
  "apiVersion":"v1",
  "metadata":{
    "name":"test-pod",
    "labels":{
      "name":"test-pod"
    }
  },
  "spec":{
    "containers":[
      {
        "name":"test",
        "image":"centos:centos7",
        "env": [
          {
            "name":"podname",
            "valueFrom": {
              "fieldRef": {
                "fieldPath":"metadata.name"
              }
            }
          },
          {
            "name":"podname_composed",
            "value":"$(podname)_composed"
          },
          {
            "name":"var1",
            "value":"value1"
          },
          {
            "name":"var2",
            "value":"$(var1)"
          },
          {
            "name":"var3",
            "value":"120"
          }
        ],
        "command": [
          "sleep",
          "$(var3)"
        ]
      }
    ],
    "restartPolicy":"Never",
    "dnsPolicy":"ClusterFirst"
  }
}
`)

func testExtendedTestdataTestEnvPodJsonBytes() ([]byte, error) {
	return _testExtendedTestdataTestEnvPodJson, nil
}

func testExtendedTestdataTestEnvPodJson() (*asset, error) {
	bytes, err := testExtendedTestdataTestEnvPodJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/test-env-pod.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataTestGitserverYaml = []byte(`apiVersion: v1
kind: Template
labels:
  template: gitserver
metadata:
  name: gitserver
objects:
# The gitserver is deployed as a singleton pod and uses a very small amount
# of resources. It can host or transiently serve Git repositories, as well
# as automatically integrate with builds in a namespace.
- apiVersion: v1
  kind: DeploymentConfig
  metadata:
    name: gitserver
    labels:
      app: gitserver
  spec:
    replicas: 1 # the gitserver is not HA and should not be scaled past 1
    selector:
      run-container: gitserver
    template:
      metadata:
        labels:
          run-container: gitserver
      spec:
        containers:
        - name: gitserver
          image: openshift/origin-gitserver
          readinessProbe:
            tcpSocket:
              port: 8080
          ports:
          - containerPort: 8080

          env:
          # Each environment variable matching GIT_INITIAL_CLONE_* will
          # be cloned when the process starts; failures will be logged.
          # <name> must be [A-Z0-9_\-\.], the cloned directory name will
          # be lowercased. If the name is invalid the pod will halt. If
          # the repository already exists on disk, it will be updated
          # from the remote.
          #
          - name: GIT_INITIAL_CLONE_1
            value: https://github.com/openshift/ruby-hello-world.git;ruby-hello-world


          # The namespace of the pod is required for implicit config
          # (passing '-' to AUTOLINK_KUBECONFIG or REQUIRE_SERVER_AUTH)
          # and can also be used to target a specific namespace.
          - name: POD_NAMESPACE
            valueFrom:
              fieldRef:
                fieldPath: metadata.namespace

          # The URL that builds must use to access the Git repositories
          # stored in this app.
          # TODO: support HTTPS
          - name: PUBLIC_URL
            value: http://gitserver.$(POD_NAMESPACE).svc.cluster.local:8080
          # The directory to store Git repositories in. If not backed
          # by a persistent volume, repositories will be lost when
          # deployments occur. Use INITIAL_GIT_CLONE and AUTOLINK_*
          # to remove the need to use a persistent volume.
          - name: GIT_HOME
            value: /var/lib/git
          # The directory to use as the default hook directory for any
          # cloned or autolinked directories.
          - name: HOOK_PATH
            value: /var/lib/git-hooks

          # Authentication and authorization

          # If 'yes', clients may push to the server with git push.
          - name: ALLOW_GIT_PUSH
            value: "yes"
          # If 'yes', clients may set hooks via the API. However, unless
          # the Git home is backed by a persistent volume, any deployment
          # will result in the hooks being lost.
          - name: ALLOW_GIT_HOOKS
            value: "yes"
          # If 'yes', clients can create new git repositories on demand
          # by pushing. If the data on disk is not backed by a persistent
          # volume, the Git repo will be deleted if the deployment is
          # updated.
          - name: ALLOW_LAZY_CREATE
            value: "yes"
          # If 'yes', clients can pull without being authenticated.
          - name: ALLOW_ANON_GIT_PULL

          # Provides the path to a kubeconfig file in the image that
          # should be used to authorize against the server. The value
          # '-' will use the pod's service account.
          # May not be used in combination with REQUIRE_GIT_AUTH
          #- name: REQUIRE_SERVER_AUTH
          #  value: "-"
          
          # The namespace to check authorization against when
          # REQUIRE_SERVICE_AUTH is used. Users must have 'get' on
          # 'pods' to pull and 'create' on 'pods' to push.
          - name: AUTH_NAMESPACE
            value: $(POD_NAMESPACE)
          # Require BASIC authentication with a username and password
          # to push or pull.
          # May not be used in combination with REQUIRE_SERVER_AUTH
          - name: REQUIRE_GIT_AUTH
            value: gituser:gituserpassword

          # Autolinking:
          #
          # The gitserver can automatically clone Git repositories
          # associated with a build config and replace the URL with
          # a link to the repo on PUBLIC_URL. The default post-receive
          # hook on the cloned repo will then trigger a build. You
          # may customize the hook with AUTOLINK_HOOK (path to hook).
          # To autolink, the account the pod runs under must have 'edit'
          # on the AUTOLINK_NAMESPACE:
          #
          #    oc policy add-role-to-user \
          #      system:serviceaccount:${namespace}:gitserver edit
          #
          # Links are checked every time the pod starts.

          # The location to read auth configuration from for autolinking.
          # If '-', use the service account token to link. The account
          # represented by this config must have the edit role on the
          # namespace.
          #- name: AUTOLINK_KUBECONFIG
          #  value: "-"

          # The namespace to autolink
          #- name: AUTOLINK_NAMESPACE
          #  value: $(POD_NAMESPACE)

          # The path to a script in the image to use as the default
          # post-receive hook - only set during link, so has no effect
          # on cloned repositories. See the "hooks" directory in the
          # image for examples.
          #- name: AUTOLINK_HOOK

          # The master service host is not signed with the service IP
          # so we override with the consistent DNS name. Required for
          # connections to the server.
          - name: KUBERNETES_SERVICE_HOST
            value: kubernetes.default

          volumeMounts:
          - mountPath: /var/lib/git/
            name: git
        volumes:
        - name: git
    triggers:
    - type: ConfigChange

# The gitserver service is required for DNS resolution
- apiVersion: v1
  kind: Service
  metadata:
    name: gitserver
    labels:
      app: gitserver
  spec:
    ports:
    - port: 8080
      targetPort: 8080
    selector:
      run-container: gitserver
- apiVersion: v1
  kind: Route
  metadata:
    name: gitserver
    labels:
      app: gitserver
  spec:
    tls:
      termination: edge
    to:
      kind: Service
      name: gitserver
`)

func testExtendedTestdataTestGitserverYamlBytes() ([]byte, error) {
	return _testExtendedTestdataTestGitserverYaml, nil
}

func testExtendedTestdataTestGitserverYaml() (*asset, error) {
	bytes, err := testExtendedTestdataTestGitserverYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/test-gitserver.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataTestSecretJson = []byte(`{
  "kind": "Secret",
  "apiVersion": "v1",
  "metadata": {
    "name": "docker",
    "creationTimestamp": null
  },
  "data": {
    "dockercfg": "eyJodHRwczovL3JlZ2lzdHJ5aG9zdC92MSI6eyJhdXRoIjoic2VjcmV0IiwiZW1haWwiOiJqb2huQGRvZS5jb20ifX0K"
  },
  "type": "Opaque"
}`)

func testExtendedTestdataTestSecretJsonBytes() ([]byte, error) {
	return _testExtendedTestdataTestSecretJson, nil
}

func testExtendedTestdataTestSecretJson() (*asset, error) {
	bytes, err := testExtendedTestdataTestSecretJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/test-secret.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testExtendedTestdataVerifyservicePipelineTemplateYaml = []byte(`apiVersion: v1
kind: Template
labels:
  template: jenkins-verifyservice-pipeline
metadata:
  name: redis-verifyservice-test
  app: redis
objects:
- apiVersion: v1
  kind: Service
  metadata:
    name: redis-headless
    app: redis
  spec:
    clusterIP: None
    ports:
    - port: 6379
      targetPort: 6379
    selector:
      name: redis
- apiVersion: v1
  kind: BuildConfig
  metadata:
    name: jenkins-verifyservice-pipeline
    app: redis
  spec:
    strategy:
      jenkinsPipelineStrategy:
        jenkinsfile: |-
          try {
              timeout(time: 20, unit: 'MINUTES') {
                  // Select the default cluster
                  openshift.withCluster() {
                      // Select the default project
                      openshift.withProject() {
                        // Verify Normal Services
                        def connectedNormalService = openshift.verifyService('redis')
                        // Verify Headless Services with Selectors
                        def connectedHeadlessService = openshift.verifyService('redis-headless')
                      }
                  }
              }
          } catch (err) {
             echo "in catch block"
             echo "Caught: ${err}"
             currentBuild.result = 'FAILURE'
             throw err
          }
      type: JenkinsPipeline
`)

func testExtendedTestdataVerifyservicePipelineTemplateYamlBytes() ([]byte, error) {
	return _testExtendedTestdataVerifyservicePipelineTemplateYaml, nil
}

func testExtendedTestdataVerifyservicePipelineTemplateYaml() (*asset, error) {
	bytes, err := testExtendedTestdataVerifyservicePipelineTemplateYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/extended/testdata/verifyservice-pipeline-template.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testIntegrationTestdataProjectRequestTemplateWithQuotaYaml = []byte(`apiVersion: template.openshift.io/v1
kind: Template
metadata:
  creationTimestamp: 2015-10-24T18:25:22Z
  name: default-project-request
  namespace: default
objects:
- apiVersion: v1
  kind: Project
  metadata:
    annotations:
      openshift.io/description: ${PROJECT_DESCRIPTION}
      openshift.io/display-name: ${PROJECT_DISPLAYNAME}
      extra: here
    creationTimestamp: null
    name: ${PROJECT_NAME}
  spec: {}
  status: {}
- apiVersion: v1
  kind: ResourceQuota
  metadata:
    name: ${PROJECT_NAME}-quota
  spec:
    hard:
      cpu: 200m
      memory: 512Mi
      pods: 3
      replicationcontrollers: 3
      resourcequotas: 1
      services: 3
- apiVersion: v1
  kind: LimitRange
  metadata:
    creationTimestamp: null
    name: ${PROJECT_NAME}-limits
  spec:
    limits:
    - max:
        cpu: 500m
        memory: 750Mi
      min:
        cpu: 10m
        memory: 5Mi
      type: Pod
    - default:
        cpu: 100m
        memory: 100Mi
      max:
        cpu: 500m
        memory: 750Mi
      min:
        cpu: 10m
        memory: 5Mi
      type: Container
- apiVersion: v1
  groupNames: []
  kind: RoleBinding
  metadata:
    creationTimestamp: null
    name: admins
    namespace: ${PROJECT_NAME}
  roleRef:
    name: admin
  subjects:
  - kind: User
    name: ${PROJECT_ADMIN_USER}
  userNames:
  - ${PROJECT_ADMIN_USER}
- apiVersion: v1
  groupNames:
  - system:serviceaccounts:${PROJECT_NAME}
  kind: RoleBinding
  metadata:
    creationTimestamp: null
    name: system:image-pullers
    namespace: ${PROJECT_NAME}
  roleRef:
    name: system:image-puller
  subjects:
  - kind: SystemGroup
    name: system:serviceaccounts:${PROJECT_NAME}
  userNames: []
- apiVersion: v1
  groupNames: []
  kind: RoleBinding
  metadata:
    creationTimestamp: null
    name: system:image-builders
    namespace: ${PROJECT_NAME}
  roleRef:
    name: system:image-builder
  subjects:
  - kind: ServiceAccount
    name: builder
  userNames:
  - system:serviceaccount:${PROJECT_NAME}:builder
- apiVersion: v1
  groupNames: []
  kind: RoleBinding
  metadata:
    creationTimestamp: null
    name: system:deployers
    namespace: ${PROJECT_NAME}
  roleRef:
    name: system:deployer
  subjects:
  - kind: ServiceAccount
    name: deployer
  userNames:
  - system:serviceaccount:${PROJECT_NAME}:deployer
parameters:
- name: PROJECT_NAME
- name: PROJECT_DISPLAYNAME
- name: PROJECT_DESCRIPTION
- name: PROJECT_ADMIN_USER
`)

func testIntegrationTestdataProjectRequestTemplateWithQuotaYamlBytes() ([]byte, error) {
	return _testIntegrationTestdataProjectRequestTemplateWithQuotaYaml, nil
}

func testIntegrationTestdataProjectRequestTemplateWithQuotaYaml() (*asset, error) {
	bytes, err := testIntegrationTestdataProjectRequestTemplateWithQuotaYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/integration/testdata/project-request-template-with-quota.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testIntegrationTestdataTestBuildcliBeta2Json = []byte(`{
  "kind": "List",
  "apiVersion": "v1",
  "metadata": {},
  "items": [
    {
      "kind": "ImageStream",
      "apiVersion": "v1",
      "metadata": {
        "name": "ruby-22-centos-buildcli",
        "creationTimestamp": null
      },
      "spec": {
        "dockerImageRepository": "centos/ruby-22-centos",
        "tags": [
          {
            "name": "valid"
          }
        ]
      },
      "status": {
        "dockerImageRepository": ""
      }
    },
    {
      "kind": "BuildConfig",
      "apiVersion": "v1",
      "metadata": {
        "name": "ruby-sample-build-validtag",
        "creationTimestamp": null
      },
      "spec": {
        "triggers": [
          {
            "type": "imageChange",
            "imageChange": {}
          }
        ],
        "source": {
          "type": "Git",
          "git": {
            "uri": "git://github.com/openshift/ruby-hello-world.git"
          }
        },
        "strategy": {
          "type": "Source",
          "sourceStrategy": {
            "from": {
              "kind": "ImageStreamTag",
              "name": "ruby-22-centos-buildcli:valid"
            },
            "incremental": true
          }
        },
        "output": {
          "to": {
            "kind": "ImageStreamTag",
            "name": "origin-ruby-sample:latest"
          }
        },
        "resources": {}
      },
      "status": {
        "lastVersion": 0
      }
    },
    {
      "kind": "BuildConfig",
      "apiVersion": "v1",
      "metadata": {
        "name": "ruby-sample-build-invalidtag",
        "creationTimestamp": null
      },
      "spec": {
        "triggers": [
          {
            "type": "imageChange",
            "imageChange": {}
          }
        ],
        "source": {
          "type": "Git",
          "git": {
            "uri": "git://github.com/openshift/ruby-hello-world.git"
          }
        },
        "strategy": {
          "type": "Source",
          "sourceStrategy": {
            "from": {
              "kind": "ImageStreamTag",
              "name": "ruby-22-centos-buildcli:invalid"
            },
            "incremental": true
          }
        },
        "output": {
          "to": {
            "kind": "ImageStreamTag",
            "name": "origin-ruby-sample:latest"
          }
        },
        "resources": {}
      },
      "status": {
        "lastVersion": 0
      }
    }
  ]
}
`)

func testIntegrationTestdataTestBuildcliBeta2JsonBytes() ([]byte, error) {
	return _testIntegrationTestdataTestBuildcliBeta2Json, nil
}

func testIntegrationTestdataTestBuildcliBeta2Json() (*asset, error) {
	bytes, err := testIntegrationTestdataTestBuildcliBeta2JsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/integration/testdata/test-buildcli-beta2.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testIntegrationTestdataTestBuildcliJson = []byte(`{
  "kind": "List",
  "apiVersion": "v1",
  "metadata": {},
  "items": [
    {
      "kind": "ImageStream",
      "apiVersion": "v1",
      "metadata": {
        "name": "ruby-20-centos7-buildcli",
        "creationTimestamp": null
      },
      "spec": {
        "dockerImageRepository": "centos/ruby-25-centos7",
        "tags": [
          {
            "name": "valid"
          }
        ]
      },
      "status": {
        "dockerImageRepository": ""
      }
    },
    {
      "kind": "BuildConfig",
      "apiVersion": "v1",
      "metadata": {
        "name": "ruby-sample-build-validtag",
        "creationTimestamp": null
      },
      "spec": {
        "triggers": [
          {
            "type": "imageChange",
            "imageChange": {}
          }
        ],
        "source": {
          "type": "Git",
          "git": {
            "uri": "git://github.com/openshift/ruby-hello-world.git"
          }
        },
        "strategy": {
          "type": "Source",
          "sourceStrategy": {
            "from": {
              "kind": "DockerImage",
              "name": "centos/ruby-25-centos7"
            },
            "incremental": true
          }
        },
        "output": {
          "to": {
            "kind": "ImageStreamTag",
            "name": "origin-ruby-sample:latest"
          }
        },
        "resources": {}
      },
      "status": {
        "lastVersion": 0
      }
    },
    {
      "kind": "BuildConfig",
      "apiVersion": "v1",
      "metadata": {
        "name": "ruby-sample-build-invalidtag",
        "creationTimestamp": null
      },
      "spec": {
        "triggers": [
          {
            "type": "imageChange",
            "imageChange": {}
          }
        ],
        "source": {
          "type": "Git",
          "git": {
            "uri": "git://github.com/openshift/ruby-hello-world.git"
          }
        },
        "strategy": {
          "type": "Source",
          "sourceStrategy": {
            "from": {
              "kind": "DockerImage",
              "name": "centos/ruby-25-centos7"
            },
            "incremental": true
          }
        },
        "output": {
          "to": {
            "kind": "ImageStreamTag",
            "name": "origin-ruby-sample:latest"
          }
        },
        "resources": {}
      },
      "status": {
        "lastVersion": 0
      }
    }
  ]
}
`)

func testIntegrationTestdataTestBuildcliJsonBytes() ([]byte, error) {
	return _testIntegrationTestdataTestBuildcliJson, nil
}

func testIntegrationTestdataTestBuildcliJson() (*asset, error) {
	bytes, err := testIntegrationTestdataTestBuildcliJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/integration/testdata/test-buildcli.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testIntegrationTestdataTestDeploymentConfigYaml = []byte(`apiVersion: v1
kind: DeploymentConfig
metadata:
  name: test-deployment-config
spec:
  replicas: 1
  selector:
    name: test-deployment
  strategy:
    type: Recreate
    recreateParams:
      timeoutSeconds: 20
      post:
        failurePolicy: Ignore
        tagImages:
        - containerName: ruby-helloworld
          to:
            kind: ImageStreamTag
            name: origin-ruby-sample:deployed
  template:
    metadata:
      labels:
        name: test-deployment
    spec:
      containers:
      - image: openshift/origin-pod
        imagePullPolicy: IfNotPresent
        name: ruby-helloworld
        ports:
        - containerPort: 8080
          protocol: TCP
        resources:
          limits:
            cpu: 100m
            memory: 3Gi
      dnsPolicy: ClusterFirst
      restartPolicy: Always
      volumes:
      - emptyDir: {}
        name: vol1
  triggers:
  - type: ConfigChange
status: {}
`)

func testIntegrationTestdataTestDeploymentConfigYamlBytes() ([]byte, error) {
	return _testIntegrationTestdataTestDeploymentConfigYaml, nil
}

func testIntegrationTestdataTestDeploymentConfigYaml() (*asset, error) {
	bytes, err := testIntegrationTestdataTestDeploymentConfigYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/integration/testdata/test-deployment-config.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testIntegrationTestdataTestImageStreamMappingJson = []byte(`{
  "kind": "ImageStreamMapping",
  "apiVersion": "v1",
  "metadata": {
    "name": "test",
    "creationTimestamp": null
  },
  "image": {
    "metadata": {
      "name": "sha256:4986bf8c15363d1c5d15512d5266f8777bfba4974ac56e3270e7760f6f0a8125",
      "creationTimestamp": null
    },
    "dockerImageReference": "openshift/ruby-19-centos:latest",
    "dockerImageMetadata": {
      "kind": "DockerImage",
      "apiVersion": "1.0",
      "Id": "",
      "Created": null,
      "ContainerConfig": {},
      "Config": {}
    },
    "dockerImageMetadataVersion": "1.0",
    "dockerImageManifest": "{\n   \"name\": \"library/busybox\",\n   \"tag\": \"latest\",\n   \"architecture\": \"amd64\",\n   \"fsLayers\": [\n      {\n         \"blobSum\": \"tarsum.dev+sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\"\n      },\n      {\n         \"blobSum\": \"tarsum.dev+sha256:d43a7079c4dd020e9c65419c2eb6751ea49d6f7f9337edd895596cd5f7aa6369\"\n      },\n      {\n         \"blobSum\": \"tarsum.dev+sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\"\n      },\n      {\n         \"blobSum\": \"tarsum.dev+sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\"\n      }\n   ],\n   \"history\": [\n      {\n         \"v1Compatibility\": \"{\\\"id\\\":\\\"4986bf8c15363d1c5d15512d5266f8777bfba4974ac56e3270e7760f6f0a8125\\\",\\\"parent\\\":\\\"ea13149945cb6b1e746bf28032f02e9b5a793523481a0a18645fc77ad53c4ea2\\\",\\\"created\\\":\\\"2014-12-31T22:23:56.943403668Z\\\",\\\"container\\\":\\\"83dcf36ad1042b90f4ea8b2ebb60e61b2f1a451a883e04b388be299ad382b259\\\",\\\"container_config\\\":{\\\"Hostname\\\":\\\"7f674915980d\\\",\\\"Domainname\\\":\\\"\\\",\\\"User\\\":\\\"\\\",\\\"Memory\\\":0,\\\"MemorySwap\\\":0,\\\"CpuShares\\\":0,\\\"Cpuset\\\":\\\"\\\",\\\"AttachStdin\\\":false,\\\"AttachStdout\\\":false,\\\"AttachStderr\\\":false,\\\"PortSpecs\\\":null,\\\"ExposedPorts\\\":null,\\\"Tty\\\":false,\\\"OpenStdin\\\":false,\\\"StdinOnce\\\":false,\\\"Env\\\":[\\\"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\\\"],\\\"Cmd\\\":[\\\"/bin/sh\\\",\\\"-c\\\",\\\"#(nop) CMD [/bin/sh]\\\"],\\\"Image\\\":\\\"ea13149945cb6b1e746bf28032f02e9b5a793523481a0a18645fc77ad53c4ea2\\\",\\\"Volumes\\\":null,\\\"WorkingDir\\\":\\\"\\\",\\\"Entrypoint\\\":null,\\\"NetworkDisabled\\\":false,\\\"MacAddress\\\":\\\"\\\",\\\"OnBuild\\\":[]},\\\"docker_version\\\":\\\"1.4.1\\\",\\\"author\\\":\\\"Jerome Petazzoni \\\\u003cjerome@docker.com\\\\u003e\\\",\\\"config\\\":{\\\"Hostname\\\":\\\"7f674915980d\\\",\\\"Domainname\\\":\\\"\\\",\\\"User\\\":\\\"\\\",\\\"Memory\\\":0,\\\"MemorySwap\\\":0,\\\"CpuShares\\\":0,\\\"Cpuset\\\":\\\"\\\",\\\"AttachStdin\\\":false,\\\"AttachStdout\\\":false,\\\"AttachStderr\\\":false,\\\"PortSpecs\\\":null,\\\"ExposedPorts\\\":null,\\\"Tty\\\":false,\\\"OpenStdin\\\":false,\\\"StdinOnce\\\":false,\\\"Env\\\":[\\\"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\\\"],\\\"Cmd\\\":[\\\"/bin/sh\\\"],\\\"Image\\\":\\\"ea13149945cb6b1e746bf28032f02e9b5a793523481a0a18645fc77ad53c4ea2\\\",\\\"Volumes\\\":null,\\\"WorkingDir\\\":\\\"\\\",\\\"Entrypoint\\\":null,\\\"NetworkDisabled\\\":false,\\\"MacAddress\\\":\\\"\\\",\\\"OnBuild\\\":[]},\\\"architecture\\\":\\\"amd64\\\",\\\"os\\\":\\\"linux\\\",\\\"checksum\\\":\\\"tarsum.dev+sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\\\",\\\"Size\\\":0}\\n\"\n      },\n      {\n         \"v1Compatibility\": \"{\\\"id\\\":\\\"ea13149945cb6b1e746bf28032f02e9b5a793523481a0a18645fc77ad53c4ea2\\\",\\\"parent\\\":\\\"df7546f9f060a2268024c8a230d8639878585defcc1bc6f79d2728a13957871b\\\",\\\"created\\\":\\\"2014-12-31T22:23:56.190797792Z\\\",\\\"container\\\":\\\"7f674915980dbcafb3096fa82369c2943194486dcb4e585e3490a2e66c530e44\\\",\\\"container_config\\\":{\\\"Hostname\\\":\\\"7f674915980d\\\",\\\"Domainname\\\":\\\"\\\",\\\"User\\\":\\\"\\\",\\\"Memory\\\":0,\\\"MemorySwap\\\":0,\\\"CpuShares\\\":0,\\\"Cpuset\\\":\\\"\\\",\\\"AttachStdin\\\":false,\\\"AttachStdout\\\":false,\\\"AttachStderr\\\":false,\\\"PortSpecs\\\":null,\\\"ExposedPorts\\\":null,\\\"Tty\\\":false,\\\"OpenStdin\\\":false,\\\"StdinOnce\\\":false,\\\"Env\\\":[\\\"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\\\"],\\\"Cmd\\\":[\\\"/bin/sh\\\",\\\"-c\\\",\\\"#(nop) ADD file:8cf517d90fe79547c474641cc1e6425850e04abbd8856718f7e4a184ea878538 in /\\\"],\\\"Image\\\":\\\"df7546f9f060a2268024c8a230d8639878585defcc1bc6f79d2728a13957871b\\\",\\\"Volumes\\\":null,\\\"WorkingDir\\\":\\\"\\\",\\\"Entrypoint\\\":null,\\\"NetworkDisabled\\\":false,\\\"MacAddress\\\":\\\"\\\",\\\"OnBuild\\\":[]},\\\"docker_version\\\":\\\"1.4.1\\\",\\\"author\\\":\\\"Jerome Petazzoni \\\\u003cjerome@docker.com\\\\u003e\\\",\\\"config\\\":{\\\"Hostname\\\":\\\"7f674915980d\\\",\\\"Domainname\\\":\\\"\\\",\\\"User\\\":\\\"\\\",\\\"Memory\\\":0,\\\"MemorySwap\\\":0,\\\"CpuShares\\\":0,\\\"Cpuset\\\":\\\"\\\",\\\"AttachStdin\\\":false,\\\"AttachStdout\\\":false,\\\"AttachStderr\\\":false,\\\"PortSpecs\\\":null,\\\"ExposedPorts\\\":null,\\\"Tty\\\":false,\\\"OpenStdin\\\":false,\\\"StdinOnce\\\":false,\\\"Env\\\":[\\\"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\\\"],\\\"Cmd\\\":null,\\\"Image\\\":\\\"df7546f9f060a2268024c8a230d8639878585defcc1bc6f79d2728a13957871b\\\",\\\"Volumes\\\":null,\\\"WorkingDir\\\":\\\"\\\",\\\"Entrypoint\\\":null,\\\"NetworkDisabled\\\":false,\\\"MacAddress\\\":\\\"\\\",\\\"OnBuild\\\":[]},\\\"architecture\\\":\\\"amd64\\\",\\\"os\\\":\\\"linux\\\",\\\"checksum\\\":\\\"tarsum.dev+sha256:d43a7079c4dd020e9c65419c2eb6751ea49d6f7f9337edd895596cd5f7aa6369\\\",\\\"Size\\\":2433303}\\n\"\n      },\n      {\n         \"v1Compatibility\": \"{\\\"id\\\":\\\"df7546f9f060a2268024c8a230d8639878585defcc1bc6f79d2728a13957871b\\\",\\\"parent\\\":\\\"511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158\\\",\\\"created\\\":\\\"2014-10-01T20:46:07.263351912Z\\\",\\\"container\\\":\\\"2147a17cb1b2d6626ed78e5ef8ba4c71ce82c884bc3b57ab01e6114ff357cea4\\\",\\\"container_config\\\":{\\\"Hostname\\\":\\\"2147a17cb1b2\\\",\\\"Domainname\\\":\\\"\\\",\\\"User\\\":\\\"\\\",\\\"Memory\\\":0,\\\"MemorySwap\\\":0,\\\"CpuShares\\\":0,\\\"Cpuset\\\":\\\"\\\",\\\"AttachStdin\\\":false,\\\"AttachStdout\\\":false,\\\"AttachStderr\\\":false,\\\"PortSpecs\\\":null,\\\"ExposedPorts\\\":null,\\\"Tty\\\":false,\\\"OpenStdin\\\":false,\\\"StdinOnce\\\":false,\\\"Env\\\":[\\\"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\\\"],\\\"Cmd\\\":[\\\"/bin/sh\\\",\\\"-c\\\",\\\"#(nop) MAINTAINER Jerome Petazzoni \\\\u003cjerome@docker.com\\\\u003e\\\"],\\\"Image\\\":\\\"511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158\\\",\\\"Volumes\\\":null,\\\"WorkingDir\\\":\\\"\\\",\\\"Entrypoint\\\":null,\\\"NetworkDisabled\\\":false,\\\"MacAddress\\\":\\\"\\\",\\\"OnBuild\\\":[]},\\\"docker_version\\\":\\\"1.2.0\\\",\\\"author\\\":\\\"Jerome Petazzoni \\\\u003cjerome@docker.com\\\\u003e\\\",\\\"config\\\":{\\\"Hostname\\\":\\\"2147a17cb1b2\\\",\\\"Domainname\\\":\\\"\\\",\\\"User\\\":\\\"\\\",\\\"Memory\\\":0,\\\"MemorySwap\\\":0,\\\"CpuShares\\\":0,\\\"Cpuset\\\":\\\"\\\",\\\"AttachStdin\\\":false,\\\"AttachStdout\\\":false,\\\"AttachStderr\\\":false,\\\"PortSpecs\\\":null,\\\"ExposedPorts\\\":null,\\\"Tty\\\":false,\\\"OpenStdin\\\":false,\\\"StdinOnce\\\":false,\\\"Env\\\":[\\\"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\\\"],\\\"Cmd\\\":null,\\\"Image\\\":\\\"511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158\\\",\\\"Volumes\\\":null,\\\"WorkingDir\\\":\\\"\\\",\\\"Entrypoint\\\":null,\\\"NetworkDisabled\\\":false,\\\"MacAddress\\\":\\\"\\\",\\\"OnBuild\\\":[]},\\\"architecture\\\":\\\"amd64\\\",\\\"os\\\":\\\"linux\\\",\\\"checksum\\\":\\\"tarsum.dev+sha256:1b755912c77197c6a43539f2a708ef89d5849b8ce02642cb702e47afaa8195c3\\\",\\\"Size\\\":0}\\n\"\n      },\n      {\n         \"v1Compatibility\": \"{\\\"id\\\":\\\"511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158\\\",\\\"comment\\\":\\\"Imported from -\\\",\\\"created\\\":\\\"2013-06-13T14:03:50.821769-07:00\\\",\\\"container_config\\\":{\\\"Hostname\\\":\\\"\\\",\\\"Domainname\\\":\\\"\\\",\\\"User\\\":\\\"\\\",\\\"Memory\\\":0,\\\"MemorySwap\\\":0,\\\"CpuShares\\\":0,\\\"Cpuset\\\":\\\"\\\",\\\"AttachStdin\\\":false,\\\"AttachStdout\\\":false,\\\"AttachStderr\\\":false,\\\"PortSpecs\\\":null,\\\"ExposedPorts\\\":null,\\\"Tty\\\":false,\\\"OpenStdin\\\":false,\\\"StdinOnce\\\":false,\\\"Env\\\":null,\\\"Cmd\\\":null,\\\"Image\\\":\\\"\\\",\\\"Volumes\\\":null,\\\"WorkingDir\\\":\\\"\\\",\\\"Entrypoint\\\":null,\\\"NetworkDisabled\\\":false,\\\"MacAddress\\\":\\\"\\\",\\\"OnBuild\\\":null},\\\"docker_version\\\":\\\"0.4.0\\\",\\\"architecture\\\":\\\"x86_64\\\",\\\"checksum\\\":\\\"tarsum.dev+sha256:324d4cf44ee7daa46266c1df830c61a7df615c0632176a339e7310e34723d67a\\\",\\\"Size\\\":0}\\n\"\n      }\n   ],\n   \"schemaVersion\": 1,\n   \"signatures\": [\n      {\n         \"header\": {\n            \"jwk\": {\n               \"crv\": \"P-256\",\n               \"kid\": \"OIH7:HQFS:44FK:45VB:3B53:OIAG:TPL4:ATF5:6PNE:MGHN:NHQX:2GE4\",\n               \"kty\": \"EC\",\n               \"x\": \"Cu_UyxwLgHzE9rvlYSmvVdqYCXY42E9eNhBb0xNv0SQ\",\n               \"y\": \"zUsjWJkeKQ5tv7S-hl1Tg71cd-CqnrtiiLxSi6N_yc8\"\n            },\n            \"alg\": \"ES256\"\n         },\n         \"signature\": \"bWiisabH8LgSXezUhjN8X3I7ESBo_fCXvFtqAwRmzozTfPHTr8edd13SU0KUJMq4X7_agEuLpSh1V8YGcBVpYg\",\n         \"protected\": \"eyJmb3JtYXRMZW5ndGgiOjcwNjMsImZvcm1hdFRhaWwiOiJDbjAiLCJ0aW1lIjoiMjAxNS0wMy0zMVQxNjozMjoyOVoifQ\"\n      }\n   ]\n}"
  },
  "tag": "sometag"
}`)

func testIntegrationTestdataTestImageStreamMappingJsonBytes() ([]byte, error) {
	return _testIntegrationTestdataTestImageStreamMappingJson, nil
}

func testIntegrationTestdataTestImageStreamMappingJson() (*asset, error) {
	bytes, err := testIntegrationTestdataTestImageStreamMappingJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/integration/testdata/test-image-stream-mapping.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testIntegrationTestdataTestImageStreamJson = []byte(`{
  "kind": "ImageStream",
  "apiVersion": "v1",
  "metadata": {
    "name": "test",
    "creationTimestamp": null,
    "labels": {
      "color": "blue"
    }
  },
  "spec": {},
  "status": {
    "dockerImageRepository": ""
  }
}`)

func testIntegrationTestdataTestImageStreamJsonBytes() ([]byte, error) {
	return _testIntegrationTestdataTestImageStreamJson, nil
}

func testIntegrationTestdataTestImageStreamJson() (*asset, error) {
	bytes, err := testIntegrationTestdataTestImageStreamJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/integration/testdata/test-image-stream.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testIntegrationTestdataTestImageJson = []byte(`{
  "kind": "Image",
  "apiVersion": "image.openshift.io/v1",
  "metadata": {
    "name": "test",
    "creationTimestamp": null
  },
  "dockerImageReference": "openshift/ruby-19-centos:latest",
  "dockerImageMetadata": {
    "kind": "DockerImage",
    "apiVersion": "1.0",
    "Id": "",
    "ContainerConfig": {},
    "Config": {}
  },
  "dockerImageMetadataVersion": "1.0"
}
`)

func testIntegrationTestdataTestImageJsonBytes() ([]byte, error) {
	return _testIntegrationTestdataTestImageJson, nil
}

func testIntegrationTestdataTestImageJson() (*asset, error) {
	bytes, err := testIntegrationTestdataTestImageJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/integration/testdata/test-image.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testIntegrationTestdataTestReplicationControllerYaml = []byte(`apiVersion: v1
kind: ReplicationController
metadata:
  annotations:
    openshift.io/deployment-config.latest-version: "1"
    openshift.io/deployment-config.name: test-deployment
    openshift.io/deployment.phase: Complete
    optnshift.io/deployment.replicas: "1"
  name: test-replication-controller
spec:
  replicas: 1
  selector:
    deployment: test-deployment
    deploymentconfig: test-deployment
  template:
    metadata:
      labels:
        deployment: test-deployment
        deploymentconfig: test-deployment
    spec:
      containers:
      - image: openshift/origin-pod
        imagePullPolicy: IfNotPresent
        name: ruby-helloworld
        ports:
        - containerPort: 8080
          protocol: TCP
        resources: {}
      dnsPolicy: ClusterFirst
      restartPolicy: Always
status: {}
`)

func testIntegrationTestdataTestReplicationControllerYamlBytes() ([]byte, error) {
	return _testIntegrationTestdataTestReplicationControllerYaml, nil
}

func testIntegrationTestdataTestReplicationControllerYaml() (*asset, error) {
	bytes, err := testIntegrationTestdataTestReplicationControllerYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/integration/testdata/test-replication-controller.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testIntegrationTestdataTestRouteJson = []byte(`{
  "kind": "Route",
  "apiVersion": "v1",
  "metadata": {
    "name": "testroute",
    "creationTimestamp": null,
    "labels": {
       "rtlabel1": "greatroute"
    }
  },
  "spec": {
    "host": "test.example.com",
    "to": {
      "kind": "Service",
      "name": "testservice"
    }
  },
  "status": {}
}
`)

func testIntegrationTestdataTestRouteJsonBytes() ([]byte, error) {
	return _testIntegrationTestdataTestRouteJson, nil
}

func testIntegrationTestdataTestRouteJson() (*asset, error) {
	bytes, err := testIntegrationTestdataTestRouteJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/integration/testdata/test-route.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testIntegrationTestdataTestServiceWithFinalizerJson = []byte(`{
  "kind": "Service",
  "apiVersion": "v1",
  "metadata": {
    "name": "frontend",
    "creationTimestamp": null,
    "labels": {
      "name": "frontend"
    },
    "finalizers": ["fake/one"]
  },
  "spec": {
    "ports": [
      {
        "protocol": "TCP",
        "port": 9998,
        "targetPort": 9998,
        "nodePort": 0
      }
    ],
    "selector": {
      "name": "frontend"
    },
    "type": "ClusterIP",
    "sessionAffinity": "None"
  },
  "status": {
    "loadBalancer": {}
  }
}`)

func testIntegrationTestdataTestServiceWithFinalizerJsonBytes() ([]byte, error) {
	return _testIntegrationTestdataTestServiceWithFinalizerJson, nil
}

func testIntegrationTestdataTestServiceWithFinalizerJson() (*asset, error) {
	bytes, err := testIntegrationTestdataTestServiceWithFinalizerJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/integration/testdata/test-service-with-finalizer.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _testIntegrationTestdataTestServiceJson = []byte(`{
  "kind": "Service",
  "apiVersion": "v1",
  "metadata": {
    "name": "frontend",
    "creationTimestamp": null,
    "labels": {
      "name": "frontend"
    }
  },
  "spec": {
    "ports": [
      {
        "protocol": "TCP",
        "port": 9998,
        "targetPort": 9998,
        "nodePort": 0
      }
    ],
    "selector": {
      "name": "frontend"
    },
    "type": "ClusterIP",
    "sessionAffinity": "None"
  },
  "status": {
    "loadBalancer": {}
  }
}`)

func testIntegrationTestdataTestServiceJsonBytes() ([]byte, error) {
	return _testIntegrationTestdataTestServiceJson, nil
}

func testIntegrationTestdataTestServiceJson() (*asset, error) {
	bytes, err := testIntegrationTestdataTestServiceJsonBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "test/integration/testdata/test-service.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

// Asset loads and returns the asset for the given name.
// It returns an error if the asset could not be found or
// could not be loaded.
func Asset(name string) ([]byte, error) {
	cannonicalName := strings.Replace(name, "\\", "/", -1)
	if f, ok := _bindata[cannonicalName]; ok {
		a, err := f()
		if err != nil {
			return nil, fmt.Errorf("Asset %s can't read by error: %v", name, err)
		}
		return a.bytes, nil
	}
	return nil, fmt.Errorf("Asset %s not found", name)
}

// MustAsset is like Asset but panics when Asset would return an error.
// It simplifies safe initialization of global variables.
func MustAsset(name string) []byte {
	a, err := Asset(name)
	if err != nil {
		panic("asset: Asset(" + name + "): " + err.Error())
	}

	return a
}

// AssetInfo loads and returns the asset info for the given name.
// It returns an error if the asset could not be found or
// could not be loaded.
func AssetInfo(name string) (os.FileInfo, error) {
	cannonicalName := strings.Replace(name, "\\", "/", -1)
	if f, ok := _bindata[cannonicalName]; ok {
		a, err := f()
		if err != nil {
			return nil, fmt.Errorf("AssetInfo %s can't read by error: %v", name, err)
		}
		return a.info, nil
	}
	return nil, fmt.Errorf("AssetInfo %s not found", name)
}

// AssetNames returns the names of the assets.
func AssetNames() []string {
	names := make([]string, 0, len(_bindata))
	for name := range _bindata {
		names = append(names, name)
	}
	return names
}

// _bindata is a table, holding each asset generator, mapped to its name.
var _bindata = map[string]func() (*asset, error){
	"examples/db-templates/mariadb-ephemeral-template.json": examplesDbTemplatesMariadbEphemeralTemplateJson,
	"examples/db-templates/mariadb-persistent-template.json": examplesDbTemplatesMariadbPersistentTemplateJson,
	"examples/db-templates/mongodb-ephemeral-template.json": examplesDbTemplatesMongodbEphemeralTemplateJson,
	"examples/db-templates/mongodb-persistent-template.json": examplesDbTemplatesMongodbPersistentTemplateJson,
	"examples/db-templates/mysql-ephemeral-template.json": examplesDbTemplatesMysqlEphemeralTemplateJson,
	"examples/db-templates/mysql-persistent-template.json": examplesDbTemplatesMysqlPersistentTemplateJson,
	"examples/db-templates/postgresql-ephemeral-template.json": examplesDbTemplatesPostgresqlEphemeralTemplateJson,
	"examples/db-templates/postgresql-persistent-template.json": examplesDbTemplatesPostgresqlPersistentTemplateJson,
	"examples/db-templates/redis-ephemeral-template.json": examplesDbTemplatesRedisEphemeralTemplateJson,
	"examples/db-templates/redis-persistent-template.json": examplesDbTemplatesRedisPersistentTemplateJson,
	"examples/image-streams/image-streams-centos7.json": examplesImageStreamsImageStreamsCentos7Json,
	"examples/image-streams/image-streams-rhel7.json": examplesImageStreamsImageStreamsRhel7Json,
	"examples/sample-app/application-template-dockerbuild.json": examplesSampleAppApplicationTemplateDockerbuildJson,
	"examples/sample-app/application-template-pullspecbuild.json": examplesSampleAppApplicationTemplatePullspecbuildJson,
	"examples/sample-app/application-template-stibuild.json": examplesSampleAppApplicationTemplateStibuildJson,
	"examples/sample-app/cleanup.sh": examplesSampleAppCleanupSh,
	"examples/sample-app/github-webhook-example.json": examplesSampleAppGithubWebhookExampleJson,
	"examples/quickstarts/cakephp-mysql-persistent.json": examplesQuickstartsCakephpMysqlPersistentJson,
	"examples/quickstarts/cakephp-mysql.json": examplesQuickstartsCakephpMysqlJson,
	"examples/quickstarts/dancer-mysql-persistent.json": examplesQuickstartsDancerMysqlPersistentJson,
	"examples/quickstarts/dancer-mysql.json": examplesQuickstartsDancerMysqlJson,
	"examples/quickstarts/django-postgresql-persistent.json": examplesQuickstartsDjangoPostgresqlPersistentJson,
	"examples/quickstarts/django-postgresql.json": examplesQuickstartsDjangoPostgresqlJson,
	"examples/quickstarts/dotnet-pgsql-persistent.json": examplesQuickstartsDotnetPgsqlPersistentJson,
	"examples/quickstarts/dotnet.json": examplesQuickstartsDotnetJson,
	"examples/quickstarts/httpd.json": examplesQuickstartsHttpdJson,
	"examples/quickstarts/nginx.json": examplesQuickstartsNginxJson,
	"examples/quickstarts/nodejs-mongodb-persistent.json": examplesQuickstartsNodejsMongodbPersistentJson,
	"examples/quickstarts/nodejs-mongodb.json": examplesQuickstartsNodejsMongodbJson,
	"examples/quickstarts/rails-postgresql-persistent.json": examplesQuickstartsRailsPostgresqlPersistentJson,
	"examples/quickstarts/rails-postgresql.json": examplesQuickstartsRailsPostgresqlJson,
	"examples/hello-openshift/Dockerfile": examplesHelloOpenshiftDockerfile,
	"examples/hello-openshift/hello-pod.json": examplesHelloOpenshiftHelloPodJson,
	"examples/hello-openshift/hello-project.json": examplesHelloOpenshiftHelloProjectJson,
	"examples/jenkins/application-template.json": examplesJenkinsApplicationTemplateJson,
	"examples/jenkins/jenkins-ephemeral-template.json": examplesJenkinsJenkinsEphemeralTemplateJson,
	"examples/jenkins/jenkins-persistent-template.json": examplesJenkinsJenkinsPersistentTemplateJson,
	"examples/jenkins/pipeline/bluegreen-pipeline.yaml": examplesJenkinsPipelineBluegreenPipelineYaml,
	"examples/jenkins/pipeline/maven-pipeline.yaml": examplesJenkinsPipelineMavenPipelineYaml,
	"examples/jenkins/pipeline/nodejs-sample-pipeline.yaml": examplesJenkinsPipelineNodejsSamplePipelineYaml,
	"examples/jenkins/pipeline/openshift-client-plugin-pipeline.yaml": examplesJenkinsPipelineOpenshiftClientPluginPipelineYaml,
	"examples/jenkins/pipeline/samplepipeline.yaml": examplesJenkinsPipelineSamplepipelineYaml,
	"examples/quickstarts/cakephp-mysql.json/cakephp-mysql.json": examplesQuickstartsCakephpMysqlJsonCakephpMysqlJson,
	"test/extended/testdata/aggregator/kube-system-auth-reader.yaml": testExtendedTestdataAggregatorKubeSystemAuthReaderYaml,
	"test/extended/testdata/aggregator/sample-apiserver-apiservice.yaml": testExtendedTestdataAggregatorSampleApiserverApiserviceYaml,
	"test/extended/testdata/aggregator/sample-apiserver-authdelegator.yaml": testExtendedTestdataAggregatorSampleApiserverAuthdelegatorYaml,
	"test/extended/testdata/aggregator/sample-apiserver-authreader.yaml": testExtendedTestdataAggregatorSampleApiserverAuthreaderYaml,
	"test/extended/testdata/aggregator/sample-apiserver-rc.yaml": testExtendedTestdataAggregatorSampleApiserverRcYaml,
	"test/extended/testdata/aggregator/sample-apiserver-sa.yaml": testExtendedTestdataAggregatorSampleApiserverSaYaml,
	"test/extended/testdata/aggregator/sample-apiserver-service.yaml": testExtendedTestdataAggregatorSampleApiserverServiceYaml,
	"test/extended/testdata/builds/application-template-custombuild.json": testExtendedTestdataBuildsApplicationTemplateCustombuildJson,
	"test/extended/testdata/builds/build-postcommit/docker.yaml": testExtendedTestdataBuildsBuildPostcommitDockerYaml,
	"test/extended/testdata/builds/build-postcommit/imagestreams.yaml": testExtendedTestdataBuildsBuildPostcommitImagestreamsYaml,
	"test/extended/testdata/builds/build-postcommit/sti.yaml": testExtendedTestdataBuildsBuildPostcommitStiYaml,
	"test/extended/testdata/builds/build-pruning/default-group-build-config.yaml": testExtendedTestdataBuildsBuildPruningDefaultGroupBuildConfigYaml,
	"test/extended/testdata/builds/build-pruning/default-legacy-build-config.yaml": testExtendedTestdataBuildsBuildPruningDefaultLegacyBuildConfigYaml,
	"test/extended/testdata/builds/build-pruning/errored-build-config.yaml": testExtendedTestdataBuildsBuildPruningErroredBuildConfigYaml,
	"test/extended/testdata/builds/build-pruning/failed-build-config.yaml": testExtendedTestdataBuildsBuildPruningFailedBuildConfigYaml,
	"test/extended/testdata/builds/build-pruning/failed-pipeline.yaml": testExtendedTestdataBuildsBuildPruningFailedPipelineYaml,
	"test/extended/testdata/builds/build-pruning/imagestream.yaml": testExtendedTestdataBuildsBuildPruningImagestreamYaml,
	"test/extended/testdata/builds/build-pruning/successful-build-config.yaml": testExtendedTestdataBuildsBuildPruningSuccessfulBuildConfigYaml,
	"test/extended/testdata/builds/build-pruning/successful-pipeline.yaml": testExtendedTestdataBuildsBuildPruningSuccessfulPipelineYaml,
	"test/extended/testdata/builds/build-quota/.s2i/bin/assemble": testExtendedTestdataBuildsBuildQuotaS2iBinAssemble,
	"test/extended/testdata/builds/build-quota/Dockerfile": testExtendedTestdataBuildsBuildQuotaDockerfile,
	"test/extended/testdata/builds/build-secrets/Dockerfile": testExtendedTestdataBuildsBuildSecretsDockerfile,
	"test/extended/testdata/builds/build-secrets/s2i-binary-dir/.s2i/bin/assemble": testExtendedTestdataBuildsBuildSecretsS2iBinaryDirS2iBinAssemble,
	"test/extended/testdata/builds/build-secrets/s2i-binary-dir/.s2i/bin/run": testExtendedTestdataBuildsBuildSecretsS2iBinaryDirS2iBinRun,
	"test/extended/testdata/builds/build-secrets/s2i-binary-dir/Gemfile": testExtendedTestdataBuildsBuildSecretsS2iBinaryDirGemfile,
	"test/extended/testdata/builds/build-secrets/s2i-binary-dir/config.ru": testExtendedTestdataBuildsBuildSecretsS2iBinaryDirConfigRu,
	"test/extended/testdata/builds/build-secrets/test-configmap-2.json": testExtendedTestdataBuildsBuildSecretsTestConfigmap2Json,
	"test/extended/testdata/builds/build-secrets/test-configmap.json": testExtendedTestdataBuildsBuildSecretsTestConfigmapJson,
	"test/extended/testdata/builds/build-secrets/test-docker-build.json": testExtendedTestdataBuildsBuildSecretsTestDockerBuildJson,
	"test/extended/testdata/builds/build-secrets/test-is.json": testExtendedTestdataBuildsBuildSecretsTestIsJson,
	"test/extended/testdata/builds/build-secrets/test-s2i-build.json": testExtendedTestdataBuildsBuildSecretsTestS2iBuildJson,
	"test/extended/testdata/builds/build-secrets/test-secret-2.json": testExtendedTestdataBuildsBuildSecretsTestSecret2Json,
	"test/extended/testdata/builds/build-secrets/test-secret.json": testExtendedTestdataBuildsBuildSecretsTestSecretJson,
	"test/extended/testdata/builds/build-timing/Dockerfile": testExtendedTestdataBuildsBuildTimingDockerfile,
	"test/extended/testdata/builds/build-timing/s2i-binary-dir/.s2i/bin/assemble": testExtendedTestdataBuildsBuildTimingS2iBinaryDirS2iBinAssemble,
	"test/extended/testdata/builds/build-timing/s2i-binary-dir/.s2i/bin/run": testExtendedTestdataBuildsBuildTimingS2iBinaryDirS2iBinRun,
	"test/extended/testdata/builds/build-timing/s2i-binary-dir/Gemfile": testExtendedTestdataBuildsBuildTimingS2iBinaryDirGemfile,
	"test/extended/testdata/builds/build-timing/s2i-binary-dir/config.ru": testExtendedTestdataBuildsBuildTimingS2iBinaryDirConfigRu,
	"test/extended/testdata/builds/build-timing/test-docker-build.json": testExtendedTestdataBuildsBuildTimingTestDockerBuildJson,
	"test/extended/testdata/builds/build-timing/test-is.json": testExtendedTestdataBuildsBuildTimingTestIsJson,
	"test/extended/testdata/builds/build-timing/test-s2i-build.json": testExtendedTestdataBuildsBuildTimingTestS2iBuildJson,
	"test/extended/testdata/builds/cluster-config/invalid-build-cluster-config.yaml": testExtendedTestdataBuildsClusterConfigInvalidBuildClusterConfigYaml,
	"test/extended/testdata/builds/cluster-config/registry-blacklist.yaml": testExtendedTestdataBuildsClusterConfigRegistryBlacklistYaml,
	"test/extended/testdata/builds/cluster-config/registry-whitelist.yaml": testExtendedTestdataBuildsClusterConfigRegistryWhitelistYaml,
	"test/extended/testdata/builds/cluster-config.yaml": testExtendedTestdataBuildsClusterConfigYaml,
	"test/extended/testdata/builds/custom-build/Dockerfile": testExtendedTestdataBuildsCustomBuildDockerfile,
	"test/extended/testdata/builds/custom-build/Dockerfile.sample": testExtendedTestdataBuildsCustomBuildDockerfileSample,
	"test/extended/testdata/builds/custom-build/build.sh": testExtendedTestdataBuildsCustomBuildBuildSh,
	"test/extended/testdata/builds/docker-add/Dockerfile": testExtendedTestdataBuildsDockerAddDockerfile,
	"test/extended/testdata/builds/incremental-auth-build.json": testExtendedTestdataBuildsIncrementalAuthBuildJson,
	"test/extended/testdata/builds/pullsecret/linked-nodejs-bc.yaml": testExtendedTestdataBuildsPullsecretLinkedNodejsBcYaml,
	"test/extended/testdata/builds/pullsecret/pullsecret-nodejs-bc.yaml": testExtendedTestdataBuildsPullsecretPullsecretNodejsBcYaml,
	"test/extended/testdata/builds/s2i-environment-build-app/.s2i/environment": testExtendedTestdataBuildsS2iEnvironmentBuildAppS2iEnvironment,
	"test/extended/testdata/builds/s2i-environment-build-app/Gemfile": testExtendedTestdataBuildsS2iEnvironmentBuildAppGemfile,
	"test/extended/testdata/builds/s2i-environment-build-app/config.ru": testExtendedTestdataBuildsS2iEnvironmentBuildAppConfigRu,
	"test/extended/testdata/builds/statusfail-assemble/.s2i/bin/assemble": testExtendedTestdataBuildsStatusfailAssembleS2iBinAssemble,
	"test/extended/testdata/builds/statusfail-badcontextdirs2i.yaml": testExtendedTestdataBuildsStatusfailBadcontextdirs2iYaml,
	"test/extended/testdata/builds/statusfail-failedassemble.yaml": testExtendedTestdataBuildsStatusfailFailedassembleYaml,
	"test/extended/testdata/builds/statusfail-fetchbuilderimage.yaml": testExtendedTestdataBuildsStatusfailFetchbuilderimageYaml,
	"test/extended/testdata/builds/statusfail-fetchsourcedocker.yaml": testExtendedTestdataBuildsStatusfailFetchsourcedockerYaml,
	"test/extended/testdata/builds/statusfail-fetchsources2i.yaml": testExtendedTestdataBuildsStatusfailFetchsources2iYaml,
	"test/extended/testdata/builds/statusfail-genericreason.yaml": testExtendedTestdataBuildsStatusfailGenericreasonYaml,
	"test/extended/testdata/builds/statusfail-oomkilled.yaml": testExtendedTestdataBuildsStatusfailOomkilledYaml,
	"test/extended/testdata/builds/statusfail-postcommithook.yaml": testExtendedTestdataBuildsStatusfailPostcommithookYaml,
	"test/extended/testdata/builds/statusfail-pushtoregistry.yaml": testExtendedTestdataBuildsStatusfailPushtoregistryYaml,
	"test/extended/testdata/builds/test-auth-build.yaml": testExtendedTestdataBuildsTestAuthBuildYaml,
	"test/extended/testdata/builds/test-bc-with-pr-ref.yaml": testExtendedTestdataBuildsTestBcWithPrRefYaml,
	"test/extended/testdata/builds/test-build-app/Dockerfile": testExtendedTestdataBuildsTestBuildAppDockerfile,
	"test/extended/testdata/builds/test-build-app/Gemfile": testExtendedTestdataBuildsTestBuildAppGemfile,
	"test/extended/testdata/builds/test-build-app/config.ru": testExtendedTestdataBuildsTestBuildAppConfigRu,
	"test/extended/testdata/builds/test-build-cluster-config.yaml": testExtendedTestdataBuildsTestBuildClusterConfigYaml,
	"test/extended/testdata/builds/test-build-podsvc.json": testExtendedTestdataBuildsTestBuildPodsvcJson,
	"test/extended/testdata/builds/test-build-proxy.yaml": testExtendedTestdataBuildsTestBuildProxyYaml,
	"test/extended/testdata/builds/test-build-revision.json": testExtendedTestdataBuildsTestBuildRevisionJson,
	"test/extended/testdata/builds/test-build.yaml": testExtendedTestdataBuildsTestBuildYaml,
	"test/extended/testdata/builds/test-buildconfigsecretinjector.yaml": testExtendedTestdataBuildsTestBuildconfigsecretinjectorYaml,
	"test/extended/testdata/builds/test-cds-dockerbuild.json": testExtendedTestdataBuildsTestCdsDockerbuildJson,
	"test/extended/testdata/builds/test-cds-sourcebuild.json": testExtendedTestdataBuildsTestCdsSourcebuildJson,
	"test/extended/testdata/builds/test-context-build.json": testExtendedTestdataBuildsTestContextBuildJson,
	"test/extended/testdata/builds/test-custom-build.yaml": testExtendedTestdataBuildsTestCustomBuildYaml,
	"test/extended/testdata/builds/test-docker-app/Dockerfile": testExtendedTestdataBuildsTestDockerAppDockerfile,
	"test/extended/testdata/builds/test-docker-build-pullsecret.json": testExtendedTestdataBuildsTestDockerBuildPullsecretJson,
	"test/extended/testdata/builds/test-docker-build.json": testExtendedTestdataBuildsTestDockerBuildJson,
	"test/extended/testdata/builds/test-docker-no-outputname.json": testExtendedTestdataBuildsTestDockerNoOutputnameJson,
	"test/extended/testdata/builds/test-env-build.json": testExtendedTestdataBuildsTestEnvBuildJson,
	"test/extended/testdata/builds/test-imagechangetriggers.yaml": testExtendedTestdataBuildsTestImagechangetriggersYaml,
	"test/extended/testdata/builds/test-imageresolution-custom-build.yaml": testExtendedTestdataBuildsTestImageresolutionCustomBuildYaml,
	"test/extended/testdata/builds/test-imageresolution-docker-build.yaml": testExtendedTestdataBuildsTestImageresolutionDockerBuildYaml,
	"test/extended/testdata/builds/test-imageresolution-s2i-build.yaml": testExtendedTestdataBuildsTestImageresolutionS2iBuildYaml,
	"test/extended/testdata/builds/test-imagesource-buildconfig.yaml": testExtendedTestdataBuildsTestImagesourceBuildconfigYaml,
	"test/extended/testdata/builds/test-nosrc-build.json": testExtendedTestdataBuildsTestNosrcBuildJson,
	"test/extended/testdata/builds/test-s2i-build-quota.json": testExtendedTestdataBuildsTestS2iBuildQuotaJson,
	"test/extended/testdata/builds/test-s2i-build.json": testExtendedTestdataBuildsTestS2iBuildJson,
	"test/extended/testdata/builds/test-s2i-no-outputname.json": testExtendedTestdataBuildsTestS2iNoOutputnameJson,
	"test/extended/testdata/builds/test-symlink-build.yaml": testExtendedTestdataBuildsTestSymlinkBuildYaml,
	"test/extended/testdata/builds/valuefrom/failed-docker-build-value-from-config.yaml": testExtendedTestdataBuildsValuefromFailedDockerBuildValueFromConfigYaml,
	"test/extended/testdata/builds/valuefrom/failed-sti-build-value-from-config.yaml": testExtendedTestdataBuildsValuefromFailedStiBuildValueFromConfigYaml,
	"test/extended/testdata/builds/valuefrom/successful-docker-build-value-from-config.yaml": testExtendedTestdataBuildsValuefromSuccessfulDockerBuildValueFromConfigYaml,
	"test/extended/testdata/builds/valuefrom/successful-sti-build-value-from-config.yaml": testExtendedTestdataBuildsValuefromSuccessfulStiBuildValueFromConfigYaml,
	"test/extended/testdata/builds/valuefrom/test-configmap.yaml": testExtendedTestdataBuildsValuefromTestConfigmapYaml,
	"test/extended/testdata/builds/valuefrom/test-is.json": testExtendedTestdataBuildsValuefromTestIsJson,
	"test/extended/testdata/builds/valuefrom/test-secret.yaml": testExtendedTestdataBuildsValuefromTestSecretYaml,
	"test/extended/testdata/builds/webhook/bitbucket/testdata/pushevent-not-master.json": testExtendedTestdataBuildsWebhookBitbucketTestdataPusheventNotMasterJson,
	"test/extended/testdata/builds/webhook/bitbucket/testdata/pushevent.json": testExtendedTestdataBuildsWebhookBitbucketTestdataPusheventJson,
	"test/extended/testdata/builds/webhook/bitbucket/testdata/pushevent54-not-master.json": testExtendedTestdataBuildsWebhookBitbucketTestdataPushevent54NotMasterJson,
	"test/extended/testdata/builds/webhook/bitbucket/testdata/pushevent54.json": testExtendedTestdataBuildsWebhookBitbucketTestdataPushevent54Json,
	"test/extended/testdata/builds/webhook/generic/testdata/post-receive-git.json": testExtendedTestdataBuildsWebhookGenericTestdataPostReceiveGitJson,
	"test/extended/testdata/builds/webhook/generic/testdata/push-generic-envs.json": testExtendedTestdataBuildsWebhookGenericTestdataPushGenericEnvsJson,
	"test/extended/testdata/builds/webhook/generic/testdata/push-generic-envs.yaml": testExtendedTestdataBuildsWebhookGenericTestdataPushGenericEnvsYaml,
	"test/extended/testdata/builds/webhook/generic/testdata/push-generic.json": testExtendedTestdataBuildsWebhookGenericTestdataPushGenericJson,
	"test/extended/testdata/builds/webhook/generic/testdata/push-gitlab.json": testExtendedTestdataBuildsWebhookGenericTestdataPushGitlabJson,
	"test/extended/testdata/builds/webhook/github/testdata/pingevent.json": testExtendedTestdataBuildsWebhookGithubTestdataPingeventJson,
	"test/extended/testdata/builds/webhook/github/testdata/pushevent-not-master-branch.json": testExtendedTestdataBuildsWebhookGithubTestdataPusheventNotMasterBranchJson,
	"test/extended/testdata/builds/webhook/github/testdata/pushevent.json": testExtendedTestdataBuildsWebhookGithubTestdataPusheventJson,
	"test/extended/testdata/builds/webhook/gitlab/testdata/pushevent-not-master-branch.json": testExtendedTestdataBuildsWebhookGitlabTestdataPusheventNotMasterBranchJson,
	"test/extended/testdata/builds/webhook/gitlab/testdata/pushevent.json": testExtendedTestdataBuildsWebhookGitlabTestdataPusheventJson,
	"test/extended/testdata/cli/pod-with-two-containers.yaml": testExtendedTestdataCliPodWithTwoContainersYaml,
	"test/extended/testdata/cluster/master-vert.yaml": testExtendedTestdataClusterMasterVertYaml,
	"test/extended/testdata/cluster/quickstarts/cakephp-mysql.json": testExtendedTestdataClusterQuickstartsCakephpMysqlJson,
	"test/extended/testdata/cluster/quickstarts/dancer-mysql.json": testExtendedTestdataClusterQuickstartsDancerMysqlJson,
	"test/extended/testdata/cluster/quickstarts/django-postgresql.json": testExtendedTestdataClusterQuickstartsDjangoPostgresqlJson,
	"test/extended/testdata/cluster/quickstarts/nodejs-mongodb.json": testExtendedTestdataClusterQuickstartsNodejsMongodbJson,
	"test/extended/testdata/cluster/quickstarts/rails-postgresql.json": testExtendedTestdataClusterQuickstartsRailsPostgresqlJson,
	"test/extended/testdata/cmd/hack/lib/cmd.sh": testExtendedTestdataCmdHackLibCmdSh,
	"test/extended/testdata/cmd/hack/lib/compress.awk": testExtendedTestdataCmdHackLibCompressAwk,
	"test/extended/testdata/cmd/hack/lib/constants.sh": testExtendedTestdataCmdHackLibConstantsSh,
	"test/extended/testdata/cmd/hack/lib/init.sh": testExtendedTestdataCmdHackLibInitSh,
	"test/extended/testdata/cmd/hack/lib/log/output.sh": testExtendedTestdataCmdHackLibLogOutputSh,
	"test/extended/testdata/cmd/hack/lib/log/stacktrace.sh": testExtendedTestdataCmdHackLibLogStacktraceSh,
	"test/extended/testdata/cmd/hack/lib/log/system.sh": testExtendedTestdataCmdHackLibLogSystemSh,
	"test/extended/testdata/cmd/hack/lib/test/junit.sh": testExtendedTestdataCmdHackLibTestJunitSh,
	"test/extended/testdata/cmd/hack/lib/util/environment.sh": testExtendedTestdataCmdHackLibUtilEnvironmentSh,
	"test/extended/testdata/cmd/hack/lib/util/misc.sh": testExtendedTestdataCmdHackLibUtilMiscSh,
	"test/extended/testdata/cmd/hack/lib/util/text.sh": testExtendedTestdataCmdHackLibUtilTextSh,
	"test/extended/testdata/cmd/hack/lib/util/trap.sh": testExtendedTestdataCmdHackLibUtilTrapSh,
	"test/extended/testdata/cmd/test/cmd/admin.sh": testExtendedTestdataCmdTestCmdAdminSh,
	"test/extended/testdata/cmd/test/cmd/annotations.sh": testExtendedTestdataCmdTestCmdAnnotationsSh,
	"test/extended/testdata/cmd/test/cmd/apiresources.sh": testExtendedTestdataCmdTestCmdApiresourcesSh,
	"test/extended/testdata/cmd/test/cmd/authentication.sh": testExtendedTestdataCmdTestCmdAuthenticationSh,
	"test/extended/testdata/cmd/test/cmd/basicresources.sh": testExtendedTestdataCmdTestCmdBasicresourcesSh,
	"test/extended/testdata/cmd/test/cmd/builds.sh": testExtendedTestdataCmdTestCmdBuildsSh,
	"test/extended/testdata/cmd/test/cmd/completions.sh": testExtendedTestdataCmdTestCmdCompletionsSh,
	"test/extended/testdata/cmd/test/cmd/config.sh": testExtendedTestdataCmdTestCmdConfigSh,
	"test/extended/testdata/cmd/test/cmd/convert.sh": testExtendedTestdataCmdTestCmdConvertSh,
	"test/extended/testdata/cmd/test/cmd/create.sh": testExtendedTestdataCmdTestCmdCreateSh,
	"test/extended/testdata/cmd/test/cmd/debug.sh": testExtendedTestdataCmdTestCmdDebugSh,
	"test/extended/testdata/cmd/test/cmd/deployments.sh": testExtendedTestdataCmdTestCmdDeploymentsSh,
	"test/extended/testdata/cmd/test/cmd/describer.sh": testExtendedTestdataCmdTestCmdDescriberSh,
	"test/extended/testdata/cmd/test/cmd/edit.sh": testExtendedTestdataCmdTestCmdEditSh,
	"test/extended/testdata/cmd/test/cmd/env.sh": testExtendedTestdataCmdTestCmdEnvSh,
	"test/extended/testdata/cmd/test/cmd/framework-test.sh": testExtendedTestdataCmdTestCmdFrameworkTestSh,
	"test/extended/testdata/cmd/test/cmd/get.sh": testExtendedTestdataCmdTestCmdGetSh,
	"test/extended/testdata/cmd/test/cmd/help.sh": testExtendedTestdataCmdTestCmdHelpSh,
	"test/extended/testdata/cmd/test/cmd/idle.sh": testExtendedTestdataCmdTestCmdIdleSh,
	"test/extended/testdata/cmd/test/cmd/image-lookup.sh": testExtendedTestdataCmdTestCmdImageLookupSh,
	"test/extended/testdata/cmd/test/cmd/images.sh": testExtendedTestdataCmdTestCmdImagesSh,
	"test/extended/testdata/cmd/test/cmd/login.sh": testExtendedTestdataCmdTestCmdLoginSh,
	"test/extended/testdata/cmd/test/cmd/migrate.sh": testExtendedTestdataCmdTestCmdMigrateSh,
	"test/extended/testdata/cmd/test/cmd/newapp.sh": testExtendedTestdataCmdTestCmdNewappSh,
	"test/extended/testdata/cmd/test/cmd/observe.sh": testExtendedTestdataCmdTestCmdObserveSh,
	"test/extended/testdata/cmd/test/cmd/policy-storage-admin.sh": testExtendedTestdataCmdTestCmdPolicyStorageAdminSh,
	"test/extended/testdata/cmd/test/cmd/policy.sh": testExtendedTestdataCmdTestCmdPolicySh,
	"test/extended/testdata/cmd/test/cmd/printer.sh": testExtendedTestdataCmdTestCmdPrinterSh,
	"test/extended/testdata/cmd/test/cmd/projects.sh": testExtendedTestdataCmdTestCmdProjectsSh,
	"test/extended/testdata/cmd/test/cmd/quota.sh": testExtendedTestdataCmdTestCmdQuotaSh,
	"test/extended/testdata/cmd/test/cmd/registry.sh": testExtendedTestdataCmdTestCmdRegistrySh,
	"test/extended/testdata/cmd/test/cmd/routes.sh": testExtendedTestdataCmdTestCmdRoutesSh,
	"test/extended/testdata/cmd/test/cmd/rsync.sh": testExtendedTestdataCmdTestCmdRsyncSh,
	"test/extended/testdata/cmd/test/cmd/run.sh": testExtendedTestdataCmdTestCmdRunSh,
	"test/extended/testdata/cmd/test/cmd/secrets.sh": testExtendedTestdataCmdTestCmdSecretsSh,
	"test/extended/testdata/cmd/test/cmd/services.sh": testExtendedTestdataCmdTestCmdServicesSh,
	"test/extended/testdata/cmd/test/cmd/set-data.sh": testExtendedTestdataCmdTestCmdSetDataSh,
	"test/extended/testdata/cmd/test/cmd/set-image.sh": testExtendedTestdataCmdTestCmdSetImageSh,
	"test/extended/testdata/cmd/test/cmd/set-liveness-probe.sh": testExtendedTestdataCmdTestCmdSetLivenessProbeSh,
	"test/extended/testdata/cmd/test/cmd/setbuildhook.sh": testExtendedTestdataCmdTestCmdSetbuildhookSh,
	"test/extended/testdata/cmd/test/cmd/setbuildsecret.sh": testExtendedTestdataCmdTestCmdSetbuildsecretSh,
	"test/extended/testdata/cmd/test/cmd/status.sh": testExtendedTestdataCmdTestCmdStatusSh,
	"test/extended/testdata/cmd/test/cmd/templates.sh": testExtendedTestdataCmdTestCmdTemplatesSh,
	"test/extended/testdata/cmd/test/cmd/testdata/app-scenarios/docker-compose/complex/app/Dockerfile": testExtendedTestdataCmdTestCmdTestdataAppScenariosDockerComposeComplexAppDockerfile,
	"test/extended/testdata/cmd/test/cmd/testdata/app-scenarios/docker-compose/complex/docker-compose.generated.yaml": testExtendedTestdataCmdTestCmdTestdataAppScenariosDockerComposeComplexDockerComposeGeneratedYaml,
	"test/extended/testdata/cmd/test/cmd/testdata/app-scenarios/docker-compose/complex/docker-compose.imported.yaml": testExtendedTestdataCmdTestCmdTestdataAppScenariosDockerComposeComplexDockerComposeImportedYaml,
	"test/extended/testdata/cmd/test/cmd/testdata/app-scenarios/docker-compose/complex/docker-compose.yml": testExtendedTestdataCmdTestCmdTestdataAppScenariosDockerComposeComplexDockerComposeYml,
	"test/extended/testdata/cmd/test/cmd/testdata/app-scenarios/docker-compose/complex/nginx/Dockerfile": testExtendedTestdataCmdTestCmdTestdataAppScenariosDockerComposeComplexNginxDockerfile,
	"test/extended/testdata/cmd/test/cmd/testdata/app-scenarios/docker-compose/wordpress/docker-compose.yml": testExtendedTestdataCmdTestCmdTestdataAppScenariosDockerComposeWordpressDockerComposeYml,
	"test/extended/testdata/cmd/test/cmd/testdata/app-scenarios/k8s-lonely-pod.json": testExtendedTestdataCmdTestCmdTestdataAppScenariosK8sLonelyPodJson,
	"test/extended/testdata/cmd/test/cmd/testdata/app-scenarios/k8s-sample-app.json": testExtendedTestdataCmdTestCmdTestdataAppScenariosK8sSampleAppJson,
	"test/extended/testdata/cmd/test/cmd/testdata/app-scenarios/k8s-service-pod-no-rc.json": testExtendedTestdataCmdTestCmdTestdataAppScenariosK8sServicePodNoRcJson,
	"test/extended/testdata/cmd/test/cmd/testdata/app-scenarios/k8s-service-with-nothing.json": testExtendedTestdataCmdTestCmdTestdataAppScenariosK8sServiceWithNothingJson,
	"test/extended/testdata/cmd/test/cmd/testdata/app-scenarios/k8s-unserviced-rc.json": testExtendedTestdataCmdTestCmdTestdataAppScenariosK8sUnservicedRcJson,
	"test/extended/testdata/cmd/test/cmd/testdata/app-scenarios/new-project-deployed-app.yaml": testExtendedTestdataCmdTestCmdTestdataAppScenariosNewProjectDeployedAppYaml,
	"test/extended/testdata/cmd/test/cmd/testdata/app-scenarios/new-project-no-build.yaml": testExtendedTestdataCmdTestCmdTestdataAppScenariosNewProjectNoBuildYaml,
	"test/extended/testdata/cmd/test/cmd/testdata/app-scenarios/new-project-one-build.yaml": testExtendedTestdataCmdTestCmdTestdataAppScenariosNewProjectOneBuildYaml,
	"test/extended/testdata/cmd/test/cmd/testdata/app-scenarios/new-project-two-deployment-configs.yaml": testExtendedTestdataCmdTestCmdTestdataAppScenariosNewProjectTwoDeploymentConfigsYaml,
	"test/extended/testdata/cmd/test/cmd/testdata/app-scenarios/petset.yaml": testExtendedTestdataCmdTestCmdTestdataAppScenariosPetsetYaml,
	"test/extended/testdata/cmd/test/cmd/testdata/application-template-custombuild.json": testExtendedTestdataCmdTestCmdTestdataApplicationTemplateCustombuildJson,
	"test/extended/testdata/cmd/test/cmd/testdata/application-template-dockerbuild.json": testExtendedTestdataCmdTestCmdTestdataApplicationTemplateDockerbuildJson,
	"test/extended/testdata/cmd/test/cmd/testdata/application-template-stibuild.json": testExtendedTestdataCmdTestCmdTestdataApplicationTemplateStibuildJson,
	"test/extended/testdata/cmd/test/cmd/testdata/convert/job-v1.yaml": testExtendedTestdataCmdTestCmdTestdataConvertJobV1Yaml,
	"test/extended/testdata/cmd/test/cmd/testdata/convert/job-v2.json": testExtendedTestdataCmdTestCmdTestdataConvertJobV2Json,
	"test/extended/testdata/cmd/test/cmd/testdata/external-service.yaml": testExtendedTestdataCmdTestCmdTestdataExternalServiceYaml,
	"test/extended/testdata/cmd/test/cmd/testdata/hello-openshift/hello-pod.json": testExtendedTestdataCmdTestCmdTestdataHelloOpenshiftHelloPodJson,
	"test/extended/testdata/cmd/test/cmd/testdata/idling-dc.yaml": testExtendedTestdataCmdTestCmdTestdataIdlingDcYaml,
	"test/extended/testdata/cmd/test/cmd/testdata/idling-svc-route.yaml": testExtendedTestdataCmdTestCmdTestdataIdlingSvcRouteYaml,
	"test/extended/testdata/cmd/test/cmd/testdata/image-streams/image-streams-centos7.json": testExtendedTestdataCmdTestCmdTestdataImageStreamsImageStreamsCentos7Json,
	"test/extended/testdata/cmd/test/cmd/testdata/jenkins/jenkins-ephemeral-template.json": testExtendedTestdataCmdTestCmdTestdataJenkinsJenkinsEphemeralTemplateJson,
	"test/extended/testdata/cmd/test/cmd/testdata/mixed-api-versions.yaml": testExtendedTestdataCmdTestCmdTestdataMixedApiVersionsYaml,
	"test/extended/testdata/cmd/test/cmd/testdata/modified-ruby-imagestream.json": testExtendedTestdataCmdTestCmdTestdataModifiedRubyImagestreamJson,
	"test/extended/testdata/cmd/test/cmd/testdata/multiport-service.yaml": testExtendedTestdataCmdTestCmdTestdataMultiportServiceYaml,
	"test/extended/testdata/cmd/test/cmd/testdata/new-app/bc-from-imagestreamimage.json": testExtendedTestdataCmdTestCmdTestdataNewAppBcFromImagestreamimageJson,
	"test/extended/testdata/cmd/test/cmd/testdata/new-app/build-arg-dockerfile/Dockerfile": testExtendedTestdataCmdTestCmdTestdataNewAppBuildArgDockerfileDockerfile,
	"test/extended/testdata/cmd/test/cmd/testdata/new-app/circular-is.yaml": testExtendedTestdataCmdTestCmdTestdataNewAppCircularIsYaml,
	"test/extended/testdata/cmd/test/cmd/testdata/new-app/circular.yaml": testExtendedTestdataCmdTestCmdTestdataNewAppCircularYaml,
	"test/extended/testdata/cmd/test/cmd/testdata/new-app/imagestream-ref.yaml": testExtendedTestdataCmdTestCmdTestdataNewAppImagestreamRefYaml,
	"test/extended/testdata/cmd/test/cmd/testdata/new-app/installable-stream.yaml": testExtendedTestdataCmdTestCmdTestdataNewAppInstallableStreamYaml,
	"test/extended/testdata/cmd/test/cmd/testdata/new-app/invalid-build-strategy.yaml": testExtendedTestdataCmdTestCmdTestdataNewAppInvalidBuildStrategyYaml,
	"test/extended/testdata/cmd/test/cmd/testdata/new-app/invalid.json": testExtendedTestdataCmdTestCmdTestdataNewAppInvalidJson,
	"test/extended/testdata/cmd/test/cmd/testdata/new-app/template-minimal-expose.json": testExtendedTestdataCmdTestCmdTestdataNewAppTemplateMinimalExposeJson,
	"test/extended/testdata/cmd/test/cmd/testdata/new-app/template-with-app-label.json": testExtendedTestdataCmdTestCmdTestdataNewAppTemplateWithAppLabelJson,
	"test/extended/testdata/cmd/test/cmd/testdata/new-app/template-with-crd.yaml": testExtendedTestdataCmdTestCmdTestdataNewAppTemplateWithCrdYaml,
	"test/extended/testdata/cmd/test/cmd/testdata/new-app/template-with-namespaces.json": testExtendedTestdataCmdTestCmdTestdataNewAppTemplateWithNamespacesJson,
	"test/extended/testdata/cmd/test/cmd/testdata/new-app/template-without-app-label.json": testExtendedTestdataCmdTestCmdTestdataNewAppTemplateWithoutAppLabelJson,
	"test/extended/testdata/cmd/test/cmd/testdata/new-app/template_multiple_resource_gvs.yaml": testExtendedTestdataCmdTestCmdTestdataNewAppTemplate_multiple_resource_gvsYaml,
	"test/extended/testdata/cmd/test/cmd/testdata/new-app/test-cmd-newapp-env.env": testExtendedTestdataCmdTestCmdTestdataNewAppTestCmdNewappEnvEnv,
	"test/extended/testdata/cmd/test/cmd/testdata/new-app/test-cmd-newapp-params.env": testExtendedTestdataCmdTestCmdTestdataNewAppTestCmdNewappParamsEnv,
	"test/extended/testdata/cmd/test/cmd/testdata/oauthaccesstoken.yaml": testExtendedTestdataCmdTestCmdTestdataOauthaccesstokenYaml,
	"test/extended/testdata/cmd/test/cmd/testdata/old-template.json": testExtendedTestdataCmdTestCmdTestdataOldTemplateJson,
	"test/extended/testdata/cmd/test/cmd/testdata/resource-builder/directory/json-no-extension-in-directory": testExtendedTestdataCmdTestCmdTestdataResourceBuilderDirectoryJsonNoExtensionInDirectory,
	"test/extended/testdata/cmd/test/cmd/testdata/resource-builder/directory/json-with-extension.json": testExtendedTestdataCmdTestCmdTestdataResourceBuilderDirectoryJsonWithExtensionJson,
	"test/extended/testdata/cmd/test/cmd/testdata/resource-builder/directory/non-api-file": testExtendedTestdataCmdTestCmdTestdataResourceBuilderDirectoryNonApiFile,
	"test/extended/testdata/cmd/test/cmd/testdata/resource-builder/directory/yml-with-extension.yml": testExtendedTestdataCmdTestCmdTestdataResourceBuilderDirectoryYmlWithExtensionYml,
	"test/extended/testdata/cmd/test/cmd/testdata/resource-builder/json-no-extension": testExtendedTestdataCmdTestCmdTestdataResourceBuilderJsonNoExtension,
	"test/extended/testdata/cmd/test/cmd/testdata/resource-builder/yml-no-extension": testExtendedTestdataCmdTestCmdTestdataResourceBuilderYmlNoExtension,
	"test/extended/testdata/cmd/test/cmd/testdata/roles/empty-role.yaml": testExtendedTestdataCmdTestCmdTestdataRolesEmptyRoleYaml,
	"test/extended/testdata/cmd/test/cmd/testdata/roles/policy-clusterroles.yaml": testExtendedTestdataCmdTestCmdTestdataRolesPolicyClusterrolesYaml,
	"test/extended/testdata/cmd/test/cmd/testdata/roles/policy-roles.yaml": testExtendedTestdataCmdTestCmdTestdataRolesPolicyRolesYaml,
	"test/extended/testdata/cmd/test/cmd/testdata/rollingupdate-daemonset.yaml": testExtendedTestdataCmdTestCmdTestdataRollingupdateDaemonsetYaml,
	"test/extended/testdata/cmd/test/cmd/testdata/services.yaml": testExtendedTestdataCmdTestCmdTestdataServicesYaml,
	"test/extended/testdata/cmd/test/cmd/testdata/simple-deployment.yaml": testExtendedTestdataCmdTestCmdTestdataSimpleDeploymentYaml,
	"test/extended/testdata/cmd/test/cmd/testdata/stable-busybox.yaml": testExtendedTestdataCmdTestCmdTestdataStableBusyboxYaml,
	"test/extended/testdata/cmd/test/cmd/testdata/statefulset.yaml": testExtendedTestdataCmdTestCmdTestdataStatefulsetYaml,
	"test/extended/testdata/cmd/test/cmd/testdata/templateinstance_objectkinds.yaml": testExtendedTestdataCmdTestCmdTestdataTemplateinstance_objectkindsYaml,
	"test/extended/testdata/cmd/test/cmd/testdata/templates/basic-users-binding.json": testExtendedTestdataCmdTestCmdTestdataTemplatesBasicUsersBindingJson,
	"test/extended/testdata/cmd/test/cmd/testdata/templates/guestbook.env": testExtendedTestdataCmdTestCmdTestdataTemplatesGuestbookEnv,
	"test/extended/testdata/cmd/test/cmd/testdata/templates/guestbook.json": testExtendedTestdataCmdTestCmdTestdataTemplatesGuestbookJson,
	"test/extended/testdata/cmd/test/cmd/testdata/templates/guestbook_list.json": testExtendedTestdataCmdTestCmdTestdataTemplatesGuestbook_listJson,
	"test/extended/testdata/cmd/test/cmd/testdata/templates/multiline.txt": testExtendedTestdataCmdTestCmdTestdataTemplatesMultilineTxt,
	"test/extended/testdata/cmd/test/cmd/testdata/templates/template-type-precision.json": testExtendedTestdataCmdTestCmdTestdataTemplatesTemplateTypePrecisionJson,
	"test/extended/testdata/cmd/test/cmd/testdata/templates/template_required_params.env": testExtendedTestdataCmdTestCmdTestdataTemplatesTemplate_required_paramsEnv,
	"test/extended/testdata/cmd/test/cmd/testdata/templates/template_required_params.yaml": testExtendedTestdataCmdTestCmdTestdataTemplatesTemplate_required_paramsYaml,
	"test/extended/testdata/cmd/test/cmd/testdata/test-bc.yaml": testExtendedTestdataCmdTestCmdTestdataTestBcYaml,
	"test/extended/testdata/cmd/test/cmd/testdata/test-buildcli.json": testExtendedTestdataCmdTestCmdTestdataTestBuildcliJson,
	"test/extended/testdata/cmd/test/cmd/testdata/test-deployment-config.yaml": testExtendedTestdataCmdTestCmdTestdataTestDeploymentConfigYaml,
	"test/extended/testdata/cmd/test/cmd/testdata/test-docker-build.json": testExtendedTestdataCmdTestCmdTestdataTestDockerBuildJson,
	"test/extended/testdata/cmd/test/cmd/testdata/test-image-stream.json": testExtendedTestdataCmdTestCmdTestdataTestImageStreamJson,
	"test/extended/testdata/cmd/test/cmd/testdata/test-image.json": testExtendedTestdataCmdTestCmdTestdataTestImageJson,
	"test/extended/testdata/cmd/test/cmd/testdata/test-multiarch-stream.yaml": testExtendedTestdataCmdTestCmdTestdataTestMultiarchStreamYaml,
	"test/extended/testdata/cmd/test/cmd/testdata/test-replication-controller.yaml": testExtendedTestdataCmdTestCmdTestdataTestReplicationControllerYaml,
	"test/extended/testdata/cmd/test/cmd/testdata/test-route.json": testExtendedTestdataCmdTestCmdTestdataTestRouteJson,
	"test/extended/testdata/cmd/test/cmd/testdata/test-s2i-build.json": testExtendedTestdataCmdTestCmdTestdataTestS2iBuildJson,
	"test/extended/testdata/cmd/test/cmd/testdata/test-service.json": testExtendedTestdataCmdTestCmdTestdataTestServiceJson,
	"test/extended/testdata/cmd/test/cmd/testdata/test-stream.yaml": testExtendedTestdataCmdTestCmdTestdataTestStreamYaml,
	"test/extended/testdata/cmd/test/cmd/timeout.sh": testExtendedTestdataCmdTestCmdTimeoutSh,
	"test/extended/testdata/cmd/test/cmd/triggers.sh": testExtendedTestdataCmdTestCmdTriggersSh,
	"test/extended/testdata/cmd/test/cmd/volumes.sh": testExtendedTestdataCmdTestCmdVolumesSh,
	"test/extended/testdata/cmd/test/cmd/whoami.sh": testExtendedTestdataCmdTestCmdWhoamiSh,
	"test/extended/testdata/config-map-jenkins-slave-pods.yaml": testExtendedTestdataConfigMapJenkinsSlavePodsYaml,
	"test/extended/testdata/csi/aws-ebs/install-template.yaml": testExtendedTestdataCsiAwsEbsInstallTemplateYaml,
	"test/extended/testdata/csi/aws-ebs/manifest.yaml": testExtendedTestdataCsiAwsEbsManifestYaml,
	"test/extended/testdata/csi/aws-ebs/storageclass.yaml": testExtendedTestdataCsiAwsEbsStorageclassYaml,
	"test/extended/testdata/custom-secret-builder/Dockerfile": testExtendedTestdataCustomSecretBuilderDockerfile,
	"test/extended/testdata/custom-secret-builder/build.sh": testExtendedTestdataCustomSecretBuilderBuildSh,
	"test/extended/testdata/deployments/custom-deployment.yaml": testExtendedTestdataDeploymentsCustomDeploymentYaml,
	"test/extended/testdata/deployments/deployment-example.yaml": testExtendedTestdataDeploymentsDeploymentExampleYaml,
	"test/extended/testdata/deployments/deployment-history-limit.yaml": testExtendedTestdataDeploymentsDeploymentHistoryLimitYaml,
	"test/extended/testdata/deployments/deployment-ignores-deployer.yaml": testExtendedTestdataDeploymentsDeploymentIgnoresDeployerYaml,
	"test/extended/testdata/deployments/deployment-image-resolution-is.yaml": testExtendedTestdataDeploymentsDeploymentImageResolutionIsYaml,
	"test/extended/testdata/deployments/deployment-image-resolution.yaml": testExtendedTestdataDeploymentsDeploymentImageResolutionYaml,
	"test/extended/testdata/deployments/deployment-min-ready-seconds.yaml": testExtendedTestdataDeploymentsDeploymentMinReadySecondsYaml,
	"test/extended/testdata/deployments/deployment-simple.yaml": testExtendedTestdataDeploymentsDeploymentSimpleYaml,
	"test/extended/testdata/deployments/deployment-trigger.yaml": testExtendedTestdataDeploymentsDeploymentTriggerYaml,
	"test/extended/testdata/deployments/deployment-with-ref-env.yaml": testExtendedTestdataDeploymentsDeploymentWithRefEnvYaml,
	"test/extended/testdata/deployments/failing-pre-hook.yaml": testExtendedTestdataDeploymentsFailingPreHookYaml,
	"test/extended/testdata/deployments/generation-test.yaml": testExtendedTestdataDeploymentsGenerationTestYaml,
	"test/extended/testdata/deployments/multi-ict-deployment.yaml": testExtendedTestdataDeploymentsMultiIctDeploymentYaml,
	"test/extended/testdata/deployments/paused-deployment.yaml": testExtendedTestdataDeploymentsPausedDeploymentYaml,
	"test/extended/testdata/deployments/readiness-test.yaml": testExtendedTestdataDeploymentsReadinessTestYaml,
	"test/extended/testdata/deployments/tag-images-deployment.yaml": testExtendedTestdataDeploymentsTagImagesDeploymentYaml,
	"test/extended/testdata/deployments/test-deployment-broken.yaml": testExtendedTestdataDeploymentsTestDeploymentBrokenYaml,
	"test/extended/testdata/deployments/test-deployment-test.yaml": testExtendedTestdataDeploymentsTestDeploymentTestYaml,
	"test/extended/testdata/disaster-recovery/restore-etcd.sh": testExtendedTestdataDisasterRecoveryRestoreEtcdSh,
	"test/extended/testdata/disaster-recovery/rollback-A.yaml": testExtendedTestdataDisasterRecoveryRollbackAYaml,
	"test/extended/testdata/disaster-recovery/rollback-B.yaml": testExtendedTestdataDisasterRecoveryRollbackBYaml,
	"test/extended/testdata/disaster-recovery/ssh-bastion/clusterrole.yaml": testExtendedTestdataDisasterRecoverySshBastionClusterroleYaml,
	"test/extended/testdata/disaster-recovery/ssh-bastion/clusterrolebinding.yaml": testExtendedTestdataDisasterRecoverySshBastionClusterrolebindingYaml,
	"test/extended/testdata/disaster-recovery/ssh-bastion/deployment.yaml": testExtendedTestdataDisasterRecoverySshBastionDeploymentYaml,
	"test/extended/testdata/disaster-recovery/ssh-bastion/namespace.yaml": testExtendedTestdataDisasterRecoverySshBastionNamespaceYaml,
	"test/extended/testdata/disaster-recovery/ssh-bastion/role.yaml": testExtendedTestdataDisasterRecoverySshBastionRoleYaml,
	"test/extended/testdata/disaster-recovery/ssh-bastion/rolebinding.yaml": testExtendedTestdataDisasterRecoverySshBastionRolebindingYaml,
	"test/extended/testdata/disaster-recovery/ssh-bastion/service.yaml": testExtendedTestdataDisasterRecoverySshBastionServiceYaml,
	"test/extended/testdata/disaster-recovery/ssh-bastion/serviceaccount.yaml": testExtendedTestdataDisasterRecoverySshBastionServiceaccountYaml,
	"test/extended/testdata/disaster-recovery/ssh-bastion/sshd_config": testExtendedTestdataDisasterRecoverySshBastionSshd_config,
	"test/extended/testdata/disaster-recovery/update_route_53.py": testExtendedTestdataDisasterRecoveryUpdate_route_53Py,
	"test/extended/testdata/forcepull-test.json": testExtendedTestdataForcepullTestJson,
	"test/extended/testdata/gssapi/config/kubeconfig": testExtendedTestdataGssapiConfigKubeconfig,
	"test/extended/testdata/gssapi/config/oauth_config.json": testExtendedTestdataGssapiConfigOauth_configJson,
	"test/extended/testdata/gssapi/fedora/base/Dockerfile": testExtendedTestdataGssapiFedoraBaseDockerfile,
	"test/extended/testdata/gssapi/fedora/kerberos/Dockerfile": testExtendedTestdataGssapiFedoraKerberosDockerfile,
	"test/extended/testdata/gssapi/fedora/kerberos_configured/Dockerfile": testExtendedTestdataGssapiFedoraKerberos_configuredDockerfile,
	"test/extended/testdata/gssapi/proxy/Dockerfile": testExtendedTestdataGssapiProxyDockerfile,
	"test/extended/testdata/gssapi/proxy/configure.sh": testExtendedTestdataGssapiProxyConfigureSh,
	"test/extended/testdata/gssapi/proxy/gssapiproxy-buildconfig.yaml": testExtendedTestdataGssapiProxyGssapiproxyBuildconfigYaml,
	"test/extended/testdata/gssapi/proxy/gssapiproxy-deploymentconfig.yaml": testExtendedTestdataGssapiProxyGssapiproxyDeploymentconfigYaml,
	"test/extended/testdata/gssapi/proxy/gssapiproxy-imagestream.yaml": testExtendedTestdataGssapiProxyGssapiproxyImagestreamYaml,
	"test/extended/testdata/gssapi/proxy/gssapiproxy-service.yaml": testExtendedTestdataGssapiProxyGssapiproxyServiceYaml,
	"test/extended/testdata/gssapi/proxy/healthz": testExtendedTestdataGssapiProxyHealthz,
	"test/extended/testdata/gssapi/proxy/kadm5.acl": testExtendedTestdataGssapiProxyKadm5Acl,
	"test/extended/testdata/gssapi/proxy/kdc.conf": testExtendedTestdataGssapiProxyKdcConf,
	"test/extended/testdata/gssapi/proxy/krb5.conf": testExtendedTestdataGssapiProxyKrb5Conf,
	"test/extended/testdata/gssapi/proxy/proxy.conf": testExtendedTestdataGssapiProxyProxyConf,
	"test/extended/testdata/gssapi/scripts/gssapi-tests.sh": testExtendedTestdataGssapiScriptsGssapiTestsSh,
	"test/extended/testdata/gssapi/scripts/test-wrapper.sh": testExtendedTestdataGssapiScriptsTestWrapperSh,
	"test/extended/testdata/gssapi/ubuntu/base/Dockerfile": testExtendedTestdataGssapiUbuntuBaseDockerfile,
	"test/extended/testdata/gssapi/ubuntu/kerberos/Dockerfile": testExtendedTestdataGssapiUbuntuKerberosDockerfile,
	"test/extended/testdata/gssapi/ubuntu/kerberos_configured/Dockerfile": testExtendedTestdataGssapiUbuntuKerberos_configuredDockerfile,
	"test/extended/testdata/hello-builder/Dockerfile": testExtendedTestdataHelloBuilderDockerfile,
	"test/extended/testdata/hello-builder/scripts/assemble": testExtendedTestdataHelloBuilderScriptsAssemble,
	"test/extended/testdata/hello-builder/scripts/run": testExtendedTestdataHelloBuilderScriptsRun,
	"test/extended/testdata/idling-echo-server-rc.yaml": testExtendedTestdataIdlingEchoServerRcYaml,
	"test/extended/testdata/idling-echo-server.yaml": testExtendedTestdataIdlingEchoServerYaml,
	"test/extended/testdata/image/deployment-with-annotation-trigger.yaml": testExtendedTestdataImageDeploymentWithAnnotationTriggerYaml,
	"test/extended/testdata/image/test-image.json": testExtendedTestdataImageTestImageJson,
	"test/extended/testdata/image-pull-secrets/dc-with-new-pull-secret.yaml": testExtendedTestdataImagePullSecretsDcWithNewPullSecretYaml,
	"test/extended/testdata/image-pull-secrets/dc-with-old-pull-secret.yaml": testExtendedTestdataImagePullSecretsDcWithOldPullSecretYaml,
	"test/extended/testdata/image-pull-secrets/pod-with-new-pull-secret.yaml": testExtendedTestdataImagePullSecretsPodWithNewPullSecretYaml,
	"test/extended/testdata/image-pull-secrets/pod-with-no-pull-secret.yaml": testExtendedTestdataImagePullSecretsPodWithNoPullSecretYaml,
	"test/extended/testdata/image-pull-secrets/pod-with-old-pull-secret.yaml": testExtendedTestdataImagePullSecretsPodWithOldPullSecretYaml,
	"test/extended/testdata/image_ecosystem/perl-hotdeploy/index.pl": testExtendedTestdataImage_ecosystemPerlHotdeployIndexPl,
	"test/extended/testdata/image_ecosystem/perl-hotdeploy/lib/My/Test.pm": testExtendedTestdataImage_ecosystemPerlHotdeployLibMyTestPm,
	"test/extended/testdata/image_ecosystem/perl-hotdeploy/perl.json": testExtendedTestdataImage_ecosystemPerlHotdeployPerlJson,
	"test/extended/testdata/imagestream-jenkins-slave-pods.yaml": testExtendedTestdataImagestreamJenkinsSlavePodsYaml,
	"test/extended/testdata/imagestreamtag-jenkins-slave-pods.yaml": testExtendedTestdataImagestreamtagJenkinsSlavePodsYaml,
	"test/extended/testdata/jenkins-plugin/build-job-clone.xml": testExtendedTestdataJenkinsPluginBuildJobCloneXml,
	"test/extended/testdata/jenkins-plugin/build-job-slave.xml": testExtendedTestdataJenkinsPluginBuildJobSlaveXml,
	"test/extended/testdata/jenkins-plugin/build-job.xml": testExtendedTestdataJenkinsPluginBuildJobXml,
	"test/extended/testdata/jenkins-plugin/build-with-env-job.xml": testExtendedTestdataJenkinsPluginBuildWithEnvJobXml,
	"test/extended/testdata/jenkins-plugin/build-with-exec-steps.xml": testExtendedTestdataJenkinsPluginBuildWithExecStepsXml,
	"test/extended/testdata/jenkins-plugin/create-job.xml": testExtendedTestdataJenkinsPluginCreateJobXml,
	"test/extended/testdata/jenkins-plugin/delete-job-keys.xml": testExtendedTestdataJenkinsPluginDeleteJobKeysXml,
	"test/extended/testdata/jenkins-plugin/delete-job-labels.xml": testExtendedTestdataJenkinsPluginDeleteJobLabelsXml,
	"test/extended/testdata/jenkins-plugin/delete-job.xml": testExtendedTestdataJenkinsPluginDeleteJobXml,
	"test/extended/testdata/jenkins-plugin/imagestream-scm-dsl-job.xml": testExtendedTestdataJenkinsPluginImagestreamScmDslJobXml,
	"test/extended/testdata/jenkins-plugin/imagestream-scm-job.xml": testExtendedTestdataJenkinsPluginImagestreamScmJobXml,
	"test/extended/testdata/jenkins-plugin/multitag-job.xml": testExtendedTestdataJenkinsPluginMultitagJobXml,
	"test/extended/testdata/jenkins-plugin/multitag-template.json": testExtendedTestdataJenkinsPluginMultitagTemplateJson,
	"test/extended/testdata/jenkins-plugin/shared-resources-template.json": testExtendedTestdataJenkinsPluginSharedResourcesTemplateJson,
	"test/extended/testdata/jenkins-slave-template.yaml": testExtendedTestdataJenkinsSlaveTemplateYaml,
	"test/extended/testdata/jobs/v1.yaml": testExtendedTestdataJobsV1Yaml,
	"test/extended/testdata/ldap/groupsync.sh": testExtendedTestdataLdapGroupsyncSh,
	"test/extended/testdata/ldap/ldapserver-config-cm.yaml": testExtendedTestdataLdapLdapserverConfigCmYaml,
	"test/extended/testdata/ldap/ldapserver-deployment.yaml": testExtendedTestdataLdapLdapserverDeploymentYaml,
	"test/extended/testdata/ldap/ldapserver-scripts-cm.yaml": testExtendedTestdataLdapLdapserverScriptsCmYaml,
	"test/extended/testdata/ldap/ldapserver-service.yaml": testExtendedTestdataLdapLdapserverServiceYaml,
	"test/extended/testdata/long_names/Dockerfile": testExtendedTestdataLong_namesDockerfile,
	"test/extended/testdata/long_names/fixture.json": testExtendedTestdataLong_namesFixtureJson,
	"test/extended/testdata/marketplace/csc/02-csc.yaml": testExtendedTestdataMarketplaceCsc02CscYaml,
	"test/extended/testdata/marketplace/opsrc/02-opsrc.yaml": testExtendedTestdataMarketplaceOpsrc02OpsrcYaml,
	"test/extended/testdata/multi-namespace-pipeline.yaml": testExtendedTestdataMultiNamespacePipelineYaml,
	"test/extended/testdata/multi-namespace-template.yaml": testExtendedTestdataMultiNamespaceTemplateYaml,
	"test/extended/testdata/oauthserver/cabundle-cm.yaml": testExtendedTestdataOauthserverCabundleCmYaml,
	"test/extended/testdata/oauthserver/oauth-network.yaml": testExtendedTestdataOauthserverOauthNetworkYaml,
	"test/extended/testdata/oauthserver/oauth-pod.yaml": testExtendedTestdataOauthserverOauthPodYaml,
	"test/extended/testdata/oauthserver/oauth-sa.yaml": testExtendedTestdataOauthserverOauthSaYaml,
	"test/extended/testdata/olm/etcd-subscription.yaml": testExtendedTestdataOlmEtcdSubscriptionYaml,
	"test/extended/testdata/olm/operatorgroup.yaml": testExtendedTestdataOlmOperatorgroupYaml,
	"test/extended/testdata/openshift-secret-to-jenkins-credential.yaml": testExtendedTestdataOpenshiftSecretToJenkinsCredentialYaml,
	"test/extended/testdata/releases/payload-1/etcd-operator/image-references": testExtendedTestdataReleasesPayload1EtcdOperatorImageReferences,
	"test/extended/testdata/releases/payload-1/etcd-operator/manifest.yaml": testExtendedTestdataReleasesPayload1EtcdOperatorManifestYaml,
	"test/extended/testdata/releases/payload-1/image-registry/10_image-registry_crd.yaml": testExtendedTestdataReleasesPayload1ImageRegistry10_imageRegistry_crdYaml,
	"test/extended/testdata/releases/payload-1/image-registry/image-references": testExtendedTestdataReleasesPayload1ImageRegistryImageReferences,
	"test/extended/testdata/releases/payload-1/image-registry/manifest.yaml": testExtendedTestdataReleasesPayload1ImageRegistryManifestYaml,
	"test/extended/testdata/roles/empty-role.yaml": testExtendedTestdataRolesEmptyRoleYaml,
	"test/extended/testdata/roles/policy-clusterroles.yaml": testExtendedTestdataRolesPolicyClusterrolesYaml,
	"test/extended/testdata/roles/policy-roles.yaml": testExtendedTestdataRolesPolicyRolesYaml,
	"test/extended/testdata/router/ingress.yaml": testExtendedTestdataRouterIngressYaml,
	"test/extended/testdata/router/reencrypt-serving-cert.yaml": testExtendedTestdataRouterReencryptServingCertYaml,
	"test/extended/testdata/router/router-common.yaml": testExtendedTestdataRouterRouterCommonYaml,
	"test/extended/testdata/router/router-config-manager.yaml": testExtendedTestdataRouterRouterConfigManagerYaml,
	"test/extended/testdata/router/router-http-echo-server.yaml": testExtendedTestdataRouterRouterHttpEchoServerYaml,
	"test/extended/testdata/router/router-metrics.yaml": testExtendedTestdataRouterRouterMetricsYaml,
	"test/extended/testdata/router/router-override-domains.yaml": testExtendedTestdataRouterRouterOverrideDomainsYaml,
	"test/extended/testdata/router/router-override.yaml": testExtendedTestdataRouterRouterOverrideYaml,
	"test/extended/testdata/router/router-scoped.yaml": testExtendedTestdataRouterRouterScopedYaml,
	"test/extended/testdata/router/weighted-router.yaml": testExtendedTestdataRouterWeightedRouterYaml,
	"test/extended/testdata/run_policy/parallel-bc.yaml": testExtendedTestdataRun_policyParallelBcYaml,
	"test/extended/testdata/run_policy/serial-bc.yaml": testExtendedTestdataRun_policySerialBcYaml,
	"test/extended/testdata/run_policy/serial-latest-only-bc.yaml": testExtendedTestdataRun_policySerialLatestOnlyBcYaml,
	"test/extended/testdata/s2i-dropcaps/root-access-build.yaml": testExtendedTestdataS2iDropcapsRootAccessBuildYaml,
	"test/extended/testdata/s2i-dropcaps/rootable-ruby/Dockerfile": testExtendedTestdataS2iDropcapsRootableRubyDockerfile,
	"test/extended/testdata/s2i-dropcaps/rootable-ruby/adduser": testExtendedTestdataS2iDropcapsRootableRubyAdduser,
	"test/extended/testdata/s2i-dropcaps/rootable-ruby/assemble": testExtendedTestdataS2iDropcapsRootableRubyAssemble,
	"test/extended/testdata/sample-image-stream.json": testExtendedTestdataSampleImageStreamJson,
	"test/extended/testdata/samplepipeline-withenvs.yaml": testExtendedTestdataSamplepipelineWithenvsYaml,
	"test/extended/testdata/service-serving-cert/nginx-serving-cert.conf": testExtendedTestdataServiceServingCertNginxServingCertConf,
	"test/extended/testdata/signer-buildconfig.yaml": testExtendedTestdataSignerBuildconfigYaml,
	"test/extended/testdata/templates/crunchydata-pod.json": testExtendedTestdataTemplatesCrunchydataPodJson,
	"test/extended/testdata/templates/guestbook.json": testExtendedTestdataTemplatesGuestbookJson,
	"test/extended/testdata/templates/guestbook_list.json": testExtendedTestdataTemplatesGuestbook_listJson,
	"test/extended/testdata/templates/templateinstance_badobject.yaml": testExtendedTestdataTemplatesTemplateinstance_badobjectYaml,
	"test/extended/testdata/templates/templateinstance_objectkinds.yaml": testExtendedTestdataTemplatesTemplateinstance_objectkindsYaml,
	"test/extended/testdata/templates/templateinstance_readiness.yaml": testExtendedTestdataTemplatesTemplateinstance_readinessYaml,
	"test/extended/testdata/templates/templateservicebroker_bind.yaml": testExtendedTestdataTemplatesTemplateservicebroker_bindYaml,
	"test/extended/testdata/test-cli-debug.yaml": testExtendedTestdataTestCliDebugYaml,
	"test/extended/testdata/test-env-pod.json": testExtendedTestdataTestEnvPodJson,
	"test/extended/testdata/test-gitserver.yaml": testExtendedTestdataTestGitserverYaml,
	"test/extended/testdata/test-secret.json": testExtendedTestdataTestSecretJson,
	"test/extended/testdata/verifyservice-pipeline-template.yaml": testExtendedTestdataVerifyservicePipelineTemplateYaml,
	"test/integration/testdata/project-request-template-with-quota.yaml": testIntegrationTestdataProjectRequestTemplateWithQuotaYaml,
	"test/integration/testdata/test-buildcli-beta2.json": testIntegrationTestdataTestBuildcliBeta2Json,
	"test/integration/testdata/test-buildcli.json": testIntegrationTestdataTestBuildcliJson,
	"test/integration/testdata/test-deployment-config.yaml": testIntegrationTestdataTestDeploymentConfigYaml,
	"test/integration/testdata/test-image-stream-mapping.json": testIntegrationTestdataTestImageStreamMappingJson,
	"test/integration/testdata/test-image-stream.json": testIntegrationTestdataTestImageStreamJson,
	"test/integration/testdata/test-image.json": testIntegrationTestdataTestImageJson,
	"test/integration/testdata/test-replication-controller.yaml": testIntegrationTestdataTestReplicationControllerYaml,
	"test/integration/testdata/test-route.json": testIntegrationTestdataTestRouteJson,
	"test/integration/testdata/test-service-with-finalizer.json": testIntegrationTestdataTestServiceWithFinalizerJson,
	"test/integration/testdata/test-service.json": testIntegrationTestdataTestServiceJson,
}

// AssetDir returns the file names below a certain
// directory embedded in the file by go-bindata.
// For example if you run go-bindata on data/... and data contains the
// following hierarchy:
//     data/
//       foo.txt
//       img/
//         a.png
//         b.png
// then AssetDir("data") would return []string{"foo.txt", "img"}
// AssetDir("data/img") would return []string{"a.png", "b.png"}
// AssetDir("foo.txt") and AssetDir("notexist") would return an error
// AssetDir("") will return []string{"data"}.
func AssetDir(name string) ([]string, error) {
	node := _bintree
	if len(name) != 0 {
		cannonicalName := strings.Replace(name, "\\", "/", -1)
		pathList := strings.Split(cannonicalName, "/")
		for _, p := range pathList {
			node = node.Children[p]
			if node == nil {
				return nil, fmt.Errorf("Asset %s not found", name)
			}
		}
	}
	if node.Func != nil {
		return nil, fmt.Errorf("Asset %s not found", name)
	}
	rv := make([]string, 0, len(node.Children))
	for childName := range node.Children {
		rv = append(rv, childName)
	}
	return rv, nil
}

type bintree struct {
	Func     func() (*asset, error)
	Children map[string]*bintree
}
var _bintree = &bintree{nil, map[string]*bintree{
	"examples": &bintree{nil, map[string]*bintree{
		"db-templates": &bintree{nil, map[string]*bintree{
			"mariadb-ephemeral-template.json": &bintree{examplesDbTemplatesMariadbEphemeralTemplateJson, map[string]*bintree{}},
			"mariadb-persistent-template.json": &bintree{examplesDbTemplatesMariadbPersistentTemplateJson, map[string]*bintree{}},
			"mongodb-ephemeral-template.json": &bintree{examplesDbTemplatesMongodbEphemeralTemplateJson, map[string]*bintree{}},
			"mongodb-persistent-template.json": &bintree{examplesDbTemplatesMongodbPersistentTemplateJson, map[string]*bintree{}},
			"mysql-ephemeral-template.json": &bintree{examplesDbTemplatesMysqlEphemeralTemplateJson, map[string]*bintree{}},
			"mysql-persistent-template.json": &bintree{examplesDbTemplatesMysqlPersistentTemplateJson, map[string]*bintree{}},
			"postgresql-ephemeral-template.json": &bintree{examplesDbTemplatesPostgresqlEphemeralTemplateJson, map[string]*bintree{}},
			"postgresql-persistent-template.json": &bintree{examplesDbTemplatesPostgresqlPersistentTemplateJson, map[string]*bintree{}},
			"redis-ephemeral-template.json": &bintree{examplesDbTemplatesRedisEphemeralTemplateJson, map[string]*bintree{}},
			"redis-persistent-template.json": &bintree{examplesDbTemplatesRedisPersistentTemplateJson, map[string]*bintree{}},
		}},
		"hello-openshift": &bintree{nil, map[string]*bintree{
			"Dockerfile": &bintree{examplesHelloOpenshiftDockerfile, map[string]*bintree{}},
			"hello-pod.json": &bintree{examplesHelloOpenshiftHelloPodJson, map[string]*bintree{}},
			"hello-project.json": &bintree{examplesHelloOpenshiftHelloProjectJson, map[string]*bintree{}},
		}},
		"image-streams": &bintree{nil, map[string]*bintree{
			"image-streams-centos7.json": &bintree{examplesImageStreamsImageStreamsCentos7Json, map[string]*bintree{}},
			"image-streams-rhel7.json": &bintree{examplesImageStreamsImageStreamsRhel7Json, map[string]*bintree{}},
		}},
		"jenkins": &bintree{nil, map[string]*bintree{
			"application-template.json": &bintree{examplesJenkinsApplicationTemplateJson, map[string]*bintree{}},
			"jenkins-ephemeral-template.json": &bintree{examplesJenkinsJenkinsEphemeralTemplateJson, map[string]*bintree{}},
			"jenkins-persistent-template.json": &bintree{examplesJenkinsJenkinsPersistentTemplateJson, map[string]*bintree{}},
			"pipeline": &bintree{nil, map[string]*bintree{
				"bluegreen-pipeline.yaml": &bintree{examplesJenkinsPipelineBluegreenPipelineYaml, map[string]*bintree{}},
				"maven-pipeline.yaml": &bintree{examplesJenkinsPipelineMavenPipelineYaml, map[string]*bintree{}},
				"nodejs-sample-pipeline.yaml": &bintree{examplesJenkinsPipelineNodejsSamplePipelineYaml, map[string]*bintree{}},
				"openshift-client-plugin-pipeline.yaml": &bintree{examplesJenkinsPipelineOpenshiftClientPluginPipelineYaml, map[string]*bintree{}},
				"samplepipeline.yaml": &bintree{examplesJenkinsPipelineSamplepipelineYaml, map[string]*bintree{}},
			}},
		}},
		"quickstarts": &bintree{nil, map[string]*bintree{
			"cakephp-mysql-persistent.json": &bintree{examplesQuickstartsCakephpMysqlPersistentJson, map[string]*bintree{}},
			"cakephp-mysql.json": &bintree{examplesQuickstartsCakephpMysqlJson, map[string]*bintree{
				"cakephp-mysql.json": &bintree{examplesQuickstartsCakephpMysqlJsonCakephpMysqlJson, map[string]*bintree{}},
			}},
			"dancer-mysql-persistent.json": &bintree{examplesQuickstartsDancerMysqlPersistentJson, map[string]*bintree{}},
			"dancer-mysql.json": &bintree{examplesQuickstartsDancerMysqlJson, map[string]*bintree{}},
			"django-postgresql-persistent.json": &bintree{examplesQuickstartsDjangoPostgresqlPersistentJson, map[string]*bintree{}},
			"django-postgresql.json": &bintree{examplesQuickstartsDjangoPostgresqlJson, map[string]*bintree{}},
			"dotnet-pgsql-persistent.json": &bintree{examplesQuickstartsDotnetPgsqlPersistentJson, map[string]*bintree{}},
			"dotnet.json": &bintree{examplesQuickstartsDotnetJson, map[string]*bintree{}},
			"httpd.json": &bintree{examplesQuickstartsHttpdJson, map[string]*bintree{}},
			"nginx.json": &bintree{examplesQuickstartsNginxJson, map[string]*bintree{}},
			"nodejs-mongodb-persistent.json": &bintree{examplesQuickstartsNodejsMongodbPersistentJson, map[string]*bintree{}},
			"nodejs-mongodb.json": &bintree{examplesQuickstartsNodejsMongodbJson, map[string]*bintree{}},
			"rails-postgresql-persistent.json": &bintree{examplesQuickstartsRailsPostgresqlPersistentJson, map[string]*bintree{}},
			"rails-postgresql.json": &bintree{examplesQuickstartsRailsPostgresqlJson, map[string]*bintree{}},
		}},
		"sample-app": &bintree{nil, map[string]*bintree{
			"application-template-dockerbuild.json": &bintree{examplesSampleAppApplicationTemplateDockerbuildJson, map[string]*bintree{}},
			"application-template-pullspecbuild.json": &bintree{examplesSampleAppApplicationTemplatePullspecbuildJson, map[string]*bintree{}},
			"application-template-stibuild.json": &bintree{examplesSampleAppApplicationTemplateStibuildJson, map[string]*bintree{}},
			"cleanup.sh": &bintree{examplesSampleAppCleanupSh, map[string]*bintree{}},
			"github-webhook-example.json": &bintree{examplesSampleAppGithubWebhookExampleJson, map[string]*bintree{}},
		}},
	}},
	"test": &bintree{nil, map[string]*bintree{
		"extended": &bintree{nil, map[string]*bintree{
			"testdata": &bintree{nil, map[string]*bintree{
				"aggregator": &bintree{nil, map[string]*bintree{
					"kube-system-auth-reader.yaml": &bintree{testExtendedTestdataAggregatorKubeSystemAuthReaderYaml, map[string]*bintree{}},
					"sample-apiserver-apiservice.yaml": &bintree{testExtendedTestdataAggregatorSampleApiserverApiserviceYaml, map[string]*bintree{}},
					"sample-apiserver-authdelegator.yaml": &bintree{testExtendedTestdataAggregatorSampleApiserverAuthdelegatorYaml, map[string]*bintree{}},
					"sample-apiserver-authreader.yaml": &bintree{testExtendedTestdataAggregatorSampleApiserverAuthreaderYaml, map[string]*bintree{}},
					"sample-apiserver-rc.yaml": &bintree{testExtendedTestdataAggregatorSampleApiserverRcYaml, map[string]*bintree{}},
					"sample-apiserver-sa.yaml": &bintree{testExtendedTestdataAggregatorSampleApiserverSaYaml, map[string]*bintree{}},
					"sample-apiserver-service.yaml": &bintree{testExtendedTestdataAggregatorSampleApiserverServiceYaml, map[string]*bintree{}},
				}},
				"builds": &bintree{nil, map[string]*bintree{
					"application-template-custombuild.json": &bintree{testExtendedTestdataBuildsApplicationTemplateCustombuildJson, map[string]*bintree{}},
					"build-postcommit": &bintree{nil, map[string]*bintree{
						"docker.yaml": &bintree{testExtendedTestdataBuildsBuildPostcommitDockerYaml, map[string]*bintree{}},
						"imagestreams.yaml": &bintree{testExtendedTestdataBuildsBuildPostcommitImagestreamsYaml, map[string]*bintree{}},
						"sti.yaml": &bintree{testExtendedTestdataBuildsBuildPostcommitStiYaml, map[string]*bintree{}},
					}},
					"build-pruning": &bintree{nil, map[string]*bintree{
						"default-group-build-config.yaml": &bintree{testExtendedTestdataBuildsBuildPruningDefaultGroupBuildConfigYaml, map[string]*bintree{}},
						"default-legacy-build-config.yaml": &bintree{testExtendedTestdataBuildsBuildPruningDefaultLegacyBuildConfigYaml, map[string]*bintree{}},
						"errored-build-config.yaml": &bintree{testExtendedTestdataBuildsBuildPruningErroredBuildConfigYaml, map[string]*bintree{}},
						"failed-build-config.yaml": &bintree{testExtendedTestdataBuildsBuildPruningFailedBuildConfigYaml, map[string]*bintree{}},
						"failed-pipeline.yaml": &bintree{testExtendedTestdataBuildsBuildPruningFailedPipelineYaml, map[string]*bintree{}},
						"imagestream.yaml": &bintree{testExtendedTestdataBuildsBuildPruningImagestreamYaml, map[string]*bintree{}},
						"successful-build-config.yaml": &bintree{testExtendedTestdataBuildsBuildPruningSuccessfulBuildConfigYaml, map[string]*bintree{}},
						"successful-pipeline.yaml": &bintree{testExtendedTestdataBuildsBuildPruningSuccessfulPipelineYaml, map[string]*bintree{}},
					}},
					"build-quota": &bintree{nil, map[string]*bintree{
						".s2i": &bintree{nil, map[string]*bintree{
							"bin": &bintree{nil, map[string]*bintree{
								"assemble": &bintree{testExtendedTestdataBuildsBuildQuotaS2iBinAssemble, map[string]*bintree{}},
							}},
						}},
						"Dockerfile": &bintree{testExtendedTestdataBuildsBuildQuotaDockerfile, map[string]*bintree{}},
					}},
					"build-secrets": &bintree{nil, map[string]*bintree{
						"Dockerfile": &bintree{testExtendedTestdataBuildsBuildSecretsDockerfile, map[string]*bintree{}},
						"s2i-binary-dir": &bintree{nil, map[string]*bintree{
							".s2i": &bintree{nil, map[string]*bintree{
								"bin": &bintree{nil, map[string]*bintree{
									"assemble": &bintree{testExtendedTestdataBuildsBuildSecretsS2iBinaryDirS2iBinAssemble, map[string]*bintree{}},
									"run": &bintree{testExtendedTestdataBuildsBuildSecretsS2iBinaryDirS2iBinRun, map[string]*bintree{}},
								}},
							}},
							"Gemfile": &bintree{testExtendedTestdataBuildsBuildSecretsS2iBinaryDirGemfile, map[string]*bintree{}},
							"config.ru": &bintree{testExtendedTestdataBuildsBuildSecretsS2iBinaryDirConfigRu, map[string]*bintree{}},
						}},
						"test-configmap-2.json": &bintree{testExtendedTestdataBuildsBuildSecretsTestConfigmap2Json, map[string]*bintree{}},
						"test-configmap.json": &bintree{testExtendedTestdataBuildsBuildSecretsTestConfigmapJson, map[string]*bintree{}},
						"test-docker-build.json": &bintree{testExtendedTestdataBuildsBuildSecretsTestDockerBuildJson, map[string]*bintree{}},
						"test-is.json": &bintree{testExtendedTestdataBuildsBuildSecretsTestIsJson, map[string]*bintree{}},
						"test-s2i-build.json": &bintree{testExtendedTestdataBuildsBuildSecretsTestS2iBuildJson, map[string]*bintree{}},
						"test-secret-2.json": &bintree{testExtendedTestdataBuildsBuildSecretsTestSecret2Json, map[string]*bintree{}},
						"test-secret.json": &bintree{testExtendedTestdataBuildsBuildSecretsTestSecretJson, map[string]*bintree{}},
					}},
					"build-timing": &bintree{nil, map[string]*bintree{
						"Dockerfile": &bintree{testExtendedTestdataBuildsBuildTimingDockerfile, map[string]*bintree{}},
						"s2i-binary-dir": &bintree{nil, map[string]*bintree{
							".s2i": &bintree{nil, map[string]*bintree{
								"bin": &bintree{nil, map[string]*bintree{
									"assemble": &bintree{testExtendedTestdataBuildsBuildTimingS2iBinaryDirS2iBinAssemble, map[string]*bintree{}},
									"run": &bintree{testExtendedTestdataBuildsBuildTimingS2iBinaryDirS2iBinRun, map[string]*bintree{}},
								}},
							}},
							"Gemfile": &bintree{testExtendedTestdataBuildsBuildTimingS2iBinaryDirGemfile, map[string]*bintree{}},
							"config.ru": &bintree{testExtendedTestdataBuildsBuildTimingS2iBinaryDirConfigRu, map[string]*bintree{}},
						}},
						"test-docker-build.json": &bintree{testExtendedTestdataBuildsBuildTimingTestDockerBuildJson, map[string]*bintree{}},
						"test-is.json": &bintree{testExtendedTestdataBuildsBuildTimingTestIsJson, map[string]*bintree{}},
						"test-s2i-build.json": &bintree{testExtendedTestdataBuildsBuildTimingTestS2iBuildJson, map[string]*bintree{}},
					}},
					"cluster-config": &bintree{nil, map[string]*bintree{
						"invalid-build-cluster-config.yaml": &bintree{testExtendedTestdataBuildsClusterConfigInvalidBuildClusterConfigYaml, map[string]*bintree{}},
						"registry-blacklist.yaml": &bintree{testExtendedTestdataBuildsClusterConfigRegistryBlacklistYaml, map[string]*bintree{}},
						"registry-whitelist.yaml": &bintree{testExtendedTestdataBuildsClusterConfigRegistryWhitelistYaml, map[string]*bintree{}},
					}},
					"cluster-config.yaml": &bintree{testExtendedTestdataBuildsClusterConfigYaml, map[string]*bintree{}},
					"custom-build": &bintree{nil, map[string]*bintree{
						"Dockerfile": &bintree{testExtendedTestdataBuildsCustomBuildDockerfile, map[string]*bintree{}},
						"Dockerfile.sample": &bintree{testExtendedTestdataBuildsCustomBuildDockerfileSample, map[string]*bintree{}},
						"build.sh": &bintree{testExtendedTestdataBuildsCustomBuildBuildSh, map[string]*bintree{}},
					}},
					"docker-add": &bintree{nil, map[string]*bintree{
						"Dockerfile": &bintree{testExtendedTestdataBuildsDockerAddDockerfile, map[string]*bintree{}},
					}},
					"incremental-auth-build.json": &bintree{testExtendedTestdataBuildsIncrementalAuthBuildJson, map[string]*bintree{}},
					"pullsecret": &bintree{nil, map[string]*bintree{
						"linked-nodejs-bc.yaml": &bintree{testExtendedTestdataBuildsPullsecretLinkedNodejsBcYaml, map[string]*bintree{}},
						"pullsecret-nodejs-bc.yaml": &bintree{testExtendedTestdataBuildsPullsecretPullsecretNodejsBcYaml, map[string]*bintree{}},
					}},
					"s2i-environment-build-app": &bintree{nil, map[string]*bintree{
						".s2i": &bintree{nil, map[string]*bintree{
							"environment": &bintree{testExtendedTestdataBuildsS2iEnvironmentBuildAppS2iEnvironment, map[string]*bintree{}},
						}},
						"Gemfile": &bintree{testExtendedTestdataBuildsS2iEnvironmentBuildAppGemfile, map[string]*bintree{}},
						"config.ru": &bintree{testExtendedTestdataBuildsS2iEnvironmentBuildAppConfigRu, map[string]*bintree{}},
					}},
					"statusfail-assemble": &bintree{nil, map[string]*bintree{
						".s2i": &bintree{nil, map[string]*bintree{
							"bin": &bintree{nil, map[string]*bintree{
								"assemble": &bintree{testExtendedTestdataBuildsStatusfailAssembleS2iBinAssemble, map[string]*bintree{}},
							}},
						}},
					}},
					"statusfail-badcontextdirs2i.yaml": &bintree{testExtendedTestdataBuildsStatusfailBadcontextdirs2iYaml, map[string]*bintree{}},
					"statusfail-failedassemble.yaml": &bintree{testExtendedTestdataBuildsStatusfailFailedassembleYaml, map[string]*bintree{}},
					"statusfail-fetchbuilderimage.yaml": &bintree{testExtendedTestdataBuildsStatusfailFetchbuilderimageYaml, map[string]*bintree{}},
					"statusfail-fetchsourcedocker.yaml": &bintree{testExtendedTestdataBuildsStatusfailFetchsourcedockerYaml, map[string]*bintree{}},
					"statusfail-fetchsources2i.yaml": &bintree{testExtendedTestdataBuildsStatusfailFetchsources2iYaml, map[string]*bintree{}},
					"statusfail-genericreason.yaml": &bintree{testExtendedTestdataBuildsStatusfailGenericreasonYaml, map[string]*bintree{}},
					"statusfail-oomkilled.yaml": &bintree{testExtendedTestdataBuildsStatusfailOomkilledYaml, map[string]*bintree{}},
					"statusfail-postcommithook.yaml": &bintree{testExtendedTestdataBuildsStatusfailPostcommithookYaml, map[string]*bintree{}},
					"statusfail-pushtoregistry.yaml": &bintree{testExtendedTestdataBuildsStatusfailPushtoregistryYaml, map[string]*bintree{}},
					"test-auth-build.yaml": &bintree{testExtendedTestdataBuildsTestAuthBuildYaml, map[string]*bintree{}},
					"test-bc-with-pr-ref.yaml": &bintree{testExtendedTestdataBuildsTestBcWithPrRefYaml, map[string]*bintree{}},
					"test-build-app": &bintree{nil, map[string]*bintree{
						"Dockerfile": &bintree{testExtendedTestdataBuildsTestBuildAppDockerfile, map[string]*bintree{}},
						"Gemfile": &bintree{testExtendedTestdataBuildsTestBuildAppGemfile, map[string]*bintree{}},
						"config.ru": &bintree{testExtendedTestdataBuildsTestBuildAppConfigRu, map[string]*bintree{}},
					}},
					"test-build-cluster-config.yaml": &bintree{testExtendedTestdataBuildsTestBuildClusterConfigYaml, map[string]*bintree{}},
					"test-build-podsvc.json": &bintree{testExtendedTestdataBuildsTestBuildPodsvcJson, map[string]*bintree{}},
					"test-build-proxy.yaml": &bintree{testExtendedTestdataBuildsTestBuildProxyYaml, map[string]*bintree{}},
					"test-build-revision.json": &bintree{testExtendedTestdataBuildsTestBuildRevisionJson, map[string]*bintree{}},
					"test-build.yaml": &bintree{testExtendedTestdataBuildsTestBuildYaml, map[string]*bintree{}},
					"test-buildconfigsecretinjector.yaml": &bintree{testExtendedTestdataBuildsTestBuildconfigsecretinjectorYaml, map[string]*bintree{}},
					"test-cds-dockerbuild.json": &bintree{testExtendedTestdataBuildsTestCdsDockerbuildJson, map[string]*bintree{}},
					"test-cds-sourcebuild.json": &bintree{testExtendedTestdataBuildsTestCdsSourcebuildJson, map[string]*bintree{}},
					"test-context-build.json": &bintree{testExtendedTestdataBuildsTestContextBuildJson, map[string]*bintree{}},
					"test-custom-build.yaml": &bintree{testExtendedTestdataBuildsTestCustomBuildYaml, map[string]*bintree{}},
					"test-docker-app": &bintree{nil, map[string]*bintree{
						"Dockerfile": &bintree{testExtendedTestdataBuildsTestDockerAppDockerfile, map[string]*bintree{}},
					}},
					"test-docker-build-pullsecret.json": &bintree{testExtendedTestdataBuildsTestDockerBuildPullsecretJson, map[string]*bintree{}},
					"test-docker-build.json": &bintree{testExtendedTestdataBuildsTestDockerBuildJson, map[string]*bintree{}},
					"test-docker-no-outputname.json": &bintree{testExtendedTestdataBuildsTestDockerNoOutputnameJson, map[string]*bintree{}},
					"test-env-build.json": &bintree{testExtendedTestdataBuildsTestEnvBuildJson, map[string]*bintree{}},
					"test-imagechangetriggers.yaml": &bintree{testExtendedTestdataBuildsTestImagechangetriggersYaml, map[string]*bintree{}},
					"test-imageresolution-custom-build.yaml": &bintree{testExtendedTestdataBuildsTestImageresolutionCustomBuildYaml, map[string]*bintree{}},
					"test-imageresolution-docker-build.yaml": &bintree{testExtendedTestdataBuildsTestImageresolutionDockerBuildYaml, map[string]*bintree{}},
					"test-imageresolution-s2i-build.yaml": &bintree{testExtendedTestdataBuildsTestImageresolutionS2iBuildYaml, map[string]*bintree{}},
					"test-imagesource-buildconfig.yaml": &bintree{testExtendedTestdataBuildsTestImagesourceBuildconfigYaml, map[string]*bintree{}},
					"test-nosrc-build.json": &bintree{testExtendedTestdataBuildsTestNosrcBuildJson, map[string]*bintree{}},
					"test-s2i-build-quota.json": &bintree{testExtendedTestdataBuildsTestS2iBuildQuotaJson, map[string]*bintree{}},
					"test-s2i-build.json": &bintree{testExtendedTestdataBuildsTestS2iBuildJson, map[string]*bintree{}},
					"test-s2i-no-outputname.json": &bintree{testExtendedTestdataBuildsTestS2iNoOutputnameJson, map[string]*bintree{}},
					"test-symlink-build.yaml": &bintree{testExtendedTestdataBuildsTestSymlinkBuildYaml, map[string]*bintree{}},
					"valuefrom": &bintree{nil, map[string]*bintree{
						"failed-docker-build-value-from-config.yaml": &bintree{testExtendedTestdataBuildsValuefromFailedDockerBuildValueFromConfigYaml, map[string]*bintree{}},
						"failed-sti-build-value-from-config.yaml": &bintree{testExtendedTestdataBuildsValuefromFailedStiBuildValueFromConfigYaml, map[string]*bintree{}},
						"successful-docker-build-value-from-config.yaml": &bintree{testExtendedTestdataBuildsValuefromSuccessfulDockerBuildValueFromConfigYaml, map[string]*bintree{}},
						"successful-sti-build-value-from-config.yaml": &bintree{testExtendedTestdataBuildsValuefromSuccessfulStiBuildValueFromConfigYaml, map[string]*bintree{}},
						"test-configmap.yaml": &bintree{testExtendedTestdataBuildsValuefromTestConfigmapYaml, map[string]*bintree{}},
						"test-is.json": &bintree{testExtendedTestdataBuildsValuefromTestIsJson, map[string]*bintree{}},
						"test-secret.yaml": &bintree{testExtendedTestdataBuildsValuefromTestSecretYaml, map[string]*bintree{}},
					}},
					"webhook": &bintree{nil, map[string]*bintree{
						"bitbucket": &bintree{nil, map[string]*bintree{
							"testdata": &bintree{nil, map[string]*bintree{
								"pushevent-not-master.json": &bintree{testExtendedTestdataBuildsWebhookBitbucketTestdataPusheventNotMasterJson, map[string]*bintree{}},
								"pushevent.json": &bintree{testExtendedTestdataBuildsWebhookBitbucketTestdataPusheventJson, map[string]*bintree{}},
								"pushevent54-not-master.json": &bintree{testExtendedTestdataBuildsWebhookBitbucketTestdataPushevent54NotMasterJson, map[string]*bintree{}},
								"pushevent54.json": &bintree{testExtendedTestdataBuildsWebhookBitbucketTestdataPushevent54Json, map[string]*bintree{}},
							}},
						}},
						"generic": &bintree{nil, map[string]*bintree{
							"testdata": &bintree{nil, map[string]*bintree{
								"post-receive-git.json": &bintree{testExtendedTestdataBuildsWebhookGenericTestdataPostReceiveGitJson, map[string]*bintree{}},
								"push-generic-envs.json": &bintree{testExtendedTestdataBuildsWebhookGenericTestdataPushGenericEnvsJson, map[string]*bintree{}},
								"push-generic-envs.yaml": &bintree{testExtendedTestdataBuildsWebhookGenericTestdataPushGenericEnvsYaml, map[string]*bintree{}},
								"push-generic.json": &bintree{testExtendedTestdataBuildsWebhookGenericTestdataPushGenericJson, map[string]*bintree{}},
								"push-gitlab.json": &bintree{testExtendedTestdataBuildsWebhookGenericTestdataPushGitlabJson, map[string]*bintree{}},
							}},
						}},
						"github": &bintree{nil, map[string]*bintree{
							"testdata": &bintree{nil, map[string]*bintree{
								"pingevent.json": &bintree{testExtendedTestdataBuildsWebhookGithubTestdataPingeventJson, map[string]*bintree{}},
								"pushevent-not-master-branch.json": &bintree{testExtendedTestdataBuildsWebhookGithubTestdataPusheventNotMasterBranchJson, map[string]*bintree{}},
								"pushevent.json": &bintree{testExtendedTestdataBuildsWebhookGithubTestdataPusheventJson, map[string]*bintree{}},
							}},
						}},
						"gitlab": &bintree{nil, map[string]*bintree{
							"testdata": &bintree{nil, map[string]*bintree{
								"pushevent-not-master-branch.json": &bintree{testExtendedTestdataBuildsWebhookGitlabTestdataPusheventNotMasterBranchJson, map[string]*bintree{}},
								"pushevent.json": &bintree{testExtendedTestdataBuildsWebhookGitlabTestdataPusheventJson, map[string]*bintree{}},
							}},
						}},
					}},
				}},
				"cli": &bintree{nil, map[string]*bintree{
					"pod-with-two-containers.yaml": &bintree{testExtendedTestdataCliPodWithTwoContainersYaml, map[string]*bintree{}},
				}},
				"cluster": &bintree{nil, map[string]*bintree{
					"master-vert.yaml": &bintree{testExtendedTestdataClusterMasterVertYaml, map[string]*bintree{}},
					"quickstarts": &bintree{nil, map[string]*bintree{
						"cakephp-mysql.json": &bintree{testExtendedTestdataClusterQuickstartsCakephpMysqlJson, map[string]*bintree{}},
						"dancer-mysql.json": &bintree{testExtendedTestdataClusterQuickstartsDancerMysqlJson, map[string]*bintree{}},
						"django-postgresql.json": &bintree{testExtendedTestdataClusterQuickstartsDjangoPostgresqlJson, map[string]*bintree{}},
						"nodejs-mongodb.json": &bintree{testExtendedTestdataClusterQuickstartsNodejsMongodbJson, map[string]*bintree{}},
						"rails-postgresql.json": &bintree{testExtendedTestdataClusterQuickstartsRailsPostgresqlJson, map[string]*bintree{}},
					}},
				}},
				"cmd": &bintree{nil, map[string]*bintree{
					"hack": &bintree{nil, map[string]*bintree{
						"lib": &bintree{nil, map[string]*bintree{
							"cmd.sh": &bintree{testExtendedTestdataCmdHackLibCmdSh, map[string]*bintree{}},
							"compress.awk": &bintree{testExtendedTestdataCmdHackLibCompressAwk, map[string]*bintree{}},
							"constants.sh": &bintree{testExtendedTestdataCmdHackLibConstantsSh, map[string]*bintree{}},
							"init.sh": &bintree{testExtendedTestdataCmdHackLibInitSh, map[string]*bintree{}},
							"log": &bintree{nil, map[string]*bintree{
								"output.sh": &bintree{testExtendedTestdataCmdHackLibLogOutputSh, map[string]*bintree{}},
								"stacktrace.sh": &bintree{testExtendedTestdataCmdHackLibLogStacktraceSh, map[string]*bintree{}},
								"system.sh": &bintree{testExtendedTestdataCmdHackLibLogSystemSh, map[string]*bintree{}},
							}},
							"test": &bintree{nil, map[string]*bintree{
								"junit.sh": &bintree{testExtendedTestdataCmdHackLibTestJunitSh, map[string]*bintree{}},
							}},
							"util": &bintree{nil, map[string]*bintree{
								"environment.sh": &bintree{testExtendedTestdataCmdHackLibUtilEnvironmentSh, map[string]*bintree{}},
								"misc.sh": &bintree{testExtendedTestdataCmdHackLibUtilMiscSh, map[string]*bintree{}},
								"text.sh": &bintree{testExtendedTestdataCmdHackLibUtilTextSh, map[string]*bintree{}},
								"trap.sh": &bintree{testExtendedTestdataCmdHackLibUtilTrapSh, map[string]*bintree{}},
							}},
						}},
					}},
					"test": &bintree{nil, map[string]*bintree{
						"cmd": &bintree{nil, map[string]*bintree{
							"admin.sh": &bintree{testExtendedTestdataCmdTestCmdAdminSh, map[string]*bintree{}},
							"annotations.sh": &bintree{testExtendedTestdataCmdTestCmdAnnotationsSh, map[string]*bintree{}},
							"apiresources.sh": &bintree{testExtendedTestdataCmdTestCmdApiresourcesSh, map[string]*bintree{}},
							"authentication.sh": &bintree{testExtendedTestdataCmdTestCmdAuthenticationSh, map[string]*bintree{}},
							"basicresources.sh": &bintree{testExtendedTestdataCmdTestCmdBasicresourcesSh, map[string]*bintree{}},
							"builds.sh": &bintree{testExtendedTestdataCmdTestCmdBuildsSh, map[string]*bintree{}},
							"completions.sh": &bintree{testExtendedTestdataCmdTestCmdCompletionsSh, map[string]*bintree{}},
							"config.sh": &bintree{testExtendedTestdataCmdTestCmdConfigSh, map[string]*bintree{}},
							"convert.sh": &bintree{testExtendedTestdataCmdTestCmdConvertSh, map[string]*bintree{}},
							"create.sh": &bintree{testExtendedTestdataCmdTestCmdCreateSh, map[string]*bintree{}},
							"debug.sh": &bintree{testExtendedTestdataCmdTestCmdDebugSh, map[string]*bintree{}},
							"deployments.sh": &bintree{testExtendedTestdataCmdTestCmdDeploymentsSh, map[string]*bintree{}},
							"describer.sh": &bintree{testExtendedTestdataCmdTestCmdDescriberSh, map[string]*bintree{}},
							"edit.sh": &bintree{testExtendedTestdataCmdTestCmdEditSh, map[string]*bintree{}},
							"env.sh": &bintree{testExtendedTestdataCmdTestCmdEnvSh, map[string]*bintree{}},
							"framework-test.sh": &bintree{testExtendedTestdataCmdTestCmdFrameworkTestSh, map[string]*bintree{}},
							"get.sh": &bintree{testExtendedTestdataCmdTestCmdGetSh, map[string]*bintree{}},
							"help.sh": &bintree{testExtendedTestdataCmdTestCmdHelpSh, map[string]*bintree{}},
							"idle.sh": &bintree{testExtendedTestdataCmdTestCmdIdleSh, map[string]*bintree{}},
							"image-lookup.sh": &bintree{testExtendedTestdataCmdTestCmdImageLookupSh, map[string]*bintree{}},
							"images.sh": &bintree{testExtendedTestdataCmdTestCmdImagesSh, map[string]*bintree{}},
							"login.sh": &bintree{testExtendedTestdataCmdTestCmdLoginSh, map[string]*bintree{}},
							"migrate.sh": &bintree{testExtendedTestdataCmdTestCmdMigrateSh, map[string]*bintree{}},
							"newapp.sh": &bintree{testExtendedTestdataCmdTestCmdNewappSh, map[string]*bintree{}},
							"observe.sh": &bintree{testExtendedTestdataCmdTestCmdObserveSh, map[string]*bintree{}},
							"policy-storage-admin.sh": &bintree{testExtendedTestdataCmdTestCmdPolicyStorageAdminSh, map[string]*bintree{}},
							"policy.sh": &bintree{testExtendedTestdataCmdTestCmdPolicySh, map[string]*bintree{}},
							"printer.sh": &bintree{testExtendedTestdataCmdTestCmdPrinterSh, map[string]*bintree{}},
							"projects.sh": &bintree{testExtendedTestdataCmdTestCmdProjectsSh, map[string]*bintree{}},
							"quota.sh": &bintree{testExtendedTestdataCmdTestCmdQuotaSh, map[string]*bintree{}},
							"registry.sh": &bintree{testExtendedTestdataCmdTestCmdRegistrySh, map[string]*bintree{}},
							"routes.sh": &bintree{testExtendedTestdataCmdTestCmdRoutesSh, map[string]*bintree{}},
							"rsync.sh": &bintree{testExtendedTestdataCmdTestCmdRsyncSh, map[string]*bintree{}},
							"run.sh": &bintree{testExtendedTestdataCmdTestCmdRunSh, map[string]*bintree{}},
							"secrets.sh": &bintree{testExtendedTestdataCmdTestCmdSecretsSh, map[string]*bintree{}},
							"services.sh": &bintree{testExtendedTestdataCmdTestCmdServicesSh, map[string]*bintree{}},
							"set-data.sh": &bintree{testExtendedTestdataCmdTestCmdSetDataSh, map[string]*bintree{}},
							"set-image.sh": &bintree{testExtendedTestdataCmdTestCmdSetImageSh, map[string]*bintree{}},
							"set-liveness-probe.sh": &bintree{testExtendedTestdataCmdTestCmdSetLivenessProbeSh, map[string]*bintree{}},
							"setbuildhook.sh": &bintree{testExtendedTestdataCmdTestCmdSetbuildhookSh, map[string]*bintree{}},
							"setbuildsecret.sh": &bintree{testExtendedTestdataCmdTestCmdSetbuildsecretSh, map[string]*bintree{}},
							"status.sh": &bintree{testExtendedTestdataCmdTestCmdStatusSh, map[string]*bintree{}},
							"templates.sh": &bintree{testExtendedTestdataCmdTestCmdTemplatesSh, map[string]*bintree{}},
							"testdata": &bintree{nil, map[string]*bintree{
								"app-scenarios": &bintree{nil, map[string]*bintree{
									"docker-compose": &bintree{nil, map[string]*bintree{
										"complex": &bintree{nil, map[string]*bintree{
											"app": &bintree{nil, map[string]*bintree{
												"Dockerfile": &bintree{testExtendedTestdataCmdTestCmdTestdataAppScenariosDockerComposeComplexAppDockerfile, map[string]*bintree{}},
											}},
											"docker-compose.generated.yaml": &bintree{testExtendedTestdataCmdTestCmdTestdataAppScenariosDockerComposeComplexDockerComposeGeneratedYaml, map[string]*bintree{}},
											"docker-compose.imported.yaml": &bintree{testExtendedTestdataCmdTestCmdTestdataAppScenariosDockerComposeComplexDockerComposeImportedYaml, map[string]*bintree{}},
											"docker-compose.yml": &bintree{testExtendedTestdataCmdTestCmdTestdataAppScenariosDockerComposeComplexDockerComposeYml, map[string]*bintree{}},
											"nginx": &bintree{nil, map[string]*bintree{
												"Dockerfile": &bintree{testExtendedTestdataCmdTestCmdTestdataAppScenariosDockerComposeComplexNginxDockerfile, map[string]*bintree{}},
											}},
										}},
										"wordpress": &bintree{nil, map[string]*bintree{
											"docker-compose.yml": &bintree{testExtendedTestdataCmdTestCmdTestdataAppScenariosDockerComposeWordpressDockerComposeYml, map[string]*bintree{}},
										}},
									}},
									"k8s-lonely-pod.json": &bintree{testExtendedTestdataCmdTestCmdTestdataAppScenariosK8sLonelyPodJson, map[string]*bintree{}},
									"k8s-sample-app.json": &bintree{testExtendedTestdataCmdTestCmdTestdataAppScenariosK8sSampleAppJson, map[string]*bintree{}},
									"k8s-service-pod-no-rc.json": &bintree{testExtendedTestdataCmdTestCmdTestdataAppScenariosK8sServicePodNoRcJson, map[string]*bintree{}},
									"k8s-service-with-nothing.json": &bintree{testExtendedTestdataCmdTestCmdTestdataAppScenariosK8sServiceWithNothingJson, map[string]*bintree{}},
									"k8s-unserviced-rc.json": &bintree{testExtendedTestdataCmdTestCmdTestdataAppScenariosK8sUnservicedRcJson, map[string]*bintree{}},
									"new-project-deployed-app.yaml": &bintree{testExtendedTestdataCmdTestCmdTestdataAppScenariosNewProjectDeployedAppYaml, map[string]*bintree{}},
									"new-project-no-build.yaml": &bintree{testExtendedTestdataCmdTestCmdTestdataAppScenariosNewProjectNoBuildYaml, map[string]*bintree{}},
									"new-project-one-build.yaml": &bintree{testExtendedTestdataCmdTestCmdTestdataAppScenariosNewProjectOneBuildYaml, map[string]*bintree{}},
									"new-project-two-deployment-configs.yaml": &bintree{testExtendedTestdataCmdTestCmdTestdataAppScenariosNewProjectTwoDeploymentConfigsYaml, map[string]*bintree{}},
									"petset.yaml": &bintree{testExtendedTestdataCmdTestCmdTestdataAppScenariosPetsetYaml, map[string]*bintree{}},
								}},
								"application-template-custombuild.json": &bintree{testExtendedTestdataCmdTestCmdTestdataApplicationTemplateCustombuildJson, map[string]*bintree{}},
								"application-template-dockerbuild.json": &bintree{testExtendedTestdataCmdTestCmdTestdataApplicationTemplateDockerbuildJson, map[string]*bintree{}},
								"application-template-stibuild.json": &bintree{testExtendedTestdataCmdTestCmdTestdataApplicationTemplateStibuildJson, map[string]*bintree{}},
								"convert": &bintree{nil, map[string]*bintree{
									"job-v1.yaml": &bintree{testExtendedTestdataCmdTestCmdTestdataConvertJobV1Yaml, map[string]*bintree{}},
									"job-v2.json": &bintree{testExtendedTestdataCmdTestCmdTestdataConvertJobV2Json, map[string]*bintree{}},
								}},
								"external-service.yaml": &bintree{testExtendedTestdataCmdTestCmdTestdataExternalServiceYaml, map[string]*bintree{}},
								"hello-openshift": &bintree{nil, map[string]*bintree{
									"hello-pod.json": &bintree{testExtendedTestdataCmdTestCmdTestdataHelloOpenshiftHelloPodJson, map[string]*bintree{}},
								}},
								"idling-dc.yaml": &bintree{testExtendedTestdataCmdTestCmdTestdataIdlingDcYaml, map[string]*bintree{}},
								"idling-svc-route.yaml": &bintree{testExtendedTestdataCmdTestCmdTestdataIdlingSvcRouteYaml, map[string]*bintree{}},
								"image-streams": &bintree{nil, map[string]*bintree{
									"image-streams-centos7.json": &bintree{testExtendedTestdataCmdTestCmdTestdataImageStreamsImageStreamsCentos7Json, map[string]*bintree{}},
								}},
								"jenkins": &bintree{nil, map[string]*bintree{
									"jenkins-ephemeral-template.json": &bintree{testExtendedTestdataCmdTestCmdTestdataJenkinsJenkinsEphemeralTemplateJson, map[string]*bintree{}},
								}},
								"mixed-api-versions.yaml": &bintree{testExtendedTestdataCmdTestCmdTestdataMixedApiVersionsYaml, map[string]*bintree{}},
								"modified-ruby-imagestream.json": &bintree{testExtendedTestdataCmdTestCmdTestdataModifiedRubyImagestreamJson, map[string]*bintree{}},
								"multiport-service.yaml": &bintree{testExtendedTestdataCmdTestCmdTestdataMultiportServiceYaml, map[string]*bintree{}},
								"new-app": &bintree{nil, map[string]*bintree{
									"bc-from-imagestreamimage.json": &bintree{testExtendedTestdataCmdTestCmdTestdataNewAppBcFromImagestreamimageJson, map[string]*bintree{}},
									"build-arg-dockerfile": &bintree{nil, map[string]*bintree{
										"Dockerfile": &bintree{testExtendedTestdataCmdTestCmdTestdataNewAppBuildArgDockerfileDockerfile, map[string]*bintree{}},
									}},
									"circular-is.yaml": &bintree{testExtendedTestdataCmdTestCmdTestdataNewAppCircularIsYaml, map[string]*bintree{}},
									"circular.yaml": &bintree{testExtendedTestdataCmdTestCmdTestdataNewAppCircularYaml, map[string]*bintree{}},
									"imagestream-ref.yaml": &bintree{testExtendedTestdataCmdTestCmdTestdataNewAppImagestreamRefYaml, map[string]*bintree{}},
									"installable-stream.yaml": &bintree{testExtendedTestdataCmdTestCmdTestdataNewAppInstallableStreamYaml, map[string]*bintree{}},
									"invalid-build-strategy.yaml": &bintree{testExtendedTestdataCmdTestCmdTestdataNewAppInvalidBuildStrategyYaml, map[string]*bintree{}},
									"invalid.json": &bintree{testExtendedTestdataCmdTestCmdTestdataNewAppInvalidJson, map[string]*bintree{}},
									"template-minimal-expose.json": &bintree{testExtendedTestdataCmdTestCmdTestdataNewAppTemplateMinimalExposeJson, map[string]*bintree{}},
									"template-with-app-label.json": &bintree{testExtendedTestdataCmdTestCmdTestdataNewAppTemplateWithAppLabelJson, map[string]*bintree{}},
									"template-with-crd.yaml": &bintree{testExtendedTestdataCmdTestCmdTestdataNewAppTemplateWithCrdYaml, map[string]*bintree{}},
									"template-with-namespaces.json": &bintree{testExtendedTestdataCmdTestCmdTestdataNewAppTemplateWithNamespacesJson, map[string]*bintree{}},
									"template-without-app-label.json": &bintree{testExtendedTestdataCmdTestCmdTestdataNewAppTemplateWithoutAppLabelJson, map[string]*bintree{}},
									"template_multiple_resource_gvs.yaml": &bintree{testExtendedTestdataCmdTestCmdTestdataNewAppTemplate_multiple_resource_gvsYaml, map[string]*bintree{}},
									"test-cmd-newapp-env.env": &bintree{testExtendedTestdataCmdTestCmdTestdataNewAppTestCmdNewappEnvEnv, map[string]*bintree{}},
									"test-cmd-newapp-params.env": &bintree{testExtendedTestdataCmdTestCmdTestdataNewAppTestCmdNewappParamsEnv, map[string]*bintree{}},
								}},
								"oauthaccesstoken.yaml": &bintree{testExtendedTestdataCmdTestCmdTestdataOauthaccesstokenYaml, map[string]*bintree{}},
								"old-template.json": &bintree{testExtendedTestdataCmdTestCmdTestdataOldTemplateJson, map[string]*bintree{}},
								"resource-builder": &bintree{nil, map[string]*bintree{
									"directory": &bintree{nil, map[string]*bintree{
										"json-no-extension-in-directory": &bintree{testExtendedTestdataCmdTestCmdTestdataResourceBuilderDirectoryJsonNoExtensionInDirectory, map[string]*bintree{}},
										"json-with-extension.json": &bintree{testExtendedTestdataCmdTestCmdTestdataResourceBuilderDirectoryJsonWithExtensionJson, map[string]*bintree{}},
										"non-api-file": &bintree{testExtendedTestdataCmdTestCmdTestdataResourceBuilderDirectoryNonApiFile, map[string]*bintree{}},
										"yml-with-extension.yml": &bintree{testExtendedTestdataCmdTestCmdTestdataResourceBuilderDirectoryYmlWithExtensionYml, map[string]*bintree{}},
									}},
									"json-no-extension": &bintree{testExtendedTestdataCmdTestCmdTestdataResourceBuilderJsonNoExtension, map[string]*bintree{}},
									"yml-no-extension": &bintree{testExtendedTestdataCmdTestCmdTestdataResourceBuilderYmlNoExtension, map[string]*bintree{}},
								}},
								"roles": &bintree{nil, map[string]*bintree{
									"empty-role.yaml": &bintree{testExtendedTestdataCmdTestCmdTestdataRolesEmptyRoleYaml, map[string]*bintree{}},
									"policy-clusterroles.yaml": &bintree{testExtendedTestdataCmdTestCmdTestdataRolesPolicyClusterrolesYaml, map[string]*bintree{}},
									"policy-roles.yaml": &bintree{testExtendedTestdataCmdTestCmdTestdataRolesPolicyRolesYaml, map[string]*bintree{}},
								}},
								"rollingupdate-daemonset.yaml": &bintree{testExtendedTestdataCmdTestCmdTestdataRollingupdateDaemonsetYaml, map[string]*bintree{}},
								"services.yaml": &bintree{testExtendedTestdataCmdTestCmdTestdataServicesYaml, map[string]*bintree{}},
								"simple-deployment.yaml": &bintree{testExtendedTestdataCmdTestCmdTestdataSimpleDeploymentYaml, map[string]*bintree{}},
								"stable-busybox.yaml": &bintree{testExtendedTestdataCmdTestCmdTestdataStableBusyboxYaml, map[string]*bintree{}},
								"statefulset.yaml": &bintree{testExtendedTestdataCmdTestCmdTestdataStatefulsetYaml, map[string]*bintree{}},
								"templateinstance_objectkinds.yaml": &bintree{testExtendedTestdataCmdTestCmdTestdataTemplateinstance_objectkindsYaml, map[string]*bintree{}},
								"templates": &bintree{nil, map[string]*bintree{
									"basic-users-binding.json": &bintree{testExtendedTestdataCmdTestCmdTestdataTemplatesBasicUsersBindingJson, map[string]*bintree{}},
									"guestbook.env": &bintree{testExtendedTestdataCmdTestCmdTestdataTemplatesGuestbookEnv, map[string]*bintree{}},
									"guestbook.json": &bintree{testExtendedTestdataCmdTestCmdTestdataTemplatesGuestbookJson, map[string]*bintree{}},
									"guestbook_list.json": &bintree{testExtendedTestdataCmdTestCmdTestdataTemplatesGuestbook_listJson, map[string]*bintree{}},
									"multiline.txt": &bintree{testExtendedTestdataCmdTestCmdTestdataTemplatesMultilineTxt, map[string]*bintree{}},
									"template-type-precision.json": &bintree{testExtendedTestdataCmdTestCmdTestdataTemplatesTemplateTypePrecisionJson, map[string]*bintree{}},
									"template_required_params.env": &bintree{testExtendedTestdataCmdTestCmdTestdataTemplatesTemplate_required_paramsEnv, map[string]*bintree{}},
									"template_required_params.yaml": &bintree{testExtendedTestdataCmdTestCmdTestdataTemplatesTemplate_required_paramsYaml, map[string]*bintree{}},
								}},
								"test-bc.yaml": &bintree{testExtendedTestdataCmdTestCmdTestdataTestBcYaml, map[string]*bintree{}},
								"test-buildcli.json": &bintree{testExtendedTestdataCmdTestCmdTestdataTestBuildcliJson, map[string]*bintree{}},
								"test-deployment-config.yaml": &bintree{testExtendedTestdataCmdTestCmdTestdataTestDeploymentConfigYaml, map[string]*bintree{}},
								"test-docker-build.json": &bintree{testExtendedTestdataCmdTestCmdTestdataTestDockerBuildJson, map[string]*bintree{}},
								"test-image-stream.json": &bintree{testExtendedTestdataCmdTestCmdTestdataTestImageStreamJson, map[string]*bintree{}},
								"test-image.json": &bintree{testExtendedTestdataCmdTestCmdTestdataTestImageJson, map[string]*bintree{}},
								"test-multiarch-stream.yaml": &bintree{testExtendedTestdataCmdTestCmdTestdataTestMultiarchStreamYaml, map[string]*bintree{}},
								"test-replication-controller.yaml": &bintree{testExtendedTestdataCmdTestCmdTestdataTestReplicationControllerYaml, map[string]*bintree{}},
								"test-route.json": &bintree{testExtendedTestdataCmdTestCmdTestdataTestRouteJson, map[string]*bintree{}},
								"test-s2i-build.json": &bintree{testExtendedTestdataCmdTestCmdTestdataTestS2iBuildJson, map[string]*bintree{}},
								"test-service.json": &bintree{testExtendedTestdataCmdTestCmdTestdataTestServiceJson, map[string]*bintree{}},
								"test-stream.yaml": &bintree{testExtendedTestdataCmdTestCmdTestdataTestStreamYaml, map[string]*bintree{}},
							}},
							"timeout.sh": &bintree{testExtendedTestdataCmdTestCmdTimeoutSh, map[string]*bintree{}},
							"triggers.sh": &bintree{testExtendedTestdataCmdTestCmdTriggersSh, map[string]*bintree{}},
							"volumes.sh": &bintree{testExtendedTestdataCmdTestCmdVolumesSh, map[string]*bintree{}},
							"whoami.sh": &bintree{testExtendedTestdataCmdTestCmdWhoamiSh, map[string]*bintree{}},
						}},
					}},
				}},
				"config-map-jenkins-slave-pods.yaml": &bintree{testExtendedTestdataConfigMapJenkinsSlavePodsYaml, map[string]*bintree{}},
				"csi": &bintree{nil, map[string]*bintree{
					"aws-ebs": &bintree{nil, map[string]*bintree{
						"install-template.yaml": &bintree{testExtendedTestdataCsiAwsEbsInstallTemplateYaml, map[string]*bintree{}},
						"manifest.yaml": &bintree{testExtendedTestdataCsiAwsEbsManifestYaml, map[string]*bintree{}},
						"storageclass.yaml": &bintree{testExtendedTestdataCsiAwsEbsStorageclassYaml, map[string]*bintree{}},
					}},
				}},
				"custom-secret-builder": &bintree{nil, map[string]*bintree{
					"Dockerfile": &bintree{testExtendedTestdataCustomSecretBuilderDockerfile, map[string]*bintree{}},
					"build.sh": &bintree{testExtendedTestdataCustomSecretBuilderBuildSh, map[string]*bintree{}},
				}},
				"deployments": &bintree{nil, map[string]*bintree{
					"custom-deployment.yaml": &bintree{testExtendedTestdataDeploymentsCustomDeploymentYaml, map[string]*bintree{}},
					"deployment-example.yaml": &bintree{testExtendedTestdataDeploymentsDeploymentExampleYaml, map[string]*bintree{}},
					"deployment-history-limit.yaml": &bintree{testExtendedTestdataDeploymentsDeploymentHistoryLimitYaml, map[string]*bintree{}},
					"deployment-ignores-deployer.yaml": &bintree{testExtendedTestdataDeploymentsDeploymentIgnoresDeployerYaml, map[string]*bintree{}},
					"deployment-image-resolution-is.yaml": &bintree{testExtendedTestdataDeploymentsDeploymentImageResolutionIsYaml, map[string]*bintree{}},
					"deployment-image-resolution.yaml": &bintree{testExtendedTestdataDeploymentsDeploymentImageResolutionYaml, map[string]*bintree{}},
					"deployment-min-ready-seconds.yaml": &bintree{testExtendedTestdataDeploymentsDeploymentMinReadySecondsYaml, map[string]*bintree{}},
					"deployment-simple.yaml": &bintree{testExtendedTestdataDeploymentsDeploymentSimpleYaml, map[string]*bintree{}},
					"deployment-trigger.yaml": &bintree{testExtendedTestdataDeploymentsDeploymentTriggerYaml, map[string]*bintree{}},
					"deployment-with-ref-env.yaml": &bintree{testExtendedTestdataDeploymentsDeploymentWithRefEnvYaml, map[string]*bintree{}},
					"failing-pre-hook.yaml": &bintree{testExtendedTestdataDeploymentsFailingPreHookYaml, map[string]*bintree{}},
					"generation-test.yaml": &bintree{testExtendedTestdataDeploymentsGenerationTestYaml, map[string]*bintree{}},
					"multi-ict-deployment.yaml": &bintree{testExtendedTestdataDeploymentsMultiIctDeploymentYaml, map[string]*bintree{}},
					"paused-deployment.yaml": &bintree{testExtendedTestdataDeploymentsPausedDeploymentYaml, map[string]*bintree{}},
					"readiness-test.yaml": &bintree{testExtendedTestdataDeploymentsReadinessTestYaml, map[string]*bintree{}},
					"tag-images-deployment.yaml": &bintree{testExtendedTestdataDeploymentsTagImagesDeploymentYaml, map[string]*bintree{}},
					"test-deployment-broken.yaml": &bintree{testExtendedTestdataDeploymentsTestDeploymentBrokenYaml, map[string]*bintree{}},
					"test-deployment-test.yaml": &bintree{testExtendedTestdataDeploymentsTestDeploymentTestYaml, map[string]*bintree{}},
				}},
				"disaster-recovery": &bintree{nil, map[string]*bintree{
					"restore-etcd.sh": &bintree{testExtendedTestdataDisasterRecoveryRestoreEtcdSh, map[string]*bintree{}},
					"rollback-A.yaml": &bintree{testExtendedTestdataDisasterRecoveryRollbackAYaml, map[string]*bintree{}},
					"rollback-B.yaml": &bintree{testExtendedTestdataDisasterRecoveryRollbackBYaml, map[string]*bintree{}},
					"ssh-bastion": &bintree{nil, map[string]*bintree{
						"clusterrole.yaml": &bintree{testExtendedTestdataDisasterRecoverySshBastionClusterroleYaml, map[string]*bintree{}},
						"clusterrolebinding.yaml": &bintree{testExtendedTestdataDisasterRecoverySshBastionClusterrolebindingYaml, map[string]*bintree{}},
						"deployment.yaml": &bintree{testExtendedTestdataDisasterRecoverySshBastionDeploymentYaml, map[string]*bintree{}},
						"namespace.yaml": &bintree{testExtendedTestdataDisasterRecoverySshBastionNamespaceYaml, map[string]*bintree{}},
						"role.yaml": &bintree{testExtendedTestdataDisasterRecoverySshBastionRoleYaml, map[string]*bintree{}},
						"rolebinding.yaml": &bintree{testExtendedTestdataDisasterRecoverySshBastionRolebindingYaml, map[string]*bintree{}},
						"service.yaml": &bintree{testExtendedTestdataDisasterRecoverySshBastionServiceYaml, map[string]*bintree{}},
						"serviceaccount.yaml": &bintree{testExtendedTestdataDisasterRecoverySshBastionServiceaccountYaml, map[string]*bintree{}},
						"sshd_config": &bintree{testExtendedTestdataDisasterRecoverySshBastionSshd_config, map[string]*bintree{}},
					}},
					"update_route_53.py": &bintree{testExtendedTestdataDisasterRecoveryUpdate_route_53Py, map[string]*bintree{}},
				}},
				"forcepull-test.json": &bintree{testExtendedTestdataForcepullTestJson, map[string]*bintree{}},
				"gssapi": &bintree{nil, map[string]*bintree{
					"config": &bintree{nil, map[string]*bintree{
						"kubeconfig": &bintree{testExtendedTestdataGssapiConfigKubeconfig, map[string]*bintree{}},
						"oauth_config.json": &bintree{testExtendedTestdataGssapiConfigOauth_configJson, map[string]*bintree{}},
					}},
					"fedora": &bintree{nil, map[string]*bintree{
						"base": &bintree{nil, map[string]*bintree{
							"Dockerfile": &bintree{testExtendedTestdataGssapiFedoraBaseDockerfile, map[string]*bintree{}},
						}},
						"kerberos": &bintree{nil, map[string]*bintree{
							"Dockerfile": &bintree{testExtendedTestdataGssapiFedoraKerberosDockerfile, map[string]*bintree{}},
						}},
						"kerberos_configured": &bintree{nil, map[string]*bintree{
							"Dockerfile": &bintree{testExtendedTestdataGssapiFedoraKerberos_configuredDockerfile, map[string]*bintree{}},
						}},
					}},
					"proxy": &bintree{nil, map[string]*bintree{
						"Dockerfile": &bintree{testExtendedTestdataGssapiProxyDockerfile, map[string]*bintree{}},
						"configure.sh": &bintree{testExtendedTestdataGssapiProxyConfigureSh, map[string]*bintree{}},
						"gssapiproxy-buildconfig.yaml": &bintree{testExtendedTestdataGssapiProxyGssapiproxyBuildconfigYaml, map[string]*bintree{}},
						"gssapiproxy-deploymentconfig.yaml": &bintree{testExtendedTestdataGssapiProxyGssapiproxyDeploymentconfigYaml, map[string]*bintree{}},
						"gssapiproxy-imagestream.yaml": &bintree{testExtendedTestdataGssapiProxyGssapiproxyImagestreamYaml, map[string]*bintree{}},
						"gssapiproxy-service.yaml": &bintree{testExtendedTestdataGssapiProxyGssapiproxyServiceYaml, map[string]*bintree{}},
						"healthz": &bintree{testExtendedTestdataGssapiProxyHealthz, map[string]*bintree{}},
						"kadm5.acl": &bintree{testExtendedTestdataGssapiProxyKadm5Acl, map[string]*bintree{}},
						"kdc.conf": &bintree{testExtendedTestdataGssapiProxyKdcConf, map[string]*bintree{}},
						"krb5.conf": &bintree{testExtendedTestdataGssapiProxyKrb5Conf, map[string]*bintree{}},
						"proxy.conf": &bintree{testExtendedTestdataGssapiProxyProxyConf, map[string]*bintree{}},
					}},
					"scripts": &bintree{nil, map[string]*bintree{
						"gssapi-tests.sh": &bintree{testExtendedTestdataGssapiScriptsGssapiTestsSh, map[string]*bintree{}},
						"test-wrapper.sh": &bintree{testExtendedTestdataGssapiScriptsTestWrapperSh, map[string]*bintree{}},
					}},
					"ubuntu": &bintree{nil, map[string]*bintree{
						"base": &bintree{nil, map[string]*bintree{
							"Dockerfile": &bintree{testExtendedTestdataGssapiUbuntuBaseDockerfile, map[string]*bintree{}},
						}},
						"kerberos": &bintree{nil, map[string]*bintree{
							"Dockerfile": &bintree{testExtendedTestdataGssapiUbuntuKerberosDockerfile, map[string]*bintree{}},
						}},
						"kerberos_configured": &bintree{nil, map[string]*bintree{
							"Dockerfile": &bintree{testExtendedTestdataGssapiUbuntuKerberos_configuredDockerfile, map[string]*bintree{}},
						}},
					}},
				}},
				"hello-builder": &bintree{nil, map[string]*bintree{
					"Dockerfile": &bintree{testExtendedTestdataHelloBuilderDockerfile, map[string]*bintree{}},
					"scripts": &bintree{nil, map[string]*bintree{
						"assemble": &bintree{testExtendedTestdataHelloBuilderScriptsAssemble, map[string]*bintree{}},
						"run": &bintree{testExtendedTestdataHelloBuilderScriptsRun, map[string]*bintree{}},
					}},
				}},
				"idling-echo-server-rc.yaml": &bintree{testExtendedTestdataIdlingEchoServerRcYaml, map[string]*bintree{}},
				"idling-echo-server.yaml": &bintree{testExtendedTestdataIdlingEchoServerYaml, map[string]*bintree{}},
				"image": &bintree{nil, map[string]*bintree{
					"deployment-with-annotation-trigger.yaml": &bintree{testExtendedTestdataImageDeploymentWithAnnotationTriggerYaml, map[string]*bintree{}},
					"test-image.json": &bintree{testExtendedTestdataImageTestImageJson, map[string]*bintree{}},
				}},
				"image-pull-secrets": &bintree{nil, map[string]*bintree{
					"dc-with-new-pull-secret.yaml": &bintree{testExtendedTestdataImagePullSecretsDcWithNewPullSecretYaml, map[string]*bintree{}},
					"dc-with-old-pull-secret.yaml": &bintree{testExtendedTestdataImagePullSecretsDcWithOldPullSecretYaml, map[string]*bintree{}},
					"pod-with-new-pull-secret.yaml": &bintree{testExtendedTestdataImagePullSecretsPodWithNewPullSecretYaml, map[string]*bintree{}},
					"pod-with-no-pull-secret.yaml": &bintree{testExtendedTestdataImagePullSecretsPodWithNoPullSecretYaml, map[string]*bintree{}},
					"pod-with-old-pull-secret.yaml": &bintree{testExtendedTestdataImagePullSecretsPodWithOldPullSecretYaml, map[string]*bintree{}},
				}},
				"image_ecosystem": &bintree{nil, map[string]*bintree{
					"perl-hotdeploy": &bintree{nil, map[string]*bintree{
						"index.pl": &bintree{testExtendedTestdataImage_ecosystemPerlHotdeployIndexPl, map[string]*bintree{}},
						"lib": &bintree{nil, map[string]*bintree{
							"My": &bintree{nil, map[string]*bintree{
								"Test.pm": &bintree{testExtendedTestdataImage_ecosystemPerlHotdeployLibMyTestPm, map[string]*bintree{}},
							}},
						}},
						"perl.json": &bintree{testExtendedTestdataImage_ecosystemPerlHotdeployPerlJson, map[string]*bintree{}},
					}},
				}},
				"imagestream-jenkins-slave-pods.yaml": &bintree{testExtendedTestdataImagestreamJenkinsSlavePodsYaml, map[string]*bintree{}},
				"imagestreamtag-jenkins-slave-pods.yaml": &bintree{testExtendedTestdataImagestreamtagJenkinsSlavePodsYaml, map[string]*bintree{}},
				"jenkins-plugin": &bintree{nil, map[string]*bintree{
					"build-job-clone.xml": &bintree{testExtendedTestdataJenkinsPluginBuildJobCloneXml, map[string]*bintree{}},
					"build-job-slave.xml": &bintree{testExtendedTestdataJenkinsPluginBuildJobSlaveXml, map[string]*bintree{}},
					"build-job.xml": &bintree{testExtendedTestdataJenkinsPluginBuildJobXml, map[string]*bintree{}},
					"build-with-env-job.xml": &bintree{testExtendedTestdataJenkinsPluginBuildWithEnvJobXml, map[string]*bintree{}},
					"build-with-exec-steps.xml": &bintree{testExtendedTestdataJenkinsPluginBuildWithExecStepsXml, map[string]*bintree{}},
					"create-job.xml": &bintree{testExtendedTestdataJenkinsPluginCreateJobXml, map[string]*bintree{}},
					"delete-job-keys.xml": &bintree{testExtendedTestdataJenkinsPluginDeleteJobKeysXml, map[string]*bintree{}},
					"delete-job-labels.xml": &bintree{testExtendedTestdataJenkinsPluginDeleteJobLabelsXml, map[string]*bintree{}},
					"delete-job.xml": &bintree{testExtendedTestdataJenkinsPluginDeleteJobXml, map[string]*bintree{}},
					"imagestream-scm-dsl-job.xml": &bintree{testExtendedTestdataJenkinsPluginImagestreamScmDslJobXml, map[string]*bintree{}},
					"imagestream-scm-job.xml": &bintree{testExtendedTestdataJenkinsPluginImagestreamScmJobXml, map[string]*bintree{}},
					"multitag-job.xml": &bintree{testExtendedTestdataJenkinsPluginMultitagJobXml, map[string]*bintree{}},
					"multitag-template.json": &bintree{testExtendedTestdataJenkinsPluginMultitagTemplateJson, map[string]*bintree{}},
					"shared-resources-template.json": &bintree{testExtendedTestdataJenkinsPluginSharedResourcesTemplateJson, map[string]*bintree{}},
				}},
				"jenkins-slave-template.yaml": &bintree{testExtendedTestdataJenkinsSlaveTemplateYaml, map[string]*bintree{}},
				"jobs": &bintree{nil, map[string]*bintree{
					"v1.yaml": &bintree{testExtendedTestdataJobsV1Yaml, map[string]*bintree{}},
				}},
				"ldap": &bintree{nil, map[string]*bintree{
					"groupsync.sh": &bintree{testExtendedTestdataLdapGroupsyncSh, map[string]*bintree{}},
					"ldapserver-config-cm.yaml": &bintree{testExtendedTestdataLdapLdapserverConfigCmYaml, map[string]*bintree{}},
					"ldapserver-deployment.yaml": &bintree{testExtendedTestdataLdapLdapserverDeploymentYaml, map[string]*bintree{}},
					"ldapserver-scripts-cm.yaml": &bintree{testExtendedTestdataLdapLdapserverScriptsCmYaml, map[string]*bintree{}},
					"ldapserver-service.yaml": &bintree{testExtendedTestdataLdapLdapserverServiceYaml, map[string]*bintree{}},
				}},
				"long_names": &bintree{nil, map[string]*bintree{
					"Dockerfile": &bintree{testExtendedTestdataLong_namesDockerfile, map[string]*bintree{}},
					"fixture.json": &bintree{testExtendedTestdataLong_namesFixtureJson, map[string]*bintree{}},
				}},
				"marketplace": &bintree{nil, map[string]*bintree{
					"csc": &bintree{nil, map[string]*bintree{
						"02-csc.yaml": &bintree{testExtendedTestdataMarketplaceCsc02CscYaml, map[string]*bintree{}},
					}},
					"opsrc": &bintree{nil, map[string]*bintree{
						"02-opsrc.yaml": &bintree{testExtendedTestdataMarketplaceOpsrc02OpsrcYaml, map[string]*bintree{}},
					}},
				}},
				"multi-namespace-pipeline.yaml": &bintree{testExtendedTestdataMultiNamespacePipelineYaml, map[string]*bintree{}},
				"multi-namespace-template.yaml": &bintree{testExtendedTestdataMultiNamespaceTemplateYaml, map[string]*bintree{}},
				"oauthserver": &bintree{nil, map[string]*bintree{
					"cabundle-cm.yaml": &bintree{testExtendedTestdataOauthserverCabundleCmYaml, map[string]*bintree{}},
					"oauth-network.yaml": &bintree{testExtendedTestdataOauthserverOauthNetworkYaml, map[string]*bintree{}},
					"oauth-pod.yaml": &bintree{testExtendedTestdataOauthserverOauthPodYaml, map[string]*bintree{}},
					"oauth-sa.yaml": &bintree{testExtendedTestdataOauthserverOauthSaYaml, map[string]*bintree{}},
				}},
				"olm": &bintree{nil, map[string]*bintree{
					"etcd-subscription.yaml": &bintree{testExtendedTestdataOlmEtcdSubscriptionYaml, map[string]*bintree{}},
					"operatorgroup.yaml": &bintree{testExtendedTestdataOlmOperatorgroupYaml, map[string]*bintree{}},
				}},
				"openshift-secret-to-jenkins-credential.yaml": &bintree{testExtendedTestdataOpenshiftSecretToJenkinsCredentialYaml, map[string]*bintree{}},
				"releases": &bintree{nil, map[string]*bintree{
					"payload-1": &bintree{nil, map[string]*bintree{
						"etcd-operator": &bintree{nil, map[string]*bintree{
							"image-references": &bintree{testExtendedTestdataReleasesPayload1EtcdOperatorImageReferences, map[string]*bintree{}},
							"manifest.yaml": &bintree{testExtendedTestdataReleasesPayload1EtcdOperatorManifestYaml, map[string]*bintree{}},
						}},
						"image-registry": &bintree{nil, map[string]*bintree{
							"10_image-registry_crd.yaml": &bintree{testExtendedTestdataReleasesPayload1ImageRegistry10_imageRegistry_crdYaml, map[string]*bintree{}},
							"image-references": &bintree{testExtendedTestdataReleasesPayload1ImageRegistryImageReferences, map[string]*bintree{}},
							"manifest.yaml": &bintree{testExtendedTestdataReleasesPayload1ImageRegistryManifestYaml, map[string]*bintree{}},
						}},
					}},
				}},
				"roles": &bintree{nil, map[string]*bintree{
					"empty-role.yaml": &bintree{testExtendedTestdataRolesEmptyRoleYaml, map[string]*bintree{}},
					"policy-clusterroles.yaml": &bintree{testExtendedTestdataRolesPolicyClusterrolesYaml, map[string]*bintree{}},
					"policy-roles.yaml": &bintree{testExtendedTestdataRolesPolicyRolesYaml, map[string]*bintree{}},
				}},
				"router": &bintree{nil, map[string]*bintree{
					"ingress.yaml": &bintree{testExtendedTestdataRouterIngressYaml, map[string]*bintree{}},
					"reencrypt-serving-cert.yaml": &bintree{testExtendedTestdataRouterReencryptServingCertYaml, map[string]*bintree{}},
					"router-common.yaml": &bintree{testExtendedTestdataRouterRouterCommonYaml, map[string]*bintree{}},
					"router-config-manager.yaml": &bintree{testExtendedTestdataRouterRouterConfigManagerYaml, map[string]*bintree{}},
					"router-http-echo-server.yaml": &bintree{testExtendedTestdataRouterRouterHttpEchoServerYaml, map[string]*bintree{}},
					"router-metrics.yaml": &bintree{testExtendedTestdataRouterRouterMetricsYaml, map[string]*bintree{}},
					"router-override-domains.yaml": &bintree{testExtendedTestdataRouterRouterOverrideDomainsYaml, map[string]*bintree{}},
					"router-override.yaml": &bintree{testExtendedTestdataRouterRouterOverrideYaml, map[string]*bintree{}},
					"router-scoped.yaml": &bintree{testExtendedTestdataRouterRouterScopedYaml, map[string]*bintree{}},
					"weighted-router.yaml": &bintree{testExtendedTestdataRouterWeightedRouterYaml, map[string]*bintree{}},
				}},
				"run_policy": &bintree{nil, map[string]*bintree{
					"parallel-bc.yaml": &bintree{testExtendedTestdataRun_policyParallelBcYaml, map[string]*bintree{}},
					"serial-bc.yaml": &bintree{testExtendedTestdataRun_policySerialBcYaml, map[string]*bintree{}},
					"serial-latest-only-bc.yaml": &bintree{testExtendedTestdataRun_policySerialLatestOnlyBcYaml, map[string]*bintree{}},
				}},
				"s2i-dropcaps": &bintree{nil, map[string]*bintree{
					"root-access-build.yaml": &bintree{testExtendedTestdataS2iDropcapsRootAccessBuildYaml, map[string]*bintree{}},
					"rootable-ruby": &bintree{nil, map[string]*bintree{
						"Dockerfile": &bintree{testExtendedTestdataS2iDropcapsRootableRubyDockerfile, map[string]*bintree{}},
						"adduser": &bintree{testExtendedTestdataS2iDropcapsRootableRubyAdduser, map[string]*bintree{}},
						"assemble": &bintree{testExtendedTestdataS2iDropcapsRootableRubyAssemble, map[string]*bintree{}},
					}},
				}},
				"sample-image-stream.json": &bintree{testExtendedTestdataSampleImageStreamJson, map[string]*bintree{}},
				"samplepipeline-withenvs.yaml": &bintree{testExtendedTestdataSamplepipelineWithenvsYaml, map[string]*bintree{}},
				"service-serving-cert": &bintree{nil, map[string]*bintree{
					"nginx-serving-cert.conf": &bintree{testExtendedTestdataServiceServingCertNginxServingCertConf, map[string]*bintree{}},
				}},
				"signer-buildconfig.yaml": &bintree{testExtendedTestdataSignerBuildconfigYaml, map[string]*bintree{}},
				"templates": &bintree{nil, map[string]*bintree{
					"crunchydata-pod.json": &bintree{testExtendedTestdataTemplatesCrunchydataPodJson, map[string]*bintree{}},
					"guestbook.json": &bintree{testExtendedTestdataTemplatesGuestbookJson, map[string]*bintree{}},
					"guestbook_list.json": &bintree{testExtendedTestdataTemplatesGuestbook_listJson, map[string]*bintree{}},
					"templateinstance_badobject.yaml": &bintree{testExtendedTestdataTemplatesTemplateinstance_badobjectYaml, map[string]*bintree{}},
					"templateinstance_objectkinds.yaml": &bintree{testExtendedTestdataTemplatesTemplateinstance_objectkindsYaml, map[string]*bintree{}},
					"templateinstance_readiness.yaml": &bintree{testExtendedTestdataTemplatesTemplateinstance_readinessYaml, map[string]*bintree{}},
					"templateservicebroker_bind.yaml": &bintree{testExtendedTestdataTemplatesTemplateservicebroker_bindYaml, map[string]*bintree{}},
				}},
				"test-cli-debug.yaml": &bintree{testExtendedTestdataTestCliDebugYaml, map[string]*bintree{}},
				"test-env-pod.json": &bintree{testExtendedTestdataTestEnvPodJson, map[string]*bintree{}},
				"test-gitserver.yaml": &bintree{testExtendedTestdataTestGitserverYaml, map[string]*bintree{}},
				"test-secret.json": &bintree{testExtendedTestdataTestSecretJson, map[string]*bintree{}},
				"verifyservice-pipeline-template.yaml": &bintree{testExtendedTestdataVerifyservicePipelineTemplateYaml, map[string]*bintree{}},
			}},
		}},
		"integration": &bintree{nil, map[string]*bintree{
			"testdata": &bintree{nil, map[string]*bintree{
				"project-request-template-with-quota.yaml": &bintree{testIntegrationTestdataProjectRequestTemplateWithQuotaYaml, map[string]*bintree{}},
				"test-buildcli-beta2.json": &bintree{testIntegrationTestdataTestBuildcliBeta2Json, map[string]*bintree{}},
				"test-buildcli.json": &bintree{testIntegrationTestdataTestBuildcliJson, map[string]*bintree{}},
				"test-deployment-config.yaml": &bintree{testIntegrationTestdataTestDeploymentConfigYaml, map[string]*bintree{}},
				"test-image-stream-mapping.json": &bintree{testIntegrationTestdataTestImageStreamMappingJson, map[string]*bintree{}},
				"test-image-stream.json": &bintree{testIntegrationTestdataTestImageStreamJson, map[string]*bintree{}},
				"test-image.json": &bintree{testIntegrationTestdataTestImageJson, map[string]*bintree{}},
				"test-replication-controller.yaml": &bintree{testIntegrationTestdataTestReplicationControllerYaml, map[string]*bintree{}},
				"test-route.json": &bintree{testIntegrationTestdataTestRouteJson, map[string]*bintree{}},
				"test-service-with-finalizer.json": &bintree{testIntegrationTestdataTestServiceWithFinalizerJson, map[string]*bintree{}},
				"test-service.json": &bintree{testIntegrationTestdataTestServiceJson, map[string]*bintree{}},
			}},
		}},
	}},
}}

// RestoreAsset restores an asset under the given directory
func RestoreAsset(dir, name string) error {
	data, err := Asset(name)
	if err != nil {
		return err
	}
	info, err := AssetInfo(name)
	if err != nil {
		return err
	}
	err = os.MkdirAll(_filePath(dir, filepath.Dir(name)), os.FileMode(0755))
	if err != nil {
		return err
	}
	err = ioutil.WriteFile(_filePath(dir, name), data, info.Mode())
	if err != nil {
		return err
	}
	err = os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime())
	if err != nil {
		return err
	}
	return nil
}

// RestoreAssets restores an asset under the given directory recursively
func RestoreAssets(dir, name string) error {
	children, err := AssetDir(name)
	// File
	if err != nil {
		return RestoreAsset(dir, name)
	}
	// Dir
	for _, child := range children {
		err = RestoreAssets(dir, filepath.Join(name, child))
		if err != nil {
			return err
		}
	}
	return nil
}

func _filePath(dir, name string) string {
	cannonicalName := strings.Replace(name, "\\", "/", -1)
	return filepath.Join(append([]string{dir}, strings.Split(cannonicalName, "/")...)...)
}

