Run acceptance tests only when 'acceptance' go:build tag is present #21
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.
Description
This solves the problem of running acceptance tests as per the solution agreed (running them only manually from local).
It's using
//go:build acceptance
go build tag to mark acceptance test files (and//go:build unit
). File naming convention I used is:*_acc_test.go
for acceptance tests file, and*_test.go
for unit tests file.This can easily be tested locally with
go test ./...
(without the tag) orgo test ./... -tags=acceptance
, if one wants to run the acceptance tests too from local.I also did some file renaming and class renaming, as per terraform conventions used in other
cisco-open
repos.This also copied over all the changes present in this PR (so it can be closed now): #16
Type of Change
Checklist