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

Add unit tests to ncproxy #1143

Merged
merged 1 commit into from
Sep 10, 2021

Conversation

katiewasnothere
Copy link
Contributor

  • Add mocked grpc and ttrpc services for ncproxy testing

Signed-off-by: Kathryn Baldauf kabaldau@microsoft.com

@katiewasnothere katiewasnothere requested a review from a team as a code owner August 31, 2021 21:56
if _, ok := err.(hcn.NetworkNotFoundError); ok {
return nil, status.Errorf(codes.NotFound, "no network/switch with name `%s` found", req.SwitchName)
policies := []hcn.NetworkPolicy{}
if req.SwitchName != "" {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added this change to allow us to make other network types than just transparent as was the previous limitation. This is also needed for the tests since we can't make transparent networks without an adapter.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's fine, I didn't like how I made this required to start with.

@katiewasnothere katiewasnothere force-pushed the ncproxy_tests branch 2 times, most recently from 199d095 to c63024f Compare August 31, 2021 22:08
@katiewasnothere katiewasnothere force-pushed the ncproxy_tests branch 3 times, most recently from 4d5976c to 8fd2e14 Compare September 8, 2021 01:26
@dcantah dcantah self-assigned this Sep 8, 2021
Copy link
Contributor

@anmaxvl anmaxvl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@@ -35,4 +35,7 @@ const (

// V20H2 corresponds to Windows Server 20H2 (semi-annual channel).
V20H2 = 19042

// V21H1 corresponds to Windows Server 21H1 (semi-annual channel).
V21H1 = 19043
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some of the things here, like this, feel like they'd be better off in their own commit.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a comment to the test to indicate why it blocks on this version

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ty

Copy link
Contributor

@dcantah dcantah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move the osversion package change into its own commit. Testing changes lgtm

* Add mocked grpc and ttrpc services for ncproxy testing

Signed-off-by: Kathryn Baldauf <kabaldau@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants