From 9dcb4fb603569ab421f9a82ebd92276c95df536d Mon Sep 17 00:00:00 2001 From: Ruben Verborgh Date: Tue, 22 Dec 2020 00:32:38 +0100 Subject: [PATCH] test: Make integration test names consistent. --- test/integration/Config.ts | 2 +- .../{FullConfig.acl.test.ts => LdpHandlerWithAuth.test.ts} | 4 ++-- ...ullConfig.noAuth.test.ts => LdpHandlerWithoutAuth.test.ts} | 4 ++-- ...ticatedLdpHandler.test.ts => LpdHandlerOperations.test.ts} | 2 +- test/integration/Middleware.test.ts | 2 +- test/integration/PodCreation.test.ts | 2 +- .../{Authorization.test.ts => ServerWithAuth.test.ts} | 4 ++-- test/integration/SparqlStorage.test.ts | 4 ++-- test/integration/WebSocketsProtocol.test.ts | 2 +- .../{auth-ldp-handler.json => config/ldp-with-auth.json} | 0 .../{middleware.json => config/server-middleware.json} | 0 .../{auth-allow-all.json => config/server-without-auth.json} | 0 12 files changed, 13 insertions(+), 13 deletions(-) rename test/integration/{FullConfig.acl.test.ts => LdpHandlerWithAuth.test.ts} (98%) rename test/integration/{FullConfig.noAuth.test.ts => LdpHandlerWithoutAuth.test.ts} (99%) rename test/integration/{AuthenticatedLdpHandler.test.ts => LpdHandlerOperations.test.ts} (98%) rename test/integration/{Authorization.test.ts => ServerWithAuth.test.ts} (97%) rename test/integration/{auth-ldp-handler.json => config/ldp-with-auth.json} (100%) rename test/integration/{middleware.json => config/server-middleware.json} (100%) rename test/integration/{auth-allow-all.json => config/server-without-auth.json} (100%) diff --git a/test/integration/Config.ts b/test/integration/Config.ts index a5521bfaa..14e036169 100644 --- a/test/integration/Config.ts +++ b/test/integration/Config.ts @@ -17,7 +17,7 @@ export const instantiateFromConfig = async(componentUrl: string, configFile: str await loader.registerAvailableModuleResources(); // Instantiate the component from the config - const configPath = Path.join(__dirname, configFile); + const configPath = Path.join(__dirname, 'config', configFile); return loader.instantiateFromUrl(componentUrl, configPath, undefined, { variables }); }; diff --git a/test/integration/FullConfig.acl.test.ts b/test/integration/LdpHandlerWithAuth.test.ts similarity index 98% rename from test/integration/FullConfig.acl.test.ts rename to test/integration/LdpHandlerWithAuth.test.ts index fd95d7565..1ed60b285 100644 --- a/test/integration/FullConfig.acl.test.ts +++ b/test/integration/LdpHandlerWithAuth.test.ts @@ -35,7 +35,7 @@ describe.each(stores)('An LDP handler with auth using %s', (name, { storeUrn, se }; const internalStore = await instantiateFromConfig( storeUrn, - 'auth-ldp-handler.json', + 'ldp-with-auth.json', variables, ) as ResourceStore; variables['urn:solid-server:default:variable:store'] = internalStore; @@ -45,7 +45,7 @@ describe.each(stores)('An LDP handler with auth using %s', (name, { storeUrn, se let store: ResourceStore; const instances = await instantiateFromConfig( 'urn:solid-server:test:Instances', - 'auth-ldp-handler.json', + 'ldp-with-auth.json', variables, ) as Record; ({ handler, store, initializer } = instances); diff --git a/test/integration/FullConfig.noAuth.test.ts b/test/integration/LdpHandlerWithoutAuth.test.ts similarity index 99% rename from test/integration/FullConfig.noAuth.test.ts rename to test/integration/LdpHandlerWithoutAuth.test.ts index b3b6297d2..ec533924e 100644 --- a/test/integration/FullConfig.noAuth.test.ts +++ b/test/integration/LdpHandlerWithoutAuth.test.ts @@ -30,7 +30,7 @@ describe.each(stores)('An LDP handler without auth using %s', (name, { storeUrn, }; const internalStore = await instantiateFromConfig( storeUrn, - 'auth-ldp-handler.json', + 'ldp-with-auth.json', variables, ) as ResourceStore; variables['urn:solid-server:default:variable:store'] = internalStore; @@ -39,7 +39,7 @@ describe.each(stores)('An LDP handler without auth using %s', (name, { storeUrn, let initializer: Initializer; const instances = await instantiateFromConfig( 'urn:solid-server:test:Instances', - 'auth-ldp-handler.json', + 'ldp-with-auth.json', variables, ) as Record; ({ handler, initializer } = instances); diff --git a/test/integration/AuthenticatedLdpHandler.test.ts b/test/integration/LpdHandlerOperations.test.ts similarity index 98% rename from test/integration/AuthenticatedLdpHandler.test.ts rename to test/integration/LpdHandlerOperations.test.ts index 4056c1bf0..b3552c1e2 100644 --- a/test/integration/AuthenticatedLdpHandler.test.ts +++ b/test/integration/LpdHandlerOperations.test.ts @@ -13,7 +13,7 @@ describe('An integrated AuthenticatedLdpHandler', (): void => { beforeAll(async(): Promise => { handler = await instantiateFromConfig( - 'urn:solid-server:default:LdpHandler', 'auth-allow-all.json', { + 'urn:solid-server:default:LdpHandler', 'server-without-auth.json', { 'urn:solid-server:default:variable:baseUrl': BASE, }, ) as HttpHandler; diff --git a/test/integration/Middleware.test.ts b/test/integration/Middleware.test.ts index 2732861b0..660040a0a 100644 --- a/test/integration/Middleware.test.ts +++ b/test/integration/Middleware.test.ts @@ -21,7 +21,7 @@ describe('An Express server with middleware', (): void => { beforeAll(async(): Promise => { const factory = await instantiateFromConfig( - 'urn:solid-server:default:ExpressHttpServerFactory', 'middleware.json', { + 'urn:solid-server:default:ExpressHttpServerFactory', 'server-middleware.json', { 'urn:solid-server:default:PodManagerHandler': new StaticAsyncHandler(false, null), 'urn:solid-server:default:LdpHandler': new SimpleHttpHandler(), 'urn:solid-server:default:variable:port': port, diff --git a/test/integration/PodCreation.test.ts b/test/integration/PodCreation.test.ts index 84cd8407e..68951044f 100644 --- a/test/integration/PodCreation.test.ts +++ b/test/integration/PodCreation.test.ts @@ -14,7 +14,7 @@ describe('A server with a pod handler', (): void => { beforeAll(async(): Promise => { const factory = await instantiateFromConfig( - 'urn:solid-server:default:ServerFactory', 'auth-allow-all.json', { + 'urn:solid-server:default:ServerFactory', 'server-without-auth.json', { 'urn:solid-server:default:variable:port': port, 'urn:solid-server:default:variable:baseUrl': baseUrl, 'urn:solid-server:default:variable:podTemplateFolder': join(__dirname, '../assets/templates'), diff --git a/test/integration/Authorization.test.ts b/test/integration/ServerWithAuth.test.ts similarity index 97% rename from test/integration/Authorization.test.ts rename to test/integration/ServerWithAuth.test.ts index 6be5a7584..21a48f8c5 100644 --- a/test/integration/Authorization.test.ts +++ b/test/integration/ServerWithAuth.test.ts @@ -15,7 +15,7 @@ describe('A server with authorization', (): void => { }; const internalStore = await instantiateFromConfig( 'urn:solid-server:default:MemoryResourceStore', - 'auth-ldp-handler.json', + 'ldp-with-auth.json', variables, ) as ResourceStore; variables['urn:solid-server:default:variable:store'] = internalStore; @@ -25,7 +25,7 @@ describe('A server with authorization', (): void => { let store: ResourceStore; const instances = await instantiateFromConfig( 'urn:solid-server:test:Instances', - 'auth-ldp-handler.json', + 'ldp-with-auth.json', variables, ) as Record; ({ handler, store, initializer } = instances); diff --git a/test/integration/SparqlStorage.test.ts b/test/integration/SparqlStorage.test.ts index 5f84daa89..431efacaa 100644 --- a/test/integration/SparqlStorage.test.ts +++ b/test/integration/SparqlStorage.test.ts @@ -14,7 +14,7 @@ describeIf('docker', 'A server with a SPARQL endpoint as storage', (): void => { }; const internalStore = await instantiateFromConfig( 'urn:solid-server:default:SparqlResourceStore', - 'auth-ldp-handler.json', + 'ldp-with-auth.json', variables, ) as ResourceStore; variables['urn:solid-server:default:variable:store'] = internalStore; @@ -23,7 +23,7 @@ describeIf('docker', 'A server with a SPARQL endpoint as storage', (): void => { let initializer: Initializer; const instances = await instantiateFromConfig( 'urn:solid-server:test:Instances', - 'auth-ldp-handler.json', + 'ldp-with-auth.json', variables, ) as Record; ({ handler, initializer } = instances); diff --git a/test/integration/WebSocketsProtocol.test.ts b/test/integration/WebSocketsProtocol.test.ts index cabee57f4..f8a7e3866 100644 --- a/test/integration/WebSocketsProtocol.test.ts +++ b/test/integration/WebSocketsProtocol.test.ts @@ -13,7 +13,7 @@ describe('A server with the Solid WebSockets API behind a proxy', (): void => { beforeAll(async(): Promise => { const factory = await instantiateFromConfig( - 'urn:solid-server:default:ServerFactory', 'auth-allow-all.json', { + 'urn:solid-server:default:ServerFactory', 'server-without-auth.json', { 'urn:solid-server:default:variable:port': port, 'urn:solid-server:default:variable:baseUrl': 'https://example.pod/', 'urn:solid-server:default:variable:podTemplateFolder': 'templates', diff --git a/test/integration/auth-ldp-handler.json b/test/integration/config/ldp-with-auth.json similarity index 100% rename from test/integration/auth-ldp-handler.json rename to test/integration/config/ldp-with-auth.json diff --git a/test/integration/middleware.json b/test/integration/config/server-middleware.json similarity index 100% rename from test/integration/middleware.json rename to test/integration/config/server-middleware.json diff --git a/test/integration/auth-allow-all.json b/test/integration/config/server-without-auth.json similarity index 100% rename from test/integration/auth-allow-all.json rename to test/integration/config/server-without-auth.json