Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added example for the API Mangement service #260

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

WilliamMortlMicrosoft
Copy link

This PR adds an additional example for this repo that demonstrates how to add/delete an API Management Service as well as add/delete an API endpoint within the service.

NOTE: this test takes a VERY long time to run (~60m) due to the speed (or lack thereof) with which Azure creates an API Management service instance.

@WilliamMortlMicrosoft
Copy link
Author

Successful test run example:

Williams-MBP:apimgmt wmortl$ go test -timeout 60m
2019/08/29 15:06:01 creating resource group 'azure-samples-go-APIMSTest-jVhoN' on location: eastus2
2019/08/29 15:06:07 creating api management service...
creating api management service...
2019/08/29 15:45:19 api management service created
api management service created
2019/08/29 15:45:19 creating api endpoint...
creating api endpoint...
2019/08/29 15:46:28 open api endpoint created
open api endpoint created
2019/08/29 15:46:28 deleting the api endpoint...
deleting the api endpoint...
2019/08/29 15:46:31 open api endpoint deleted
open api endpoint deleted
2019/08/29 15:48:33 api management service deleted
api management service deleted
2019/08/29 15:48:33 deleting resources
PASS
ok github.com/WilliamMortlMicrosoft/azure-sdk-for-go-samples/apimgmt 2554.421s

@WilliamMortlMicrosoft
Copy link
Author

The test is set to t.SkipNow() due to the length of it running... that line can be commented out in order to run it manually. This test takes too long to be part of a continuous integration pipeline.

@WilliamMortlMicrosoft
Copy link
Author

Please fix the build error, it is not due to this PR:

WARNING: failed to install github.com/golang/lint/golint: exit status 1

gometalinter: error: failed to install the following linters: github.com/golang/lint/golint

WARNING: exec: "golint": executable file not found in $PATH

done linting.

building...

github.com/Azure-Samples/azure-sdk-for-go-samples/web

github.com/Azure-Samples/azure-sdk-for-go-samples/vendor/github.com/Azure/azure-sdk-for-go/services/web/mgmt/2016-09-01/web

github.com/Azure-Samples/azure-sdk-for-go-samples/web

done building.

ISPR: 1

Makefile:2: recipe for target 'test' failed

make: *** [test] Error 1```

go.mod Outdated
@@ -0,0 +1,49 @@
module github.com/WilliamMortlMicrosoft/azure-sdk-for-go-samples
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Module name needs to be fixed. You might also just omit the go.mod/go.sum files for now as we don't have great module support at this time.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the review @jhendrixMSFT !! I made your suggested changes and added a README file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants