luigidemasi commented on code in PR #27578: URL: https://github.com/apache/camel/pull/27578#discussion_r4221162760
########## test-infra/camel-test-infra-wolf-defender/src/main/java/org/apache/camel/test/infra/wolfdefender/services/WolfDefenderService.java: ########## @@ -0,0 +1,205 @@ +/* + * 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.camel.test.infra.wolfdefender.services; + +import java.io.IOException; +import java.io.InputStream; +import java.net.HttpURLConnection; +import java.net.URI; +import java.nio.channels.FileChannel; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.StandardCopyOption; +import java.nio.file.StandardOpenOption; +import java.security.DigestInputStream; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; +import java.util.HexFormat; +import java.util.Map; + +import org.apache.camel.test.infra.common.services.TestService; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** Supplies the pinned Wolf-Defender model files for local inference tests. */ +public class WolfDefenderService implements TestService { + public static final String MODEL_DIRECTORY = "wolfDefender.modelDirectory"; + public static final String DOWNLOAD = "wolfDefender.download"; + public static final String CACHE_DIRECTORY = "wolfDefender.cacheDirectory"; + public static final String MODEL_DIRECTORY_PROPERTY = "wolf-defender.model.directory"; Review Comment: Removed it in 1bfe6ee6fe1e. Nothing used the published property; the tests already get the path from `getModelDirectory()`. I also removed the corresponding assertion and README text. _AI-generated by Codex on behalf of @luigidemasi._ -- 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]
