Skip to content

Commit

Permalink
Fix a problem in the canonical hash integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
EricWittmann committed May 14, 2024
1 parent a36f822 commit ade82a0
Showing 1 changed file with 20 additions and 19 deletions.
Original file line number Diff line number Diff line change
@@ -1,28 +1,10 @@
package io.apicurio.tests.migration;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.StandardCharsets;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import java.util.UUID;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.zip.ZipOutputStream;

import org.apache.commons.codec.digest.DigestUtils;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;

import io.apicurio.registry.client.auth.VertXAuthFactory;
import io.apicurio.registry.model.BranchId;
import io.apicurio.registry.rest.client.RegistryClient;
import io.apicurio.registry.types.ArtifactType;
import io.apicurio.registry.types.ContentTypes;
import io.apicurio.registry.types.VersionState;
import io.apicurio.registry.utils.IoUtil;
import io.apicurio.registry.utils.impexp.ArtifactBranchEntity;
Expand All @@ -34,6 +16,24 @@
import io.apicurio.tests.utils.Constants;
import io.kiota.http.vertx.VertXRequestAdapter;
import io.quarkus.test.junit.QuarkusIntegrationTest;
import org.apache.commons.codec.digest.DigestUtils;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.StandardCharsets;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import java.util.UUID;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.zip.ZipOutputStream;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;

@QuarkusIntegrationTest
@Tag(Constants.MIGRATION)
Expand Down Expand Up @@ -95,6 +95,7 @@ public InputStream generateExportedZip(Map<String, String> artifacts) {
Long contentId = contentIndex.computeIfAbsent(contentHash, k -> {
ContentEntity contentEntity = new ContentEntity();
contentEntity.contentId = contentIdSeq.getAndIncrement();
contentEntity.contentType = ContentTypes.APPLICATION_JSON;
contentEntity.contentHash = contentHash;
contentEntity.canonicalHash = null;
contentEntity.contentBytes = contentBytes;
Expand Down

0 comments on commit ade82a0

Please sign in to comment.