Skip to content

Commit 2efe549

Browse files
authored
Merge pull request #74 from matrober-uk/tls-client-auth-ignored
Remove test for invalid client auth
2 parents e76b20a + bd8925a commit 2efe549

File tree

1 file changed

+0
-34
lines changed

1 file changed

+0
-34
lines changed

tls_connections_test.go

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -260,37 +260,3 @@ func TestAnonConfigToMutualTLSConnectionFails(t *testing.T) {
260260
assert.Equal(t, "2393", errCtx.GetErrorCode())
261261

262262
}
263-
264-
/*
265-
* Test that we get an error code when we give an invalid value for the
266-
* TLSClientAuth parameter.
267-
*/
268-
func TestInvalidClientAuthValue(t *testing.T) {
269-
270-
cf, err := mqjms.CreateConnectionFactoryFromDefaultJSONFiles()
271-
assert.Nil(t, err)
272-
273-
// Override the connection settings to point to the anonymous ("one way") TLS
274-
// channel (must be configured on the queue manager)
275-
cf.ChannelName = "TLS.ANON.SVRCONN"
276-
277-
// Set the channel settings that tells the client what TLS configuration to use
278-
// to connect to the queue manager.
279-
cf.TLSCipherSpec = "ANY_TLS12"
280-
cf.TLSClientAuth = "INVALID_VALUE!"
281-
cf.KeyRepository = "./tls-samples/anon-tls" // points to .kdb file
282-
283-
// Creates a connection to the queue manager, using defer to close it automatically
284-
// at the end of the function (if it was created successfully)
285-
context, errCtx := cf.CreateContext()
286-
if context != nil {
287-
defer context.Close()
288-
}
289-
290-
assert.NotNil(t, errCtx)
291-
if errCtx != nil {
292-
assert.Equal(t, "MQRC_CD_ERROR", errCtx.GetReason())
293-
assert.Equal(t, "2277", errCtx.GetErrorCode())
294-
}
295-
296-
}

0 commit comments

Comments
 (0)