Skip to content
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

Expand testing and documentation #60

Merged
merged 2 commits into from
Aug 25, 2020
Merged

Expand testing and documentation #60

merged 2 commits into from
Aug 25, 2020

Conversation

robert-cronin
Copy link
Contributor

@robert-cronin robert-cronin commented Jul 16, 2020

This is the testing PR, specifically for ensuring the Git operations and peer communications are deterministic.

PR will also add documentation to each class and interface.
Fixes #3
Fixes #62
Fixes #91

@robert-cronin robert-cronin added the development Standard development label Jul 16, 2020
@robert-cronin robert-cronin self-assigned this Jul 16, 2020
@robert-cronin robert-cronin changed the title Expand testing Expand testing and documentation Jul 16, 2020
@CMCDragonkai
Copy link
Member

CMCDragonkai commented Jul 20, 2020

BTW, for the compiled output, I'd recommend not using the minified output here.

Minification is only needed for web apps and the final GUI app.

For this sort of stuff, not-minifying allow us to more easily do diffs in our commits.

@CMCDragonkai
Copy link
Member

Most of this is syntax changes right?

Can we merge the simple stuff first like syntax changes and then get to the meat of the stuff in the separate PR?

Also the number of files being changed in docs and dist always ends up blowing up the PR interface.

Is there a way we can not build the docs/dist changes until we need to? So the PRs here can just add functionality, and then just before we merge, we can add the build. Or even do that in a separate commit. It makes it very difficult to review the code with some much boilerplate noise.

@robert-cronin
Copy link
Contributor Author

robert-cronin commented Jul 22, 2020

BTW, for the compiled output, I'd recommend not using the minified output here.

Minification is only needed for web apps and the final GUI app.

For this sort of stuff, not-minifying allow us to more easily do diffs in our commits.

Yeah sure, we can stop webpack from minifying with the following option:

optimization: {
    minimize: false
},

I will do this now and we can minify later

@robert-cronin
Copy link
Contributor Author

Most of this is syntax changes right?

Can we merge the simple stuff first like syntax changes and then get to the meat of the stuff in the separate PR?

Also the number of files being changed in docs and dist always ends up blowing up the PR interface.

Is there a way we can not build the docs/dist changes until we need to? So the PRs here can just add functionality, and then just before we merge, we can add the build. Or even do that in a separate commit. It makes it very difficult to review the code with some much boilerplate noise.

Yeah I agree, the dist and docs folders clog up the review interface. We could always .gitignore those folders since they are generated output after all? Or probably the better option would be to do what we did last time and separate out the commits into a generated files commit for docs/dist etc and a source files commit for actual changes that need to be reviewed. I think I will maintain these two with rebasing.

@robert-cronin robert-cronin force-pushed the testing branch 2 times, most recently from 5002479 to d726983 Compare July 22, 2020 02:32
@robert-cronin
Copy link
Contributor Author

You can now exclude the generated files from a review based on a single commit and I will try to keep it this way with future changes 👍

@CMCDragonkai
Copy link
Member

CMCDragonkai commented Jul 22, 2020 via email

@CMCDragonkai
Copy link
Member

CMCDragonkai commented Jul 22, 2020 via email

@robert-cronin robert-cronin force-pushed the testing branch 8 times, most recently from a50a8b8 to 7e649df Compare August 3, 2020 08:06
@robert-cronin robert-cronin force-pushed the testing branch 3 times, most recently from 6f84585 to e3c95c2 Compare August 5, 2020 08:32
@CMCDragonkai
Copy link
Member

What's the relationship between this PR and #73? Should this be merged first?

@robert-cronin
Copy link
Contributor Author

robert-cronin commented Aug 11, 2020

#73 can be merged first, it is a separate addition that doesn't include any dedicated testing (the testing for that addition will be added in here)

@robert-cronin robert-cronin force-pushed the testing branch 3 times, most recently from e03d951 to d176fc7 Compare August 24, 2020 06:11
@robert-cronin
Copy link
Contributor Author

robert-cronin commented Aug 24, 2020

We now have 60 tests running to success, here are some noteworthy changes made to the library code:

  • added in PK_LOG_PATH and PK_SOCKET_PATH environment variable options, purely for creating a separate agent environment for testing.
  • separated the git backend and frontend into testable modules that don't depend on vaultManager.

These tests now also cover the agent and cli code

@robert-cronin robert-cronin force-pushed the testing branch 2 times, most recently from c7bdd56 to 9b4f52b Compare August 24, 2020 08:58
@robert-cronin
Copy link
Contributor Author

This PR is now ready for review @CMCDragonkai

@robert-cronin
Copy link
Contributor Author

robert-cronin commented Aug 25, 2020

I've noticed the jest tests fail in the pipeline because of the agent tests. This might be because the agent cannot connect in the nodejs image we use for the pipeline.

The tests are also throwing because there is no mock CA to test our secure connection.

I will create a new issue for this, I suspect the solution is using our new nix image instead of nodejs for our jest testing.

@robert-cronin
Copy link
Contributor Author

Pipeline is successful, but hangs as described in #92. This is a specific issue with gitlab, so we can go ahead and merge.

@robert-cronin robert-cronin merged commit a2076c4 into master Aug 25, 2020
@robert-cronin robert-cronin deleted the testing branch August 25, 2020 03:54
@CMCDragonkai
Copy link
Member

Nice! This will be useful as we are doing the training soon.

@CMCDragonkai
Copy link
Member

@robert-cronin

added in PK_LOG_PATH and PK_SOCKET_PATH environment variable options, purely for creating a separate agent environment for testing.

These 2 env variables should be mentioned in the .env.example. I don't see it there.

Furthermore the shell.nix might want to set them according to project-local ./tmp directory.

@robert-cronin
Copy link
Contributor Author

Im not sure it makes much sense to put them in .env, they are purely for testing and in that case we would need to include that file in a commit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
development Standard development
2 participants