-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #93 from jimmarino/feat/align-message-types
feat: Update TCK to more closely align with the DSP specification and add testcases
- Loading branch information
Showing
40 changed files
with
1,116 additions
and
324 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,13 @@ | ||
# Compliance Verfication Framework | ||
# Compliance Verification Framework | ||
To build: | ||
|
||
```bash | ||
./gradlew clean build | ||
``` | ||
|
||
To execute: | ||
|
||
```bash | ||
java -jar runtimes/dsp-tck/build/libs/dsp-tck-runtime.jar -config config/tck/sample.tck.properties | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* | ||
* Copyright (c) 2023 Metaform Systems, Inc. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Apache License, Version 2.0 which is available at | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* Contributors: | ||
* Metaform Systems, Inc. - initial API and implementation | ||
* | ||
* | ||
*/ | ||
|
||
|
34 changes: 34 additions & 0 deletions
34
boot/src/main/java/org/eclipse/dataspacetck/core/spi/boot/Monitor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
* Copyright (c) 2024 Metaform Systems, Inc. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Apache License, Version 2.0 which is available at | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* Contributors: | ||
* Metaform Systems, Inc. - initial API and implementation | ||
* | ||
*/ | ||
package org.eclipse.dataspacetck.core.spi.boot; | ||
|
||
/** | ||
* Sends formatted messages to the system output. | ||
*/ | ||
public interface Monitor { | ||
|
||
Monitor enableSuccess(); | ||
|
||
Monitor enableError(); | ||
|
||
Monitor enableBold(); | ||
|
||
Monitor resetMode(); | ||
|
||
Monitor newLine(); | ||
|
||
Monitor message(String message); | ||
|
||
Monitor debug(String message); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Contains sample configuration options | ||
dataspacetck.dsp.local.connector=false | ||
dataspacetck.debug=true | ||
dataspacetck.dsp.connector.http.url=http://localhost:8282/api/v1/dsp/ | ||
|
||
# Sets the dataset and offer ids to use for contract negotiation scenarios | ||
CN_01_01_DATASETID=ACN0101 | ||
CN_01_01_OFFERID=CD123:ACN0101:456 | ||
CN_01_02_DATASETID=ACN0102 | ||
CN_01_02_OFFERID=CD123:ACN0102:456 | ||
CN_01_03_DATASETID=ACN0103 | ||
CN_01_03_OFFERID=CD123:ACN0103:456 | ||
CN_01_04_DATASETID=ACN0104 | ||
CN_01_04_OFFERID=CD123:ACN0104:456 | ||
|
||
CN_02_01_DATASETID=ACN0201 | ||
CN_02_01_OFFERID=CD123:ACN0201:456 | ||
CN_02_02_DATASETID=ACN0202 | ||
CN_02_02_OFFERID=CD123:ACN0202:456 | ||
CN_02_03_DATASETID=ACN0203 | ||
CN_02_03_OFFERID=CD123:ACN0203:456 | ||
CN_02_04_DATASETID=ACN0204 | ||
CN_02_04_OFFERID=CD123:ACN0204:456 | ||
CN_02_05_DATASETID=ACN0205 | ||
CN_02_05_OFFERID=CD123:ACN0205:456 | ||
CN_02_06_DATASETID=ACN0206 | ||
CN_02_06_OFFERID=CD123:ACN0206:456 | ||
CN_02_07_DATASETID=ACN0207 | ||
CN_02_07_OFFERID=CD123:ACN0207:456 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,5 +12,7 @@ | |
* | ||
* | ||
*/ | ||
|
||
dependencies { | ||
api(project(":boot")) | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
core/src/main/java/org/eclipse/dataspacetck/core/system/ConfigFunctions.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* | ||
* Copyright (c) 2024 Metaform Systems, Inc. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Apache License, Version 2.0 which is available at | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* Contributors: | ||
* Metaform Systems, Inc. - initial API and implementation | ||
* | ||
*/ | ||
|
||
package org.eclipse.dataspacetck.core.system; | ||
|
||
/** | ||
* Configuration manipulation functions. | ||
*/ | ||
public class ConfigFunctions { | ||
|
||
/** | ||
* Returns a configuration value by checking system properties and then env variables. Keys are converted to uppercase and | ||
* "." is replaced by "_" when checking for env variables. | ||
*/ | ||
public static String propertyOrEnv(String key, String defaultValue) { | ||
var value = System.getProperty(key); | ||
if (exists(value)) { | ||
return value; | ||
} | ||
var upperKey = key.toUpperCase().replace('.', '_'); | ||
value = System.getenv(upperKey); | ||
if (exists(value)) { | ||
return value; | ||
} | ||
return defaultValue; | ||
} | ||
|
||
private static boolean exists(String value) { | ||
return value != null && !value.trim().isEmpty(); | ||
} | ||
|
||
private ConfigFunctions() { | ||
} | ||
} |
Oops, something went wrong.