#!/bin/bash
set -evx

sudo chef-server-ctl test -J $WORKSPACE/pedant.xml --all

if [ "$OMNIBUS_FIPS_MODE" == "true" ]
then
  sudo sh -c 'echo "fips true" >> /etc/opscode/chef-server.rb'
  sudo chef-server-ctl reconfigure
  echo ""
  echo "Sleeping 120 seconds to allow the Chef Server to reconfigure in FIPS mode"
  echo ""
  sleep 120
  sudo chef-server-ctl test -J $WORKSPACE/pedant-fips.xml --smoke
fi

#!/bin/bash
set -evx

sudo chef-server-ctl test -J $WORKSPACE/pedant.xml --all

if [ "$OMNIBUS_FIPS_MODE" == "true" ]
then
  sudo sh -c 'echo -e "\nfips true" >> /etc/opscode/chef-server.rb'
  sudo chef-server-ctl reconfigure
  echo ""
  echo "Sleeping 120 seconds to allow the Chef Server to reconfigure in FIPS mode"
  echo ""
  sleep 120
  sudo chef-server-ctl test -J $WORKSPACE/pedant-fips.xml --smoke
fi

Add a newline in case the existing config doesn't have one
Add a newline in case the existing config doesn't have one

Signed-off-by: Steven Danna <9ce5770b3bb4b2a1d59be2d97e34379cd192299f@chef.io>
