Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration-Test-Suite for aasenvironment-component #137

Merged
merged 31 commits into from
Nov 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
b1f4072
Updates SpecificAssetIDValueValueOnlySerialization
ahoimariew Aug 17, 2023
aab3d23
Implements EntityValueValueOnlyDecorator
jannisjung Aug 18, 2023
684ae43
Fixes SpecificAssetIdValueValueOnlySerialization
jannisjung Aug 18, 2023
4582539
Adds SpecificAssetIdValueValueSerialization to SubmodelRepository
jannisjung Aug 18, 2023
266bdb4
Includes externalSubjectId for serialization and deserialzation
jannisjung Aug 22, 2023
e989758
cleans up code, refactoring
ahoimariew Aug 22, 2023
c624de9
Merge branch 'eclipse-basyx:main' into main
ahoimariew Aug 30, 2023
615b288
loads environment preconfiguration from folder
ahoimariew Sep 11, 2023
c63cf1c
Implements loadEnvironmentFromFolder Test
jannisjung Sep 12, 2023
bf199b6
Refactors Test and AasEnvironmentPreconfigurationLoader
jannisjung Sep 13, 2023
2d7876d
Refactors Test
jannisjung Sep 13, 2023
e78a751
Reworks AasEnvironmentPreconfigurationLoader
jannisjung Sep 15, 2023
f32e986
Fully migrates to test "TestPreconfiguration"
jannisjung Sep 17, 2023
b06b241
Adds slf4j to aasenvironment-http pom
jannisjung Sep 18, 2023
2a7c677
Improves null value handling
jannisjung Sep 18, 2023
48fac55
Removes unnecessary/disruptive pom entries
jannisjung Sep 18, 2023
08504d2
Reworks AasEnvironmentPreconfigurationLoader
jannisjung Sep 19, 2023
9a27b2b
Resolves Review Remarks
jannisjung Sep 20, 2023
7f1e447
Merge branch 'eclipse-basyx:main' into main
ahoimariew Oct 6, 2023
ba1da0e
tries to execute IT in aasenvironment
ahoimariew Oct 18, 2023
fd04061
approaches integration test for aasenvironment
ahoimariew Oct 18, 2023
5fd7bec
tries to integrate the submodelreporsitoryIT
ahoimariew Nov 13, 2023
2b08354
Renames DummyConfigs with individual Names
jannisjung Nov 13, 2023
304da21
Renemes Dummy Configs with individual Names
jannisjung Nov 13, 2023
6107046
Adds dependency and annotation
jannisjung Nov 13, 2023
0c702b2
finalize the IT-Integration
ahoimariew Nov 13, 2023
481cd1f
Merges branch 'main' of https://github.com/eclipse-basyx/basyx-java-s…
jannisjung Nov 14, 2023
988e8ed
Resolves Merge conflict
jannisjung Nov 14, 2023
b0a11e0
Readds and renames DummyConfig for DiscoveryService
jannisjung Nov 14, 2023
4ff6dd5
Integrates missing png in aasenv src/test/res
ahoimariew Nov 17, 2023
1948b92
applies the review-remarks
ahoimariew Nov 17, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
*
*/
@Configuration
public class DummyConfig {
public class DummyDiscoveryServiceConfig {

private final String COLLECTION = "discoveryServiceHTTPTestCollection";

Expand Down
33 changes: 31 additions & 2 deletions basyx.aasenvironment/basyx.aasenvironment.component/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,42 @@
</properties>

<dependencies>

<dependency>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This dependency can be removed as it is unnecessary.

<groupId>org.eclipse.digitaltwin.basyx</groupId>
<artifactId>basyx.aasrepository.component</artifactId>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.digitaltwin.basyx</groupId>
<artifactId>basyx.aasrepository-tck</artifactId>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.digitaltwin.basyx</groupId>
<artifactId>basyx.submodelrepository.component</artifactId>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.digitaltwin.basyx</groupId>
<artifactId>basyx.submodelrepository-tck</artifactId>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.digitaltwin.basyx</groupId>
<artifactId>basyx.conceptdescriptionrepository-tck</artifactId>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.digitaltwin.basyx</groupId>
<artifactId>basyx.conceptdescriptionrepository.component</artifactId>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.digitaltwin.basyx</groupId>
Expand All @@ -40,12 +65,12 @@
<groupId>org.eclipse.digitaltwin.basyx</groupId>
<artifactId>basyx.http</artifactId>
</dependency>
<dependency>
<dependency>
<groupId>org.eclipse.digitaltwin.basyx</groupId>
<artifactId>basyx.submodelservice-core</artifactId>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
</dependency>
<dependency>
<groupId>org.eclipse.digitaltwin.basyx</groupId>
<artifactId>basyx.http</artifactId>
Expand Down Expand Up @@ -158,6 +183,10 @@
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*******************************************************************************
* Copyright (C) 2023 the Eclipse BaSyx Authors
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* SPDX-License-Identifier: MIT
******************************************************************************/

package org.eclipse.digitaltwin.basyx.aasenvironment.component;

import org.eclipse.digitaltwin.basyx.aasrepository.component.AASRepositoryIT;
import org.eclipse.digitaltwin.basyx.conceptdescriptionrepository.component.ConceptDescriptionRepositoryIT;
import org.eclipse.digitaltwin.basyx.submodelrepository.component.SubmodelRepositoryIT;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;

/**
* Integration test using the Integration tests from AASRepository,
* SubmodelRepository and ConceptDescriptionRepository over the test suite
*
* @author witt
*
*/

@RunWith(Suite.class)
@Suite.SuiteClasses({ AASRepositoryIT.class, SubmodelRepositoryIT.class, ConceptDescriptionRepositoryIT.class, })
public class AASEnvironmentIT {

}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* SPDX-License-Identifier: MIT
******************************************************************************/

package basyx.aasenvironment.component;
package org.eclipse.digitaltwin.basyx.aasenvironment.component;

import static org.junit.Assert.assertNotNull;

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
*
*/
@Configuration
public class DummyConfig {
public class DummyAasRepositoryConfig {

@Bean
@ConditionalOnMissingBean
Expand Down
5 changes: 0 additions & 5 deletions basyx.aasrepository/basyx.aasrepository-tck/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,24 @@
<dependency>
<groupId>org.eclipse.digitaltwin.basyx</groupId>
<artifactId>basyx.aasrepository-http</artifactId>
<scope>test</scope>
<classifier>tests</classifier>
</dependency>
<dependency>
<groupId>org.eclipse.digitaltwin.basyx</groupId>
<artifactId>basyx.http</artifactId>
<scope>test</scope>
<classifier>tests</classifier>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents.client5</groupId>
<artifactId>httpclient5</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import org.eclipse.digitaltwin.basyx.aasservice.AasServiceFactory;
import org.eclipse.digitaltwin.basyx.aasservice.feature.AasServiceFeature;
import org.eclipse.digitaltwin.basyx.aasservice.feature.DecoratedAasServiceFactory;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
Expand All @@ -49,6 +50,7 @@
@Configuration
public class AasRepositoryConfiguration {
@Bean
@ConditionalOnMissingBean
public static AasRepository getAasRepository(AasRepositoryFactory aasRepositoryFactory, List<AasRepositoryFeature> features) {
return new DecoratedAasRepositoryFactory(aasRepositoryFactory, features).create();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@
*
*/
public class AASRepositoryIT extends AasRepositoryTestDefinedURL {

}
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@
*
*/
@Configuration
public class DummyConfig {
public class DummyConceptDescriptionRepositoryConfig {

@Bean
@ConditionalOnMissingBean
public ConceptDescriptionRepository createConceptDescriptionRepository() {
return new InMemoryConceptDescriptionRepository();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,35 +11,29 @@
<dependency>
<groupId>org.eclipse.digitaltwin.basyx</groupId>
<artifactId>basyx.conceptdescriptionrepository-http</artifactId>
<scope>test</scope>
<classifier>tests</classifier>
</dependency>
<dependency>
<groupId>org.eclipse.digitaltwin.basyx</groupId>
<artifactId>basyx.conceptdescriptionrepository-core</artifactId>
<scope>test</scope>
<classifier>tests</classifier>
</dependency>
<dependency>
<groupId>org.eclipse.digitaltwin.basyx</groupId>
<artifactId>basyx.http</artifactId>
<scope>test</scope>
<classifier>tests</classifier>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents.client5</groupId>
<artifactId>httpclient5</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,14 @@
import org.eclipse.digitaltwin.basyx.conceptdescriptionrepository.ConceptDescriptionRepositoryFactory;
import org.eclipse.digitaltwin.basyx.conceptdescriptionrepository.feature.ConceptDescriptionRepositoryFeature;
import org.eclipse.digitaltwin.basyx.conceptdescriptionrepository.feature.DecoratedConceptDescriptionRepositoryFactory;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
* Provides the spring bean configuration for the {@link ConceptDescriptionRepository}
* utilizing all found features for the respective services
* Provides the spring bean configuration for the
* {@link ConceptDescriptionRepository} utilizing all found features for the
* respective services
*
* @author danish
*
Expand All @@ -45,8 +47,9 @@
public class ConceptDescriptionRepositoryConfiguration {

@Bean
@ConditionalOnMissingBean
public static ConceptDescriptionRepository getConceptDescriptionRepository(ConceptDescriptionRepositoryFactory aasRepositoryFactory, List<ConceptDescriptionRepositoryFeature> features) {
return new DecoratedConceptDescriptionRepositoryFactory(aasRepositoryFactory, features).create();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@
*
*/
@Configuration
public class DummyConfig {
public class DummySubmodelRepositoryConfig {

@Bean
@ConditionalOnMissingBean
public SubmodelRepository createSubmodelRepository() {
return new InMemorySubmodelRepository(new InMemorySubmodelServiceFactory());
}
}
}
7 changes: 0 additions & 7 deletions basyx.submodelrepository/basyx.submodelrepository-tck/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,39 +12,32 @@
<groupId>org.eclipse.digitaltwin.basyx</groupId>
<artifactId>basyx.submodelservice-http</artifactId>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.digitaltwin.basyx</groupId>
<artifactId>basyx.submodelrepository-http</artifactId>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.digitaltwin.basyx</groupId>
<artifactId>basyx.http</artifactId>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents.client5</groupId>
<artifactId>httpclient5</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.digitaltwin.basyx</groupId>
<artifactId>basyx.submodelservice-http</artifactId>
<scope>test</scope>
<classifier>tests</classifier>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import org.eclipse.digitaltwin.basyx.submodelservice.SubmodelServiceFactory;
import org.eclipse.digitaltwin.basyx.submodelservice.feature.DecoratedSubmodelServiceFactory;
import org.eclipse.digitaltwin.basyx.submodelservice.feature.SubmodelServiceFeature;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
Expand All @@ -50,15 +51,14 @@
@Configuration
public class SubmodelRepositoryConfiguration {
@Bean
public SubmodelRepository getSubmodelRepository(SubmodelRepositoryFactory aasRepositoryFactory,
List<SubmodelRepositoryFeature> features) {
@ConditionalOnMissingBean
public SubmodelRepository getSubmodelRepository(SubmodelRepositoryFactory aasRepositoryFactory, List<SubmodelRepositoryFeature> features) {
return new DecoratedSubmodelRepositoryFactory(aasRepositoryFactory, features).create();
}

@Primary
@Bean
public SubmodelServiceFactory getSubmodelServiceFactory(SubmodelServiceFactory aasServiceFactory,
List<SubmodelServiceFeature> features) {
public SubmodelServiceFactory getSubmodelServiceFactory(SubmodelServiceFactory aasServiceFactory, List<SubmodelServiceFeature> features) {
return new DecoratedSubmodelServiceFactory(aasServiceFactory, features);
}
}