-
Notifications
You must be signed in to change notification settings - Fork 35
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
Add parser tests part 1 #49
Add parser tests part 1 #49
Conversation
@mmulholla make a temp commit and print |
I added a change to the build order to enable the build to pass. go fmt was failing because the pull request was running go tests and then checking go fmt. The go test creates a tmp directory which it leaves populated, then go fmt throws an error because of the tmp directory existing. I changed the build order so it checks format and then runs the tests and the build then passes. I also tweeked build output after running go fmt to output the error message from go fmt - without thus i would never have found this issue!! |
tests/src/tests/README.md
Outdated
* Parser functions covered: | ||
* Read an existing devfile. | ||
* Write a new devfile. | ||
* Modify Content of a devfile. |
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.
* Modify Content of a devfile. | |
* Modify content of a devfile. |
tests/src/tests/README.md
Outdated
* Composite | ||
* Components | ||
* Container | ||
* Volume |
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.
since #48 has been merged, plugin component with uri defined is also supported
tests/src/tests/README.md
Outdated
1. Go to directory tests/src/tests | ||
1. Run ```go test``` or ```go test -v``` | ||
1. The test creates the following files: | ||
1. ```./tmp/test.log``` contains log output from the tests. |
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.
the tmp
folder should be added in gitignore
tests/src/tests/README.md
Outdated
|
||
* Each devfile is created in a schema structure. | ||
* Which attributes are set and the values used are randomized. | ||
* Once the schema structure is complete it is written in one of two ways. |
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.
why? explain in which situation each is being picked to used?
tests/src/tests/README.md
Outdated
* ```func create<command-type>Command() *schema.<command-type>``` | ||
* creates the command object and calls ```set<command-type>CommandValues``` to add attribute values | ||
* for example see: ```func createExecCommand(execCommand *schema.ExecCommand)``` | ||
* ```func set<command-type>CommandValues(project-sourceProject *schema.<project-source>)``` |
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.
suggest to switch order of set<command-type>CommandValues
and create<command-type>Command()
should explain it before reference it
tests/src/tests/README.md
Outdated
* main entry point for a test to add a command | ||
* maintains the array of commands in the schema structure | ||
* calls generateCommand() | ||
* ```func generateCommand(command *schema.Command, genericCommand *GenericCommand)``` |
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.
same here, suggest to explain generateCommand
before reference it under addCommand
tests/src/tests/README.md
Outdated
* ```func (devfile *TestDevfile) UpdateCommand(command *schema.Command) error``` | ||
* includes logic to call set<commad-type>CommandValues for each commandType. | ||
* ```func (devfile TestDevfile) VerifyCommands(parserCommands []schema.Command) error``` | ||
* Includes logic to compare the array of commands obtained from the parser with those created by the test. if the compare fails: |
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.
be consistent
* Includes logic to compare the array of commands obtained from the parser with those created by the test. if the compare fails: | |
* includes logic to compare the array of commands obtained from the parser with those created by the test. If the compare fails: |
tests/src/tests/README.md
Outdated
* Includes code to get object from the paser and verify their content. | ||
* For commands code is required to: | ||
1. Retrieve each command from the parser | ||
1. Use command id to obtain the GenericCommand object which matches |
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.
since defined as Id
in schema
1. Use command id to obtain the GenericCommand object which matches | |
1. Use command Id to obtain the GenericCommand object which matches |
tests/src/tests/README.md
Outdated
* For commands code is required to: | ||
1. Retrieve each command from the parser | ||
1. Use command id to obtain the GenericCommand object which matches | ||
1. compare the command structure returned by the parser with the command structure saved in the GenericCommand object. |
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.
To be consistent
1. compare the command structure returned by the parser with the command structure saved in the GenericCommand object. | |
1. Compare the command structure returned by the parser with the command structure saved in the GenericCommand object. |
tests/src/tests/README.md
Outdated
* ```func (devfile TestDevfile) EditCommands() error``` | ||
* Specific to command objects. | ||
1. Ensure devfile is written to disk | ||
1. use parser to read devfile and get all command object |
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.
1. use parser to read devfile and get all command object | |
1. Use parser to read devfile and get all command object |
tests/src/tests/README.md
Outdated
1. use parser to read devfile and get all command object | ||
1. for each command call: | ||
* ```func (devfile *TestDevfile) UpdateCommand(command *schema.Command) error``` | ||
1. when all commands have been updated, use parser to write the updated devfile to disk |
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.
1. when all commands have been updated, use parser to write the updated devfile to disk | |
1. When all commands have been updated, use parser to write the updated devfile to disk |
tests/src/tests/README.md
Outdated
* Specific to command objects. | ||
1. Ensure devfile is written to disk | ||
1. use parser to read devfile and get all command object | ||
1. for each command call: |
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.
1. for each command call: | |
1. For each command call: |
tests/src/tests/README.md
Outdated
* See also | ||
*```func Test_<string>ExecCommand(t *testing.T)``` | ||
*```func Test_MultiCommand(t *testing.T)``` | ||
*```func Test_Everything(t *testing.T)``` |
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.
Need space after *
*```func Test_Everything(t *testing.T)``` | |
* ```func Test_<string>ExecCommand(t *testing.T)``` | |
* ```func Test_MultiCommand(t *testing.T)``` | |
* ```func Test_Everything(t *testing.T)``` |
tests/src/tests/README.md
Outdated
*```func Test_<string>ExecCommand(t *testing.T)``` | ||
*```func Test_MultiCommand(t *testing.T)``` | ||
*```func Test_Everything(t *testing.T)``` | ||
* add logic to ```func runTest(testContent TestContent, t *testing.T)``` includes logic |
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.
* add logic to ```func runTest(testContent TestContent, t *testing.T)``` includes logic | |
* Adds logic to ```func runTest(testContent TestContent, t *testing.T)``` which includes logic |
tests/src/tests/README.md
Outdated
*```func Test_MultiCommand(t *testing.T)``` | ||
*```func Test_Everything(t *testing.T)``` | ||
* add logic to ```func runTest(testContent TestContent, t *testing.T)``` includes logic | ||
1. Add commands to the test |
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.
1. Add commands to the test | |
1. Adds commands to the test |
tests/src/tests/README.md
Outdated
1. command-test-utils.AddCommand | ||
1. command-test-utils.GenerateCommand | ||
1. command-test-utils.createExecCommand | ||
1. command-test-utils.setExecCommandValues |
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.
check the indentation, otherwise the format will be incorrect.
same as below
1. command-test-utils.setExecCommandValues | |
1. command-test-utils.AddCommand | |
1. command-test-utils.GenerateCommand | |
1. command-test-utils.createExecCommand | |
1. command-test-utils.setExecCommandValues |
eecdda8
to
1eb906b
Compare
1eb906b
to
c9ea73a
Compare
@yangcao77 Thank you for your comments, I have addressed each of them except: "since #48 has been merged, plugin component with uri defined is also supported" the section is about what is supported in the test which does not include that function yet. |
tests/src/tests/test_utils.go
Outdated
return GetRandomDecision(1, 1) | ||
} | ||
|
||
func GetRandomDecision(success int, failure int) bool { |
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.
how does this function works? why expect an int value for success and failure?
Besides, I would like to suggest having a simple comment for every function you added
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.
There are a lots of functions without comments. Is it OK if I add these in a subsequent pull request? The tests are working and would like to get them merged - this is only part 1.
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.
Have now added simple comments to all functions
if GetBinaryDecision() { | ||
containerComponent.VolumeMounts = AddVolume(GetRandomNumber(4)) | ||
} else { | ||
containerComponent.Env = nil |
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.
should be VolumeMounts
?
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.
if it's nil
, you can just leave it empty instead of setting it as nil. same as above
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.
yes, oops
LogMessage("Enter VerifyComponents") | ||
errorString := "" | ||
|
||
// Compare entire array of commands |
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.
components*
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.
oops
return Exposures[GetRandomNumber(len(Exposures))-1] | ||
} | ||
|
||
var Protocols = [...]schema.EndpointProtocol{schema.HTTPEndpointProtocol, schema.WSEndpointProtocol, schema.TCPEndpointProtocol, schema.UDPEndpointProtocol} |
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.
should wss
and https
be included as well?
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.
At the time of writing the tests the parser was not using the schema with this update. If it is now I can extend the test.
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.
yes, it's been merged in api repo as a part of devfile/api#268
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.
I tried and the tests failed, will enable later.
} | ||
devfile.replaceSchemaCommand(*parserCommand) | ||
} else { | ||
errorString += LogMessage(fmt.Sprintf(" ....... Command not found in test : %s", parserCommand.Id)) |
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.
I would prefer to have errorString
with type []string
and do errorString= append(errorString, errorMessage)
instead of using +=
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.
Sure append is new to me :-), but another I would like to keep for part 2.
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.
done
tests/src/tests/test_utils.go
Outdated
|
||
func GetGroupKinds() []schema.CommandGroupKind { | ||
setRandSeed() | ||
return []schema.CommandGroupKind{schema.BuildCommandGroupKind, schema.RunCommandGroupKind, schema.TestCommandGroupKind, schema.DebugCommandGroupKind} |
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.
this is a constant slice, no need to setRandSeed. and no need a separate function for the group kinds
suggest to have the slice defined at top of the file, as you've done for protocol and exposure in endpoints
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.
Yes, I created endpoint later than components - maybe my go skills were increasing :-)
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.
Done
tests/src/tests/test_utils.go
Outdated
testDevfile := TestDevfile{} | ||
testDevfile.SchemaDevFile = schema.Devfile{} | ||
testDevfile.FileName = fileName | ||
testDevfile.SchemaDevFile.SchemaVersion = "2.0.0" |
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.
Just want to point out that I have seen this schema version is hard coded to 2.0.0
, and the tests are relying on devfile structs defined in api repo(schema). However, the parser repo is going to support multiple schema versions, not only V2, but also future versions.
I know this is the first PR (part1) for the test, we might also want to start considering how the test structure is going to be for future schema versions, i.e. which parts can be commonly used, and which parts are version specific.
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.
Yes, that is on my to do list, not sure yet how to best do it.
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.
I honestly think we should do that before merging this PR. Once this merged, we will keep adding tests and before we know it, it will be a lot of updates and refactoring to accommodate future version schema changes.
tests/src/tests/test_utils.go
Outdated
} | ||
err = devObj.WriteYamlDevfile() | ||
if err != nil { | ||
LogMessage(fmt.Sprintf(" ..... ERROR: wriring devfile : %v", err)) |
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.
again, I saw the formats for log messages are inconsistent.
here is ..... ERROR:
for error messages, and above are using --> ERROR
and I saw some messages are with 5 dots, and some are with 6 dots, and with/without spaces in between.
this is due to the log format is manually input for every message, and which is something we want to avoid
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.
Yes, that will help with consistency, part 2? :-)
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.
Done
tests/src/tests/test_utils.go
Outdated
if commands != nil && len(commands) > 0 { | ||
err = devfile.VerifyCommands(commands) | ||
} else { | ||
LogMessage(fmt.Sprintf(" No command found in %s : ", devfile.FileName)) |
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.
LogMessage(fmt.Sprintf(" No command found in %s : ", devfile.FileName)) | |
LogMessage(fmt.Sprintf(" No commands found in %s : ", devfile.FileName)) |
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.
lol, the patent attorney in me says that "command" is more accurate.
tests/src/tests/test_utils.go
Outdated
|
||
err = ctx.SetAbsPath() | ||
if err != nil { | ||
LogMessage(fmt.Sprintf(" ..... ERROR: setting devfile path : %v", err)) |
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.
should return err
if it's not nil.
same for other error checks
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.
The code in this case does return err. One of my ingrained code styles is single entry single exit.
tests/src/tests/test_utils.go
Outdated
LogMessage(fmt.Sprintf(" .......marshall and write devfile %s", devfile.FileName)) | ||
c, err := yaml.Marshal(&(devfile.SchemaDevFile)) | ||
|
||
if err == nil { |
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.
IMO, we should check err!= nil
, and return err.
same for other error checks
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.
Same here, it does get returned but only at the end. - single entry single exit
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.
Changed all err ==nil to err != nil to hopefully look less weird, but I keep a single exit point.
@yangcao77 I have hopefully addressed all of your comments to your satisfaction. Also thanks again for the thorough review and teaching me about append. |
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.
Some review comments
Can we also update the path tests/src/tests
?
- Dockerfiles can be in
tests/examples/dockerfiles
- tests code themselves can in
tests/<test type like integration/e2e>
&tests/utils
- Readme can in
tests/
tests/src/tests/README.md
Outdated
|
||
The tests use the go language and are intended to test every apsect of the parser for every schema attribute. Some basic aspects of the tests: | ||
|
||
* A first test (parser_v200_schema_test.go) feeds pre-created devfiles to the parser to ensure the parser can parse all attribues and return an approproate error when the devfile contains an 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.
No file with this name
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.
attribues, approproate typo
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.
Added a note to say the test was not available yet - needs updating as a result of schema changes
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.
If its not there, should we really merge this information? Dont want others to be confused whoever is reading it
tests/src/tests/test_utils.go
Outdated
const tmpDir = "./tmp/" | ||
const logErrorOnly = false | ||
const logFileName = "test.log" | ||
const logToFileOnly = true // If set to false the log output will also be output to the console |
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.
const tmpDir = "./tmp/" | |
const logErrorOnly = false | |
const logFileName = "test.log" | |
const logToFileOnly = true // If set to false the log output will also be output to the console | |
const ( | |
tmpDir = "./tmp/" | |
logErrorOnly = false | |
logFileName = "test.log" | |
// logToFileOnly if set to false the log output will also be output to the console | |
logToFileOnly = true | |
) |
is cleaner way to define multiple consts, golang also puts the comment before the variable/const so that it can be viewed by any IDE navigation. Similar for the other files declaring consts
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.
Also perhaps maybe we can customize settings like logToFileOnly using some sort of ENV rather than changing code constants and it gives a greater flexibility with the default being true
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.
Changed the constant format.
Customizing the settings is using ENV or similar is for the future.
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.
Think test devfile logic can be cleaned up more. There are a few redundant codes in tests.
tests/src/tests/test_utils.go
Outdated
} | ||
|
||
type TestDevfile struct { | ||
SchemaDevFile schema.Devfile |
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.
can we rename this to something else? Its very confusing to read TestDevfile.SchemaDevFile
. Maybe Data or Contents sounds ok?
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.
I honestly cannot think of a more descriptive name - going to punt on this one.
func (devfile *TestDevfile) UpdateCommand(parserCommand *schema.Command) error { | ||
|
||
var errorString []string | ||
testCommand, found := getSchemaCommand(devfile.SchemaDevFile.Commands, parserCommand.Id) |
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.
why are we doing this? You already have the command that you passed in to this function - parserCommand
. The getSchemaCommand()
basically loops thru all the commands and matches the id and returns the same command back..
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 here I am testing the paser api used to modify existing devfile conent. So first I create the schema structure as reference devfile content. Write that to disk, have the parser read it and then start updating. For updating I update the reference structure, use parser api to make the same update, get the full devfile back and make sure the updates are reflected. Probably need to get some invalid updates going here to that is for the future.
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.
I get what you mean, but you are not doing anything with the testCommand
in this func:
var err error
testCommand, found := getSchemaCommand(devfile.SchemaDevFile.Commands, parserCommand.Id)
if found {
LogInfoMessage(fmt.Sprintf("Updating command id: %s", parserCommand.Id))
if testCommand.Exec != nil {
setExecCommandValues(parserCommand.Exec)
} else if testCommand.Composite != nil {
setCompositeCommandValues(parserCommand.Composite)
}
devfile.replaceSchemaCommand(*parserCommand)
} else {
err = errors.New(LogErrorMessage(fmt.Sprintf("Command not found in test : %s", parserCommand.Id)))
}
return err
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.
testCommand is used in the if and else statements. The logic is basically
- Use the id from the command returned by the parser to find the equivalent command in the test.
2: if it is found:
a. check the type of the command recorded in the test and set appropriate update values in the command returned by the parser
b. replace the command stored in the test with the new version to be given to the parser. - If it is not found we have a problem.
on return the parser api is use to write the updated parser command.
I could do this any number of ways but the outcome needs to be the same.
func (devfile TestDevfile) replaceSchemaCommand(command schema.Command) { | ||
for i := 0; i < len(devfile.SchemaDevFile.Commands); i++ { | ||
if devfile.SchemaDevFile.Commands[i].Id == command.Id { | ||
devfile.SchemaDevFile.Commands[i] = command | ||
break | ||
} | ||
} | ||
} |
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.
I think if we clean up the test devfile structs like I mentioned earlier you can use the parser's updateCommand() func. This is basically duplicating effort and having two copies of the same thing - one in test and one in parser
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.
Yes, just the way the test work, maintain a reference of devfile content to compare with what the parser returns.
9b1f8f7
to
0010b5f
Compare
Guys, thank you for the thorough reviews. I have hopefully responded to all of your comments and addressed most of them. |
@maysunfaisal @yangcao77 Are you OK to approve now? |
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.
Few other minor nits and comments
return Exposures[GetRandomNumber(len(Exposures))-1] | ||
} | ||
|
||
//var Protocols = [...]schema.EndpointProtocol{schema.HTTPEndpointProtocol, schema.HTTPSEndpointProtocol, schema.WSEndpointProtocol, schema.WSSEndpointProtocol, schema.TCPEndpointProtocol, schema.UDPEndpointProtocol} |
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.
remove comment
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.
It is a place holder for when I can run against the latest schema, at which point it will be uncomented.
2cecc05
to
603f8e3
Compare
603f8e3
to
d2d24b3
Compare
@maysunfaisal - all done now? |
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.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: maysunfaisal, mmulholla The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What does this PR do?
Adds tests which use the parser api to verify, create. and edit valid devfile.yaml files.
Current support :
Commands: Exec and Composite
Components: Container and Volume
What issues does this PR fix or reference?
devfile/api#215
Is your PR tested? Consider putting some instruction how to test your changes
Yes. Readme includes instruction for how to modify tests