Skip to content

Added encrypted_transport testcase migrated in go#5664

Merged
deepthi merged 2 commits intovitessio:masterfrom
planetscale:tal_upstream_encrypted_transport_test
Jan 8, 2020
Merged

Added encrypted_transport testcase migrated in go#5664
deepthi merged 2 commits intovitessio:masterfrom
planetscale:tal_upstream_encrypted_transport_test

Conversation

@saurabh408
Copy link
Copy Markdown
Contributor

Encrypted transport tests :

  • Sets up all the certificates , some table ACL's and connect via grpc client with SSL.
  • exercises the "grpc_use_effective_callerid" flag, by connecting without SSL.

Signed-off-by: saurabh saurabh.408@gmail.com

Signed-off-by: saurabh <saurabh.408@gmail.com>
@saurabh408 saurabh408 requested a review from sougou as a code owner January 7, 2020 09:04
Copy link
Copy Markdown
Contributor

@ajeetj ajeetj left a comment

Choose a reason for hiding this comment

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

Overall looks good.
Small nit-picks here and there mentioned below.

err = clusterInstance.VtctlclientProcess.InitTablet(&replicaTablet, clusterInstance.Cell, keyspace, hostname, shardName)
assert.Nil(t, err)
err = replicaTablet.VttabletProcess.CreateDB(keyspace)
assert.Nil(t, err)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe use in a loop

for _, tablet := range []cluster.Vttablet{*masterTablet, *replicaTablet} {
			
		}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

Comment on lines +133 to +134
}
]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: formatting looks off

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done


// Reparenting
vtctlClientArgs = append(vtctlClientTmArgs, "InitShardMaster", "-force", "test_keyspace/0", masterTablet.Alias)
_, err = clusterInstance.VtctlProcess.ExecuteCommandWithOutput(vtctlClientArgs...)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

As you don't need a result here maybe write another method in VtctlProcess which just returns err?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

for i := 0; i < 2; i++ {
// instantiate vttablet object with reserved ports
tabletUID := clusterInstance.GetAndReserveTabletUID()
tablet := clusterInstance.GetVttabletInstance("replica", tabletUID, cell)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: if you can pass tabletUID=0 then you don't need to call separate tabletUID := clusterInstance.GetAndReserveTabletUID()

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

Signed-off-by: saurabh <saurabh.408@gmail.com>
Copy link
Copy Markdown
Collaborator

@deepthi deepthi left a comment

Choose a reason for hiding this comment

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

LGTM

@deepthi deepthi merged commit 9b0dae0 into vitessio:master Jan 8, 2020
@deepthi deepthi deleted the tal_upstream_encrypted_transport_test branch January 8, 2020 00:43
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