...

Text file src/github.com/datawire/ambassador/v2/builder/copy-gold.sh

Documentation: github.com/datawire/ambassador/v2/builder

     1#!bash
     2
     3GOLDDIR=${1:-python/tests/gold}
     4
     5# rm -rf "$GOLDDIR"
     6mkdir -p "$GOLDDIR"
     7
     8kubectl() {
     9    if ! test -f tools/bin/kubectl; then
    10        make tools/bin/kubectl >&2
    11    fi
    12    tools/bin/kubectl "$@"
    13}
    14
    15copy_gold () {
    16	local pod="$1"
    17	local namespace="${2:-default}"
    18
    19	if kubectl cp -n $namespace $pod:/tmp/ambassador "$GOLDDIR/${pod}-tmp" >/dev/null; then
    20		rm -rf "$GOLDDIR/$pod"
    21		mv "$GOLDDIR/${pod}-tmp" "$GOLDDIR/${pod}"
    22		# We don't try to compare aconf nor ir configuration when using gold files.
    23		# They only contribute noise, so remove them here.
    24		rm -f "$GOLDDIR/${pod}/snapshots/aconf.json"
    25		rm -f "$GOLDDIR/${pod}/snapshots/ir.json"
    26		printf "                                                                \r"
    27		printf "${pod}...\r"
    28		# echo "$pod: copied"
    29	else
    30		printf "                                                                \r"
    31		printf "${pod}.${namespace}: failed\n"
    32	fi
    33}
    34
    35copy_gold acceptancegrpcbridgetest
    36copy_gold acceptancegrpctest
    37copy_gold acceptancegrpcwebtest
    38copy_gold ambassadoridtest
    39copy_gold authenticationgrpctest
    40copy_gold authenticationv2grpctest
    41copy_gold authenticationheaderrouting
    42copy_gold authenticationhttpbufferedtest
    43copy_gold authenticationhttpfailuremodeallowtest
    44copy_gold authenticationhttppartialbuffertest
    45copy_gold authenticationtest
    46copy_gold authenticationtestv1
    47copy_gold authenticationwebsockettest
    48copy_gold circuitbreakingtcptest
    49# copy_gold circuitbreakingtest	# mockery can't quite cope with this -- not sure why
    50copy_gold clientcertificateauthentication
    51copy_gold clustertagtest
    52# copy_gold consultest
    53copy_gold dogstatsdtest
    54# copy_gold endpointgrpctest
    55copy_gold envoylogtest
    56copy_gold envoylogjsontest
    57copy_gold globalcircuitbreakingtest
    58copy_gold globalcorstest
    59# copy_gold globalloadbalancing
    60copy_gold gzipminimumconfigtest
    61copy_gold gzipnotsupportedcontenttypetest
    62copy_gold gziptest
    63copy_gold hostcrdwildcards
    64copy_gold hostcrdcleartext
    65copy_gold hostcrdrootredirectslashmapping
    66copy_gold hostcrdtlsconfig
    67copy_gold hostcrddouble
    68copy_gold hostcrdclientcertsamenamespace
    69copy_gold hostcrdrootredirectcongratulations
    70copy_gold hostcrdrootredirectre2mapping
    71copy_gold hostcrdseparatetlscontext
    72copy_gold hostcrdclientcertcrossnamespace
    73copy_gold hostcrdmanualcontext
    74copy_gold hostcrdno8080
    75copy_gold hostcrdsingle
    76copy_gold hostcrdforcedstar
    77# copy_gold ingressstatustest1
    78# copy_gold ingressstatustest2
    79# copy_gold ingressstatustestacrossnamespaces
    80# copy_gold ingressstatustestwithannotations
    81# copy_gold knative0110test
    82copy_gold linkerdheadermapping
    83copy_gold listeneridletimeout
    84# copy_gold loadbalancertest
    85copy_gold logservicetest
    86# copy_gold luatest
    87# copy_gold permappingloadbalancing
    88copy_gold ratelimitv0test
    89copy_gold ratelimitv1test
    90copy_gold ratelimitv1withtlstest
    91copy_gold ratelimitv2test
    92copy_gold redirecttests
    93copy_gold redirecttestsinvalidsecret
    94copy_gold redirecttestswithproxyproto
    95copy_gold retrypolicytest
    96copy_gold saferegexmapping
    97copy_gold servernametest
    98copy_gold statsdtest
    99copy_gold tls
   100copy_gold tlscontextciphersuites
   101copy_gold tlscontextprotocolmaxversion
   102copy_gold tlscontextprotocolminversion
   103copy_gold tlscontextstest
   104copy_gold tlscontexttest
   105# copy_gold tlsingresstest
   106copy_gold tlsinvalidsecret
   107copy_gold tlsoriginationsecret
   108copy_gold tracingexternalauthtest
   109copy_gold tracingtest
   110copy_gold tracingtestsampling
   111copy_gold tracingtestshorttraceid
   112copy_gold tracingtestzipkinv1
   113copy_gold tracingtestzipkinv2
   114copy_gold unsaferegexmapping
   115copy_gold xfpredirect
   116copy_gold empty empty-namespace
   117copy_gold plain plain-namespace
   118copy_gold tcpmappingtest tcp-namespace
   119copy_gold tcpmappingbasictest
   120copy_gold tcpmappingcrossnamespacetest
   121copy_gold tcpmappingtlsoriginationbooltest
   122copy_gold tcpmappingtlsoriginationv2schemetest
   123copy_gold tcpmappingtlsoriginationcontexttest
   124copy_gold tcpmappingtlsoriginationcontextwithdottest
   125copy_gold tcpmappingtlsoriginationcontextcrossnamespacetest
   126copy_gold tcpmappingtlsterminationbasictest
   127copy_gold tcpmappingtlsterminationcrossnamespacetest
   128copy_gold tcpmappingsnisharedcontexttest
   129copy_gold tcpmappingsniseparatecontextstest
   130copy_gold tcpmappingsniwithhttptest
   131copy_gold tcpmappingaddresstest
   132copy_gold tcpmappingweighttest
   133
   134printf "\n"

View as plain text