PakhomovAlexander commented on code in PR #1659: URL: https://github.com/apache/ignite-3/pull/1659#discussion_r1102572793
########## modules/network/src/test/java/org/apache/ignite/internal/network/ssl/SslContextProviderTest.java: ########## @@ -0,0 +1,165 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.network.ssl; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.containsString; +import static org.hamcrest.Matchers.equalTo; +import static org.hamcrest.Matchers.notNullValue; +import static org.junit.Assert.assertThrows; + +import io.netty.handler.ssl.SslContext; +import org.apache.ignite.internal.configuration.testframework.ConfigurationExtension; +import org.apache.ignite.internal.configuration.testframework.InjectConfiguration; +import org.apache.ignite.internal.network.configuration.SslConfiguration; +import org.apache.ignite.lang.ErrorGroups.Common; +import org.apache.ignite.lang.IgniteException; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; + +@ExtendWith(ConfigurationExtension.class) +class SslContextProviderTest { + + @InjectConfiguration + SslConfiguration configuration; + + String password; + + String keyStorePkcs12Path; + + String trustStoreJks12Path; + + @BeforeEach + void setUp() { + password = "changeit"; + keyStorePkcs12Path = SslContextProviderTest.class.getClassLoader().getResource("ssl/keystore.p12").getPath(); Review Comment: No, they do not need it. But we test the scenario that is close to the real world. (The keystore and truststore were generated by me using `openssl` and `keytool`). That means they are likely the same as our users would use. In case we generate keystore and truststore directly from java code, I can not guarantee that they are the same as users would use. Does it make sense? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
