fix: trim registry repository slugs
This commit is contained in:
@@ -191,6 +191,18 @@ tap.test('should expose generated service registry targets', async () => {
|
||||
expect(refreshedService.data.registryTarget?.imageUrl).toEqual(registryTarget.imageUrl);
|
||||
});
|
||||
|
||||
tap.test('should trim truncated registry repository suffixes', async () => {
|
||||
const registryTarget = testCloudly.registryManager.getServiceRegistryTarget({
|
||||
id: 'service-5gv-123456',
|
||||
data: {
|
||||
name: 'Registry Target Test Service',
|
||||
},
|
||||
} as any);
|
||||
|
||||
expect(registryTarget.repository).toEqual('workloads/registry-target-test-service-service-5gv');
|
||||
expect(registryTarget.repository.split('/').every((partArg) => /^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(partArg))).toBeTrue();
|
||||
});
|
||||
|
||||
tap.test('should push service config updates to connected coreflows', async (toolsArg) => {
|
||||
const cluster = await testClient.cluster.createCluster('Registry Config Push Test Cluster');
|
||||
const persistedCluster = await testCloudly.clusterManager.getConfigBy_ConfigID(cluster.id);
|
||||
|
||||
Reference in New Issue
Block a user