Test Project initiation for Terraform (resource_mso_schema_template_anp_test) (DCNE-148)#30
Open
shrsr wants to merge 4 commits intoCiscoDevNet:masterfrom
Open
Test Project initiation for Terraform (resource_mso_schema_template_anp_test) (DCNE-148)#30shrsr wants to merge 4 commits intoCiscoDevNet:masterfrom
shrsr wants to merge 4 commits intoCiscoDevNet:masterfrom
Conversation
anvitha-jain
requested changes
Aug 23, 2022
samiib
requested changes
Mar 2, 2024
Collaborator
samiib
left a comment
There was a problem hiding this comment.
Just a few variable consistency changes and some merge conflicts to be fixed.
| } | ||
| msoClient := m.(*client.Client) | ||
| _, err := MakeRestRequest(msoClient, path, method, payload) | ||
| var ignore_on_destroy = d.Get("ignore_on_destroy").(bool) |
Collaborator
There was a problem hiding this comment.
Suggested change
| var ignore_on_destroy = d.Get("ignore_on_destroy").(bool) | |
| var ignoreOnDestroy = d.Get("ignore_on_destroy").(bool) |
And everywhere else where this is used.
| anpName = importReadANP | ||
| epgName = importReadEPG | ||
| } else { | ||
| get_attribute := strings.Split(d.Id(), "/") |
Collaborator
There was a problem hiding this comment.
Suggested change
| get_attribute := strings.Split(d.Id(), "/") | |
| getAttribute := strings.Split(d.Id(), "/") |
Same as everywhere else and in other resources.
Collaborator
|
Syncing PR to Jira |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Steps to run the test:
Export to environment-
export MSO_USERNAME=admin
export MSO_PASSWORD='pwd'
export MSO_URL=
Add the following to GNUmakefile in terraform-provider-mso folder -$(TEST) -v $ (TESTARGS) -timeout 120m -race -covermode=atomic -coverprofile=coverage.out
testacccoverage: fmtcheck
-TF_ACC=1 go test
go tool cover -html=coverage.out
coverprofile ensures that we collect coverage and the metrics will be saved to the file specified- coverage.out.
covermode=atomic tracks parallel test branches
go tool cover -html=coverage.out opens the generated coverage.out on the browser
Example-
For running all test functions in resource_mso_schema_site_anp_epg_selector_test use the command :
make testacccoverage TESTARGS="-run=TestAccMSOSchemaSiteAnpEpgSelector_"