Skip to content

Commit

Permalink
revert
Browse files Browse the repository at this point in the history
Signed-off-by: RoyShravani <shravani.roy@progress.com>
  • Loading branch information
RoyShravani committed Jan 15, 2025
1 parent e6b1cdf commit 82ddd14
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions .studio/chef-server-collection
Original file line number Diff line number Diff line change
Expand Up @@ -392,21 +392,6 @@ function test_knife() {
done
}

document "ohai_time" <<DOC
Gets ohai_time for a converged node. Assumes converge_chef_client has already run.
DOC
function ohai_time() {
set_up_chef_server_test_environment

CHEF_LICENSE=accept-no-persist hab pkg exec chef/chef-dk knife node show test-admin \
--server-url "${chef_server_url}" \
--key "${chef_server_test_admin_key_path_path}" \
-c "${chef_server_pivotal_rb_path}" \
--user test-admin \
-a ohai_time \
| grep ohai_time | cut -f2 -d":" | xargs
}

hab_curl() {
hab pkg exec core/curl curl "$@";
}
Expand All @@ -416,7 +401,7 @@ document "test_if_login_working_with_correct_credentials" <<DOC
DOC
test_if_login_working_with_correct_credentials() {
bootstrap_chef_user_data || return 1
local url="https://${chef_server_hostname}/id/signin"
local url="https://${chef_server_hostname}/id/auth/chef/callback"

res_code=$(hab_curl --insecure -H -s -o /dev/null -w "%{http_code}" "$url" \
--header 'x-requested-with: XMLHttpRequest' \
Expand All @@ -439,7 +424,7 @@ document "test_if_login_failing_with_incorrect_credentials" <<DOC
DOC
test_if_login_failing_with_incorrect_credentials() {
bootstrap_chef_user_data || return 1
local url="https://${chef_server_hostname}/id/signin"
local url="https://${chef_server_hostname}/id/auth/chef/callback"
local incorrect_password='incorrect-password'

res_code=$(hab_curl --insecure -H -s -o /dev/null -w "%{http_code}" "$url" \
Expand Down Expand Up @@ -542,6 +527,21 @@ test_if_webui_key_is_patched() {
fi
}

document "ohai_time" <<DOC
Gets ohai_time for a converged node. Assumes converge_chef_client has already run.
DOC
function ohai_time() {
set_up_chef_server_test_environment

CHEF_LICENSE=accept-no-persist hab pkg exec chef/chef-dk knife node show test-admin \
--server-url "${chef_server_url}" \
--key "${chef_server_test_admin_key_path_path}" \
-c "${chef_server_pivotal_rb_path}" \
--user test-admin \
-a ohai_time \
| grep ohai_time | cut -f2 -d":" | xargs
}

document "test_if_env_vars_are_configured_after_patch" <<DOC
test if OCID ENV variables are configured after patch
DOC
Expand Down Expand Up @@ -603,4 +603,4 @@ test_if_oauthapps_are_patched_correctly() {
else
echo "OAuth App values are patched correctly"
fi
}
}

0 comments on commit 82ddd14

Please sign in to comment.