Skip to content

Commit 2c00efb

Browse files
committed
fix conflicts
1 parent 8baf0d7 commit 2c00efb

122 files changed

Lines changed: 13548 additions & 3716 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

openmetadata-integration-tests/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<parent>
44
<artifactId>platform</artifactId>
55
<groupId>org.open-metadata</groupId>
6-
<version>1.13.0</version>
6+
<version>1.12.0-SNAPSHOT</version>
77
</parent>
88
<modelVersion>4.0.0</modelVersion>
99
<artifactId>openmetadata-integration-tests</artifactId>

openmetadata-integration-tests/src/test/java/org/openmetadata/it/bootstrap/TestSuiteBootstrap.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,6 @@ private void startFuseki() {
348348
.withExposedPorts(FUSEKI_PORT)
349349
.withEnv("ADMIN_PASSWORD", FUSEKI_ADMIN_PASSWORD)
350350
.withEnv("FUSEKI_DATASET_1", FUSEKI_DATASET)
351-
.withTmpFs(java.util.Map.of("/fuseki/databases", "rw,size=256m,uid=100,gid=101"))
352351
.waitingFor(
353352
Wait.forHttp("/$/ping")
354353
.forPort(FUSEKI_PORT)
@@ -925,6 +924,13 @@ public static Jdbi getJdbi() {
925924
return jdbi;
926925
}
927926

927+
/**
928+
* Returns true if Fuseki was started for this test session.
929+
*/
930+
public static boolean isFusekiEnabled() {
931+
return fusekiEndpoint != null;
932+
}
933+
928934
/**
929935
* Returns the Fuseki SPARQL endpoint URL for RDF operations.
930936
*/
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
package org.openmetadata.it.factories;
2+
3+
import java.util.List;
4+
import org.openmetadata.it.util.TestNamespace;
5+
import org.openmetadata.schema.entity.data.Glossary;
6+
import org.openmetadata.schema.entity.data.GlossaryTerm;
7+
import org.openmetadata.sdk.fluent.GlossaryTerms;
8+
9+
/**
10+
* Factory for creating GlossaryTerm entities in integration tests using fluent API.
11+
*
12+
* <p>Uses the static fluent API from {@link GlossaryTerms}. Ensure {@code
13+
* GlossaryTerms.setDefaultClient(client)} is called before using these methods (handled by
14+
* SdkClients.initializeFluentAPIs).
15+
*/
16+
public class GlossaryTermTestFactory {
17+
18+
/**
19+
* Create a glossary term with default settings using fluent API.
20+
*/
21+
public static GlossaryTerm createSimple(TestNamespace ns, Glossary glossary) {
22+
return GlossaryTerms.create()
23+
.name(ns.prefix("term"))
24+
.in(glossary.getFullyQualifiedName())
25+
.withDescription("Test term")
26+
.execute();
27+
}
28+
29+
/**
30+
* Create glossary term with custom name using fluent API.
31+
*/
32+
public static GlossaryTerm createWithName(TestNamespace ns, Glossary glossary, String baseName) {
33+
return GlossaryTerms.create()
34+
.name(ns.prefix(baseName))
35+
.in(glossary.getFullyQualifiedName())
36+
.withDescription("Test term: " + baseName)
37+
.execute();
38+
}
39+
40+
/**
41+
* Create glossary term with description using fluent API.
42+
*/
43+
public static GlossaryTerm createWithDescription(
44+
TestNamespace ns, Glossary glossary, String description) {
45+
return GlossaryTerms.create()
46+
.name(ns.prefix("term"))
47+
.in(glossary.getFullyQualifiedName())
48+
.withDescription(description)
49+
.execute();
50+
}
51+
52+
/**
53+
* Create glossary term under a parent term using fluent API.
54+
*/
55+
public static GlossaryTerm createChild(
56+
TestNamespace ns, Glossary glossary, GlossaryTerm parent, String baseName) {
57+
return GlossaryTerms.create()
58+
.name(ns.prefix(baseName))
59+
.in(glossary.getFullyQualifiedName())
60+
.under(parent.getFullyQualifiedName())
61+
.withDescription("Child term of " + parent.getName())
62+
.execute();
63+
}
64+
65+
/**
66+
* Create glossary term with synonyms using fluent API.
67+
*/
68+
public static GlossaryTerm createWithSynonyms(
69+
TestNamespace ns, Glossary glossary, String baseName, List<String> synonyms) {
70+
return GlossaryTerms.create()
71+
.name(ns.prefix(baseName))
72+
.in(glossary.getFullyQualifiedName())
73+
.withDescription("Term with synonyms")
74+
.withSynonyms(synonyms)
75+
.execute();
76+
}
77+
78+
/**
79+
* Create glossary term with related terms using fluent API.
80+
*
81+
* @param relatedTermFqns List of fully qualified names of related terms
82+
*/
83+
public static GlossaryTerm createWithRelatedTerms(
84+
TestNamespace ns, Glossary glossary, String baseName, List<String> relatedTermFqns) {
85+
return GlossaryTerms.create()
86+
.name(ns.prefix(baseName))
87+
.in(glossary.getFullyQualifiedName())
88+
.withDescription("Term with related terms")
89+
.withRelatedTerms(relatedTermFqns)
90+
.execute();
91+
}
92+
93+
/**
94+
* Create glossary term with display name using fluent API.
95+
*/
96+
public static GlossaryTerm createWithDisplayName(
97+
TestNamespace ns, Glossary glossary, String baseName, String displayName) {
98+
return GlossaryTerms.create()
99+
.name(ns.prefix(baseName))
100+
.in(glossary.getFullyQualifiedName())
101+
.withDisplayName(displayName)
102+
.withDescription("Term with display name")
103+
.execute();
104+
}
105+
106+
/**
107+
* Delete a glossary term by ID (hard delete with recursive).
108+
*/
109+
public static void delete(GlossaryTerm term) {
110+
GlossaryTerms.find(term.getId()).delete().recursively().permanently().confirm();
111+
}
112+
}
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
package org.openmetadata.it.factories;
2+
3+
import org.openmetadata.it.util.TestNamespace;
4+
import org.openmetadata.schema.entity.data.Glossary;
5+
import org.openmetadata.sdk.fluent.Glossaries;
6+
7+
/**
8+
* Factory for creating Glossary entities in integration tests using fluent API.
9+
*
10+
* <p>Uses the static fluent API from {@link Glossaries}. Ensure {@code
11+
* Glossaries.setDefaultClient(client)} is called before using these methods (handled by
12+
* SdkClients.initializeFluentAPIs).
13+
*/
14+
public class GlossaryTestFactory {
15+
16+
/**
17+
* Create a glossary with default settings using fluent API.
18+
*/
19+
public static Glossary createSimple(TestNamespace ns) {
20+
return Glossaries.create()
21+
.name(ns.prefix("glossary"))
22+
.withDescription("Test glossary")
23+
.execute();
24+
}
25+
26+
/**
27+
* Create glossary with custom name using fluent API.
28+
*/
29+
public static Glossary createWithName(TestNamespace ns, String baseName) {
30+
return Glossaries.create()
31+
.name(ns.prefix(baseName))
32+
.withDescription("Test glossary: " + baseName)
33+
.execute();
34+
}
35+
36+
/**
37+
* Create glossary with description using fluent API.
38+
*/
39+
public static Glossary createWithDescription(TestNamespace ns, String description) {
40+
return Glossaries.create().name(ns.prefix("glossary")).withDescription(description).execute();
41+
}
42+
43+
/**
44+
* Create glossary with display name using fluent API.
45+
*/
46+
public static Glossary createWithDisplayName(
47+
TestNamespace ns, String baseName, String displayName) {
48+
return Glossaries.create()
49+
.name(ns.prefix(baseName))
50+
.withDisplayName(displayName)
51+
.withDescription("Test glossary with display name")
52+
.execute();
53+
}
54+
55+
/**
56+
* Delete a glossary by ID (hard delete with recursive).
57+
*/
58+
public static void delete(Glossary glossary) {
59+
Glossaries.find(glossary.getId()).delete().recursively().permanently().confirm();
60+
}
61+
}

0 commit comments

Comments
 (0)