From 8176b622ae5abde121a1abc431da6cdec6ed83a0 Mon Sep 17 00:00:00 2001 From: James Rosewell Date: Thu, 12 Nov 2026 01:57:11 +0000 Subject: [PATCH] Set the licence key field the live 51Did test reads DidClientLiveTests declares a licenceKey field, never assigns it, and reads it in identifiersCreatedFor to build the "&license=" part of the form body, so DidClient.encode is handed null and anIdentifierForAnotherAddress_ReportsEveryFactor fails with a NullPointerException. That is the whole of the Cloud 51Did failure on rc. init() now takes the licence key once, keeps it in the field and gives that field to the client, which is the shape the file had before the lookup moved from env() to LiveCloudKeys.find() and was inlined into the constructor call. No fail() is added for a missing licence key, because LiveCloudKeys says the licence key is optional and both tests that need one already skip on client.hasLicenceKey(). One lookup now feeds both that guard and the form body, so the field cannot be null where it is read. Test code only, so nothing a user sees changes. --- .../test/java/fiftyone/pipeline/did/DidClientLiveTests.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pipeline/pipeline.did/src/test/java/fiftyone/pipeline/did/DidClientLiveTests.java b/pipeline/pipeline.did/src/test/java/fiftyone/pipeline/did/DidClientLiveTests.java index ea605515..6794f4ee 100644 --- a/pipeline/pipeline.did/src/test/java/fiftyone/pipeline/did/DidClientLiveTests.java +++ b/pipeline/pipeline.did/src/test/java/fiftyone/pipeline/did/DidClientLiveTests.java @@ -70,8 +70,10 @@ public void init() { if (resourceKey == null) { fail(LiveCloudKeys.noResourceKey()); } - client = new DidClient( - resourceKey, LiveCloudKeys.find(LiveCloudKeys.LICENCE_KEY_NAMES)); + // One lookup serves both, so the key the form body sends and the + // one hasLicenceKey() answers for can never disagree. + licenceKey = LiveCloudKeys.find(LiveCloudKeys.LICENCE_KEY_NAMES); + client = new DidClient(resourceKey, licenceKey); } @Test