-
Notifications
You must be signed in to change notification settings - Fork 28
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
RegEx Lookup and Improved RegEx #412
Conversation
5403f90
to
d8fa9bc
Compare
service-remove: ([a-z]+) | ||
stack-create: ([a-z0-9]){64} | ||
stack-list: NAME\s+ID\s+STATE\s*-+\s*\n+([a-z0-9A-Z\s]*){1,} | ||
stack-stop: ([a-z0-9]){64} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of [stack-create
, stack-stop
, stack-restart
] it should be just a single stack-id
The same for service-id
func TestCmds(t *testing.T) { | ||
_, err := loadRegexLookup() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You never use the []*LookupSpec
return | ||
} | ||
|
||
func loadRegexLookup() ([]*LookupSpec, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So you can remove it here
} | ||
|
||
//Parse regex-lookup.yml using a map | ||
func parseLookup(file string) (*LookupSpec, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and here
Ref #387
Added
regex-lookup.yml
containing a dictionary of regular expressions used in the test runner. Also updated the regular expressions for better pattern matching.The earlier version of regular expressions was limited to matching the pattern of the first row of the output. The updated regex matches the pattern of the entire output that is returned.
To test:
go test github.com/appcelerator/amp/cmd/amp/cli