Skip to content

Commit 6f05fb0

Browse files
committed
REMOVE: eliminate endpoint testing steps
1 parent b28893f commit 6f05fb0

File tree

2 files changed

+0
-30
lines changed

2 files changed

+0
-30
lines changed

.github/workflows/deploy-infra.yml

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -68,28 +68,3 @@ jobs:
6868

6969
- name: Terraform Apply
7070
run: terraform apply -var="environment=${{ inputs.environment }}" -auto-approve tfplan
71-
72-
- name: Get API Management outputs
73-
run: |
74-
terraform output -json > outputs.json
75-
echo "Terraform outputs saved successfully"
76-
77-
- name: Test API endpoint
78-
run: |
79-
GATEWAY_URL=$(terraform output -raw gateway_url | xargs)
80-
echo "Testing API endpoint at: ${GATEWAY_URL}/sample/get"
81-
for i in {1..5}; do
82-
echo "Attempt $i..."
83-
HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" -H "Ocp-Apim-Subscription-Key: placeholder" "${GATEWAY_URL}/sample/get")
84-
echo "HTTP Status: $HTTP_CODE"
85-
if [ "$HTTP_CODE" = "401" ] || [ "$HTTP_CODE" = "403" ]; then
86-
echo "✓ API is responding (auth required is expected)"
87-
break
88-
elif [ "$HTTP_CODE" = "200" ]; then
89-
echo "✓ API is responding"
90-
break
91-
else
92-
echo "✗ API not responding yet, waiting 30 seconds..."
93-
sleep 30
94-
fi
95-
done

cmd/root.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,9 @@ import (
77
)
88

99
var (
10-
// Version is set during build via ldflags
1110
Version = "dev"
1211
)
1312

14-
// rootCmd represents the base command when called without any subcommands
1513
var rootCmd = &cobra.Command{
1614
Use: "kura",
1715
Short: "Kura - Azure API Management subscription key backup and restore tool",
@@ -23,8 +21,6 @@ and restore them from a backup file.`,
2321
Version: Version,
2422
}
2523

26-
// Execute adds all child commands to the root command and sets flags appropriately.
27-
// This is called by main.main(). It only needs to happen once to the rootCmd.
2824
func Execute() {
2925
err := rootCmd.Execute()
3026
if err != nil {
@@ -33,7 +29,6 @@ func Execute() {
3329
}
3430

3531
func init() {
36-
// Here you will define your flags and configuration settings.
3732
// Cobra supports persistent flags, which, if defined here,
3833
// will be global for your application.
3934

0 commit comments

Comments
 (0)