#!/bin/sh

CLI_SCRPT=/tmp/test.cli
CONFIG_FILE=standalone-test.xml
{
  echo "embed-server --server-config=${CONFIG_FILE}"
  echo "batch"
  for i in `seq 1 300`
  do
    echo "/subsystem=undertow/configuration=filter/response-header=test${i}:add(header-name=test${i},header-value=test${i})"
    # echo "/subsystem=undertow/configuration=filter/expression-filter=test${i}:add(expression=\"set(attribute='%{o,test${i}}', value='test${i}')\")"
    echo "/subsystem=undertow/server=default-server/host=default-host/filter-ref=test${i}:add(priority=$((i%10 + 10)))"
  done
  echo run-batch
} > $CLI_SCRPT

