mayday icon indicating copy to clipboard operation
mayday copied to clipboard

Implement more rigorous testing

Open brianredbeard opened this issue 8 years ago • 2 comments

We should implement functional and unit testing for Mayday.

  • Unit Testing
    • [ ] Invalid command parsing
    • [ ] Symbolic link naming
  • Functional
    • [ ] File does not exist
    • [ ] File isn't readable
    • [ ] Permissions are wrong

As we progress in adding features (Object storage upload, etc) we should strive for 100% test coverage.

brianredbeard avatar Jul 06 '16 00:07 brianredbeard

#27 has a bunch of setup for getting testing done, and contains tests for file.go and command.go.

Can you explain more about what we're looking for the (specific tests you pointed out) to do? For instance, for "symbolic link naming", is that just making sure that if I say to run tar -xzf foo.tar.gz and make a link called "foo", that the link foo is made to mayday_commands/tar_-xzf_foo.tar.gz ? And for the functional tests, these are tests on the output files in /tmp/, correct?

tschuy avatar Jul 06 '16 16:07 tschuy

Ok, I rewrote Mayday. See #29. It's a heck of a lot more testable, but there are certain aspects I'm not sure of.

tschuy avatar Jul 08 '16 00:07 tschuy