As we reevaluate how to best support and maintain Staging Ref in the future, we encourage development teams using this environment to highlight their use cases in the following issue: https://gitlab.com/gitlab-com/gl-infra/software-delivery/framework/software-delivery-framework-issue-tracker/-/issues/36.

Skip to content
Snippets Groups Projects
Commit ec6529fa authored by Patrick Bajao's avatar Patrick Bajao
Browse files

Merge branch 'ashmckenzie/fix-some-testifylint-errors' into 'main'

parents dbf4d3de d9c1e911
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -125,6 +125,6 @@ func TestCheckForVersionFlag(t *testing.T) {
cmd.Env = append(os.Environ(), "GITLAB_SHELL_TEST_CHECK_FOR_VERSION_FLAG=1")
out, err := cmd.Output()
require.Nil(t, err)
require.NoError(t, err)
require.Equal(t, "test 1.2.3-456\n", string(out))
}
Loading
Loading
@@ -33,7 +33,7 @@ func TestPrometheusMetrics(t *testing.T) {
func TestCachedConnections(t *testing.T) {
c := newClient()
require.Len(t, c.cache.connections, 0)
require.Empty(t, c.cache.connections)
cmd := Command{ServiceName: "git-upload-pack", Address: "tcp://localhost:9999"}
Loading
Loading
Loading
Loading
@@ -141,11 +141,11 @@ func TestRunGitalyCommandMetadata(t *testing.T) {
err := cmd.RunGitalyCommand(context.Background(), func(ctx context.Context, _ *grpc.ClientConn) (int32, error) {
md, exists := metadata.FromOutgoingContext(ctx)
require.True(t, exists)
require.Equal(t, len(tt.want), md.Len())
require.Len(t, md, len(tt.want))
for k, v := range tt.want {
values := md.Get(k)
require.Equal(t, 1, len(values))
require.Len(t, values, 1)
require.Equal(t, v, values[0])
}
Loading
Loading
@@ -212,11 +212,11 @@ func TestPrepareContext(t *testing.T) {
md, exists := metadata.FromOutgoingContext(ctx)
require.True(t, exists)
require.Equal(t, len(tt.want), md.Len())
require.Len(t, md, len(tt.want))
for k, v := range tt.want {
values := md.Get(k)
require.Equal(t, 1, len(values))
require.Len(t, values, 1)
require.Equal(t, v, values[0])
}
Loading
Loading
Loading
Loading
@@ -155,7 +155,7 @@ func TestHandleExec(t *testing.T) {
_, shouldContinue, err := s.handleExec(context.Background(), r)
require.Equal(t, tc.expectedErr, err)
require.Equal(t, false, shouldContinue)
require.False(t, shouldContinue)
require.Equal(t, tc.sentRequestName, f.sentRequestName)
require.Equal(t, tc.sentRequestPayload, f.sentRequestPayload)
}
Loading
Loading
Loading
Loading
@@ -284,7 +284,7 @@ func TestInvalidServerConfig(t *testing.T) {
require.Error(t, err)
require.Equal(t, "failed to listen for connection: listen tcp: address invalid: missing port in address", err.Error())
require.Nil(t, s.Shutdown())
require.NoError(t, s.Shutdown())
}
func TestClosingHangedConnections(t *testing.T) {
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment