Skip to content

Commit 7e5a6fb

Browse files
committed
Tweak the canonical hash import test
1 parent 5f83675 commit 7e5a6fb

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

integration-tests/src/test/java/io/apicurio/tests/migration/GenerateCanonicalHashImportIT.java

+12-4
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import io.apicurio.registry.client.auth.VertXAuthFactory;
44
import io.apicurio.registry.model.BranchId;
55
import io.apicurio.registry.rest.client.RegistryClient;
6+
import io.apicurio.registry.rest.client.models.Error;
67
import io.apicurio.registry.types.ArtifactType;
78
import io.apicurio.registry.types.ContentTypes;
89
import io.apicurio.registry.types.VersionState;
@@ -69,9 +70,16 @@ public void testGeneratingCanonicalHashOnImport() throws Exception {
6970
The only way is to generate canonical hash and then search artifact by it. But that needs apicurio-registry-app module as dependency.
7071
*/
7172

72-
var registryContent = client.groups().byGroupId(groupId).artifacts().byArtifactId(artifactId).versions().byVersionExpression("1").content().get();
73-
assertNotNull(registryContent);
74-
assertEquals(content, IoUtil.toString(registryContent));
73+
try {
74+
var registryContent = client.groups().byGroupId(groupId).artifacts().byArtifactId(artifactId).versions().byVersionExpression("1.0").content().get();
75+
assertNotNull(registryContent);
76+
assertEquals(content, IoUtil.toString(registryContent));
77+
} catch (Error e) {
78+
System.out.println("---");
79+
System.out.println("REST CLIENT ERROR>> " + e.getDetail());
80+
System.out.println("---");
81+
throw e;
82+
}
7583
}
7684

7785
}
@@ -139,7 +147,7 @@ public InputStream generateExportedZip(Map<String, String> artifacts) {
139147
versionEntity.labels = null;
140148
versionEntity.name = null;
141149
versionEntity.state = VersionState.ENABLED;
142-
versionEntity.version = "1";
150+
versionEntity.version = "1.0";
143151
versionEntity.versionOrder = 1;
144152

145153
writer.writeEntity(versionEntity);

0 commit comments

Comments
 (0)